CN100493221C - Method and device for transformation of data configuration file in different editions of software - Google Patents

Method and device for transformation of data configuration file in different editions of software Download PDF

Info

Publication number
CN100493221C
CN100493221C CNB2006101097122A CN200610109712A CN100493221C CN 100493221 C CN100493221 C CN 100493221C CN B2006101097122 A CNB2006101097122 A CN B2006101097122A CN 200610109712 A CN200610109712 A CN 200610109712A CN 100493221 C CN100493221 C CN 100493221C
Authority
CN
China
Prior art keywords
data
node
back end
configuration file
current version
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
CNB2006101097122A
Other languages
Chinese (zh)
Other versions
CN1909693A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2006101097122A priority Critical patent/CN100493221C/en
Publication of CN1909693A publication Critical patent/CN1909693A/en
Application granted granted Critical
Publication of CN100493221C publication Critical patent/CN100493221C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for converting the data distributing document between different software versions, and a relative device, wherein it comprises: setting the default data distributing document relative to present version; based on said default document and conversion rule, converting the data distributing document in original version into the one in present version, to make the data distributing document automatically convert based on the grammar document and default data distributing document. With said invention, the conversion of data distributing document can avoid background software, and the backspace and upgrade of software versions are consistent.

Description

Method that data configuration file is changed between different software versions and device
Technical field
The present invention relates to the data transaction field, be meant method and device that a kind of data configuration file is changed especially between different software versions.
Background technology
Width code division multiple access (Wide-band Code Division Multiple Access, WCDMA) configuration data of base station (NodeB) software is that the employing extend markup language (eXtensible MarkupLanguage, XML) store by the form of file.Configuration data is used for describing some configuration parameters of base station, as veneer quantity etc.XML provides the mechanism that is used for strict constraint storage format and logical construction.The characteristics of XML file are that grammer is complete, clear in structure, readable strong.For base station initiated and when revising configuration data, can compare strict validity checking to configuration data, when base station initiated the required data configuration file, also has a supporting grammar file that is used for the definition of data configuration file syntax in XML data center based on configuration data.Described XML data center is used to administer and maintain the data configuration file of base station, and visit and storage to all configuration datas of base station are provided.
Because the base station is between different software versions, there are increase, deletion and the modification of the back end of configuration data inevitably, make the configuration data difference of different software versions, and then there is some difference to cause the data configuration file of different software versions and grammar file.For a specific software version, the grammar file of configuration data is changeless, can be used as the part of software kit, in the upgrading base station process this grammar file is carried out auto-update, but for data configuration file, data configuration file also is not quite similar between the different base stations.Before and after the base station software edition upgrading, need to keep the continuity of configuration data, therefore, require the base station after finishing upgrading and starting, configuration data originally can not change.If directly use the data configuration file of early version, the data configuration file of early version and the grammar file of redaction can not match, make the grammer verification fail, therefore, just need in the process of base station software upgrading, upgrade synchronously, so just introduce the smooth upgrade problem of configuration data the data configuration file.The smooth upgrade of configuration data is meant that the base station is after downloading software kit and activating, configuration data can upgrade to redaction from early version, promptly must keep the preceding configuration data of upgrading, the configuration data of early version also exists in redaction, and the configuration data of increase redaction, the initial value of newly-increased configuration data can adopt default value; When carrying out the version rollback, can continue the configuration data that uses upgrading preceding simultaneously.
At present, adopt two kinds of methods that the configuration data of base station is upgraded usually, a kind of is by the backstage configuration data of base station to be upgraded; Another kind is to come the configuration data of base station is upgraded by the mode of reserving (Reserved) node.
The concrete processing procedure of the configuration data of base station being upgraded by the backstage is: before software kit is downloaded in the base station, maintenance console in the backstage at first is uploaded to the data configuration file of base station the configuration platform of the redaction in the backstage, the configuration platform of redaction is converted to the data configuration file of early version the data configuration file of redaction then, maintenance console is downloaded to the base station with the data configuration file of redaction more then, last base station is downloaded the software kit line activating of going forward side by side and is handled, process described above all need be carried out corresponding operating to the backstage by the keeper and could be realized, actual is a kind of manual upgrading of manual type.After the scheme of the configuration data of base station being upgraded by the backstage improved, can realize that data configuration file is uploaded, the automation of the conversion of data configuration file and download, and these processing are merged in the software upgrade process of base station, like this, in the base station software escalation process, just the data configuration file of early version can be automatically converted to the data configuration file of redaction, and the configuration data of reservation early version, the smooth upgrade of implementation configuration data.
If adopt manual mode upgrade data configuration file, each step all needs keeper's participation, obviously too bothers, and more can't realize the batch upgrade of base station.If adopt automated manner upgrade data configuration file,, there are base station software version and the strong excessively problem of daemon software version dependence though participation that need not the keeper requires the base station software version to match with the daemon software version.Because base station software and daemon software are all developed respectively, therefore, base station software and daemon software are difficult to guarantee supporting, and also very unreasonable in realization.The configuration platform to the conversion of data configuration file just base station software by lowest version when highest version transforms, some special processings have been carried out, for example, the configuration platform is according to the early version and the redaction of software, needs increased or the back end of deletion increases or deletes, like this, the configuration platform whenever carries out the upgrading of a base station software version, just need carry out some special processings, therefore, cause each configuration platform version all need carry out special processing at the structural change of data configuration file.Because the configuration platform realizes having irreversibility to the conversion of data configuration file by special processing, like this, when carrying out the version rollback, the configuration platform just can't be realized the automatic conversion of data configuration file.
Come the concrete processing procedure that the configuration data of base station is upgraded by the mode of Reserved node to be: the back end to various data types in the grammar file of data configuration file is reserved, these back end are called the Reserved node, the Reserved node does not have structural and hierarchical relationship, all Reserved nodes all are arranged in one deck, each Reserved node is corresponding to a configuration data in the base station, in the software kit of redaction, comprise this version with respect to the benchmark version software, the patch data file of the Reserved node that increases as the software of early version, the new version software bag is downloaded and when activating in the base station, the newly-increased Reserved node of patch data file is increased in the original data configuration file automatically, be to need in the new software version to increase and revise back end and adopt the mode that increases the Reserved node to realize without exception, when needing deletion of node in the new software version, for keeping the integrality of legacy data structure, can be left intact.Like this, as long as the abundant data type of definition in grammar file, and the back end quantity that each data type is comprised does not limit, for each software version of base station, all need not to change the grammar file of configuration data, therefore, data configuration file and the unmatched problem of grammar file between the different software versions no longer appears.
But,, lost the hierarchical structure between back end because all newly-increased Reserved nodes make not have clear and definite relevance between the Reserved node all at same one deck; And because the title of newly-increased Reserved node all fixes, make these back end indeterminate, need obtain the implication of these Reserved node representatives by the configuration platform in the implication of XML data center; Just carry out the grammer verification of back end type for newly-increased Reserved node, the quantity of Reserved node and order are not carried out strict grammer verification, so just run counter to XML file with strict logical construction original intention as data configuration file.
Summary of the invention
In view of this, the method and the device that the object of the present invention is to provide a kind of data configuration file between different software versions, to change, data configuration file is smoothly changed between different software versions, and guaranteed that the data configuration file after the conversion has strict logical construction.
In order to achieve the above object, the method changed between different software versions of data configuration file provided by the invention may further comprise the steps:
The default data configuration file that A, setting are put corresponding to the full configuration of current software version;
B1, described default data configuration file is resolved, generate current version default configuration tree;
B2, obtain the root node of original version configuration tree and current version default configuration tree;
B3, by to the root node of original version configuration tree down subtree and the subtree under the root node set of current version default configuration compare, the data configuration file of original version is changed;
The data configuration file of B4, generation current version.
The default data configuration file that full configuration is put described in the steps A, for: comprise that the back end that all need dispose and the configuration data of back end are the data configuration file of default value.
Between described step B2 and the step B3, further comprise step B30: judge whether original version configuration subtree root node needs to carry out special processing, if, call the node processing function this back end is handled, otherwise, execution in step B3 continued.
Before the described step B30, further comprise: the sign and the node processing function that needs are carried out the back end of special processing are registered in the special processing node listing.
Described step B3 may further comprise the steps:
B31, judge whether the single data node of original version configuration subtree and the single data node of current version default configuration subtree are the matched data node, if, then continue execution in step B32, otherwise, continuation execution in step B33;
The attribute of B32, current version back end adopts the attribute of the current version default data node of coupling, finishes current flow path switch;
B33, for existing in the original version data configuration file non-existent back end in the configuration file of current version default data, do not comprise the back end that exists in the original version data configuration file only in the current version data configuration file, and/or, the back end that exists in the configuration file of current version default data for not existing in the original version data configuration file is added into described back end in the current version data configuration file.
Before the current flow path switch of the described end of step B32, further comprise: when the back end that is complementary is the simple elements node, if the original version back end is identical with the data type of the current version default data node of coupling, then the current version back end adopts the configuration data of the original version back end of coupling; If the original version back end is different with the data type of the current version default data node of coupling, and the data type of current version default data node is numeral, when the original version back end can satisfy the data type area requirement of current version grammar file, the current version back end adopts the configuration data of the original version back end of coupling, when the original version back end can't satisfy the data type area requirement of current version grammar file, the current version back end adopted the default configuration data of the current version default data node of coupling; If in these two data nodes of the current version default data node of original version back end and coupling, the data type of a data node is a character string, the data type of another back end is a numeral, and then the current version back end adopts the default configuration data of the current version default data node of coupling.
Further comprise before the described step B32: when the back end that is complementary was the complex element node, search matched data node if can search the matched data node, then continued execution in step B32 in the child nodes of complex element node; If can't search the matched data node, then continue execution in step B33.
Described step B32 further comprises: in these two data nodes of the current version default data node of original version back end and coupling, a data node is the complex element node, another back end is the simple elements node, and then the current version back end adopts the default configuration data of current version default data node fully.
Described simple elements node is: the back end that does not allow node element to exist in the child nodes.
Described complex element node is to allow to exist node element and/or note node in the child nodes, and does not have the back end of the text node existence of non-NULL.
Described in the step B33 described back end is added in the current version data configuration file, for: the back end quantity in the original version data configuration file is n, the minimum data number of nodes of current version grammatical norm is m, if n 〉=m does not then need to add the back end that exists in the current version default data configuration file only in the current version data configuration file; If n<m then needs to add the back end that exists in the current version default data configuration file only in the current version data configuration file.
The back end that exists in the described only current version default data configuration file is added in the current version data configuration file, comprise: judge at first whether the back end that will add exists in the current version data configuration file, if, then jump to next back end to be added in the configuration file of current version default data, otherwise, this back end is added in the current version data configuration file.
After step B32 or the step B33, further comprise: judge whether also to exist the original version configuration subtree of handling, if then return execution in step B31; Otherwise, continue execution in step B3.
Described calling after the node processing function handles this back end further comprises: judge whether also to exist original version configuration subtree or the current version default configuration subtree handled, if then return execution in step B30; Otherwise, continue execution in step B4.
The device that data configuration file provided by the invention is changed between different software versions comprises:
Resolution unit, the default data configuration file that is used for the full configuration of current version is put is resolved, and generates current version default configuration tree and offers converting unit;
Converting unit, be used to obtain the root node of original version configuration tree and current version default configuration tree, by the subtree under the root node of subtree under the root node of original version configuration tree and current version default configuration tree is compared, the data configuration file of original version is changed, the configuration data after the conversion is offered generation unit;
Generation unit is used for the configuration data through conversion is generated the current version data configuration file.
Among the present invention, the default data configuration file that setting is put corresponding to the full configuration of current version, default data configuration file and the conversion principle of putting according to full configuration then, the data configuration file of original version is converted to the data configuration file of current version, data configuration file can be changed automatically according to grammar file and default data configuration file, and changing between different software versions for data configuration file provides great convenience.When data configuration file is changed between different software versions, be no longer dependent on daemon software, feasible realization is more reasonable, and is consistent at the rollback of software version and the processing of upgrading, the problem that data configuration file can't automatic rollback when having solved the existing version rollback.
In addition, the logical associations in the current version data configuration file after the conversion between each back end and the implication of each back end all can clearly be expressed, and make data configuration file readability strengthen greatly.Grammer verification to all back end in the data configuration file has obtained enhancing, really reached adopt have the file of strict logical construction, as the purpose of XML file as data configuration file.
Description of drawings
Fig. 1 shows data configuration file smooth upgrade flow chart among the present invention;
Fig. 2 shows among the present invention according to conversion principle translation data configuration file flow chart;
Fig. 3 shows data configuration file smooth upgrade schematic diagram among the present invention;
Fig. 4 shows XML data smoothing upgrading cellular construction schematic diagram among the present invention.
Embodiment
Among the present invention, the default data configuration file that setting is put corresponding to the full configuration of current version, default data configuration file and the conversion principle of putting according to full configuration then, the data configuration file of original version is converted to the data configuration file of current version, the configuration data that includes original version in the data configuration file of current version, and the grammar file of current version can carry out verification to the data configuration file after the conversion, and the data configuration file after the conversion has strict logical construction.The default data configuration file that full configuration is put be meant comprise in the data configuration file might need the back end that disposes, and the configuration data of back end is a default value.The default data configuration file that full configuration is put can be comprised in the software kit of current version, also can be configured in the data center.
Smooth upgrade with XML formatted data configuration file in the base station is an example below, and specific implementation of the present invention is elaborated.
Fig. 1 shows data configuration file smooth upgrade flow chart among the present invention, and as shown in Figure 1, data configuration file processing procedure of smooth upgrade between different software versions may further comprise the steps:
Step 101: the default data configuration file that the full configuration of redaction is put is resolved, generate redaction default configuration tree.The XML resolution unit adopts DOM Document Object Model (Document Object Model, DOM) with XML file to be analyzed, be that the data configuration file of XML form resolves to a document object tree in the internal memory, all all can be finished by the node of revising in the access object tree the visit of data configuration file.
Step 102: the root node that obtains early version configuration tree and redaction default configuration tree.Each XML file is corresponding with a tree structure, and each tree structure has only a unique top layer back end, and this top layer back end is root node, therefore, and can be according to the root node of the characteristics specified data configuration file of XML file.
Step 103: two stalks tree is compared and changes according to transformation rule.Subtree is a relative concept, and each branch of tree beyond all doubtly all is a subtree, but the branch of subtree also can be described as subtree.Like this, this step is exactly the process of a circulation recursion, and promptly this step is carried out always all subtrees in early version configuration tree and the redaction default configuration tree are all compared and change.The concrete processing procedure of changing according to transformation rule is as shown in Figure 2:
Step 201: judge whether early version configuration subtree root node needs to carry out special processing, if then continue execution in step 202; Otherwise, continue execution in step 203.The node that is positioned at the top layer of a subtree is the root node of this subtree.Carry out the back end of special processing for needs, the node identification (ID) and the node processing function of this back end are registered in the special processing node listing, like this, if node identification in the special processing node listing, then needs the corresponding data node is carried out special processing; If node identification not in the special processing node listing, does not then need the corresponding data node is carried out special processing.
Step 202: call the node processing function corresponding data node is handled, continue execution in step 206 then.The node processing function can be corresponding one by one with node identification, promptly carries out different special processings at different back end, and the node processing function also can be corresponding with a plurality of node identifications, and promptly node processing function is applicable to the special processing to a plurality of nodes.Different special processing processes can realize by calling different node processing functions, the special processing process that promptly different node processing functions is corresponding different.
If the data type of early version back end does not need to change, but when the implication of its expression need change, the early version back end can be registered in the special processing node listing, also include the node processing function that respective nodes is carried out corresponding special processing in this special processing node listing.
For example, following back end is arranged in the early version data configuration file, contains the configuration of transmitting power RADIOPOWER in this back end:
<MTRU?id="0?x?220000">
<BRDSTART?id="0?x?221000">1</BRDSTART>
<RADIOPOWER?id="0?x?222000">2</RADIOPOWER>
</MTRU>
In the early version data configuration file, with the corresponding unit of the Configuration Values of RADIOPOWER be 1dbm, need in the redaction data configuration file to dispose more accurately to this back end, the unit of Configuration Values is changed to 0.1dbm, yet the data type of this back end does not need to change, promptly in the redaction data configuration file, remain integer type, if but directly adopt the transformation rule of describing later that this back end is changed, the content of this back end can not change before and after conversion, but but changed the physical meaning of original configuration, the transmitting power configuration becomes 0.2dbm, if but do not change the physical meaning of former configuration, then the configuration of this back end also should be 2dbm, at this moment, just need carry out special processing to this node, concrete special processing is: call the node processing function node new to this joint structure.Back end after the employing special processing becomes:
<MTRU?id="0?x?220000">
<BRDSTART?id="0?x?221000">1</BRDSTART>
<RADIOPOWER?id="0?x?222000">20</RADIOPOWER>
</MTRU>
Step 203: whether the root node of judging two stalks tree is the matched data node, judges promptly whether the root node of early version configuration subtree and the root node of redaction default configuration subtree are the matched data node, if then continue execution in step 204; Otherwise, continue execution in step 205.In two data configuration files, if the nodename of two data nodes, node identification and the path of corresponding data node in data configuration file are all identical, then these two data nodes are the matched data node.Nodename is used to indicate the physical meaning of back end, the sign of node is used for the data node is carried out unique identification, node path is data configuration file, is the set of a sequence data node in the XML file, is used to describe the hierarchical path from root node to the specific data node.May there be the identical back end of a plurality of titles in same path down, and these nodes are distinguished by node identification.
Step 204: change according to a pair of early version back end of transformation rule, continue execution in step 206 then.
Before transformation rule one is described, at first the basic conception of some terms is carried out clearly.The form example of XML file is as follows:
<?xml?version="1.0"?>
<NODEB?id="0x0"xmlns="NodeBCfgBiz.xml">
<NODEBNAME?id="0?x?0100000">huihongdasha</NODEBNAME>
<BRD?id=0?x?200000>
<NMPT?id="0?x?210000">
<!--This?is?a?comment-->
<BRDSTART?id="0?x?211000">1</BRDSTART>
...?...
<NMPT>
...?...
</BRD>
...?...
</NODEB>
In the XML file, shape as<? back end be document node, be positioned at the head of XML file; Shape as with<beginning, with</back end that finishes is node element, wherein back end NODEB is the root node in this XML file; Shape as<!----〉back end be the note node; Only the back end for a string character string, unformatted requirement is a text node, and wherein " 1 " is text node.The node layer aggregated(particle) structure does not have set form in the XML file, and the title of node is to determine according to relevant parameter fully.
Leaf elements node and non-leaf elements node are a kind of in the node element, in the child nodes of leaf elements node node element can not be arranged, and in the child nodes of non-leaf elements node node element can be arranged.The lower level node of leaf elements node or non-leaf elements node is called child nodes.In the form example of XML file, back end " NMPT " is non-leaf elements node as mentioned above, and node element " BRDSTART " is arranged in its child nodes; Back end " BRDSTART " is the leaf elements node, does not have node element in its child nodes.
The simple elements node is meant the leaf elements node in the XML data configuration file, does not promptly allow the existence of node element in its child nodes, only may have text node and note node, and wherein text node is corresponding with particular configuration data.The complex element node is meant the non-leaf elements node in the XML data configuration file, promptly allows to exist node element and/or note node in its child nodes, does not have the text node of non-NULL to exist.
Each back end in the data configuration file all has node identification, is used for identifying uniquely the corresponding data node; Back end also has certain attribute simultaneously, and for example, whether the data of back end are static configuration data.Data type is meant all kinds of the data that can relate in the data configuration file, as integer (int), character string (string) etc.
Transformation rule one
1) in early version data configuration file and the redaction default data configuration file, when the back end that is complementary is the simple elements node, the attribute of redaction back end adopts the attribute of the redaction default data node of coupling fully, if the early version back end is identical with the data type of the redaction default data node of coupling, then the redaction back end adopts the configuration data of the early version back end of coupling fully; If the early version back end is different with the data type of the redaction default data node of coupling, and the data type of redaction default data node is numeral, then when the early version back end can satisfy the data type area requirement of redaction grammar file, data type scope as the early version back end is consistent with the data type scope of redaction grammar file, and for example the data type scope of redaction grammar file can comprise the data type scope of early version back end, the redaction back end adopts the configuration data of the early version back end of coupling, when the early version back end can't satisfy the data type area requirement of redaction grammar file, the redaction back end used the default configuration data of the redaction default data node of coupling; If in these two data nodes of the redaction default data node of early version back end and coupling, the data type of a data node is a character string, the data type of another back end is a numeral, and then the redaction back end adopts the default configuration data of the redaction default data node of coupling.
2) in early version data configuration file and the redaction default data configuration file, when the back end that is complementary is the complex element node, the attribute of redaction back end adopts the attribute of the redaction default data node of coupling fully, in the child nodes of complex element node, search for the matched data node then, if can search the matched data node, then continue to change according to transformation rule one; If can't search the matched data node, then continue to change according to follow-up transformation rule two and transformation rule three.
3) in early version data configuration file and the redaction default data configuration file, in these two data nodes of the redaction default data node of early version back end and coupling, a data node is the complex element node, another back end is the simple elements node, and then the redaction back end adopts the default configuration data of redaction default data node fully.
Step 205: change according to transformation rule two and/or three pairs of early version back end, continue execution in step 206 then.
Transformation rule two
The non-existent back end in the configuration file of redaction default data for existing in the early version data configuration file does not then comprise the back end that exists in the early version data configuration file only in the redaction data configuration file.
Transformation rule three
The back end that exists in the configuration file of redaction default data for not existing in the early version data configuration file, need be according to the minimum data number of nodes m of back end quantity n in the early version data configuration file and redaction grammatical norm, determine whether to need in the redaction data configuration file to add the back end that exists in the redaction default data configuration file only, if n 〉=m then need not to add the back end that exists in the redaction default data configuration file only in the redaction data configuration file; If n<m then needs to add the back end that exists in the redaction default data configuration file only in the redaction data configuration file.When the back end that will be only exists in the configuration file of redaction default data is added in the redaction data configuration file, judge at first whether the back end that will add exists in the redaction data configuration file, if, then jump to next back end to be added in the configuration file of redaction default data, otherwise, the corresponding data node is added in the redaction data configuration file, does not repeat with the back end that has existed in the back end that guarantee to add and the redaction data configuration file.
Step 206: judge whether also to exist early version configuration subtree or the redaction default configuration subtree handled, if then return execution in step 201; Otherwise, finish flow path switch, continue execution in step 104.
Step 104: will generate the redaction data configuration file through the configuration data of conversion, and realize the upgrading of data configuration file.
Fig. 3 shows data configuration file smooth upgrade schematic diagram among the present invention, as shown in Figure 3, during the software release upgrade of base station, the default data configuration file that the grammar file and the full configuration of redaction are put is unpacked under the assigned catalogue, after the base station resets, in the process that XML data center starts, XML data smoothing upgrading unit generates the redaction data configuration file, and uses the redaction grammar file that the redaction data configuration file is carried out strict prevention verification according to the configuration tree of early version, the default configuration tree of redaction.The described operation of Fig. 1 and Fig. 2 is carried out by XML data smoothing upgrading unit, and this XML data smoothing upgrading unit is positioned at the XML data center of base station.
Fig. 4 shows XML data smoothing upgrading cellular construction schematic diagram among the present invention, as shown in Figure 4, XML data smoothing upgrading unit comprises XML resolution unit, converting unit and generation unit, wherein, the default data configuration file that the XML resolution unit is used for the full configuration of redaction is put is resolved, and generates redaction default configuration tree and offers converting unit; Converting unit is used to obtain the root node of early version configuration tree and redaction default configuration tree, two stalks tree is compared, and change according to stored conversion rule, and the configuration data after the conversion is offered generation unit; Generation unit is used for the configuration data through conversion is generated the redaction data configuration file.
When carrying out the software version rollback, processing procedure is identical with above description, be consistent with the processing of the above upgrading when carrying out the rollback of software version, the problem that data configuration file can't automatic rollback when having solved version rollback in the prior art repeats no more.Therefore, the scheme that the present invention proposes can make data configuration file smoothly change between different software versions, promptly all be suitable for corresponding the getting final product of software version after only need making default data configuration file that full configuration puts and changing at software release upgrade and software version rollback.
The scheme that the present invention proposes is applicable to and XML has the conversion of data configuration file between different editions of the alternative document form of same characteristics.
The scheme that the present invention proposes is applicable to any situation about data configuration file need be changed between different software versions, as needing other network element of configuration data equally with the base station.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (15)

