Movatterモバイル変換


[0]ホーム

URL:


CN100407206C - Method and system for converting between different versions of configuration data - Google Patents

Method and system for converting between different versions of configuration data
Download PDF

Info

Publication number
CN100407206C
CN100407206CCN2006100031522ACN200610003152ACN100407206CCN 100407206 CCN100407206 CCN 100407206CCN 2006100031522 ACN2006100031522 ACN 2006100031522ACN 200610003152 ACN200610003152 ACN 200610003152ACN 100407206 CCN100407206 CCN 100407206C
Authority
CN
China
Prior art keywords
data
data object
object tree
configuration
node
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.)
Expired - Fee Related
Application number
CN2006100031522A
Other languages
Chinese (zh)
Other versions
CN1866252A (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 LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN2006100031522ApriorityCriticalpatent/CN100407206C/en
Publication of CN1866252ApublicationCriticalpatent/CN1866252A/en
Application grantedgrantedCritical
Publication of CN100407206CpublicationCriticalpatent/CN100407206C/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明涉及一种不同版本的配置数据间进行转换的方法和系统,其核心是:首先使用中间数据配置文件描述所有新版本中相对于旧版本中需要处理的配置数据;然后根据所述中间数据配置文件和旧版本的配置数据生成与新版本的数据配置语法文件相对应的配置数据。通过本发明,系统能够根据数据配置语法文件和中间数据配置文件对不同版本间的配置数据自动进行转换,从而能够方便系统中配置数据的升级;另外,使系统软件版本的升级与后台软件的依赖性降低,而且版本回退和升级流程一致;再者,新旧版本的数据配置文件之间的逻辑关联性和节点的含义可以明确表达出来,可读性增强;而且,对新版本的数据配置文件中所有节点的语法校验得到了增强。

Figure 200610003152

The present invention relates to a method and system for converting configuration data of different versions, the core of which is: first use intermediate data configuration files to describe the configuration data that needs to be processed in all new versions relative to the old version; then according to the intermediate data Configuration files and old version configuration data Generate configuration data corresponding to new version data configuration syntax files. Through the present invention, the system can automatically convert the configuration data between different versions according to the data configuration syntax file and the intermediate data configuration file, so that the upgrade of the configuration data in the system can be facilitated; in addition, the upgrade of the system software version and the dependence of the background software The reliability is reduced, and the version rollback and upgrade process are consistent; moreover, the logical association between the old and new versions of the data configuration file and the meaning of the nodes can be clearly expressed, and the readability is enhanced; moreover, the new version of the data configuration file Syntax validation has been enhanced for all nodes in .

Figure 200610003152

Description

Translated fromChinese
不同版本的配置数据间进行转换的方法和系统Method and system for converting between different versions of configuration data

技术领域technical field

本发明涉及通信领域,尤其涉及不同版本的配置数据间的转换。The invention relates to the communication field, in particular to the conversion between configuration data of different versions.

背景技术Background technique

当前系统软件的配置数据是采用XML文件的格式存放的,该文件称为XML数据配置文件。为了在系统启动和修改配置数据时能够对配置数据进行比较严格的合法性检查,在系统启动时,XML数据中心除了需具有数据配置文件外,还需有一个用来定义所述数据配置文件的语法的配套文件,即数据配置语法文件,如SCHEMA语法文件。The configuration data of the current system software is stored in the format of an XML file, which is called an XML data configuration file. In order to perform strict legality checks on the configuration data when the system starts and modifies the configuration data, when the system starts, the XML data center needs not only the data configuration file, but also a data configuration file used to define the The supporting file of the syntax is the data configuration syntax file, such as the SCHEMA syntax file.

由于系统中不同版本间的数据配置文件进行转换时,不可避免地存在XML配置数据节点的增加、删除和修改,这样容易导致不同版本的数据配置文件和语法文件存在一定的差异。When converting data configuration files between different versions in the system, there will inevitably be addition, deletion and modification of XML configuration data nodes, which will easily lead to certain differences between data configuration files and syntax files of different versions.

另外,对于一个指定数据配置文件版本的系统,其XML语法文件是固定不变的,可以作为软件包的一部分,在基站升级过程中其数据配置语法文件就自动升级了,但是对于数据配置文件,是随用户的具体配置而改变的,不同的基站也有不同的数据配置文件,在基站软件版本升级前后,需要保持用户配置数据的延续性,因此就需要在基站升级后,保持原来配置好的配置数据不变。如果直接采用老的数据配置文件,又可能导致老的数据配置文件和新版本的数据配置语法文件不匹配的现象出现,以至于当进行语法校验时容易导致校验失败,因此需要在基站进行软件升级的过程中对数据配置文件进行同步升级。In addition, for a system that specifies the version of the data configuration file, its XML syntax file is fixed and can be used as a part of the software package. The data configuration syntax file is automatically upgraded during the upgrade process of the base station, but for the data configuration file, It changes with the specific configuration of the user. Different base stations also have different data configuration files. Before and after the upgrade of the base station software version, the continuity of the user configuration data needs to be maintained. Therefore, it is necessary to maintain the original configured configuration after the base station is upgraded. The data is unchanged. If the old data configuration file is used directly, it may cause a mismatch between the old data configuration file and the new version of the data configuration syntax file, so that it is easy to cause the verification failure when performing syntax verification, so it needs to be performed in the base station. During the software upgrade process, the data configuration files are updated synchronously.

与本发明相关的现有技术一,是在后台通过手工或后台软件来配置数据配置文件,从而实现基站中不同版本的数据配置文件间的转换。其实现过程如下:The first prior art related to the present invention is to configure the data configuration files manually or by background software in the background, so as to realize the conversion between different versions of the data configuration files in the base station. Its implementation process is as follows:

用户在下载基站系统升级软件包前,首先将数据配置文件上传给后台,然后借助后台软件将旧版本的数据配置文件转换为新版本的数据配置文件(或者手工填写XML节点),接着再将新版本的数据配置文件下载到基站,最后配合所述下载的新的系统升级软件包进行数据处理,达到系统原有配置数据能够沿用的目的。Before downloading the base station system upgrade software package, the user first uploads the data configuration file to the background, and then uses the background software to convert the old version of the data configuration file into a new version of the data configuration file (or manually fill in the XML node), and then uploads the new version The versioned data configuration file is downloaded to the base station, and finally data processing is carried out in conjunction with the downloaded new system upgrade software package, so that the original configuration data of the system can be used continuously.

由现有技术一的技术方案可以看出,其存在如下缺陷:As can be seen from the technical solution ofprior art 1, it has the following defects:

1、如果采用用户手工数据配置文件进行升级的方法,显然太麻烦,当系统软件进行批量升级时,采用这种方法就更加不可能了。1. It is obviously too troublesome to use manual data configuration files to upgrade. When the system software is upgraded in batches, it is even more impossible to use this method.

2、如果采用后台软件实现数据配置文件自动升级的方法,基站软件版本与后台软件版本间的依赖性太强,而基站软件和后台软件版本间的配套难以保证。2. If the background software is used to automatically upgrade the data configuration file, the dependence between the base station software version and the background software version is too strong, and it is difficult to guarantee the matching between the base station software and the background software version.

3、由于在后台软件中数据配置文件的转换具有不可逆性,因此在进行版本回退(由高版本向低版本回退)时,通过后台软件实现数据配置文件自动升级的方法就很难实现系统数据配置文件的自动转化。3. Since the conversion of the data configuration file in the background software is irreversible, it is difficult to implement the method of automatically upgrading the data configuration file through the background software when the version rolls back (rolling back from a high version to a low version). Automatic conversion of data profiles.

与本发明有关的现有技术二是通过在数据配置文件中采用Reserved字段来实现数据配置文件的平滑升级,其实现方法如下:The second prior art related to the present invention is to realize the smooth upgrade of the data configuration file by using the Reserved field in the data configuration file, and its implementation method is as follows:

在数据配置语法文件中对各种类型的数据节点进行预留,称为Reserved节点,这些数据节点不具有结构性和层次关系,所有的数据节点都处于同一层中,每一个数据节点对应着基站中一个配置数据。另外,在数据配置语法文件中定义足够的对应配置数据的数据类型,且每个数据类型的数据个数不加以限制,当基站的软件版本升级时,在新的版本中增加和修改节点一律采用增加Reserved节点的方法来实现,在新版本需要删除节点时,不作任何处理,保持原来数据结构的完整性。这样在不同的版本之间,只存在Reserved节点的增减,数据配置语法文件不需要改变。也就是说,在版本升级过程中,新软件中的数据配置语法文件中包含一个本版本相对于基准版本增加的Reserved节点的补丁数据文件,在系统升级起来之后,将补丁数据文件的新增Reserved节点自动增加到原来的数据配置文件中。In the data configuration syntax file, various types of data nodes are reserved, called Reserved nodes. These data nodes do not have structural and hierarchical relationships. All data nodes are in the same layer, and each data node corresponds to the base station. in a configuration data. In addition, enough data types corresponding to the configuration data are defined in the data configuration syntax file, and the number of data of each data type is not limited. When the software version of the base station is upgraded, all nodes are added and modified in the new version. The method of adding Reserved nodes is implemented. When the new version needs to delete nodes, no processing is done to maintain the integrity of the original data structure. In this way, between different versions, there is only an increase or decrease of the Reserved node, and the data configuration syntax file does not need to be changed. That is to say, during the version upgrade process, the data configuration syntax file in the new software contains a patch data file of the Reserved node added in this version compared to the baseline version. After the system is upgraded, the newly added Reserved node of the patch data file Nodes are automatically added to the original data configuration file.

由现有技术二的技术方案可以看出,其存在如下的缺陷:As can be seen from the technical solution ofprior art 2, it has the following defects:

1、由于新增Reserved节点之间不存在明确的关联性,即所有新增Reserved节点都在同一层,从而失去了数据节点间的层次结构性。1. Since there is no clear correlation between newly added Reserved nodes, that is, all newly added Reserved nodes are on the same layer, thus losing the hierarchical structure between data nodes.

2、新增节点在数据配置中心的含义不明确,因为节点名称在预留时都被定死了,需要通过后台软件辅助来看这些新增节点的代表参数的含义。2. The meaning of the newly added nodes in the data configuration center is not clear, because the node names are all fixed when reserved, and the meaning of the representative parameters of these newly added nodes needs to be viewed through the assistance of the background software.

3、对新增节点只做了节点类型的语法校验,没有对节点的个数和顺序做严格的语法校验,这样就违背了采用XML文件作为数据配置文件的初衷。3. Only the syntax check of the node type is done for the newly added nodes, and no strict syntax check is done for the number and order of the nodes, which violates the original intention of using the XML file as the data configuration file.

发明内容Contents of the invention

本发明的目的是提供一种不同版本的配置数据间进行转换的方法和系统,通过本发明,系统能够根据数据配置语法文件和中间数据配置文件对不同版本间的配置数据自动进行转换,从而能够方便系统中配置数据的升级;另外,使系统软件版本的升级与后台软件的依赖性降低,而且版本回退和升级流程一致,从而解决了版本回退时数据配置文件不能自动回退的问题;再者,新旧版本的数据配置文件之间的逻辑关联性和节点的含义可以明确表达出来,可读性增强;而且,对新版本的数据配置文件中所有节点的语法校验得到了增强,真正达到了采用XML文件作为数据配置文件的目的。The purpose of the present invention is to provide a method and system for converting configuration data of different versions. Through the present invention, the system can automatically convert configuration data between different versions according to the data configuration syntax file and the intermediate data configuration file, thereby being able to It facilitates the upgrade of configuration data in the system; in addition, it reduces the dependence between the upgrade of the system software version and the background software, and the version rollback is consistent with the upgrade process, thus solving the problem that the data configuration file cannot be rolled back automatically when the version rolls back; Furthermore, the logical association between the old and new versions of the data configuration files and the meaning of the nodes can be clearly expressed, and the readability is enhanced; moreover, the syntax check of all nodes in the new version of the data configuration files has been enhanced, truly The goal of using XML files as data configuration files is achieved.

本发明的目的是通过以下技术方案实现的:The purpose of the present invention is achieved through the following technical solutions:

本发明提供一种不同版本的配置数据间进行转换的方法,其包括:The present invention provides a method for converting configuration data of different versions, which includes:

A、使用中间数据配置文件描述新版本中相对于旧版本中需要处理的配置数据;A. Use the intermediate data configuration file to describe the configuration data that needs to be processed in the new version relative to the old version;

B1、根据旧版本的配置数据得到旧版本的数据对象树;B1. Obtain the data object tree of the old version according to the configuration data of the old version;

B2、根据所述中间数据配置文件生成中间数据对象树,并根据所述中间数据对象树中的配置数据的特殊属性对所述旧版本的数据对象树进行处理,得到新版本的数据对象树;B2. Generate an intermediate data object tree according to the intermediate data configuration file, and process the old version of the data object tree according to the special attributes of the configuration data in the intermediate data object tree to obtain a new version of the data object tree;

所述特殊属性包括:增加、修改和/或删除属性;The special attributes include: adding, modifying and/or deleting attributes;

B3、使用新版本的语法文件对所述新版本的数据对象树进行语法校验处理,并当语法校验通过后,结束旧版本配置数据向新版本配置数据的转换过程。B3. Use the syntax file of the new version to perform syntax verification processing on the new version of the data object tree, and when the syntax verification is passed, end the conversion process from the old version configuration data to the new version configuration data.

其中,所述步骤A具体为:Wherein, the step A is specifically:

使用缺省数据配置文件或自定义的数据配置文件描述新版本中相对于旧版本中需要增加、修改和/或删除的配置数据,并用特殊属性标识所述配置数据。Use a default data configuration file or a custom data configuration file to describe the configuration data that needs to be added, modified and/or deleted in the new version relative to the old version, and identify the configuration data with special attributes.

其中,所述步骤B1具体为:Wherein, the step B1 is specifically:

B11、使用旧版本的数据配置文件生成旧版本的数据对象树;B11, using the old version of the data configuration file to generate the old version of the data object tree;

B12、使用旧版本的数据配置语法文件对所述旧版本的数据对象树进行语法校验,并当语法校验通过后,确认所述旧版本的数据对象树。B12. Use the old version of the data configuration syntax file to perform syntax verification on the old version of the data object tree, and confirm the old version of the data object tree after the syntax verification is passed.

其中,所述步骤B2具体为:Wherein, the step B2 is specifically:

B21、XML数据中心使用XML解析器加载所述中间数据配置文件生成对应的中间数据对象树;B21. The XML data center uses an XML parser to load the intermediate data configuration file to generate a corresponding intermediate data object tree;

B22、从所述中间数据对象树中逐个读取相应的节点;B22. Read corresponding nodes one by one from the intermediate data object tree;

B23、按照所述节点的添加、修改和/或删除特殊属性对所述旧版本的数据对象树进行处理,并根据处理结果得到新版本的数据对象树。B23. Process the old version of the data object tree according to the addition, modification and/or deletion of special attributes of the node, and obtain a new version of the data object tree according to the processing result.

其中,当节点的特殊属性为添加时,所述步骤B23具体为:Wherein, when the special attribute of the node is added, the step B23 is specifically:

B231、按照所述节点在所述中间数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点不存在时,则将所述节点的标识、基本属性和/或缺省值信息添加到所述旧版本的数据对象树中的相应路径位置上,然后继续执行步骤B232;当确认所述节点已经存在时,则跳过所述节点,然后执行步骤B232;B231. Search whether the node exists according to the corresponding path of the node in the intermediate data object tree in the old version of the data object tree, and when it is confirmed that the node does not exist, the identification of the node , basic attributes and/or default value information are added to the corresponding path position in the old version of the data object tree, and then proceed to step B232; when it is confirmed that the node already exists, then skip the node, and then Execute step B232;

B232、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B231。B232. Judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B231.

其中,当节点的特殊属性为修改时,所述步骤B23具体为:Wherein, when the special attribute of the node is modified, the step B23 is specifically:

B233、按照所述节点在所述中间数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点存在时,则使用所述中间数据对象树中所述节点的基本属性更新所述旧版本的数据对象树中的相应节点的基本属性,然后继续执行步骤B234;如果确认所述节点不存在时,则跳过所述节点,然后执行步骤B234;B233. Search whether the node exists according to the corresponding path of the node in the intermediate data object tree in the old version of the data object tree, and use the intermediate data object tree when it is confirmed that the node exists update the basic attributes of the corresponding nodes in the old version of the data object tree, and then proceed to step B234; if it is confirmed that the node does not exist, then skip the node, and then execute step B234 ;

B234、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B233。B234. Determine whether all the nodes in the intermediate data object tree have been read, if so, end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B233.

其中,当节点的特殊属性为删除时,所述步骤B23具体为:Wherein, when the special attribute of the node is deletion, the step B23 is specifically:

B235、按照所述节点在所述中间数据对象树中的路径在所述旧版本的数据对象树中的相应路径搜索是否存在所述节点,如果存在,则直接将其删除,然后继续执行步骤B236;如果不存在,则跳过所述节点,然后继续执行步骤B236;B235. Search whether the node exists according to the path of the node in the intermediate data object tree in the corresponding path in the old version of the data object tree, and if it exists, delete it directly, and then proceed to step B236 ; If it does not exist, then skip the node, and then proceed to step B236;

B236、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B235。B236. Judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B235.

本发明提供一种不同版本的配置数据间进行转换的系统,其包括:The present invention provides a system for converting configuration data of different versions, which includes:

数据配置文件生成模块和配置数据转换模块;A data configuration file generation module and a configuration data conversion module;

所述数据配置文件生成模块,用于生成中间数据配置文件,并利用所述中间数据配置文件描述新版本中相对于旧版本中发生变化的配置数据;The data configuration file generation module is used to generate an intermediate data configuration file, and use the intermediate data configuration file to describe the configuration data that changes in the new version relative to the old version;

当不同版本的配置数据转换时,所述配置数据转换模块根据所述生成的中间数据配置文件和旧版本的配置数据生成与新版本的数据配置语法文件相对应的配置数据;When different versions of configuration data are converted, the configuration data conversion module generates configuration data corresponding to the new version of the data configuration syntax file according to the generated intermediate data configuration file and the configuration data of the old version;

所述系统中还包括:Also included in the system:

数据对象树生成模块,用于根据所述数据配置文件生成模块生成的中间数据配置文件生成相应的中间数据对象树;以及,根据旧版本的数据配置文件生成相应的旧版本的数据对象树;A data object tree generation module, configured to generate a corresponding intermediate data object tree according to the intermediate data configuration file generated by the data configuration file generation module; and generate a corresponding old version of the data object tree according to the old version of the data configuration file;

所述配置数据转换模块包括数据对象特殊属性识别模块和数据对象转换模块;The configuration data conversion module includes a data object special attribute identification module and a data object conversion module;

所述数据对象特殊属性识别模块,用于识别所述中间数据对象树中的节点的特殊属性,并将其传送给所述数据对象转换模块,所述特殊属性包括:增加、修改和/或删除属性;The data object special attribute identification module is used to identify the special attribute of the node in the intermediate data object tree and transmit it to the data object conversion module, the special attribute includes: adding, modifying and/or deleting Attributes;

所述数据对象转换模块根据所述特殊属性对旧版本的数据对象树进行处理,并根据处理结果生成新版本的数据对象树。The data object conversion module processes the old version of the data object tree according to the special attribute, and generates a new version of the data object tree according to the processing result.

其中,所述的系统还包括:Wherein, the system also includes:

语法校验模块,用于将所述生成的新版本的数据对象树中的数据对象与新版本的配置数据语法文件进行语法校验。A syntax checking module, configured to check the syntax of the data objects in the generated new version of the data object tree and the configuration data syntax file of the new version.

由上述本发明提供的技术方案可以看出,本发明中,首先使用数据配置文件描述所有新版本中相对于旧版本中需要处理的配置数据;然后根据所述数据配置文件和旧版本的配置数据生成与新版本的数据配置语法文件相对应的配置数据。通过本发明,系统能够根据数据配置语法文件和中间数据配置文件对不同版本间的配置数据自动进行转换,从而能够方便系统中配置数据的升级;另外,使系统软件版本的升级与后台软件的依赖性降低,而且版本回退和升级流程一致,从而解决了版本回退时数据配置文件不能自动回退的问题;再者,新旧版本的数据配置文件之间的逻辑关联性和节点的含义可以明确表达出来,可读性增强;而且,对新版本的数据配置文件中所有节点的语法校验得到了增强,真正达到了采用XML文件作为数据配置文件的目的。As can be seen from the technical solution provided by the present invention above, in the present invention, first use the data configuration file to describe the configuration data that needs to be processed in all new versions relative to the old version; then according to the data configuration file and the configuration data of the old version Generate configuration data corresponding to the new version of the data configuration syntax file. Through the present invention, the system can automatically convert the configuration data between different versions according to the data configuration syntax file and the intermediate data configuration file, so that the upgrade of the configuration data in the system can be facilitated; in addition, the upgrade of the system software version and the dependence of the background software The stability is reduced, and the version rollback and upgrade process are consistent, thus solving the problem that the data configuration file cannot be rolled back automatically when the version is rolled back; moreover, the logical association between the old and new version data configuration files and the meaning of the nodes can be clearly defined Expressed, the readability is enhanced; moreover, the syntax check of all nodes in the new version of the data configuration file has been enhanced, and the purpose of using XML files as the data configuration file has really been achieved.

附图说明Description of drawings

图1为本发明提供的第一实施例中的系统原理框图;Fig. 1 is the functional block diagram of the system in the first embodiment provided by the present invention;

图2为本发明提供的第二实施例中的方法流程图。Fig. 2 is a flow chart of the method in the second embodiment provided by the present invention.

具体实施方式Detailed ways

针对本发明所述的系统,本发明提供了第一实施例,其如图1所示,包括:数据配置文件生成模块、数据对象树生成模块,这里为XML解析器、配置数据转换模块和语法校验模块;其中所述配置数据转换模块包括数据对象特殊属性识别模块和数据对象转换模块。For the system described in the present invention, the present invention provides the first embodiment, and it as shown in Figure 1, comprises: data configuration file generation module, data object tree generation module, here is XML parser, configuration data conversion module and grammar A verification module; wherein the configuration data conversion module includes a data object special attribute identification module and a data object conversion module.

在系统新版本的软件中,需要包含该版本的数据配置语法文件,同时还包含一个中间数据配置文件,该文件中描述了所有标识有添加、修改和/或删除特殊属性的配置节点的路径、标识、基本属性和缺省数据值。在系统的不同版本的配置数据进行转换的过程中,软件自行将新版本的语法文件和中间数据配置文件放到系统指定的文件目录下,系统复位后,在XML数据中心启动的过程中,配置数据转换模块根据旧版本的配置对象树和中间配置数据文件及新旧两个版本的语法文件生成新版本的配置对象树和数据配置文件。具体实施过程如下:In the software of the new version of the system, the data configuration syntax file of this version needs to be included, and an intermediate data configuration file is also included, which describes the path of all configuration nodes marked with adding, modifying and/or deleting special properties, ID, base attributes, and default data values. During the process of converting configuration data of different versions of the system, the software automatically puts the new version of syntax files and intermediate data configuration files in the file directory specified by the system. After the system is reset, the configuration The data conversion module generates a new version of the configuration object tree and data configuration files according to the old version of the configuration object tree and the intermediate configuration data files and the syntax files of the old and new versions. The specific implementation process is as follows:

所述数据配置文件生成模块生成中间数据配置文件,并利用所述中间数据配置文件描述所有新版本中相对于旧版本中发生变化的配置数据。然后将中间数据配置文件传送给所述数据对象树生成模块。The data configuration file generating module generates an intermediate data configuration file, and uses the intermediate data configuration file to describe all configuration data changed in the new version relative to the old version. Then transmit the intermediate data configuration file to the data object tree generating module.

所述数据对象树生成模块,如XML解析器根据所述中间数据配置文件生成相应的中间数据对象树;以及,根据旧版本的数据配置文件生成相应的旧版本的数据对象树。然后将所述中间数据对象树和所述旧版本的数据对象树传送给配置数据转换模块。The data object tree generation module, such as an XML parser, generates a corresponding intermediate data object tree according to the intermediate data configuration file; and generates a corresponding old version of the data object tree according to an old version of the data configuration file. The intermediate data object tree and the old version of the data object tree are then transmitted to the configuration data conversion module.

所述配置数据转换模块中的所述数据对象特殊属性识别模块识别所述中间数据配置文件生成的数据对象树中的节点的特殊属性,并将其传送给所述数据对象转换模块;所述数据对象转换模块根据所述特殊属性对所述数据对象树生成模块生成的旧版本的数据对象树进行相应的添加、修改或删除处理,并根据处理结果生成新版本的数据对象树。最后,将所述生成的新版本的数据对象树传送给所述语法校验模块。The data object special attribute identification module in the configuration data conversion module identifies the special attributes of the nodes in the data object tree generated by the intermediate data configuration file, and transmits it to the data object conversion module; the data The object conversion module adds, modifies or deletes the old version of the data object tree generated by the data object tree generating module according to the special attribute, and generates a new version of the data object tree according to the processing result. Finally, the generated new version of the data object tree is transmitted to the syntax checking module.

所述语法校验模块将所述生成的新版本的数据对象树中的数据对象与新版本的配置数据语法文件进行语法校验。当校验通过后,在内存中保存根据所述新版本的数据对象树生成的新版本的数据配置文件。The syntax verification module performs syntax verification on the data objects in the generated new version of the data object tree and the configuration data syntax file of the new version. When the verification is passed, the new version of the data configuration file generated according to the new version of the data object tree is stored in memory.

针对本发明所述的方法,本发明提供了第二实施例,在该实施例中,系统根据所有新版本相对于旧版本中需处理的配置数据生成中间数据配置文件,然后根据旧版本的数据配置文件和所述中间数据配置文件完成新旧版本数据配置文件的自动转化,并使其与新版本的语法文件相匹配,同时保留旧版本数据配置文件中的配置数据。具体实施过程如图2所示,包括如下步骤:For the method described in the present invention, the present invention provides a second embodiment, in this embodiment, the system generates an intermediate data configuration file according to the configuration data to be processed in all new versions relative to the old version, and then according to the data of the old version The configuration file and the intermediate data configuration file complete the automatic conversion of the old version of the data configuration file and make it match the new version of the grammar file, while retaining the configuration data in the old version of the data configuration file. The specific implementation process is shown in Figure 2, including the following steps:

步骤1,使用中间数据配置文件描述新版本中相对于旧版本中需要增加、修改和/或删除的配置数据,并用特殊属性标识所述配置数据。Step 1, use the intermediate data configuration file to describe the configuration data that needs to be added, modified and/or deleted in the new version compared with the old version, and identify the configuration data with special attributes.

由于XMI数据节点的操作相对于前一版本主要也就是添加、修改、删除操作,本方案就是基于这一特性,使用一个中间数据配置文件来描述所有相对于旧版本软件中需处理的节点。该中间数据配置文件可以为系统根据旧版本的文件格式配置的缺省数据配置文件,也可以为用户根据XML文件的格式自定义的数据配置文件。Since the operation of XMI data nodes compared with the previous version is mainly adding, modifying, and deleting operations, this solution is based on this feature, using an intermediate data configuration file to describe all nodes that need to be processed compared to the old version of the software. The intermediate data configuration file may be a default data configuration file configured by the system according to the file format of the old version, or may be a data configuration file customized by the user according to the format of the XML file.

具体描述如下:The specific description is as follows:

a、如果需要在当前新版本软件新增XML数据节点,则在具有XML格式的中间数据配置文件中描述出该节点所在路径、该节点标识、基本属性和该节点的缺省数据值,最后对该节点添加一个特殊属性以标识出该节点是相对应于旧版本软件中的配置数据需要增加的节点;a. If it is necessary to add an XML data node in the current new version of the software, describe the path where the node is located, the node ID, basic attributes and the default data value of the node in the intermediate data configuration file in XML format, and finally This node adds a special attribute to identify that this node is a node that needs to be added corresponding to the configuration data in the old version of the software;

b、如果当前新版本软件中需要对旧版本中的XML数据节点进行修改,则如上述添加节点描述一样,需要添加一个特殊属性以标识出该节点是相对应于旧版本软件中的配置数据需要修改的节点。但是考虑到实际使用节点的路径不能修改,节点的标识是用来区分节点的,也不能修改,节点的缺省数据值以及值域类型是需要在新版本软件沿用的,所以也不能修改,剩下的只有节点基本属性了,所以在修改节点时,需要修改的只有节点的基本属性。b. If the current new version of the software needs to modify the XML data nodes in the old version, as described above for adding nodes, a special attribute needs to be added to identify that the node corresponds to the configuration data in the old version of the software. The modified node. However, considering that the path of the actually used node cannot be modified, the node identifier is used to distinguish the node and cannot be modified. The default data value and value field type of the node need to be used in the new version of the software, so it cannot be modified. Only the basic properties of the node are left, so when modifying a node, only the basic properties of the node need to be modified.

c、如果旧版本中的某一节点在新版本软件中不再使用,考虑删除该节点操作。如上述添加、修改节点一样,在中间数据配置文件中对需要删除的节点,添加一个特殊属性以标识出该节点是相对应于旧版本软件中的配置数据是需要删除的节点。但是考虑删除节点是个危险操作,譬如某节点在新版本中不再使用但是在旧版本中还需要使用,此时如果删除该节点可能会导致在软件版本回退后(从高软件版本向低软件版本回退),可能会导致读取相应节点数据失败,甚至可能引起系统出错,所以在不同版本配置数据间进行转换时对于XML数据节点的删除操作一定要慎重考虑,只有那些在新版本不再使用,并且在旧版本中即使没有该节点也不会产生错误影响的XML节点才可以标识为删除的特殊属性。c. If a node in the old version is no longer used in the new version of the software, consider deleting the node. Like adding and modifying nodes above, add a special attribute to the node that needs to be deleted in the intermediate data configuration file to identify that the node is a node that needs to be deleted corresponding to the configuration data in the old version of the software. However, it is a dangerous operation to consider deleting a node. For example, a node is no longer used in the new version but still needs to be used in the old version. Version rollback), may cause failure to read the corresponding node data, and may even cause system errors, so when converting between different versions of configuration data, the deletion of XML data nodes must be carefully considered, only those that are no longer in the new version The special attribute that can be marked as deleted is XML nodes that would not be affected by errors even without this node in older versions.

