CN102571445B - Method for converting network equipment configuration file and apparatus thereof - Google Patents

Method for converting network equipment configuration file and apparatus thereof Download PDF

Info

Publication number
CN102571445B
CN102571445B CN201210025339.8A CN201210025339A CN102571445B CN 102571445 B CN102571445 B CN 102571445B CN 201210025339 A CN201210025339 A CN 201210025339A CN 102571445 B CN102571445 B CN 102571445B
Authority
CN
China
Prior art keywords
business model
attribute
former
configuration
objective
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
CN201210025339.8A
Other languages
Chinese (zh)
Other versions
CN102571445A (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.)
Kunshan chuangzhihui Intellectual Property Operation Co.,Ltd.
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201210025339.8A priority Critical patent/CN102571445B/en
Publication of CN102571445A publication Critical patent/CN102571445A/en
Application granted granted Critical
Publication of CN102571445B publication Critical patent/CN102571445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an apparatus for converting a network equipment configuration file. The apparatus comprises an original service model module and a target service model module, wherein the original service model module is used to fill in content of each attribute of an original service model according to a original configuration file and send the original service model which is completed to the target service model module; the target service model module is used to fill in the content of the each attribute of a target service model by using the original service model which is completed and is sent by the original service model module according to a preset conversion rule, and then generate a target configuration file by using the target service model which is completed. The invention also discloses a method for converting the network equipment configuration file. By using the apparatus and the method of the invention, configuration time of updated network equipment can be reduced; configuration accuracy can be increased so as to increase working efficiency.

Description

