[go: up one dir, main page]

CN112965738B - Information model version difference comparison method and device - Google Patents

Information model version difference comparison method and device Download PDF

Info

Publication number
CN112965738B
CN112965738B CN202110140024.7A CN202110140024A CN112965738B CN 112965738 B CN112965738 B CN 112965738B CN 202110140024 A CN202110140024 A CN 202110140024A CN 112965738 B CN112965738 B CN 112965738B
Authority
CN
China
Prior art keywords
information
model
difference
version
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.)
Active
Application number
CN202110140024.7A
Other languages
Chinese (zh)
Other versions
CN112965738A (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.)
Wuhan Changjiang Computing Technology Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202110140024.7A priority Critical patent/CN112965738B/en
Publication of CN112965738A publication Critical patent/CN112965738A/en
Application granted granted Critical
Publication of CN112965738B publication Critical patent/CN112965738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an information model version difference comparison method and device, comprising the following steps: comparing the new version information model files with the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result, and generating a new information model library; and according to the version number reported by the equipment, the management and control system adapts to the latest information model base to identify and process incompatible differences. The invention adopts automatic analysis, identification and record of model difference information, and sends the version difference information of the data information model in the southbound interface of the network equipment to the latest version model library. According to the method, only one current latest model base and one current latest adaptation rule need to be maintained by a control system, compatibility processing is only carried out on incompatible differences, and compatible difference items are directly adapted according to the latest version. Additional adaptation work is avoided, human factors of difference identification and compatibility judgment are reduced, and accuracy and efficiency are improved. The invention also provides a corresponding information model version difference comparison device.

Description