1, the method changed between different software versions of a kind of data configuration file is characterized in that the method includes the steps of:
The default data configuration file that A, setting are put corresponding to the full configuration of current software version;
B1, described default data configuration file is resolved, generate current version default configuration tree;
B2, obtain the root node of original version configuration tree and current version default configuration tree;
B3, by to the root node of original version configuration tree down subtree and the subtree under the root node set of current version default configuration compare, the data configuration file of original version is changed;
The data configuration file of B4, generation current version.
2, method according to claim 1 is characterized in that, the default data configuration file that full configuration is put described in the steps A, for: comprise that the back end that all need dispose and the configuration data of back end are the data configuration file of default value.
3, method according to claim 1 is characterized in that, between described step B2 and the step B3, further comprises:
B30, judge whether original version configuration subtree root node needs to carry out special processing, if, call the node processing function this back end is handled, otherwise, execution in step B3 continued.
4, method according to claim 3 is characterized in that, before the described step B30, further comprises: the sign and the node processing function that needs are carried out the back end of special processing are registered in the special processing node listing.
5, method according to claim 3 is characterized in that, described step B3 may further comprise the steps:
B31, judge whether the single data node of original version configuration subtree and the single data node of current version default configuration subtree are the matched data node, if, then continue execution in step B32, otherwise, continuation execution in step B33;
The attribute of B32, current version back end adopts the attribute of the current version default data node of coupling, finishes current flow path switch;
B33, for existing in the original version data configuration file non-existent back end in the configuration file of current version default data, do not comprise the back end that exists in the original version data configuration file only in the current version data configuration file, and/or, the back end that exists in the configuration file of current version default data for not existing in the original version data configuration file is added into described back end in the current version data configuration file.
6, method according to claim 5, it is characterized in that, before the current flow path switch of the described end of step B32, further comprise: when the back end that is complementary is the simple elements node, if the original version back end is identical with the data type of the current version default data node of coupling, then the current version back end adopts the configuration data of the original version back end of coupling; If the original version back end is different with the data type of the current version default data node of coupling, and the data type of current version default data node is numeral, when the original version back end can satisfy the data type area requirement of current version grammar file, the current version back end adopts the configuration data of the original version back end of coupling, when the original version back end can't satisfy the data type area requirement of current version grammar file, the current version back end adopted the default configuration data of the current version default data node of coupling; If in these two data nodes of the current version default data node of original version back end and coupling, the data type of a data node is a character string, the data type of another back end is a numeral, and then the current version back end adopts the default configuration data of the current version default data node of coupling.
7, method according to claim 5, it is characterized in that, further comprise before the described step B32: when the back end that is complementary is the complex element node, search matched data node in the child nodes of complex element node, if can search the matched data node, then continue execution in step B32; If can't search the matched data node, then continue execution in step B33.
8, method according to claim 7, it is characterized in that, described step B32 further comprises: in these two data nodes of the current version default data node of original version back end and coupling, a data node is the complex element node, another back end is the simple elements node, and then the current version back end adopts the default configuration data of current version default data node fully.
According to claim 6 or 8 described methods, it is characterized in that 9, described simple elements node is: the back end that does not allow node element to exist in the child nodes.
According to claim 7 or 8 described methods, it is characterized in that 10, described complex element node is to allow to exist node element and/or note node in the child nodes, and do not have the back end of the text node existence of non-NULL.
11, method according to claim 5, it is characterized in that, described in the step B33 described back end is added in the current version data configuration file, for: the back end quantity in the original version data configuration file is n, the minimum data number of nodes of current version grammatical norm is m, if n 〉=m does not then need to add the back end that exists in the current version default data configuration file only in the current version data configuration file; If n<m then needs to add the back end that exists in the current version default data configuration file only in the current version data configuration file.
12, method according to claim 11, it is characterized in that, the back end that exists in the described only current version default data configuration file is added in the current version data configuration file, comprise: judge at first whether the back end that will add exists in the current version data configuration file, if, then jump to next back end to be added in the configuration file of current version default data, otherwise, this back end is added in the current version data configuration file.
13, method according to claim 3, it is characterized in that, after step B32 or the step B33, further comprise: judge whether also to exist original version configuration subtree or the current version default configuration subtree handled, if then return execution in step B31; Otherwise, continue execution in step B4.
14, method according to claim 3, it is characterized in that described calling after the node processing function handles this back end further comprises: judge whether also to exist the original version configuration subtree of handling, if then return execution in step B30; Otherwise, continue execution in step B3.
15, the device changed between different software versions of a kind of data configuration file is characterized in that this device comprises:
Resolution unit, the default data configuration file that is used for the full configuration of current version is put is resolved, and generates current version default configuration tree and offers converting unit;
Converting unit, be used to obtain the root node of original version configuration tree and current version default configuration tree, by the subtree under the root node of subtree under the root node of original version configuration tree and current version default configuration tree is compared, the data configuration file of original version is changed, the configuration data after the conversion is offered generation unit;
Generation unit is used for the configuration data through conversion is generated the current version data configuration file.
CNB2006101097122A 2006-08-07 2006-08-07 Method and device for transformation of data configuration file in different editions of software Active CN100493221C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101097122A CN100493221C (en) 2006-08-07 2006-08-07 Method and device for transformation of data configuration file in different editions of software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101097122A CN100493221C (en) 2006-08-07 2006-08-07 Method and device for transformation of data configuration file in different editions of software