A kind of method of switching network device configuration file and device
Technical field
The present invention relates to the configuration management technology of the network equipment in transmission network field, particularly relate to a kind of method and device of switching network device configuration file.
Background technology
The network equipment in transmission network needs the work according to bearing in a network separately to carry out business configuration, every business in the network equipment forms by multiple configuration, each configuration comprises multinomial attribute, such as, Ethernet service comprises Service configuration, Cip configuration etc., has the attributes such as index in Service configuration.The network equipment is when preserving the multinomial attribute of each configuration in every business, application programming interfaces (the API corresponding according to the attribute of each configuration in every business of self Software Create, Application Programming Interface) order, the content of every attribute of each configuration in every business is kept in corresponding internal memory and forms configuration file; After the network equipment is restarted, according to api command, read the content that the attribute of each configuration is corresponding successively from configuration file, the content corresponding according to the attribute of each configuration in the every business read, recovers the business of the network equipment.
Along with the development of network technology, the software of the network equipment can often upgrading.Using the configuration file before software upgrading as the business before former configuration file, software upgrading as former business; Business after software upgrading is as target service.When after software upgrading; configuration in the former business of part and api command corresponding to single attribute can change; so when the network equipment puts file access pattern the objectives business according to first wife, the content in former configuration file normally may be read, thus normally cannot recover target service.Such as: after the software upgrading of the network equipment, the Service configuration in former Ethernet service is substituted by L2vpn configuration; The api command that index attribute during api command corresponding to name attribute in L2vpn configuration configure from Service is corresponding is different, then use L2vpn configure in api command corresponding to name attribute obviously correctly cannot read required content from former configuration file.Now, usually according to former configuration file, configuration is analyzed by webmaster personnel, then manual configuration is done to the business of the network equipment.
But said method has following problem: the configuration that webmaster personnel will have all business of enough experience energy recognition network equipment corresponding; Manually carry out manual configuration very consuming time, easily make mistakes simultaneously.
Visible, the method for the existing configure network devices when software upgrading at present, owing to too relying on manual operation, therefore not only consuming time but also cannot accuracy be ensured, and then affect operating efficiency.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and device of switching network device configuration file, reduce the setup time of the network equipment after upgrading, improve the accuracy of configuration, and then increase work efficiency.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of device of switching network device configuration file, this device comprises: former business model module and objective business model module; Wherein,
Former business model module, for putting the content of every attribute of the former business model of filling in documents according to first wife, sends to objective business model module by the former business model after having filled in;
Objective business model module, send for utilizing former business model module filled in after former business model, fill in the content of every attribute of objective business model according to preset transformation rule; The objective business model after having filled in is utilized to generate target configuration file.
In such scheme, described objective business model module, specifically for carrying out associating preserving as transformation rule using api command corresponding for the every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model.
In such scheme, described objective business model module, specifically for:
During the attribute one_to_one corresponding of the attribute in the configuration of objective business model and the configuration of former business model, then the api command that api command corresponding for the attribute configured in former business model is corresponding with the attribute configured in objective business model is associated;
The attribute of the attribute in the configuration of objective business model and the configuration of former business model differs a pair at once, then associated by api command corresponding with the attribute configured in objective business model for one or more api command corresponding for the attribute configured in former business model.
In such scheme, described objective business model module, specifically for extracting the attribute of the configuration in objective business model one by one, according to the transformation rule of this attribute, utilizes the api command of association from former business model, obtain corresponding content and preserve.
In such scheme, described device also comprises: transceiver module, for obtaining former configuration file from the network equipment, former configuration file is sent to former business model module;
Accordingly, described former business model module, specifically for receiving the former configuration file that transceiver module is sent.
Present invention also offers a kind of method of switching network device configuration file, the method comprises:
The content of every attribute of the former business model of filling in documents is put according to first wife;
Utilize the former business model after having filled in, fill in the content of every attribute of objective business model according to preset transformation rule;
The objective business model after having filled in is utilized to generate target configuration file.
In such scheme, described transformation rule, for: api command corresponding for the every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model are associated.
In such scheme, described api command corresponding for every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model to be associated, specifically comprise:
During the attribute one_to_one corresponding of the attribute in the configuration of objective business model and the configuration of former business model, then the api command that api command corresponding for the attribute configured in former business model is corresponding with the attribute configured in objective business model is associated;
The attribute of the attribute in the configuration of objective business model and the configuration of former business model differs a pair at once, then associated by api command corresponding with the attribute configured in objective business model for one or more api command corresponding for the attribute configured in former business model.
In such scheme, described content of filling in every attribute of objective business model according to preset transformation rule, comprise: the attribute extracting the configuration in objective business model one by one, according to the transformation rule of this attribute, the api command of association is utilized from former business model, to obtain corresponding content and preserve.
In such scheme, described put the content of every attribute of the former business model of filling in documents according to first wife before, the method also comprises: from the network equipment, obtain former configuration file.
The method of switching network device configuration file provided by the present invention and device, can be the content of every attribute of objective business model by the Content Transformation of each attribute in former business model by preset transformation rule, recycle the objective business model after having filled in and generate target configuration file, thus the setup time of the network equipment after upgrading, the accuracy of raising configuration can be reduced, and then increase work efficiency; In addition, because transformation rule is for writing according to actual conditions and being preset in device provided by the invention, so transformation rule can be changed according to actual conditions, the present invention is enable to be applicable to plurality of application scenes.
Accompanying drawing explanation
Fig. 1 is the composition structural representation of the device of switching network device configuration file of the present invention;
Fig. 2 is the method flow schematic diagram of switching network device configuration file of the present invention.
Embodiment
Basic thought of the present invention is: the content of putting every attribute of the former business model of filling in documents according to first wife; Utilize the former business model after having filled in, fill in the content of every attribute of objective business model according to preset transformation rule; The objective business model after having filled in is utilized to generate target configuration file.
Below in conjunction with drawings and the specific embodiments, the present invention is further described in more detail.
The invention provides a kind of device of switching network device configuration file, as shown in Figure 1, this device comprises: former business model module 11 and objective business model module 12; Wherein,
Former business model module 11, for putting the content of every attribute of the former business model of filling in documents according to first wife, sends to objective business model module 12 by the former business model after having filled in;
Objective business model module 12, send for utilizing former business model module 11 filled in after former business model, fill in the content of every attribute of objective business model according to preset transformation rule, utilize the objective business model after having filled in generate target configuration file.
Described former business model module 11, also for preserving former business model;
Wherein, described former business model comprises: the list that each configuration that before software upgrading, any one former business comprises, the api command that every attribute of configuration is corresponding form, and the concrete method generating former business model is prior art, does not repeat here.Described former business model module 11 can preserve one or more former business model, the quantity of the concrete former business that concrete quantity will be changed according to reality at every turn and determining.
Described objective business model module 12, also for preserving objective business model;
Wherein, described objective business model comprises: the list of the api command composition that every attribute of each configuration of any one target service needs after software upgrading, configuration is corresponding, the concrete method generating objective business model is prior art, does not repeat here.Described objective business model module 12 can preserve one or more objective business model, the quantity of the objectives business that concrete quantity will be changed according to reality at every turn and determining.
Described device, also comprises: transceiver module 13, for obtaining former configuration file, former configuration file is sent to former business model module 11; Accordingly, described former business model module 11, the first wife specifically for sending according to transceiver module 13 puts the content of every attribute of the former business model of filling in documents.
Described former business model module 11, specifically for api command corresponding according to the attribute configured in former business model one by one, extracts content and preserves from former configuration file;
Wherein, described in save as and be kept in internal memory corresponding to this attribute according to prior art, do not repeat here.
Described objective business model module 12, specifically for receive that former business model module 11 sends filled in after former business model after, extract the attribute of the configuration in objective business model one by one, according to the transformation rule of this attribute, the api command of association is utilized from former business model, to obtain corresponding content and preserve;
Wherein, described transformation rule is: api command corresponding for the every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model are associated, specifically comprise:
During the attribute one_to_one corresponding of configuration of any one attribute in any one configuration of objective business model and former business model, then the api command that api command corresponding for the attribute configured in former business model is corresponding with the attribute configured in objective business model is associated;
An attribute of any one attribute in any one configuration of objective business model and the configuration of former business model differs a pair at once, then associated by api command corresponding with the attribute configured in objective business model for one or more api command corresponding for the attribute configured in former business model.
Described objective business model module 12, specifically for utilizing the objective business model after having filled in generate target configuration file, sends to transceiver module 13 by target configuration file; Accordingly, described transceiver module 13, also for target configuration file that receiving target business model module 12 is sent;
Wherein, described utilization filled in after objective business model to generate target configuration file be prior art, can comprise: utilize the content that every attribute of the every configuration in objective business model is corresponding, generate target configuration file.
The device of switching network device configuration file provided by the invention as software, can be installed in Network Management Equipment in a transport network, also can be arranged in any computer.During actual use, by the control of the Network Management Equipment or computer of installing this device, obtain the former configuration file of specified network equipment and the network equipment sending to this to specify target configuration file by the transceiver module of this device, this network equipment utilizes target configuration file to carry out subsequent operation according to prior art.
The method of switching network device configuration file of the present invention as shown in Figure 2, comprises the following steps:
Step 201: preset former business model, objective business model and transformation rule.
Step 202: obtain former configuration file, puts the content of every attribute of the former business model of filling in documents according to first wife.
Here, described content of putting every attribute of the preset former business model of filling in documents according to first wife is: api command corresponding according to the attribute configured in former business model one by one, extracts content and preserve from former configuration file.
Step 203: utilize the former business model after having filled in, fill in the content of every attribute of objective business model according to preset transformation rule.
Be specially: the attribute extracting the configuration in objective business model one by one, according to the transformation rule of this attribute, utilize the api command of association from former business model, obtain corresponding content and preserve.
Step 204: utilize the objective business model after having filled in generate target configuration file.
After above-mentioned steps 201 completes, device provided by the invention, according to the control of installed equipment, obtains the former configuration file of specified network equipment, performs step 202.
After above-mentioned steps 204 completes, target configuration file also can be sent to the network equipment obtaining former configuration file by device provided by the invention, and this network equipment utilizes target configuration file to carry out subsequent operation according to prior art.
The embodiment of the present invention, suppose that network equipment A software version before software upgrading is 33, wherein Ethernet service comprises: Service configures, and has " index ", " uerslabel " and " ceVlanPreserve " attribute in Service configuration; After software upgrading, software version is 34, and wherein Ethernet service comprises L2vpn configuration, has " index " and " ceVlanPreserve " attribute, then realize the method for the present invention to switching network device configuration file, comprise the following steps in L2vpn configuration:
Step 301: preset former Ethernet service model, target Ethernet service model and transformation rule.
Here, described former Ethernet service model comprises: " index ", " uerslabel " and " ceVlanPreserve " attribute in Service configuration and corresponding api command, as shown in table 1, the api command that in table 1, attribute " index " is corresponding is " 0xa405000e service instance<1-4096> ", and the rest may be inferred for the corresponding relation of other attributes and api command;
Table 1
Described target Ethernet service model comprises: " index " and " ceVlanPreserve " attribute in L2vpn configuration and corresponding api command, as shown in table 2, the api command that in table 2, attribute " index " is corresponding is " 0xa405001e service instance<1-4096> ", the rest may be inferred for corresponding relation between other attribute and api commands, do not repeat;
Table 2
Described transformation rule is as shown in table 3:
Table 3
Wherein, " userLabel " attribute in table 1 does not have in table 2, not this attribute of the Ethernet service model namely in software version 34, then without the need to transformation rule that this attribute preset is corresponding.
Step 302: obtain former configuration file, puts the content of every attribute of the former Ethernet service model of filling in documents according to first wife.
Step 303: the attribute extracting the configuration in target Ethernet service model one by one, according to the transformation rule of this attribute, utilizes the api command of association from former Ethernet service model, obtain corresponding content and preserve.
Step 304: utilize target Ethernet service model to generate target configuration file.
The above, be only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.