由于在中间数据配置文件中描述了新旧版本间需要处理的配置数据,接下来根据旧版本的数据配置文件和所述中间数据配置文件完成新旧版本数据配置文件的自动转换,具体实施过程如下:Since the configuration data that needs to be processed between the old and new versions is described in the intermediate data configuration file, the automatic conversion of the old and new version of the data configuration file is completed according to the old version of the data configuration file and the intermediate data configuration file. The specific implementation process is as follows:

步骤2,系统根据旧版本的配置数据得到旧版本的数据对象树。Instep 2, the system obtains the data object tree of the old version according to the configuration data of the old version.

首先当系统的XML数据中心软件进行初始化时,使用旧版本的数据配置文件按照既有的XML解析器生成对应的旧版本的数据对象树;然后使用旧版本的数据配置语法文件对所述生成的旧版本的数据对象树进行自定义的语法校验,并当语法校验通过后,确认生成的所述旧版本的数据对象树。First, when the system's XML data center software is initialized, use the old version of the data configuration file to generate the corresponding old version of the data object tree according to the existing XML parser; then use the old version of the data configuration syntax file to generate The old version of the data object tree performs self-defined syntax verification, and when the syntax verification passes, the generated data object tree of the old version is confirmed.

步骤3,XML数据中心使用XML解析器加载所述中间数据配置文件生成对应的中间数据对象树,然后从所述中间数据对象树中逐个读取相应的节点,并按照所述节点的特殊属性对所述旧版本的数据对象树进行处理,得到新版本的数据对象树。Step 3, the XML data center uses the XML parser to load the intermediate data configuration file to generate a corresponding intermediate data object tree, and then reads the corresponding nodes one by one from the intermediate data object tree, and according to the special attributes of the nodes The old version of the data object tree is processed to obtain a new version of the data object tree.

