CN100397828C - Configuration recovery method - Google Patents

Configuration recovery method Download PDF

Info

Publication number
CN100397828C
CN100397828C CNB2006101095979A CN200610109597A CN100397828C CN 100397828 C CN100397828 C CN 100397828C CN B2006101095979 A CNB2006101095979 A CN B2006101095979A CN 200610109597 A CN200610109597 A CN 200610109597A CN 100397828 C CN100397828 C CN 100397828C
Authority
CN
China
Prior art keywords
object program
intermediate object
quick configuration
parameter
configuration order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2006101095979A
Other languages
Chinese (zh)
Other versions
CN1905487A (en
Inventor
胡小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CNB2006101095979A priority Critical patent/CN100397828C/en
Publication of CN1905487A publication Critical patent/CN1905487A/en
Application granted granted Critical
Publication of CN100397828C publication Critical patent/CN100397828C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a configuration recovery method, firstly resolving configuration content into recognizable intermediate result and storing the intermediate result; as needing to recover configuration, inquiring a function map table of relations between intermediate result recording and processing functions according to intermediate result identification, and determining a corresponding processing function; then, according to the intermediate result, calling the determined processing function and making configuration by the processing function according to the intermediate result. And it can make configuration directly by the intermediate result without resolving, able to largely raise configuration recovery speed and meeting fast reset requirement of communication equipment.

Description

A kind of method of recovery configuring
Technical field
The present invention relates to the configuring technical of communication apparatus, particularly relate to a kind of method of recovery configuring.
Background technology
Communication apparatus generally needed the human configuration data necessary before starting working, such as: Routing Protocol, port, network management information or the like.In the practical application, communication apparatus may break down, and the data that cause disposing are all lost.So, when the elimination fault restarts communication apparatus, need the data of recovery configuring.
In the prior art,,, generally the content of configuration data can be preserved with textual form in order to reduce the workload of human configuration data owing to need the data volume of configuration bigger.When needs restart communication apparatus, during the recovery configuring data, can read configuration data by the configuration order of execution contexts form, thereby reach the purpose of saving labor workload.
But in the layoutprocedure, owing to the deploy content of textual form need be resolved to the intermediate object program that communication apparatus can be discerned, so, when the data volume of needs configurations is bigger, the time of resolving is also correspondingly long, reduce the speed of recovery configuring data, thereby can not satisfy the requirement that communication apparatus resets rapidly.
In addition, because prior art preserves the content of configuration data get off with textual form, fail safe is very poor.The configuration data content of textual form can leave on the communication apparatus, also can exist on the particular network server, as long as authority is arranged, the content of configuration data just is easy to be distorted.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method of recovery configuring, can dispose apace communication apparatus, satisfies the requirement that communication apparatus resets rapidly.
In order to achieve the above object, the technical scheme of the present invention's proposition is:
A kind of method of recovering the configuration of communication apparatus, deploy content is resolved to the intermediate object program of the binary form that communication apparatus can discern and preserve, described intermediate object program comprises the intermediate object program sign of indicating self, and when the needs recovery configuring, this method may further comprise the steps:
The mapping table of corresponding relation is determined the corresponding function of handling between a, sign inquiry sets in advance according to intermediate object program the processing function that is used to write down intermediate object program and handle intermediate object program;
B, call definite processing function, handle function and communication apparatus is configured according to intermediate object program according to the corresponding intermediate object program of intermediate object program sign.
In the such scheme, the method for described preservation intermediate object program is:
Described intermediate object program is generated quick configuration order according to the command format that is provided with, the quick configuration order that generates is kept in the quick configuration file.
In the such scheme, described intermediate object program comprises one or more parameters, and the method for the quick configuration order of described generation is:
Each parameter of described intermediate object program is changed according to the argument structure that is provided with, the parameter after the conversion is combined into quick configuration order according to the command format that is provided with.
In the such scheme, described intermediate object program is designated the command id that is used to identify described quick configuration order, and described parameter comprises the overall identification of identification parameter self, and described step a is:
A1, read the quick configuration order in the described quick configuration file;
The parameter of a2, the quick configuration order of extraction is determined command id according to the overall identification of this parameter, again according to command id query function mapping table, determines and the quick configuration order corresponding processing function of extracting.
In the such scheme, described step b is:
According to the parameter of the quick configuration order of described extraction, call definite processing function, handle function and be configured according to the parameter of the quick configuration order of this extraction.
In the such scheme, described quick configuration file also comprises: the file header that carries version information and check information;
Further comprise before the described step a1:
Read the file header of described quick configuration file, judge according to version information and/or check information whether quick configuration file is correct, if correct, execution in step a1 then; Otherwise, withdraw from this flow process.
In sum, the method of a kind of recovery configuring that the present invention proposes, preserve by the intermediate object program of deploy content being resolved the back acquisition, can be when the needs recovery configuring, the intermediate object program of directly utilizing equipment to discern is configured, need not to resolve, improved the speed of configuration restore greatly.
In addition,, be not easy to be identified, thereby can strengthen the fail safe of configuration data content because the intermediate object program of preserving is binary form.
Description of drawings
Fig. 1 is the present invention program's a flow chart;
Fig. 2 is a flow chart of using the present invention program's embodiment.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
Basic thought of the present invention is: deploy content is resolved to intermediate object program earlier also preserve, when the needs recovery configuring, directly utilize the intermediate object program of preserving to be configured.
Fig. 1 has shown flow chart of the present invention.Among the present invention, need the intermediate object program that earlier the deploy content equipment of resolving to can be discerned, and intermediate object program preserved, intermediate object program described here comprise can indicating self the intermediate object program sign.As shown in Figure 1, when the needs recovery configuring, the present invention realizes that the method for recovery configuring may further comprise the steps:
Step 101: the mapping table of corresponding relation between the processing function that is used to write down intermediate object program and handle intermediate object program that inquiry sets in advance according to the intermediate object program sign, determine the corresponding function of handling.
Step 102: call definite processing function according to the corresponding intermediate object program of intermediate object program sign, handle function and be configured according to intermediate object program.
In the practical application, communication apparatus can receive the order line of input, and described order line has been described deploy content, and these deploy contents generally adopt textual form, can't be discerned by communication apparatus, so deploy content need be resolved to the intermediate object program of binary form earlier.
The function of the processing intermediate object program described in the present invention is the core that communication apparatus is finished configuration, if with intermediate object program as handling function parameters and calling the processing function, handle function and just can be configured communication apparatus according to intermediate object program.In the practical application, the kind of handling function is a lot, can finish different configurations, such as: the IP address configuration is handled function, Routing Protocol configuration process function or the like.
For the present invention program is described better, realize recovery configuring ground method with a preferred embodiment explanation below.
In the present embodiment, the order line of supposing incoming traffic equipment has the N bar, deploy content in each bar order line can resolve to corresponding intermediate object program, and preserve with the form of quick configuration order, the method of preserving intermediate object program is: intermediate object program is generated quick configuration order according to the command format that is provided with, quicker configuration order is kept in the quick configuration file.
In the present embodiment, for the ease of preserving and call each parameter in the intermediate object program, can be in the process that generates quick configuration order, each parameter of intermediate object program is changed according to the argument structure that is provided with, and the parameter after will changing again is combined into quick configuration order according to the command format that is provided with.
That is to say, in the present embodiment, the corresponding quick configuration order of order line, and the parameter in the corresponding configuration order fast of the deploy content in the order line.Afterwards, more all quick configuration orders are combined into a quick configuration file.In the present embodiment, configuration file also is provided with a file header that comprises version information and check information fast.The form of described quick configuration file is as shown in Table 1:
File header
Quick configuration order 1
……
Quick configuration order N
Table one
Wherein, the structure of file header is as shown in Table 2:
Version information (4 byte) Check information (4 byte)
Table two
The quick configuration order of each bar comprises order length, number of parameters, parameter total length and parameter, its structure as shown in Table 3:
Figure C20061010959700081
Table three
Wherein, the structure of each parameter is as shown in Table 4:
Overall identification (4 byte) Type (4 byte) Length (4 byte) Value (4 byte)
Table four
Wherein, the overall identification field is the unique identification of parameter; Type field is the type of parameter value, such as: the interface descriptor is a character string type, and the IP address is an IPV4 type etc.; Length field is the length of parameter value; Value field is the value of parameter.
In the present embodiment, the overall identification of parameter has 4 bytes, can adopt following method to constitute: high 24 bits are the overall situation numbering of order under the parameter, and least-significant byte is the numbering of this order intrinsic parameter.The overall identification of all parameters in same quick configuration order high 24 all identical, least-significant byte difference just.Such as: the overall identification of the 5th parameter in the 10th quick configuration order can be expressed as: 00000A05H, the overall identification of the 6th parameter in the 10th quick configuration order then can be expressed as: 00000A06H.
Certainly, in the practical application, the intermediate object program after also can adopting other form hold-over command row to resolve is called corresponding processing function as long as be convenient to according to intermediate object program.
In the present embodiment, also set up a mapping table that writes down intermediate object program and handle corresponding relation between the function.On the one hand, because present embodiment adopts quick configuration order to preserve intermediate object program, and high 24 bits of overall identification of parameter are the overall situation numbering of order under the parameter in the configuration order fast, can be used as the command id of quick configuration order, just the intermediate object program sign.On the other hand, call the processing function of handling intermediate object program and be actually intermediate object program as handling function parameters, and begin to carry out from the entry address of handling function.So, can be directly in the present embodiment write down intermediate object program and handle corresponding relation between the function by command id and processing function entrance address.The described mapping table of present embodiment is as shown in Table 5:
Command id The processing function entrance address
…… ……
00000AH 0B0534F6H
…… ……
Table five
Wherein, each list item can be two tuples of an expression command id and processing function entrance address, promptly<command id, the processing function entrance address 〉.Such as<00000AH, 0B0534F6H〉the expression command id is that the corresponding entry address of quick configuration order of 00000AH is the processing function of 0B0534F6H.
Certainly, in the practical application, also can be with the mapping table of other form, as long as can determine intermediate object program and corresponding processing function.
Fig. 2 has shown the flow chart of present embodiment.As shown in Figure 2, present embodiment realizes that the method for recovery configuring may further comprise the steps:
Step 201~step 202: read quick configuration file head, and judge according to version information and/or check information whether quick configuration file is correct, if correct, then execution in step 203; Otherwise, withdraw from this flow process.
In the practical application, the deploy content of communication apparatus may change, and the version of configuration file just needs correspondingly upgrading so fast.Communication apparatus can judge whether quick configuration file is correct according to version information, if fast the version of configuration file does not meet the requirement of communication apparatus, it is incorrect then to be judged as quick configuration file, stops configuration.
Perhaps, communication apparatus also can judge whether quick configuration file is correct according to check information, if check information indication makes a mistake, deploy content may be distorted, and it is incorrect then to be judged as quick configuration file, stops configuration immediately.
Perhaps, communication apparatus also can judge according to version information and check information whether quick configuration file is correct simultaneously, if version information and check information are all correct, just continues configuration; Otherwise, stop configuration.
Certainly, in the practical application, configuration file can not have file header yet fast, so, can omit step 201~step 202.
Step 203: read the quick configuration order of article one in the quick configuration file.
Step 204: extract the parameter of quick configuration order, determine command id according to the overall identification of parameter.
In the present embodiment because high 24 bits of parameter global sign are exactly command id, can with the overall identification of parameter and FFFFFF00H with, keep high 24 information, with the acquisition command id.
Step 205:, determine and quick configuration order corresponding processing function according to command id query mappings table.
Step 206: the parameter in the quick configuration order as the processing function parameters of determining, is called definite processing function, and the processing function is configured according to the parameter of quick configuration order.
Step 207~step 208: judge whether to handle all quick configuration orders, if then withdraw from this flow process; Otherwise, read the quick configuration order of next bar, and execution in step 204.
Use the present embodiment scheme, when communication apparatus is configured first, deploy content is preserved with quick configuration file through the intermediate object program of resolving the back acquisition, when communication apparatus is restarted, when needing recovery configuring, read quick configuration file and obtain the intermediate object program that equipment can be discerned, and utilize intermediate object program directly to call corresponding processing function, communication apparatus is configured according to intermediate object program by handling function, need not to resolve this link, thereby can improve the speed of recovery configuring greatly.
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. method of recovering the configuration of communication apparatus, it is characterized in that the intermediate object program of the binary form that deploy content can be discerned with communication apparatus is preserved, described intermediate object program comprises the intermediate object program sign of indicating self, when the needs recovery configuring, this method may further comprise the steps:
A. the mapping table of corresponding relation between the processing function that is used to write down intermediate object program and handle intermediate object program that inquiry sets in advance according to the intermediate object program sign is determined the corresponding function of handling;
B. call definite processing function according to the corresponding intermediate object program of intermediate object program sign, handle function and communication apparatus is configured according to intermediate object program.
2. method according to claim 1 is characterized in that, the method for described preservation intermediate object program is:
Described intermediate object program is generated quick configuration order according to the command format that is provided with, the quick configuration order that generates is kept in the quick configuration file.
3. method according to claim 2 is characterized in that described intermediate object program comprises one or more parameters, and the method for the quick configuration order of described generation is:
Each parameter of described intermediate object program is changed according to the argument structure that is provided with, the parameter after the conversion is combined into quick configuration order according to the command format that is provided with.
4. method according to claim 3 is characterized in that described intermediate object program is designated the command id that is used to identify described quick configuration order, and described parameter comprises the overall identification of identification parameter self, and described step a is:
A1. read the quick configuration order in the described quick configuration file;
A2. extract the parameter of quick configuration order, determine command id,, determine and the quick configuration order corresponding processing function of extracting again according to command id query function mapping table according to the overall identification of this parameter.
5. method according to claim 4 is characterized in that, described step b is:
According to the parameter of the quick configuration order of described extraction, call definite processing function, handle function and be configured according to the parameter of the quick configuration order of this extraction.
6. method according to claim 5 is characterized in that, described quick configuration file also comprises: the file header that carries version information and check information;
Further comprise before the described step a1:
Read the file header of described quick configuration file, judge according to version information and/or check information whether quick configuration file is correct, if correct, execution in step a1 then; Otherwise, withdraw from this flow process.
CNB2006101095979A 2006-08-14 2006-08-14 Configuration recovery method Active CN100397828C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101095979A CN100397828C (en) 2006-08-14 2006-08-14 Configuration recovery method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101095979A CN100397828C (en) 2006-08-14 2006-08-14 Configuration recovery method

Publications (2)

Publication Number Publication Date
CN1905487A CN1905487A (en) 2007-01-31
CN100397828C true CN100397828C (en) 2008-06-25

Family

ID=37674623

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101095979A Active CN100397828C (en) 2006-08-14 2006-08-14 Configuration recovery method

Country Status (1)

Country Link
CN (1) CN100397828C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547122B (en) * 2009-04-27 2011-11-23 华为终端有限公司 Method, device and system for recovering terminal configuration

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1049446A (en) * 1996-07-31 1998-02-20 Nec Corp Configuration data recovering equipment
CN1407451A (en) * 2001-08-29 2003-04-02 深圳市中兴通讯股份有限公司上海第二研究所 Command backtracking method for embedded gateway command line interface
US20030204578A1 (en) * 2002-04-26 2003-10-30 Michael Yip Method and apparatus for restoring the configuration of a network device
CN1490977A (en) * 2002-10-17 2004-04-21 华为技术有限公司 Analysis of universal route platform command lines
CN1773505A (en) * 2004-11-08 2006-05-17 国际商业机器公司 A system and a method to configure information storage and retrieval systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1049446A (en) * 1996-07-31 1998-02-20 Nec Corp Configuration data recovering equipment
CN1407451A (en) * 2001-08-29 2003-04-02 深圳市中兴通讯股份有限公司上海第二研究所 Command backtracking method for embedded gateway command line interface
US20030204578A1 (en) * 2002-04-26 2003-10-30 Michael Yip Method and apparatus for restoring the configuration of a network device
CN1490977A (en) * 2002-10-17 2004-04-21 华为技术有限公司 Analysis of universal route platform command lines
CN1773505A (en) * 2004-11-08 2006-05-17 国际商业机器公司 A system and a method to configure information storage and retrieval systems

Also Published As

Publication number Publication date
CN1905487A (en) 2007-01-31

Similar Documents

Publication Publication Date Title
WO2019237532A1 (en) Service data monitoring method, storage medium, terminal device and apparatus
CN104281672B (en) Method and device for processing log data
CN104050281A (en) Webpage information extraction method and device based on http protocol
CN106294222A (en) A kind of method and device determining PCIE device and slot corresponding relation
CN103902653A (en) Method and device for creating data warehouse table blood relationship graph
CN105337991A (en) Integrated message flow searching and updating method
CN104639391A (en) Method for generating network flow record and corresponding flow detection equipment
US20140317137A1 (en) Log management computer and log management method
CN101594355A (en) A kind of method and device of realizing cross-version software interaction
CN102035738B (en) Method and device for acquiring routing information
CN101794261B (en) Mapping table data recovery method and device
CN105187258A (en) Method for analyzing and processing configurable Trap alarm
CN101304342B (en) Enhancement type Ethernet interface apparatus
CN104679596A (en) Message processing method and system for improving concurrence performance of server-side
CN105046159A (en) Modification identifier based OOX text document privacy information detection method
CN108762979B (en) Terminal information backup method and backup device based on matching tree
CN103780460A (en) System for realizing hardware filtering of TAP device through FPGA
CN103927252A (en) Cross-component log recording method, device and system
CN100397828C (en) Configuration recovery method
CN108845995B (en) Data processing method, data processing apparatus, storage medium, and electronic apparatus
CN108133026B (en) Multi-data processing method, system and storage medium
CN103955517A (en) Method and system for converting data in documental database to relational database
CN114531380A (en) Mirror image quality checking method and device and electronic equipment
CN103366000B (en) A kind of analytic method of large volume XML message
CN103957119A (en) Method for managing network equipment by using MIB file and browser

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.