Information model version difference comparison method and device
Technical Field
The invention belongs to the technical field of communication, and particularly relates to an information model version difference comparison method and device.
Background
The Network Management and control system performs device Management and service deployment with devices through southbound interfaces and data Information models, and currently, commonly used southbound interface Information models include structured data model languages such as xsd (xml Schema definition), YANG, SNMP (Simple Network Management Protocol), MIB (Management Information Base) model and the like. Due to the iteration of the device version, the information model of the southbound interface of the new version device is changed, and at the moment, when the old version device is managed under the new version management and control system, the problem of data model compatibility may be introduced.
The network management and control system gradually evolves towards an intensification direction, and one management and control system simultaneously manages a plurality of network devices of different versions. When the product of the existing engineering network is upgraded, the management and control system is upgraded first, and then the version of the network equipment is upgraded step by step. Due to the large number of devices, the current network upgrading is a continuous process. Therefore, the new version management and control system can simultaneously manage the new version and the old version of equipment in a longer time. Aiming at the problem of data model compatibility under a control system, the current method mainly comprises the following steps: 1) and identifying the model change manually, and judging a modified compatible result. And incompatible modification of the information model change, including modification of node paths, node names, parameter values and data structures in the information model. The manual comparison is time-consuming and labor-consuming, and is easy to miss or make mistakes. 2) Because the device is the iterative development and upgrade method, the modification difference of the information model introduced by each device upgrade is only a small part of the total data model. However, if the existing network management and control system is adapted to a plurality of versions of equipment, the method is adopted to completely adapt the full data information model of the current version of equipment, and the data model with unchanged new and old versions also needs to be repeatedly adapted, so that the workload of development and maintenance is increased.
Disclosure of Invention
Aiming at the defects or improvement requirements of the prior art, the invention provides an information model version difference comparison scheme, and solves the problem of low efficiency in the maintenance, management and multi-version adaptation development work of the information model at present. The invention comprises the following steps: (1) when a multi-version southbound interface information model is maintained, an automatic information model version management and identification method is provided, and the accuracy and efficiency of manual identification are improved; (2) when the management and control system adapts to the multi-version information model, compatibility increment adaptation is carried out according to the difference between different versions, and repeated adaptation brought by the full data information model is avoided.
To achieve the above object, according to an aspect of the present invention, there is provided an information model version difference comparison method, including:
s1, comparing the new version information model files and the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result, and generating a new information model library;
and S2, according to the version number reported by the equipment, the management and control system adapts to the latest information model library, and identifies and processes incompatible differences.
In an embodiment of the present invention, the step S1 includes:
s11, importing the information model files of the new version and the old version, and generating parameter nodes and path difference information by adopting a node analysis mode and based on XML format analysis; generating a difference expansion mark and a difference detail according to a difference comparison rule;
s12, writing the difference extension marks and the difference details in the step S11 into a new version information model file;
s13, summarizing the difference extension marks of the new version information model in the step S11, and generating a new information model file version number;
and S14, summarizing the version number of each new information model file in the step S13, and generating a new model library version number.
In an embodiment of the present invention, the step S11 includes:
s111, respectively reading new and old information model files, and acquiring all node parameter information and node path information described in the information model files in a node analysis mode, wherein the node path information is < the ID of the node, and the path of a father node >; node parameter information < parameter ID, parameter data type, parameter value field, parameter default value, parameter mandatory constraint, parameter keyword constraint, parameter general description and comment >;
s112, traversing the node path information of the new model, matching the node parameter information and the node path information of the node in the old model file, and executing the step S119 if the node path information and the node parameter information are successfully matched;
s113, if the IDs of the nodes are not matched and the difference expansion mark is added, executing a step S115;
s114, if the parent node paths are not matched, the difference expansion mark is modified;
s115, if the parameter keyword constraints are not matched, the difference expansion mark is a keyword constraint increase or a keyword constraint deletion;
s116, if the parameters are not matched with the mandatory constraints, marking the difference expansion as mandatory constraint addition or mandatory constraint deletion;
s117, if the parameter value fields are not matched, the difference expansion mark is added to the value field or deleted from the value field;
s118, if the parameter data type, the parameter default value, the parameter general description and the comment are not matched, the difference expansion is marked as general modification;
and S119, completing the traversal of the node path information of the new model.
In an embodiment of the present invention, the step S12 includes:
s121, traversing the new model difference expansion mark obtained in the step S11, and writing the new model difference expansion mark into a new model file;
s122, if the difference expansion mark is node deletion \ path modification, writing the path information of the old model node into a new model file as difference details;
s123, if the difference expansion mark is value domain deletion, or forced constraint deletion, or keyword constraint deletion, writing the old model node parameter information into a new template file as difference details;
and S124, traversing the node path information of the old model, matching the node path information of the node in the new model file, if the node path information does not exist in the new model file, writing the node parameter information and the node path information into the new model file, and marking the difference expansion as node deletion.
In an embodiment of the present invention, the step S13 includes:
s131, defining the format of the version number of the model file to be A.B.C, wherein A/B/C is a number;
s132, if node deletion, value domain deletion, forced constraint deletion, keyword constraint deletion or path modification exists in the difference expansion tag set of the new model file, the model file is incompatible modification, and the version number changes are as follows: if a is increased by 1, B is equal to 0, and C is equal to 0, go to step 135;
s133, if node \ value domain addition \ mandatory constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is compatible and modified, and the version number changes are as follows: if a is not changed, B is increased by 1, and C is equal to 0, then step 136 is executed;
s134, if node \ value domain \ mandatory constraint \ keyword constraint increase exists in the new model file difference expansion tag set, the model file is generally modified, and the version number changes are as follows: if A is not changed, B is not changed to 1, and C is increased by 1, executing step 136;
s135, traversing the difference detail in the step S123 in the step S12, and writing the version number of the old model file into each difference detail;
and S136, writing the version number of the new model file into the file version information.
In an embodiment of the present invention, the step S14 includes:
s141, defining the format of the version number of the model file to be X.Y, wherein X/Y is a number;
s142, if the version number a of the file in the model file version number set is increased by 1, increasing X by 1, and if X is not changed, increasing Y by 1;
and S143, writing the version number of the new model library into the version control file.
In an embodiment of the present invention, the step S1 includes:
s21, the management and control system analyzes and loads the new equipment model library file package;
s22, the new/old equipment loads the information model library file packages respectively and reports the current model library version number and the model file version number to the control system;
s23, the management and control system reports the version number of the current model file according to the equipment, traverses the difference details in the matched model file, and adapts to the corresponding node parameter information and node path information;
and S24, the management and control system generates or analyzes the device data instance to complete data interaction.
In one embodiment of the present invention, in the step S23:
traversing the version number of the model file if the version number of the current model library of the control system is not matched with the version number of the model library reported by a certain device;
and traversing all the difference expansion mark nodes if the version number of the current model file of the control system is not matched with the version number of the model file reported by a certain device.
In an embodiment of the present invention, the step S24 includes:
when the management and control system converts equipment interaction message data according to the information model example, if the difference extension marks exist in the nodes in the message, the message interaction data is generated according to the difference details of the model file of the old version when the message data is converted.
According to another aspect of the present invention, there is also provided an information model version difference comparison apparatus, including a new information model library generating module and a difference identification processing module, wherein:
the new information model base generation module is used for comparing the new version information model files with the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result and generating a new information model base;
and the difference identification processing module is used for adapting the latest information model base according to the version number reported by the equipment, and identifying and processing incompatible differences.
Generally, compared with the prior art, the technical scheme of the invention has the following beneficial effects:
the invention adopts automatic analysis, identification and record of model difference information, and sends the version difference information of the data information model in the southbound interface of the network equipment to the latest version model library. Based on the method adopted by the invention, the management and control system only needs to maintain a set of current latest model base and adaptation rules, compatibility processing is only carried out on incompatible differences, and the compatible difference items are directly adapted according to the latest version. Additional adaptation work is avoided, the artificial factors of difference identification and compatibility judgment are reduced, and accuracy and efficiency are improved.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for comparing version differences of an information model according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the steps of reading the old and new model libraries and comparing the new and old model libraries to generate difference information according to an embodiment of the present invention;
FIG. 3 is a flow chart of writing difference information to a new model file in an embodiment of the present invention;
FIG. 4 is a flow chart of writing version information to a new model file in an embodiment of the present invention;
FIG. 5 is a flow chart of writing version information to a new model library in an embodiment of the present invention;
fig. 6 is a flowchart of analyzing and generating version model data corresponding to a device by the management and control system in the embodiment of the present invention;
fig. 7 is a schematic structural diagram of an information model version difference comparison apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The XSD is used as a description language of the southbound interface information model of the network equipment, and the method provided by the invention is required to be adopted for version management and compatible processing of a management and control system of the XSD information model. In order to solve the problems in the prior art, as shown in fig. 1, the invention provides an information model version difference comparison method, which comprises the following steps:
s1, comparing the new version information model files and the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result, and generating a new information model library;
in the step S1 of the method, the comparing of the new and old version information model files by the version difference comparison tool, and automatically numbering the model files according to the comparison result to generate the new information model library specifically include the following steps:
s11, importing the information model files of the new version and the old version, and generating parameter nodes and path difference information by adopting a node analysis mode and based on XML format analysis; generating a difference expansion mark and a difference detail according to a difference comparison rule;
as shown in fig. 2, step S11 is specifically as follows:
and S111, respectively reading the new and old information model files, and acquiring all node parameter information and node path information described in the information model file by adopting a node analysis mode. The node path information is < own node ID, father node path >; node parameter information < parameter ID, parameter data type, parameter value field, parameter default value, parameter mandatory constraint, parameter keyword constraint, parameter general description and comment >;
and S112, traversing the node path information of the new model, and matching the node parameter information and the node path information of the node in the old model file. If the node path information and the node parameter information are both successfully matched, executing step S119;
s113, if the IDs of the nodes are not matched and the difference expansion mark is added, executing a step S115;
s114, if the paths of the father nodes are not matched, the difference expansion mark is modified;
s115, if the parameter keyword constraints are not matched, the difference expansion mark is a keyword constraint increase or a keyword constraint deletion;
s116, if the parameters are not matched with the mandatory constraints, marking the difference expansion as mandatory constraint addition or mandatory constraint deletion;
s117, if the parameter value domains are not matched, the difference expansion mark is added or deleted in the value domain;
s118, if the parameter data type, the parameter default value, the parameter general description and the comment are not matched, the difference expansion is marked as general modification;
s119, completing traversal of the node path information of the new model;
s12, writing the difference extension marks and the difference details in the step S11 into a new version information model file;
as shown in fig. 3, step S12 is specifically as follows:
s121, traversing the new model difference expansion mark obtained in the step S11, and writing the new model difference expansion mark into a new model file;
s122, if the difference expansion mark indicates the conditions of node deletion \ path modification and the like, writing the path information of the old model node as difference details into a new model file;
s123, if the difference expansion mark is in the conditions of value domain deletion \ forced constraint deletion \ keyword constraint deletion and the like, writing the parameter information of the old model node as difference details into a new template file;
s124, traversing the node path information of the old model, matching the node path information of the node in the new model file, if the node path information does not exist in the new model file, writing the node parameter information and the node path information into the new model file, and marking the difference expansion as node deletion;
s13, summarizing the difference extension marks of the new version information model in the step S11, and generating a new information model file version number;
as shown in fig. 4, step S13 is specifically as follows:
s131, defining the format of the model file version number as a.b.c (where a/B/C is a number, and default version a is 0/B is 0/C is 0);
s132, if node deletion \ value domain deletion \ forced constraint deletion \ keyword constraint deletion \ path modification exists in the new model file difference expansion tag set, the model file is incompatible modification at this time, and the version number changes are as follows: if a is increased by 1, B is equal to 0, and C is equal to 0, go to step 135;
s133, if node \ value domain addition \ mandatory constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is compatible and modified, and the version number changes are as follows: if a is not changed, B is increased by 1, and C is equal to 0, then step 136 is executed;
s134, if node \ value domain addition \ forced constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is generally modified, and the version number changes are as follows: if A is not changed, B is not changed to 1, and C is increased by 1, executing step 136;
s135, traversing the difference detail in the step S123 in the step S12, and writing the version number of the old model file into each difference detail;
s136, writing the version number of the new model file into file version information;
and S14, summarizing the version number of each new information model file in the step S13, and generating a new model library version number.
As shown in fig. 5, step S14 is specifically as follows:
s141, defining a version number format of the model file as x.y (X/Y is a number, and default version X is 0/Y is 0);
s142, if the version number a of the file in the model file version number set is increased by 1, increasing X by 1, and if X is not changed, increasing Y by 1;
s143, writing the version number of the new model library into the version control file;
s2, according to the version number reported by the device, the management and control system adapts to the latest information model base, and identifies and processes incompatible differences;
as shown in fig. 6, the method specifically includes the following steps:
s21, the management and control system analyzes and loads the new equipment model library file package;
s22, the new/old equipment loads the information model library file package respectively, and reports the current model library version number and the model file version number to the control system;
s23, the management and control system reports the version number of the current model file according to the equipment, traverses the difference details in the matched model file, and adapts to the corresponding node parameter information and node path information;
and S24, the management and control system generates or analyzes the device data instance to complete data interaction.
The technical scheme of the invention is illustrated by the following specific examples:
s1, comparing the new version information model files and the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result, and generating a new information model library;
s2, according to the version number reported by the equipment, the management and control system adapts to the latest information model base, and identifies and processes incompatible differences;
in the step S1 of the method, the comparing of the new and old version information model files by the version difference comparison tool, and automatically numbering the model files according to the comparison result to generate the new information model library specifically include the following steps:
s11, importing new and old version information model files, and generating node parameter information difference and node path information difference based on XML format analysis in a node analysis mode; generating a difference expansion mark and a difference detail according to a difference comparison rule;
s12, writing the difference extension marks and the difference details in the step S11 into a new version information model file;
s13, summarizing the difference extension marks of the new information model in the step S11 to generate the version number of the information model file;
s14, summarizing the version number of each new information model file in the step S13 to generate a model library version number;
wherein, step S11 is specifically as follows:
and S111, respectively reading the new and old information model files, and acquiring all node parameter information and node path information described in the information model files in a node analysis mode. The node path information is < own node ID, father node path >; node parameter information < parameter ID, parameter data type, parameter value field, parameter default value, parameter mandatory constraint, parameter keyword constraint, parameter general description and comment >;
and S112, traversing the node path information of the new model, and matching the node path information of the node in the old model file. If the node path information and the node parameter information are both successfully matched, executing step S119;
s113, if the IDs of the nodes are not matched and the difference expansion flag diff-flag is node-add, executing the step S115;
s114, if the paths of the father nodes are not matched, the difference expansion flag diff-flag is a path modification 'path-modification';
s115, if the parameter keyword constraints are not matched, the difference expansion mark diff-flag is added with the keyword constraints or deleted 'key-add' or 'key-delete' with the keyword constraints;
s116, if the parameters are not matched with the mandatory constraints, deleting a 'regulatory-add' or a 'regulatory-delete' flag for the difference expansion flag diff-flag;
s117, if the parameter value fields are not matched, the difference expansion mark diff-flag is range-add or range-delete;
s118, if the parameter data type, the parameter default value, the parameter general description, and the comment do not match, the difference extension is marked as general modification "diff-flag";
s119, completing traversal of the node path information of the new model;
example (c): xsd, certain node parameter information is < xsd, element name ═ slot "type ═ int32," default ═ 00, "range ═ 1-256" >, if the value domain range of the node parameter is expanded in a new version model <1-512>, and the parent node path is increased by one layer of depth (the parent layer path is changed from./qos-configuration/to./qos-configuration/hqos), then the difference extension flag is diff-flag ═ range-add | path-mode.
Wherein, step S12 is specifically as follows:
s121, traversing the new model difference expansion mark obtained in the step S11, and writing the new model difference expansion mark into a new model file; as shown in the example, after writing the difference extension flag, the node description in the new XSD model is changed to < XSD, element name ═ slot "type ═ int32," default ═ 00, "range ═ 1-256," diff-flag ═ range-add | path-modification >
S122, if the difference expansion mark indicates the conditions of node deletion \ path modification and the like, taking the path information of the old model node as difference details and writing the difference details into a new model file;
as shown in the example, after writing the difference details, the node description in the new XSD model is changed
<xsd:element name="slot"type="int32"default="00"range="1-512"diff-flag="range-add|path-modify"diff-detail="pre-range=1-256|pre-path=../qos-config"/>
S123, if the difference expansion mark is in the conditions of value domain deletion \ forced constraint deletion \ keyword constraint deletion and the like, writing the old model node information into a new template file as difference details;
s124, traversing the node path information of the old model, matching the node path information of the node in the new model file, if the node path information does not exist in the new model file, writing the node parameter information and the node path information into the new model file, and marking the difference expansion as node deletion 'node-delete';
wherein, step S13 is specifically as follows:
s131, defining the format of the model file version number as a.b.c (where a/B/C is a number, and default version a is 0/B is 0/C is 0);
s132, if node deletion \ value domain deletion \ forced constraint deletion \ keyword constraint deletion \ path modification exists in the new model file difference expansion tag set, the model file is incompatible modification at this time, and the version number changes are as follows: if a is increased by 1, B is equal to 0, and C is equal to 0, go to step 135;
s133, if node \ value domain addition \ mandatory constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is compatible and modified, and the version number changes are as follows: if a is not changed, B is increased by 1, and C is equal to 0, then step 136 is executed;
s134, if node \ value domain addition \ forced constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is generally modified, and the version number changes are as follows: if A is not changed, B is not changed to 1, and C is increased by 1, executing step 136;
s135, traversing the difference detail in the step S123 in the step S12, and writing the version number of the old model file into each difference detail;
s136, writing the version number of the new model file into file version information;
as shown in the example, in the fos-qos.xsd file, version information < xsd: revsion ver ═ 0.0.1 > before modification, and after the node modification, the new model version number is changed to 1.0.0 and version information < xsd: revsion ver ═ 1.0.0 > is written.
And the old model version number is written in each difference extension flag and difference detail. An element name, slot, int32, default, 00, range, 1-512, diff-ver, 0.0.1, diff-flag, range-add, path-modify, diff-detail, pre-range, 1-256, pre-path, qos-configuration,/>, and the like
Wherein, step S14 is specifically as follows:
s141, defining a version number format of the model file as x.y (X/Y is a number, and default X is 0/Y is 0);
s142, if the file version number A in the model file version number set is increased by 1, increasing X by 1, and if not, keeping X unchanged, and increasing Y by 1;
s143, writing the version number of the new model library into the version control file;
in order to manage the whole model library, the version numbers of the model files in the model file set need to be collected for describing the information of the whole model library. And summarizing and writing the model library version description into version data by using a version control file xsd-library.
In the method S2, the management and control system adapts to the latest information model library according to the version number reported by the device, and identifies and processes the difference details. The method specifically comprises the following steps:
s21, the management and control system analyzes and loads the new equipment model library file package;
s22, the new/old equipment loads the information model library file packages respectively and reports the current model library version number and the model file version number to the control system;
version information in an xsd-library. ini file needs to be loaded to the version number of the model library, and < xsd: version > node information in each model file fos-xxx. xsd needs to be loaded to the version number of the model file, and the version number of the model file is reported to the control system.
S23, the management and control system reports the version number of the current model file according to the equipment, traverses the difference details in the matched model file, and adapts to the corresponding node parameter information and node path information;
traversing the version number of the model file if the version number of the current model library of the control system is not matched with the version number of the model library reported by a certain device;
if the version number of the current model file of the management and control system is not matched with the version number of the model file reported by a certain device, traversing all difference extension mark nodes, namely xsd (element node) carrying diff-ver/diff-type/diff-detail elements;
s24, the management and control system generates or analyzes the device data instance to complete data interaction;
when the management and control system converts equipment interaction message data according to the information model example, if the difference extension marks exist in the nodes in the message, the message interaction data is generated according to the difference details of the model file of the old version when the message data is converted. Example (c):
as shown in the example, the information model of fos-qos.xsd is as follows according to the message data of the new version device (ver ═ 1.0.0):
...
<qos-config>
<hqos>
<slot>300</slot>
<is-enable>true</is-enable>
......
</hqos>
</qos-config>
if the matched version is the old device version number (ver is 0.0.1), the message data is as follows:
...
<qos-config>
<slot>123</slot>
<is-enable>true</is-enable>
......
</qos-config>
therefore, for the old device, for incompatible modification, after identifying the difference details, the management and control system can generate data node path and parameter information for the node according to the details.
Further, as shown in fig. 7, the present invention provides an information model version difference comparison apparatus, which includes a new information model library generation module and a difference identification processing module, wherein:
the new information model base generation module is used for comparing the new version information model files with the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result and generating a new information model base;
and the difference identification processing module is used for adapting the latest information model base according to the version number reported by the equipment, and identifying and processing incompatible differences.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. An information model version difference comparison method is characterized by comprising the following steps:
s1, comparing the new version information model files and the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result, and generating a new information model library; the S1 includes:
s11, importing the information model files of the new version and the old version, and generating parameter nodes and path difference information by adopting a node analysis mode and based on XML format analysis; generating a difference expansion mark and a difference detail according to a difference comparison rule; s12, writing the difference extension marks and the difference details in the step S11 into a new version information model file; s13, summarizing the difference extension marks of the new version information model in the step S11 to generate a new information model file version number; s14, summarizing the version number of each new information model file in the step S13 to generate a new model library version number; the S11 includes:
s111, respectively reading the new and old information model files, and acquiring all node parameter information and node path information described in the information model files in a node analysis mode, wherein the node path information is < the ID of the node, the father node path >; node parameter information < parameter ID, parameter data type, parameter value field, parameter default value, parameter mandatory constraint, parameter keyword constraint, parameter general description and comment >; s112, traversing the node path information of the new model, matching the node parameter information and the node path information of the node in the old model file, and executing the step S119 if the node path information and the node parameter information are successfully matched; s113, if the IDs of the nodes are not matched and the difference expansion mark is added, executing a step S115; s114, if the parent node paths are not matched, the difference expansion mark is modified; s115, if the parameter keyword constraints are not matched, the difference expansion mark is a keyword constraint increase or a keyword constraint deletion; s116, if the parameters are not matched with the mandatory constraints, marking the difference expansion as mandatory constraint addition or mandatory constraint deletion; s117, if the parameter value fields are not matched, the difference expansion mark is added to the value field or deleted from the value field; s118, if the parameter data type, the parameter default value, the parameter general description and the comment are not matched, the difference expansion is marked as general modification; s119, completing traversal of the node path information of the new model;
and S2, according to the version number reported by the equipment, the management and control system adapts to the latest information model library, and identifies and processes incompatible differences.
2. The method for comparing version differences of information models according to claim 1, wherein the step S12 includes:
s121, traversing the new model difference expansion mark obtained in the step S11, and writing the new model difference expansion mark into a new model file;
s122, if the difference expansion mark is node deletion \ path modification, writing the path information of the old model node into a new model file as difference details;
s123, if the difference expansion mark is value domain deletion, or forced constraint deletion, or keyword constraint deletion, writing the old model node parameter information into a new template file as difference details;
and S124, traversing the node path information of the old model, matching the node path information of the node in the new model file, if the node path information does not exist in the new model file, writing the node parameter information and the node path information into the new model file, and marking the difference expansion as node deletion.
3. The method for comparing version differences of information models according to claim 1, wherein the step S13 includes:
s131, defining the format of the version number of the model file to be A.B.C, wherein A/B/C is a number;
s132, if node deletion, value domain deletion, forced constraint deletion, keyword constraint deletion or path modification exists in the difference expansion tag set of the new model file, the model file is incompatible modification at this time, and the version number changes are as follows: a is increased by 1, B =0, C =0, then step 135 is executed;
s133, if node \ value domain addition \ mandatory constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is compatible and modified, and the version number changes are as follows: if a is not changed, B is increased by 1, and C =0, then step 136 is executed;
s134, if node \ value domain addition \ forced constraint addition \ keyword constraint addition exists in the new model file difference expansion tag set, the model file is generally modified, and the version number changes are as follows: if A is not changed, B is not changed to 1, and C is increased by 1, executing step 136;
s135, traversing the difference detail in the step S123 in the step S12, and writing the version number of the old model file into each difference detail;
and S136, writing the version number of the new model file into the file version information.
4. The method for comparing version differences of information models according to claim 1, wherein the step S14 includes:
s141, defining the format of the version number of the model file to be X.Y, wherein X/Y is a number;
s142, if the situation that the file version number A is increased by 1 exists in the model file version number set, increasing X by 1, and Y =0, otherwise, keeping X unchanged, and increasing Y by 1;
and S143, writing the version number of the new model library into the version control file.
5. The method for comparing version differences of information models according to claim 1, wherein the step S2 includes:
s21, the management and control system analyzes and loads the new equipment model library file package;
s22, the new/old equipment loads the information model library file packages respectively and reports the current model library version number and the model file version number to the control system;
s23, the management and control system reports the version number of the current model file according to the equipment, traverses the difference details in the matched model file, and adapts to the corresponding node parameter information and node path information;
and S24, the management and control system generates or analyzes the device data instance to complete data interaction.
6. The method for comparing information model version differences according to claim 5, wherein in the step S23:
traversing the version number of the model file if the version number of the current model library of the control system is not matched with the version number of the model library reported by a certain device;
and traversing all the difference expansion mark nodes if the version number of the current model file of the control system is not matched with the version number of the model file reported by a certain device.
7. The method for comparing version differences of information models according to claim 5, wherein the step S24 includes:
when the management and control system converts equipment interaction message data according to the information model example, if the difference extension marks exist in the nodes in the message, the message interaction data is generated according to the difference details of the model file of the old version when the message data is converted.
8. The device for comparing the version difference of the information model is characterized by comprising a new information model library generating module and a difference identification processing module, wherein:
the new information model base generation module is used for comparing the new version information model files with the old version information model files through a version difference comparison tool, automatically numbering the model files according to a comparison result and generating a new information model base; the method is specifically used for executing the following steps:
s11, importing the information model files of the new version and the old version, and generating parameter nodes and path difference information by adopting a node analysis mode and based on XML format analysis; generating a difference expansion mark and a difference detail according to a difference comparison rule; s12, writing the difference extension marks and the difference details in the step S11 into a new version information model file; s13, summarizing the difference extension marks of the new version information model in the step S11 to generate a new information model file version number; s14, summarizing the version number of each new information model file in the step S13 to generate a new model library version number; the S11 includes:
s111, respectively reading new and old information model files, and acquiring all node parameter information and node path information described in the information model files in a node analysis mode, wherein the node path information is < the ID of the node, and the path of a father node >; node parameter information < parameter ID, parameter data type, parameter value field, parameter default value, parameter forced constraint, parameter keyword constraint, and parameter general description and annotation >; s112, traversing the node path information of the new model, matching the node parameter information and the node path information of the node in the old model file, and executing the step S119 if the node path information and the node parameter information are successfully matched; s113, if the IDs of the nodes are not matched and the difference expansion mark is added, executing a step S115; s114, if the paths of the father nodes are not matched, the difference expansion mark is modified; s115, if the parameter keyword constraints are not matched, the difference expansion mark is a keyword constraint increase or a keyword constraint deletion; s116, if the parameters are not matched with the mandatory constraints, marking the difference expansion as mandatory constraint addition or mandatory constraint deletion; s117, if the parameter value fields are not matched, the difference expansion mark is added to the value field or deleted from the value field; s118, if the parameter data type, the parameter default value, the parameter general description and the comment are not matched, the difference expansion is marked as general modification; s119, completing traversal of the node path information of the new model;
and the difference identification processing module is used for adapting the latest information model base according to the version number reported by the equipment, and identifying and processing incompatible differences.
CN202110140024.7A 2021-02-02 2021-02-02 Information model version difference comparison method and device Active CN112965738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110140024.7A CN112965738B (en) 2021-02-02 2021-02-02 Information model version difference comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110140024.7A CN112965738B (en) 2021-02-02 2021-02-02 Information model version difference comparison method and device