步骤3是整个旧版本的配置数据向新版本的配置数据进行平滑转换过程中最关键的一步,在有了旧版本的数据对象树后,XML数据中心软件再使用XML解析器加载中间配置数据文件生成一个临时的中间数据对象树。然后再从该中间数据对象树中逐个读取相应的XML节点,并按照添加、修改或删除的特殊属性不同而执行不同的处理。具体实施过程如下:Step 3 is the most critical step in the process of smooth conversion of the entire old version of configuration data to the new version of configuration data. After the old version of the data object tree is available, the XML data center software uses the XML parser to load the intermediate configuration data file Generate a temporary tree of intermediate data objects. Then read the corresponding XML nodes one by one from the intermediate data object tree, and perform different processing according to the added, modified or deleted special attributes. The specific implementation process is as follows:

首先,XML数据中心使用XML解析器加载所述中间数据配置文件生成对应的中间数据对象树;First, the XML data center uses an XML parser to load the intermediate data configuration file to generate a corresponding intermediate data object tree;

其次,从所述中间数据对象树中逐个读取相应的节点;Secondly, read the corresponding nodes one by one from the intermediate data object tree;

最后,按照所述节点的添加、修改和/或删除特殊属性对所述旧版本的数据对象树进行处理,并根据处理结果得到新版本的数据对象树。Finally, the old version of the data object tree is processed according to the addition, modification and/or deletion of special attributes of the nodes, and a new version of the data object tree is obtained according to the processing result.

