Method and device for clearing configuration command in communication equipment
Abstract
Embodiments of the present invention provide a method and an apparatus for clearing a configuration command in a communication equipment. The method mainly includes: acquiring hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determining the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and constructing a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements; obtaining a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, comparing the initial status and the target status of the configuration command tree, determining, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clearing, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared. According to the embodiments of the present invention, the configuration command in the communication equipment may be cleared effectively and rapidly.

Term
Projected expiry 17 February 2032.
- Priority and filed
- Published
- Today
- Projected expiry
10 claims: 2 independent, 8 dependent
- 1A method for clearing a configuration command in a communication equipment, comprising:acquiring hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determining the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and constructing a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements, wherein each node in the configuration command tree represents one configuration command;obtaining a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, comparing the initial status and the target status of the configuration command tree, and determining, according to a comparison result, a node that needs to be cleared from the configuration command tree;and clearing, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.
- 7An apparatus for clearing a configuration command in a communication equipment, comprising:a configuration command tree constructing module, configured to acquire hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determine the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and construct a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements, wherein each node in the configuration command tree represents one configuration command;and a configuration command clearing processing module, configured to obtain a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, compare the initial status and the target status of the configuration command tree, determine, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clear, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.
Independent claims3
43 paragraphs in 5 sections, as filed
FIELD OF THE INVENTION
0001The present invention relates to the field of electronic technologies, and in particular, to a method and an apparatus for clearing a configuration command in a communication equipment.
BACKGROUND OF THE INVENTION
0002When there are many configuration commands in a communication equipment, the configuration commands need to be cleared.
0003A method for clearing a configuration command in the prior art includes: when configuration commands in a communication equipment reach a certain number, restarting the communication equipment, so as to clear all the configuration commands in the communication equipment
0004The foregoing method for clearing a configuration command in the prior art has the following shortcomings: The communication equipment needs to be restarted, and the configuration commands in the communication equipment cannot be cleared partially, but can only be cleared completely.
SUMMARY OF THE INVENTION
0005Embodiments of the present invention provide a method and an apparatus for clearing a configuration command in a communication equipment, so as to clear the configuration command in the communication equipment effectively.
0006A method for clearing a configuration command in a communication equipment includes: <ul id="ul0001" list-style="none" compact="compact"><li>acquiring hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determining the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and constructing a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements, where each node in the configuration command tree represents one configuration command; and</li><li>obtaining a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, comparing the initial status and the target status of the configuration command tree, determining, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clearing, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.</li></ul>
0007An apparatus for clearing a configuration command in a communication equipment includes: <ul id="ul0002" list-style="none" compact="compact"><li>a configuration command tree constructing module, configured to acquire hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determine the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and construct a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements, where each node in the configuration command tree represents one configuration command; and</li><li>a configuration command clearing processing module, configured to obtain a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, compare the initial status and the target status of the configuration command tree, determine, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clear, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.</li></ul>
0008It can be seen from the technical solutions provided by the foregoing embodiments of the present invention that, in the embodiments of the present invention, the configuration command in the communication equipment may be cleared effectively and rapidly by constructing the configuration command tree and clearing, according to the default clearing rule of the communication equipment and/or the customized clearing rule, the node that needs to be cleared.
BRIEF DESCRIPTION OF THE DRAWINGS
0009<ul id="ul0003" list-style="none" compact="compact"><li><figref idref="f0001">FIG. 1</figref> is a specific processing flow chart of a method for clearing a configuration command in a communication equipment according to Embodiment 1 of the present invention;</li><li><figref idref="f0002">FIG. 2</figref> is a schematic diagram of setting a configuration command to a branch or a Leaf by using a system command according to Embodiment 1 of the present invention; and</li><li><figref idref="f0003">FIG. 3</figref> is a specific structural diagram of an apparatus for clearing a configuration command in a communication equipment according to Embodiment 2 of the present invention.</li></ul>
DETAILED DESCRIPTION OF THE EMBODIMENT
0010The following describes the embodiments of the present invention in detail with reference to the accompanying drawings.
Embodiment 1
0011This embodiment provides a method for clearing a configuration command in a communication equipment; as shown in <figref idref="f0001">FIG 1</figref>, a specific processing procedure includes the following processing steps.
0012Step 11: Acquire hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determine the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and construct a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements.
0013A command is delivered to each network element in the communication equipment, to command each network element to return configuration information of the network element, such as a hierarchy, and the information of the configuration command deployed on each network element.
0014A hierarchical relationship of each network element represents a hierarchical relationship of the configuration command deployed on each network element. According to the information returned by each network element, the hierarchy information of each network element is determined as the hierarchy information of the configuration command deployed on each network element. That is, a configuration command deployed on a network element at a first level is taken as a branch (branch node), and a configuration command deployed on a network element at a second level below the network element at the first level is taken as a Branch or Leaf (leaf node). A Branch may include a Branch below (repeated nesting is allowed), and may also include a Leaf; but a Leaf cannot include a Branch below, that is, a Leaf is a node at a lowest level.
0015A unique treeroot (root node) is set, and is a 'root' node of configuration nodes of all levels in a configuration tree by default. A configuration command tree including a unique TreeNode is constructed according to the treeroot and all branches and Leaves, where each node in the configuration command tree represents one configuration command.
0016This embodiment provides a schematic diagram of converting the configuration command deployed on each network element into the configuration command tree, as shown in <figref idref="f0002">FIG. 2</figref>. In <figref idref="f0002">FIG 2</figref>, different indent types are used to indicate a treeroot, a branch and a Leaf; if a certain node still has a node at a next level, the node is a Branch; if a certain node does not have a node at a next level, the node is a Leaf.
0017Step 12: Obtain a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, compare the initial status and the target status of the configuration command tree, and determine, according to a comparison result, a node that needs to be cleared from the configuration command tree.
0018The constructed configuration command tree is the configuration command tree in the initial status; the target status of the configuration command tree is a status of the configuration command tree after the node is cleared. The target status of the configuration command tree is obtained according to the specific configuration status that is specified by the user and the communication equipment needs to recover to, where the target status may be an empty tree status, a tree status that several branches are kept, and so on. Then, a corresponding tree shape format of the configuration command tree may be constructed manually or by using an external program according to the target status of the configuration command tree, and is stored in a specified storage space, and then read by a system.
0019The node that needs to be cleared from the configuration command tree may be determined according to the initial status and the target status of the configuration command tree. The initial status and the target status of the configuration command tree are compared, and information of nodes (branch, leaf) that need to be kept and need to be cleared in the configuration command tree is determined according to the comparison result.
0020Step 13: Clear, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.
0021The node that needs to be cleared is cleared according to the default clearing rule of the communication equipment and/or the customized clearing rule.
0022One configuration command may include multiple parameters, and for example, one configuration command may be expressed as: Cmd $1 {$2|$3 $4} [$5]; in the configuration command, a parameter $1 is mandatory; indicates that one is chosen between a parameter $2 and a parameter $3 $4; and [] indicates that a parameter $5 is optional.
0023The default clearing rule of the communication equipment is undo cmd, that is, a command line of the default clearing rule is constructed by adding undo (uninstall) before any configuration command, and the configuration command is cleared by running the command line of the default clearing rule.
0024A command line of the customized clearing rule is constructed according to information of all or part of parameters included in the configuration command and the command line of the default clearing rule, and the configuration command is cleared by running the command line of the customized clearing rule.
0025For example, the customized clearing rule includes, but is not limited to, the following several forms.
00261. For a configuration command including multiple mandatory parameters, the command line of the customized clearing rule is constructed by taking one of the parameters as a variable parameter and by the command line of the default clearing rule. For example, for a configuration command including three mandatory parameters, cmd $1 $2 $3, if a customized clearing rule is undo cmd [var=>$2] [$3], a clearing command line is constructed by taking $2 from the command as the variable parameter.
00272. Some configuration commands are in a form of enable cmd, that is, cannot be cleared with undo, and disable needs to be added for clearing this part of configuration commands, so a customized clearing rule is disable cmd.
00283. The command line of the customized clearing rule is constructed by reducing the parameters of the configuration command in order from back to front by default and by the command line of the default clearing rule. For example, for a configuration command including four mandatory parameters cmd $1 $2 $3 $4, a constructed customized clearing rule is undo cmd $1 $2 $3, undo cmd $1 $2 and undo cmd $1 in sequence. That is, undo cmd $1 $2 $3 is used first to clear the configuration command. If the clearing is unsuccessful, undo cmd $1 $2 is used to clear the configuration command. If the clearing is still unsuccessful, undo cmd $1 is used to clear the configuration command.
00294. All parameters included in the configuration command are decomposed into each independent parameter when the parameters included in the configuration command are less than a set value, for example, <=4, and the command line of the customized clearing rule is constructed according to all permutations and combinations of all independent parameters and the command line of the default clearing rule.
0030For example, for cmd $1 $2 $3, a customized clearing rule may be undo cmd $1 $2, undo cmd $1 $3, undo cmd $2 $3, undo cmd $1, undo cmd $3, undo cmd $2. The configuration command is cleared by traversing the foregoing various customized clearing rules in sequence.
0031It can be seen from the technical solution provided by the foregoing embodiment of the present invention that, in the embodiment of the present invention, the configuration command in the communication equipment may be cleared effectively and rapidly by constructing the configuration command tree and clearing, according to the default clearing rule of the communication equipment and/or the customized clearing rule, the node that needs to be cleared.
Embodiment 2
0032This embodiment provides an apparatus for clearing a configuration command in a communication equipment; as shown in <figref idref="f0003">FIG 3</figref>, a specific structure includes the following modules: <ul id="ul0004" list-style="none" compact="compact"><li>a configuration command tree constructing module 31, configured to acquire hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determine the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and construct a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements, where each node in the configuration command tree represents one configuration command; and</li><li>a configuration command clearing processing module 32, configured to obtain a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, compare the initial status and the target status of the configuration command tree, determine, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clear, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared.</li></ul>
0033Specifically, the configuration command tree constructing module 31 is further configured to deliver a command to each network element in the communication equipment, to command each network element to return the hierarchy information of the network element and the information of the configuration command deployed on each network element; and to determine, according to the information returned by each network element, the hierarchy information of each network element as the hierarchy information of the configuration command deployed on each network element, take a configuration command deployed on a network element at a first level as a branch node branch, take a configuration command deployed on a network element at a second level below the network element at the first level as a Branch or leaf node Leaf, where the Leaf is a node at a lowest level, select a unique root node treeroot, and construct the configuration command tree in the initial status according to the treeroot and all branches and Leaves.
0034Specifically, the configuration command clearing processing module 32 is further configured to construct a command line of the default clearing rule by adding undo uninstall before the configuration command, and clear the configuration command by running the command line; and to construct the command line of the customized clearing rule according to information of all or part of parameters included in the configuration command and the command line of the default clearing rule, and clear the configuration command by running the command line of the customized clearing rule.
0035Specifically, for a configuration command including multiple mandatory parameters, the command line of the customized clearing rule is constructed by taking one of the parameters as a variable parameter and by the command line of the default clearing rule; or, the command line of the customized clearing rule is constructed by reducing the parameters of the configuration command in order from back to front by default and by the command line of the default clearing rule; or, all parameters included in the configuration command are decomposed into each independent parameter when the parameters included in the configuration command are less than a set value, and the command line of the customized clearing rule is constructed according to all permutations and combinations of all independent parameters and the command line of the default clearing rule.
0036Further, the configuration command clearing processing module 32 is further configured to, when a first node that needs to be cleared is dependent on a second node, clear the second node first and then clear the first node.
0037A specific process of applying the apparatus in the embodiment of the present invention to clear the configuration command in the communication equipment is similar to that of the foregoing method embodiment, and is not repeatedly described here.
0038Persons of ordinary skill in the art should understand that all or part of the procedures of the methods in the foregoing embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program is run, the procedures of the methods in the foregoing embodiments are performed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), and so on.
0039In conclusion, in the embodiments of the present invention, by constructing the configuration command tree and clearing, according to the default clearing rule of the communication equipment and/or the customized clearing rule, the node that needs to be cleared, the configuration command in the communication equipment may be cleared effectively and rapidly, and the communication equipment may be enabled to recover to a specific configuration status without restarting the communication equipment.
0040The method and component apparatus of the embodiments of the present invention may be integrated into all products adopting the VRP platform of Huawei, and may be applied to automated versification processes of various products to clear a residual configuration of a communication equipment rapidly, so that the equipment is in an "empty" configuration status.
0041The foregoing description is merely specific exemplary implementation manners of the present invention, but not intended to limit the protection scope of the present invention. Any variation or replacement that may be easily made by persons skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the appended claims.
Contents5
4 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| EP0682429A2 | Cites | European Patent Office (EPO) | Search report |
| US7065764B1 | Cites | United States of America | Search report |
8 members in 4 offices
Priority claims4
| Document | Office | Kind | Date |
|---|---|---|---|
| 2012071281 | China | W | |
| 2012071281 | China | W | |
| 2012071281 | – | – | – |
| WO2012CN71281 | – | – | – |
Members8
| Document | Office | Kind | |
|---|---|---|---|
| WO2012095042A2 | World Intellectual Property Organization (WIPO) | A2 | |
| CN102742215A | China | A | |
| WO2012095042A3 | World Intellectual Property Organization (WIPO) | A3 | |
| EP2804342A2This record | European Patent Office (EPO) | A2 | |
| EP2804342A4 | European Patent Office (EPO) | A4 | |
| US2014359087A1 | United States of America | A1 | |
| CN102742215B | China | B | |
| US9762430B2 | United States of America | B2 |
8 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Application withdrawnWithdrawn18W | 18W | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: THE APPLICATION HAS BEEN WITHDRAWNSTAA | STAA | |
| First examination report despatched17Q | 17Q | |
| Request for extension of the european patent (deleted)DAX | DAX | |
| Request for examination filed17P | 17P | |
| Supplementary search report drawn up and despatchedA4 | A4 | |
| Designated contracting statesAK | AK | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI |
Numbers
- Publication
- 2804342
- Publication, DOCDB
- 2804342
- Publication, EPODOC
- EP2804342
- Application
- 127340214
- Application, DOCDB
- 12734021
- Application, EPODOC
- EP20120734021
Titles3
- German
- VERFAHREN UND VORRICHTUNG ZUM RÄUMEN BEFEHL KONFIGURATION IN KOMMUNIKATIONSVORRICHTUNGEN
- English
- METHOD AND DEVICE FOR CLEARING CONFIGURATION COMMAND IN COMMUNICATION EQUIPMENT
- French
- PROCÉDÉ ET DISPOSITIF DE SUPPRESSION D'UNE COMMANDE DE CONFIGURATION DANS UN ÉQUIPEMENT DE COMMUNICATION
Classification
- CPC, 3
- H04L41/044
- H04L41/08
- H04L41/0803
- IPC, 1
- H04L12 24
Designated states1
- Contracting states, 1
- Türkiye