Claims (8)

1. a device for switching network device configuration file, is characterized in that, this device comprises: former business model module and objective business model module; Wherein,
Former business model module, for putting the content of every attribute of the former business model of filling in documents according to first wife, sends to objective business model module by the former business model after having filled in;
Objective business model module, send for utilizing former business model module filled in after former business model, fill in the content of every attribute of objective business model according to preset transformation rule; The objective business model after having filled in is utilized to generate target configuration file, wherein, the content of filling in every attribute of objective business model according to preset transformation rule comprises: the attribute of the attribute in the configuration of objective business model and the configuration of former business model differs a pair at once, then associated by api command corresponding with the attribute configured in objective business model for one or more api command corresponding for the attribute configured in former business model;
Described objective business model module, specifically for carrying out associating preserving as transformation rule using application programming interfaces api command corresponding for the every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model.
2. device according to claim 1, is characterized in that, described objective business model module, specifically for:
During the attribute one_to_one corresponding of the attribute in the configuration of objective business model and the configuration of former business model, then the api command that api command corresponding for the attribute configured in former business model is corresponding with the attribute configured in objective business model is associated.
3. device according to claim 1, is characterized in that,
Described objective business model module, specifically for extracting the attribute of the configuration in objective business model one by one, according to the transformation rule of this attribute, utilizes the api command of association from former business model, obtain corresponding content and preserve.
4. device according to claim 1, is characterized in that, described device also comprises: transceiver module, for obtaining former configuration file from the network equipment, former configuration file is sent to former business model module;
Accordingly, described former business model module, specifically for receiving the former configuration file that transceiver module is sent.
5. a method for switching network device configuration file, is characterized in that, the method comprises:
The content of every attribute of the former business model of filling in documents is put according to first wife;
Utilize the former business model after having filled in, fill in the content of every attribute of objective business model according to preset transformation rule;
The objective business model after having filled in is utilized to generate target configuration file;
Described transformation rule, for: api command corresponding for the every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model are associated, specifically comprise: the attribute of the attribute in the configuration of objective business model and the configuration of former business model differs a pair at once, then associated by api command corresponding with the attribute configured in objective business model for one or more api command corresponding for the attribute configured in former business model.
6. method according to claim 5, is characterized in that, describedly api command corresponding for every attribute in configuration every in objective business model, the api command corresponding with the attribute of the configuration in former business model is associated, and specifically comprises:
During the attribute one_to_one corresponding of the attribute in the configuration of objective business model and the configuration of former business model, then the api command that api command corresponding for the attribute configured in former business model is corresponding with the attribute configured in objective business model is associated.
7. method according to claim 5, it is characterized in that, described content of filling in every attribute of objective business model according to preset transformation rule, comprise: the attribute extracting the configuration in objective business model one by one, according to the transformation rule of this attribute, the api command of association is utilized from former business model, to obtain corresponding content and preserve.
8. method according to claim 5, is characterized in that, described put the content of every attribute of the former business model of filling in documents according to first wife before, the method also comprises: from the network equipment, obtain former configuration file.
CN201210025339.8A 2012-02-06 2012-02-06 Method for converting network equipment configuration file and apparatus thereof Active CN102571445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210025339.8A CN102571445B (en) 2012-02-06 2012-02-06 Method for converting network equipment configuration file and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210025339.8A CN102571445B (en) 2012-02-06 2012-02-06 Method for converting network equipment configuration file and apparatus thereof