对于有添加特殊属性的节点则按照其在中间数据对象树中的路径在旧版本数据对象树中相应路径搜索是否存在该节点。如果该节点不存在,则将该节点的标识和基本属性以及缺省值都添加到旧版本数据对象树中的相应路径位置(在添加该节点基本属性时需注意特殊属性只是用来标识该节点是否应该被添加的,所以在真正的数据对象树中该特殊属性是无需添加的);如果该节点在旧版本数据对象树中已存在,则跳过该节点。然后继续处理中间数据对象树中剩余还需处理的节点处理。具体实施过程如下:For a node with added special attributes, search whether the node exists in the corresponding path in the old version data object tree according to its path in the intermediate data object tree. If the node does not exist, add the node's identification, basic attributes and default values to the corresponding path position in the old version of the data object tree (when adding the node's basic attributes, it should be noted that the special attributes are only used to identify the node Whether it should be added, so this special attribute does not need to be added in the real data object tree); if the node already exists in the old version of the data object tree, skip this node. Then continue to process the remaining nodes to be processed in the intermediate data object tree. The specific implementation process is as follows:

步骤11,按照其在所述数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点不存在时,则将所述节点的标识、基本属性和/或缺省值信息添加到所述旧版本的数据对象树中的相应路径位置上,然后继续执行步骤12;当确认所述节点已经存在时,则跳过所述节点,然后执行步骤12;Step 11, according to its path in the data object tree in the corresponding path in the old version of the data object tree to search whether there is the node, when it is confirmed that the node does not exist, then the identification of the node, the basic Attribute and/or default value information is added to the corresponding path position in the data object tree of the old version, and then proceed to step 12; when it is confirmed that the node already exists, then skip the node, and then perform step 12;