Publications (2)

Publication Number Publication Date
CN1909693A CN1909693A (en) 2007-02-07
CN100493221C true CN100493221C (en) 2009-05-27

Family

ID=37700662

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101097122A Active CN100493221C (en) 2006-08-07 2006-08-07 Method and device for transformation of data configuration file in different editions of software

Country Status (1)

Country Link
CN (1) CN100493221C (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355560B (en) * 2008-09-12 2011-12-14 深圳市联软科技有限公司 Method and system for transmitting data
CN101437179B (en) * 2008-12-17 2011-02-09 烽火通信科技股份有限公司 Method for implementing batch synchronization multi-configuration data based on EPON system
JP5761200B2 (en) * 2010-11-09 2015-08-12 日本電気株式会社 Information processing device
CN102195817B (en) * 2011-05-25 2014-09-17 上海华为技术有限公司 Software upgrading method and device and software rollback method and device
CN102546815A (en) * 2012-01-20 2012-07-04 王鑫 Synchronous system and synchronous method among digital electron terminals
CN102742215B (en) 2012-02-17 2015-01-07 华为技术有限公司 Method and device for clearing configuration command in communication equipment
CN102611580B (en) * 2012-04-01 2014-10-29 Ut斯达康通讯有限公司 Multi-version network management method based on specification drive
CN104794236B (en) * 2015-05-07 2018-04-20 中国测绘科学研究院 A kind of map making rule structure and its structured organization method and system
CN106325892A (en) * 2015-06-15 2017-01-11 中兴通讯股份有限公司 Method and device for difference backspacing upgrade
CN108958827B (en) * 2017-05-25 2021-11-02 贵州白山云科技股份有限公司 Method and system for processing program upgrading fault
CN107608694B (en) * 2017-09-18 2020-05-19 杭州安恒信息技术股份有限公司 Security product configuration upgrading method and device
CN109491701A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 A kind of configuration information recovery method, system, equipment and computer storage medium
CN110175020B (en) * 2019-04-10 2023-08-22 创新先进技术有限公司 Frame attribute information expansion method and device, and frame loading method and device
CN110347413B (en) * 2019-06-27 2023-06-27 北京口袋时尚科技有限公司 Software configuration information updating method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于J2EE的电信管理网OMC***配置管理的研究与实现. 司立坤,全文,大连理工大学硕士学位论文. 2005
基于J2EE的电信管理网OMC***配置管理的研究与实现. 司立坤,全文,大连理工大学硕士学位论文. 2005 *

Also Published As

Publication number Publication date
CN1909693A (en) 2007-02-07

Similar Documents

Publication Publication Date Title
CN100493221C (en) Method and device for transformation of data configuration file in different editions of software
CN100407206C (en) Method and system for transformation between different version configuration data
US7620658B2 (en) Configuration of a directory system
US9727604B2 (en) Generating code for an integrated data system
US7689582B2 (en) Data flow system and method for heterogeneous data integration environments
CN100489774C (en) Structured code automatic configuration method and device
US7032210B2 (en) Method and system for generating program source code of a computer application from an information model
CN105740411B (en) A kind of data migration method based on SOA and WebService
CN107678736A (en) A kind of business Page Template shows method, system and computer installation
US20030126152A1 (en) Export engine which builds relational database directly from object model
CN1526104B (en) Parsing structured data
CN106649771A (en) Data model updating method and system for database
US20080098037A1 (en) Markup language based database upgrades
CN107864052A (en) Method and its system based on lasting application deployment configuration automatic updating
CN101673199A (en) Terminal parameter configuration server and automatic generating method of software interface thereof
US20080155519A1 (en) Code translator
CN102801565B (en) Method for carrying out centralized management on service configuration in network management system
CN101436185A (en) Method for implementing multiple-file compatibility by XML memory tree
CN102043657A (en) File serialization method of model library of physical modeling language Modelica
CN107193917A (en) Whole station CONFIG.SYS lossless data update method based on IID
JPH0667867A (en) Data base accessing system for application program
CN106250134A (en) The code automatic generation method of unicity language
CN101303646B (en) Modeling method based on electric communication field capable of performing meta language
JP2001325098A (en) Method for preparing application program method for operating database, method for managing item object, method for controlling module operation and computer- readable recording medium recorded with program for realizing operation, management and control methods
US8001110B2 (en) Apparatus, method, and computer program product for processing databases

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