Publications (2)

Publication Number Publication Date
CN102571445A CN102571445A (en) 2012-07-11
CN102571445B true CN102571445B (en) 2015-06-03

Family

ID=46415971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210025339.8A Active CN102571445B (en) 2012-02-06 2012-02-06 Method for converting network equipment configuration file and apparatus thereof

Country Status (1)

Country Link
CN (1) CN102571445B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076055A (en) * 2007-06-18 2007-11-21 中兴通讯股份有限公司 Method for converting toll-ticket format
CN101286881A (en) * 2008-05-16 2008-10-15 中兴通讯股份有限公司 Device for implementing multi-version compatibility of software configuration data of base station and application thereof
CN101136690B (en) * 2006-11-23 2012-01-11 中兴通讯股份有限公司 System and method for synchronizing operation maintenance center and base station configuration data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060041881A1 (en) * 2004-08-19 2006-02-23 Adkasthala Bheema P Universal upgrade architecture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136690B (en) * 2006-11-23 2012-01-11 中兴通讯股份有限公司 System and method for synchronizing operation maintenance center and base station configuration data
CN101076055A (en) * 2007-06-18 2007-11-21 中兴通讯股份有限公司 Method for converting toll-ticket format
CN101286881A (en) * 2008-05-16 2008-10-15 中兴通讯股份有限公司 Device for implementing multi-version compatibility of software configuration data of base station and application thereof