步骤12,判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤11。Step 12, judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue from the intermediate data object tree one by one Read unread nodes, and then go to step 11.

对于有修改特殊属性的节点和前述有添加属性节点一样,先按照其在中间数据对象树中的路径在旧版本数据对象树中相应路径搜索是否存在该节点。如果该节点存在,则直接使用中间数据对象树中该节点的基本属性将原始数据对象树中该节点的基本属性覆盖,其它不做修改(需注意的是修改特殊属性依然只是用来描述该节点是需要修改的,所以在属性移植时,修改特殊属性无需处理,直接跳过);如果该节点不存在则直接跳过不处理。然后继续在所述中间数据对象树中继续获取下一个还需处理的节点。具体实施过程如下:For a node with a modified special attribute, the same as the aforementioned node with an added attribute, first search whether the node exists in the corresponding path in the old version of the data object tree according to its path in the intermediate data object tree. If the node exists, directly use the basic attributes of the node in the intermediate data object tree to overwrite the basic attributes of the node in the original data object tree, and the rest will not be modified (note that modifying special attributes is still only used to describe the node It needs to be modified, so when the attribute is transplanted, the modification of the special attribute does not need to be processed, and it is directly skipped); if the node does not exist, it is directly skipped and not processed. Then continue to continue to obtain the next node to be processed in the intermediate data object tree. The specific implementation process is as follows:

步骤21,按照其在所述中间数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点存在时,则使用所述中间数据对象树中所述节点的基本属性更新所述旧版本的数据对象树中的相应节点的基本属性,然后继续执行步骤22;如果确认所述节点不存在时,则跳过所述节点,然后执行步骤22;Step 21: Search whether the node exists according to its path in the intermediate data object tree in the corresponding path in the old version of the data object tree, and when it is confirmed that the node exists, use the intermediate data object tree The basic attribute of the node updates the basic attribute of the corresponding node in the old version of the data object tree, and then proceeds to step 22; if it is confirmed that the node does not exist, then skips the node, and then performs step 22;

步骤22,判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤21。Step 22, judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue from the intermediate data object tree one by one Read unread nodes, and then go to step 21.

对于有删除特殊属性的节点则按照其在中间数据对象树中的路径在旧版本数据对象树中相应路径搜索是否存在该节点。如果存在,则直接将其删除;如果不存在,则跳过该节点,然后继续在中间数据对象树中继续获取下一个还需处理的节点。具体实施过程如下:For a node with a special property of deletion, search whether the node exists in the corresponding path in the old version data object tree according to its path in the intermediate data object tree. If it exists, delete it directly; if it does not exist, skip this node, and then continue to obtain the next node that needs to be processed in the intermediate data object tree. The specific implementation process is as follows:

步骤31,按照其在所述中间数据对象树中的路径在所述旧版本的数据对象树中的相应路径搜索是否存在所述节点,如果存在,则直接将其删除,然后继续执行步骤32;如果不存在,则跳过所述节点,然后继续执行步骤32;Step 31, searching whether the node exists according to its path in the intermediate data object tree and the corresponding path in the old version of the data object tree, and if it exists, directly delete it, and then proceed to step 32; If it does not exist, then skip the node, and then proceed to step 32;

步骤32,判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤31。Step 32, judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue from the intermediate data object tree one by one Read unread nodes, and then perform step 31.

当中间数据对象树中所有需处理的节点(指具有添加、修改和/或删除特殊属性的节点)都处理完毕后,旧版本的数据对象树中需要添加、修改和/或删除的操作也已处理完毕,则此时的旧版本的数据对象树已经被更新了,新版本的数据对象树也就此生成。接下来执行步骤4,即使用新版本的语法文件对所述新版本的数据对象树进行语法校验处理,并当语法校验通过后,结束旧版本配置数据向新版本配置数据的转换过程。When all the nodes to be processed in the intermediate data object tree (referring to nodes with special properties to add, modify and/or delete) have been processed, the operations that need to be added, modified and/or deleted in the old version of the data object tree have also been completed. After the processing is completed, the old version of the data object tree has been updated, and the new version of the data object tree is thus generated. Next,step 4 is performed, that is, using the grammar file of the new version to perform grammar check processing on the new version of the data object tree, and when the grammar check is passed, the conversion process of the old version configuration data to the new version configuration data is ended.

在步骤4中,结合新的SCHEMA语法文件对新生成的数据对象树进行新的自定义语法的SCHEMA校验,新的数据对象树中每个XML节点均校验通过后,则说明新生成的数据对象树是符合新语法的,XML软件重写系统文件目录下旧版本的数据配置文件和旧版本的语法文件,至此不同版本的配置数据间的平滑转换过程成功完成。如果在校验过程中,某节点校验失败则认为整个配置数据平滑转换过程失败。Instep 4, combined with the new SCHEMA syntax file, the newly generated data object tree is subjected to a new self-defined syntax SCHEMA verification. After each XML node in the new data object tree is verified, it means that the newly generated The data object tree conforms to the new syntax, and the XML software rewrites the old version of the data configuration file and the old version of the grammar file in the system file directory. So far, the smooth conversion process between different versions of configuration data has been successfully completed. If a node fails to verify during the verification process, it is considered that the smooth conversion process of the entire configuration data has failed.

由上述本发明的具体实施方案可以看出,本发明中由于首先使用中间数据配置文件描述所有新版本中相对于旧版本中需要处理的配置数据;然后根据所述中间数据配置文件和旧版本的配置数据生成与新版本的数据配置语法文件相对应的新版本的配置数据,因此通过本发明,系统能够根据数据配置语法文件和中间数据配置文件对不同版本间的配置数据自动进行转换,从而能够方便系统中配置数据的升级;另外,使系统软件版本的升级与后台软件的依赖性降低,而且版本回退和升级流程一致,从而解决了版本回退时数据配置文件不能自动回退的问题;再者,新旧版本的数据配置文件之间的逻辑关联性和节点的含义可以明确表达出来,可读性增强;而且,对新版本的数据配置文件中所有节点的语法校验得到了增强,真正达到了采用XML文件作为数据配置文件的目的。As can be seen from the specific embodiments of the present invention described above, in the present invention, due to first using the intermediate data configuration file to describe the configuration data that needs to be processed in all new versions relative to the old version; then according to the intermediate data configuration file and the old version The configuration data generates a new version of configuration data corresponding to the new version of the data configuration syntax file, so through the present invention, the system can automatically convert configuration data between different versions according to the data configuration syntax file and the intermediate data configuration file, thereby being able to It facilitates the upgrade of configuration data in the system; in addition, it reduces the dependence between the upgrade of the system software version and the background software, and the version rollback is consistent with the upgrade process, thus solving the problem that the data configuration file cannot be rolled back automatically when the version rolls back; Furthermore, the logical association between the old and new versions of the data configuration files and the meaning of the nodes can be clearly expressed, and the readability is enhanced; moreover, the syntax check of all nodes in the new version of the data configuration files has been enhanced, truly The goal of using XML files as data configuration files is achieved.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (9)