Publications (2)

Publication Number Publication Date
CN112965738A CN112965738A (en) 2021-06-15
CN112965738B true CN112965738B (en) 2022-07-08

Family

ID=76273068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110140024.7A Active CN112965738B (en) 2021-02-02 2021-02-02 Information model version difference comparison method and device

Country Status (1)

Country Link
CN (1) CN112965738B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934644B (en) * 2021-12-16 2022-04-15 深圳市明源云链互联网科技有限公司 Version difference comparison method and device, intelligent terminal and readable storage medium
CN117492803B (en) * 2023-12-28 2024-03-26 深圳市一诺智控科技有限公司 Intelligent door lock PCBA software upgrading method and system
CN117573199B (en) * 2024-01-16 2024-04-16 成都安世赛斯特软件技术有限公司 Model difference comparison analysis method, device, equipment and medium
CN119228510B (en) * 2024-12-03 2025-03-21 浙江大华技术股份有限公司 Customized product difference comparison method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929600A (en) * 2012-06-13 2013-02-13 许继集团有限公司 ELF (executable and linkable format)-based monitoring system version recognition method
CN109995650A (en) * 2018-01-03 2019-07-09 中兴通讯股份有限公司 Path calculation method and device under multi-dimensional constraints based on SDN network

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162501B2 (en) * 2002-11-26 2007-01-09 Microsoft Corporation Hierarchical differential document representative of changes between versions of hierarchical document
CN102013994B (en) * 2010-11-02 2014-04-09 中兴通讯股份有限公司 Method, terminal and system for implementing network element version compatibility in network management
CN102253992B (en) * 2011-07-06 2013-01-23 广东威创视讯科技股份有限公司 Object-orientation based file difference comparing method and system
CN103413200A (en) * 2013-08-16 2013-11-27 北京四方继保自动化股份有限公司 Model edition self-adaptation achieving method based on electric power enterprise server bus (ESB)
CN105930170B (en) * 2016-05-12 2019-01-22 国网辽宁省电力有限公司鞍山供电公司 A method for semantic version management of SCD files based on comparison and parsing results
CN106843893A (en) * 2017-02-07 2017-06-13 济南浪潮高新科技投资发展有限公司 A kind of documentation release management system based on OpenXML standards
CN107506219A (en) * 2017-09-21 2017-12-22 烽火通信科技股份有限公司 A kind of general version upgrade method based on android system
CN109298871B (en) * 2018-09-25 2021-09-28 东方电子股份有限公司 Software version monitoring and deploying method for intelligent scheduling system of power grid
CN111026726A (en) * 2019-10-24 2020-04-17 贵州电网有限责任公司 Method and system for comparing different versions of SCD file of intelligent substation and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929600A (en) * 2012-06-13 2013-02-13 许继集团有限公司 ELF (executable and linkable format)-based monitoring system version recognition method
CN109995650A (en) * 2018-01-03 2019-07-09 中兴通讯股份有限公司 Path calculation method and device under multi-dimensional constraints based on SDN network

Also Published As

Publication number Publication date
CN112965738A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112965738B (en) Information model version difference comparison method and device
US11429365B2 (en) Systems and methods for automated retrofitting of customized code objects
CN103365683B (en) For end-to-end patch automation and integrated method and system
US7581207B2 (en) Method of configuring managed entities in a communications network using configuration templates
US20110296391A1 (en) Systems and Methods for Dynamically Replacing Code Objects Via Conditional Pattern Templates
CN115098156B (en) Network mode management system and management method
CN111427321A (en) Multi-protocol-compatible MES data acquisition system and method thereof
US20040181783A1 (en) Transformation apparatus, transformation method, transformation programs, and computer readable recording medium having the transformation program stored therein
US20030046381A1 (en) Network device management method, network device management system, and process program for managing network device
CN119597847A (en) A method and system for realizing data synchronization between heterogeneous databases based on logs
US7283986B2 (en) End-to-end business integration testing tool
CN111651196A (en) Document publishing method, device and server
CN112100984A (en) Data conversion method and system from EBOM to SBOM
CN112672370A (en) Automatic detection method, system, device and storage medium for network element index data
CN114253808A (en) Method and device for monitoring object status
CN111277650B (en) An automated microservice identification method combining functional and non-functional metrics
CN112597343A (en) Netconf automatic configuration generation method
CN114531335B (en) Method, equipment and device for detecting management information base data
CN101158908A (en) System and method for realizing automatic equipment software upgrade
CN112653648B (en) Method and device for generating communication protocol
CN115328907B (en) Form creation method, system and storage medium
CN114297141B (en) A method and system for processing production data files of Fab equipment
CN112464033B (en) An object-oriented method for classification and communication of power data
CN118131700A (en) Industrial model construction method, device, system and storage medium
JP2005251120A (en) FA equipment interface integration device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240701

Address after: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee after: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region after: China

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Address before: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee before: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region before: China