Also Published As

Publication number Publication date
CN102571445A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN104391826A (en) Data format conversion method and data format converter
CN104199723A (en) Camera mapping method based on virtual equipment
CN108228726B (en) Incremental transaction content acquisition method and storage medium for distribution network red and black images
US20150227577A1 (en) Method and device for guaranteeing consistency of planning data
CN104750937B (en) Integrated circuit diagram conversion method based on Hadoop
CN104268226A (en) Control and method for copying and uploading Word picture based on browser
US11386255B2 (en) Parameter extraction from digitized image of a schematic or block diagram for electrical designs
CN105162252A (en) CID file-based method for achieving automatic mapping of plug-and-play power distribution terminal information
CN103338125A (en) Method for batch network device configuration
CN105718299A (en) Virtual machine configuration method, device and system
CN104201779A (en) Online monitor data automatic integration monitor method based on SVG
CN104298761A (en) Implementation method for master data matching between heterogeneous software systems
WO2019075083A1 (en) Structured document creation and processing, dynamic data storage and reporting system
CN104090948A (en) Method, device and system for processing mass data of nuclear power station
CN102148702B (en) Method for managing network by utilizing network configuration protocol
CN103310304B (en) The management method of procedural model and device
CN102571445B (en) Method for converting network equipment configuration file and apparatus thereof
CN103294461A (en) Method and system for realizing microlog background interface
CN103761395A (en) Method for generating dynamic report of virtual terminal of intelligent substation
CN103957119A (en) Method for managing network devices through MIB file and browser
CN104065613A (en) Offline operation data synchronization method, system and device of application
CN108090821A (en) One kind issues system and method based on cell phone application electronic invoice
CN101426220A (en) Method, apparatus and system for base station cutover
WO2016058462A1 (en) Method and system for configuring extensible cross-network element service
CN105550975A (en) 3D graphic instruction optimization method

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
TR01 Transfer of patent right

Effective date of registration: 20201211

Address after: Room 705, 7 / F, room 9, 1699, Zuchongzhi South Road, Kunshan City, Suzhou City, Jiangsu Province

Patentee after: Kunshan chuangzhihui Intellectual Property Operation Co.,Ltd.

Address before: 518057 Ministry of justice, Zhongxing building, South Science and technology road, Nanshan District hi tech Industrial Park, Shenzhen, Guangdong

Patentee before: ZTE Corp.

TR01 Transfer of patent right
CP02 Change in the address of a patent holder

Address after: 215300 rooms 107 and 108, area C, 55 Xiaxi street, Kunshan Development Zone, Suzhou City, Jiangsu Province

Patentee after: Kunshan chuangzhihui Intellectual Property Operation Co.,Ltd.

Address before: Room 705, 7 / F, room 9, 1699, Zuchongzhi South Road, Kunshan City, Suzhou City, Jiangsu Province

Patentee before: Kunshan chuangzhihui Intellectual Property Operation Co.,Ltd.

CP02 Change in the address of a patent holder