Translated fromChinese
1.一种不同版本的配置数据间进行转换的方法,其特征在于,包括:1. A method for converting between configuration data of different versions, characterized in that, comprising:A、使用中间数据配置文件描述新版本中相对于旧版本中需要处理的配置数据;A. Use the intermediate data configuration file to describe the configuration data that needs to be processed in the new version relative to the old version;B1、根据旧版本的配置数据得到旧版本的数据对象树;B1. Obtain the data object tree of the old version according to the configuration data of the old version;B2、根据所述中间数据配置文件生成中间数据对象树,并根据所述中间数据对象树中的配置数据的特殊属性对所述旧版本的数据对象树进行处理,得到新版本的数据对象树;B2. Generate an intermediate data object tree according to the intermediate data configuration file, and process the old version of the data object tree according to the special attributes of the configuration data in the intermediate data object tree to obtain a new version of the data object tree;所述特殊属性包括:增加、修改和/或删除属性;The special attributes include: adding, modifying and/or deleting attributes;B3、使用新版本的语法文件对所述新版本的数据对象树进行语法校验处理,并当语法校验通过后,结束旧版本配置数据向新版本配置数据的转换过程。B3. Use the syntax file of the new version to perform syntax verification processing on the new version of the data object tree, and when the syntax verification is passed, end the conversion process from the old version configuration data to the new version configuration data.2.根据权利要求1所述的方法,其特征在于,所述步骤A具体为:2. The method according to claim 1, wherein the step A is specifically:使用缺省数据配置文件或自定义的数据配置文件描述新版本中相对于旧版本中需要增加、修改和/或删除的配置数据,并用特殊属性标识所述配置数据。Use a default data configuration file or a custom data configuration file to describe the configuration data that needs to be added, modified and/or deleted in the new version relative to the old version, and identify the configuration data with special attributes.3.根据权利要求1所述的方法,其特征在于,所述步骤B1具体为:3. The method according to claim 1, wherein the step B1 is specifically:B11、使用旧版本的数据配置文件生成旧版本的数据对象树;B11, using the old version of the data configuration file to generate the old version of the data object tree;B12、使用旧版本的数据配置语法文件对所述旧版本的数据对象树进行语法校验,并当语法校验通过后,确认所述旧版本的数据对象树。B12. Use the old version of the data configuration syntax file to perform syntax verification on the old version of the data object tree, and confirm the old version of the data object tree after the syntax verification is passed.4.根据权利要求1所述的方法,其特征在于,所述步骤B2具体为:4. The method according to claim 1, wherein the step B2 is specifically:B21、XML数据中心使用XML解析器加载所述中间数据配置文件生成对应的中间数据对象树;B21. The XML data center uses an XML parser to load the intermediate data configuration file to generate a corresponding intermediate data object tree;B22、从所述中间数据对象树中逐个读取相应的节点;B22. Read corresponding nodes one by one from the intermediate data object tree;B23、按照所述节点的添加、修改和/或删除特殊属性对所述旧版本的数据对象树进行处理,并根据处理结果得到新版本的数据对象树。B23. Process the old version of the data object tree according to the addition, modification and/or deletion of special attributes of the node, and obtain a new version of the data object tree according to the processing result.5.根据权利要求4所述的方法,其特征在于,当节点的特殊属性为添加时,所述步骤B23具体为:5. The method according to claim 4, wherein when the special attribute of the node is to add, the step B23 is specifically:B231、按照所述节点在所述中间数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点不存在时,则将所述节点的标识、基本属性和/或缺省值信息添加到所述旧版本的数据对象树中的相应路径位置上,然后继续执行步骤B232;当确认所述节点已经存在时,则跳过所述节点,然后执行步骤B232;B231. Search whether the node exists according to the corresponding path of the node in the intermediate data object tree in the old version of the data object tree, and when it is confirmed that the node does not exist, the identification of the node , basic attributes and/or default value information are added to the corresponding path position in the old version of the data object tree, and then proceed to step B232; when it is confirmed that the node already exists, then skip the node, and then Execute step B232;B232、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B231。B232. Judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B231.6.根据权利要求4所述的方法,其特征在于,当节点的特殊属性为修改时,所述步骤B23具体为:6. The method according to claim 4, wherein when the special attribute of the node is modified, the step B23 is specifically:B233、按照所述节点在所述中间数据对象树中的路径在旧版本的数据对象树中的相应路径搜索是否存在所述节点,当确认所述节点存在时,则使用所述中间数据对象树中所述节点的基本属性更新所述旧版本的数据对象树中的相应节点的基本属性,然后继续执行步骤B234;如果确认所述节点不存在时,则跳过所述节点,然后执行步骤B234;B233. Search whether the node exists according to the corresponding path of the node in the intermediate data object tree in the old version of the data object tree, and use the intermediate data object tree when it is confirmed that the node exists update the basic attributes of the corresponding nodes in the old version of the data object tree, and then proceed to step B234; if it is confirmed that the node does not exist, then skip the node, and then execute step B234 ;B234、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B233。B234. Determine whether all the nodes in the intermediate data object tree have been read, if so, end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B233.7.根据权利要求4所述的方法,其特征在于,当节点的特殊属性为删除时,所述步骤B23具体为:7. The method according to claim 4, wherein when the special attribute of the node is deletion, the step B23 is specifically:B235、按照所述节点在所述中间数据对象树中的路径在所述旧版本的数据对象树中的相应路径搜索是否存在所述节点,如果存在,则直接将其删除,然后继续执行步骤B236;如果不存在,则跳过所述节点,然后继续执行步骤B236;B235. Search whether the node exists according to the path of the node in the intermediate data object tree in the corresponding path in the old version of the data object tree, and if it exists, delete it directly, and then proceed to step B236 ; If it does not exist, then skip the node, and then proceed to step B236;B236、判断所述中间数据对象树中的所有节点是否读取完毕,若是,则结束此过程,并根据处理结果得到新版本的数据对象树;否则,继续从所述中间数据对象树中逐个读取未被读取过的节点,然后执行步骤B235。B236. Judging whether all nodes in the intermediate data object tree have been read, if so, then end this process, and obtain a new version of the data object tree according to the processing result; otherwise, continue to read one by one from the intermediate data object tree Get the nodes that have not been read, and then execute step B235.8.一种不同版本的配置数据间进行转换的系统,其特征在于,包括:8. A system for converting between configuration data of different versions, characterized in that it comprises:数据配置文件生成模块和配置数据转换模块;A data configuration file generation module and a configuration data conversion module;所述数据配置文件生成模块,用于生成中间数据配置文件,并利用所述中间数据配置文件描述新版本中相对于旧版本中发生变化的配置数据;The data configuration file generation module is used to generate an intermediate data configuration file, and use the intermediate data configuration file to describe the configuration data that changes in the new version relative to the old version;当不同版本的配置数据转换时,所述配置数据转换模块根据所述生成的中间数据配置文件和旧版本的配置数据生成与新版本的数据配置语法文件相对应的配置数据;When different versions of configuration data are converted, the configuration data conversion module generates configuration data corresponding to the new version of the data configuration syntax file according to the generated intermediate data configuration file and the configuration data of the old version;所述系统中还包括:Also included in the system:数据对象树生成模块,用于根据所述数据配置文件生成模块生成的中间数据配置文件生成相应的中间数据对象树;以及,根据旧版本的数据配置文件生成相应的旧版本的数据对象树;A data object tree generation module, configured to generate a corresponding intermediate data object tree according to the intermediate data configuration file generated by the data configuration file generation module; and generate a corresponding old version of the data object tree according to the old version of the data configuration file;所述配置数据转换模块包括数据对象特殊属性识别模块和数据对象转换模块;The configuration data conversion module includes a data object special attribute identification module and a data object conversion module;所述数据对象特殊属性识别模块,用于识别所述中间数据对象树中的节点的特殊属性,并将其传送给所述数据对象转换模块,所述特殊属性包括:增加、修改和/或删除属性;The data object special attribute identification module is used to identify the special attribute of the node in the intermediate data object tree and transmit it to the data object conversion module, the special attribute includes: adding, modifying and/or deleting Attributes;所述数据对象转换模块根据所述特殊属性对旧版本的数据对象树进行处理,并根据处理结果生成新版本的数据对象树。The data object conversion module processes the old version of the data object tree according to the special attribute, and generates a new version of the data object tree according to the processing result.9.根据权利要求8所述的系统,其特征在于,还包括:9. The system according to claim 8, further comprising:语法校验模块,用于将所述生成的新版本的数据对象树中的数据对象与新版本的配置数据语法文件进行语法校验。A syntax checking module, configured to check the syntax of the data objects in the generated new version of the data object tree and the configuration data syntax file of the new version.
CN2006100031522A2006-02-202006-02-20 Method and system for converting between different versions of configuration dataExpired - Fee RelatedCN100407206C (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN2006100031522ACN100407206C (en)2006-02-202006-02-20 Method and system for converting between different versions of configuration data

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2006100031522ACN100407206C (en)2006-02-202006-02-20 Method and system for converting between different versions of configuration data

Publications (2)

Publication NumberPublication Date
CN1866252A CN1866252A (en)2006-11-22
CN100407206Ctrue CN100407206C (en)2008-07-30

Family

ID=37425274

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2006100031522AExpired - Fee RelatedCN100407206C (en)2006-02-202006-02-20 Method and system for converting between different versions of configuration data

Country Status (1)

CountryLink
CN (1)CN100407206C (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN100461704C (en)*2006-12-022009-02-11华为技术有限公司 Data Synchronization Method
CN101150831B (en)*2007-10-242010-06-09华为技术有限公司 Network element data processing method and device
CN101436126A (en)*2007-11-132009-05-20华为技术有限公司Information translating method and device in on-line upgrading process
US8751778B2 (en)*2011-01-272014-06-10Wyse Technology L.L.C.Generating, validating and applying custom extensible markup language (XML) configuration on a client having a windows-based embedded image
EP2570921A1 (en)*2011-06-142013-03-20Siemens AktiengesellschaftDevices and method for exchanging data
CN103186378A (en)*2011-12-312013-07-03鼎捷软件股份有限公司Configuration method and configuration system
US8825722B2 (en)*2012-01-132014-09-02Microsoft CorporationCalculation of properties of objects/shapes across versions of applications
CN104572132A (en)*2015-02-052015-04-29中国农业银行股份有限公司Method and device for determining program version difference
CN106383890B (en)*2016-09-232019-09-17安科讯(福建)科技有限公司XML configuration file restoration methods and its system based on XPATH
CN108363545B (en)2017-01-262021-12-03华为技术有限公司Data configuration method and data configuration device
CN108958827B (en)*2017-05-252021-11-02贵州白山云科技股份有限公司Method and system for processing program upgrading fault
CN107391216A (en)*2017-09-262017-11-24郑州云海信息技术有限公司A kind of method for upgrading software and device
CN107678766A (en)*2017-10-202018-02-09国云科技股份有限公司 A method for upgrading and upgrading system configuration files
CN110333880B (en)*2018-03-292024-02-02杭州海康威视数字技术股份有限公司Configuration updating method, device, equipment and storage medium
CN109491701A (en)*2018-11-012019-03-19郑州云海信息技术有限公司A kind of configuration information recovery method, system, equipment and computer storage medium
CN110347413B (en)*2019-06-272023-06-27北京口袋时尚科技有限公司Software configuration information updating method and device
CN113419759B (en)*2021-06-212024-11-12广联达科技股份有限公司 File upgrading method, device and electronic equipment
CN113885924A (en)*2021-12-072022-01-04深圳市明源云科技有限公司XML configuration file upgrading method and device and readable storage medium
CN120560696A (en)*2025-07-312025-08-29潍柴动力股份有限公司Electronic control unit upgrading method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1312995A (en)*1998-06-172001-09-12雅虎公司Method and apparatus for a client-server system with heterogeneous clients
CN1347529A (en)*1999-01-152002-05-01米泰吉公司 Method of Visualizing Information in Data Warehouse Environment
US20040123285A1 (en)*2002-12-242004-06-24Berg Daniel CSelf-healing version and configuration model for an application server
EP1443700A2 (en)*2002-09-192004-08-04Alcatel Canada Inc.Methods and apparatus for configuration change management in communications networks
CN1713154A (en)*2004-06-222005-12-28中兴通讯股份有限公司 A method for upgrading mobile communication network management system
CN101006424A (en)*2004-08-192007-07-25艾利森电话股份有限公司Universal upgrade architecture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1312995A (en)*1998-06-172001-09-12雅虎公司Method and apparatus for a client-server system with heterogeneous clients
CN1347529A (en)*1999-01-152002-05-01米泰吉公司 Method of Visualizing Information in Data Warehouse Environment
EP1443700A2 (en)*2002-09-192004-08-04Alcatel Canada Inc.Methods and apparatus for configuration change management in communications networks
US20040123285A1 (en)*2002-12-242004-06-24Berg Daniel CSelf-healing version and configuration model for an application server
CN1713154A (en)*2004-06-222005-12-28中兴通讯股份有限公司 A method for upgrading mobile communication network management system
CN101006424A (en)*2004-08-192007-07-25艾利森电话股份有限公司Universal upgrade architecture

Non-Patent Citations (2)

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

Also Published As

Publication numberPublication date
CN1866252A (en)2006-11-22

Similar Documents

PublicationPublication DateTitle
CN100407206C (en) Method and system for converting between different versions of configuration data
US7367027B1 (en)System for generating efficient and compact update packages
CN101984410B (en)Method and device for generating and unloading software installation package
CN110351325B (en)Data processing method and related equipment
US20110107301A1 (en)Selective delta validation of a shared artifact
US7316015B2 (en)Method, apparatus, and program for constructing an execution environment, and computer readable medium recording program thereof
CN100493221C (en) Method and device for converting data configuration files between different software versions
CN102722540B (en)Data processing method and device in real-time memory database system
CN111367547A (en)Automatic interface code synchronization method, device and storage medium
CN112632947A (en)Online document processing method, online document processing device and electronic equipment
CN102065413A (en)Database updating method and system, and base station self-starting method and system
CN106921731A (en)Leak restorative procedure and device
CN100461701C (en) Method and system for verifying consistency of network resources between network management and network elements
CN107193917A (en)Whole station CONFIG.SYS lossless data update method based on IID
US9361933B2 (en)Reducing errors in sending file attachments
CN102195895A (en)Message sending and receiving processing method and device
CN114237688A (en) Branch version merging method, apparatus, system and electronic device
CN107491298B (en)Automatic button object scanning method and system
CN112395339A (en)Method and device for checking data access between systems, computer equipment and storage medium
CN114302427B (en) A configuration parameter updating method, device and related equipment
CN105094787B (en)Method and device for processing enterprise internet application
CN109656588A (en)A kind of method and system remotely fast implementing power information acquisition terminal software upgrading
JP2014504469A (en) Network element configuration management
WO2024088151A1 (en)Method for obtaining service pack and communication apparatus
JP4963070B2 (en) Software component template management system

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20080730

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp