CN112799673B - Network protocol data checking method and device - Google Patents
Network protocol data checking method and device Download PDFInfo
- Publication number
- CN112799673B CN112799673B CN202110069633.8A CN202110069633A CN112799673B CN 112799673 B CN112799673 B CN 112799673B CN 202110069633 A CN202110069633 A CN 202110069633A CN 112799673 B CN112799673 B CN 112799673B
- Authority
- CN
- China
- Prior art keywords
- data
- target
- value pair
- key
- target data
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for checking network protocol data, wherein the checking method comprises the following steps: establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library; acquiring a check rule, first data to be checked and second data to be checked, wherein the check rule comprises a target configuration item to be compared; format conversion is carried out on the first data to be checked based on the data processing library to obtain first target data, and format conversion is carried out on the second data to be checked based on the data processing library to obtain second target data; and traversing the first target data and the second target data, comparing whether the data information of the target configuration item in the first target data and the second target data has difference or not, and outputting a checking result. In the invention, the checking result can be visually output, and the development personnel can conveniently and quickly maintain and expand the checking result.
Description
Technical Field
The invention belongs to the field of data checking, and particularly relates to a method and a device for checking network protocol data.
Background
With the rapid development of communication technology, the functions of communication equipment are more and more powerful, the configuration of the communication equipment is more and more rich and complex, meanwhile, along with the larger and larger scale of the communication network, the types and the number of the communication equipment are more and more, the network protocol data check is used as a part of network management, the network protocol data check needs to be adapted to the rich and complex configuration and numerous equipment, and a user can conveniently and rapidly check the network equipment protocol data and find and clear residual protocol data of the network equipment.
At present, the checking granularity of the existing checking mode is thicker, only the difference between data can be determined, but specific difference items cannot be determined, and specific difference details cannot be known quickly and intuitively, so that a user cannot effectively and quickly clear protocol data remained in network equipment, and the checking of the original coarse granularity can only check the difference of the data, so that a convenient and quick checking method is urgently needed.
Disclosure of Invention
The invention provides a method and a device for checking network protocol data, aiming at comparing the data to be checked through a network protocol definition file and a data processing library, traversing the data to find out a configuration item with data message difference, ensuring the integrity of checking, and visually outputting a checking result, which is beneficial to assisting a user to check the network equipment protocol data more conveniently and quickly, find and clear the residual protocol data of the network equipment, and is beneficial to a developer to maintain and expand the network equipment conveniently and quickly, thereby solving the technical problems of incomplete network protocol data checking function, non-visual display of the checking result and residual data of the network equipment.
To achieve the above object, according to an aspect of the present invention, there is provided a method for checking network protocol data, the method including:
establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library;
acquiring a check rule, first data to be checked and second data to be checked, wherein the check rule comprises a target configuration item to be compared;
format conversion is carried out on the first data to be checked based on the data processing base to obtain first target data, and format conversion is carried out on the second data to be checked based on the data processing base to obtain second target data;
and traversing the first target data and the second target data, comparing whether the data information of the target configuration item in the first target data and the second target data has difference or not, and outputting a checking result.
Preferably, the traversing the first target data and the second target data, comparing whether there is a difference between data information of the target configuration item in the first target data and the second target data, and outputting a checking result includes:
respectively traversing the primary entry nodes of the first target data and the second target data, and if the primary entry nodes meet the precondition in the check rule, acquiring configuration items with keywords under the primary entry nodes;
for each primary entry node of the first target data, taking the value of the configuration item with the keyword as a primary key value, and forming a key value pair by the primary key value and the corresponding primary entry node to establish a first key value pair set; for each primary entry node of the second target data, taking the configured value with the keyword as a primary key value, and forming a key value pair by the primary key value and the corresponding primary entry node to establish a second key value pair set;
comparing whether a first target key-value pair and a second target key-value pair with equal primary key values exist between the first key-value pair set and the second key-value pair set, wherein the first target key-value pair belongs to the first key-value pair set, and the second target key-value pair belongs to the second key-value pair set;
and if so, comparing whether the data information of each target configuration item under the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair is different or not, and outputting a checking result.
Preferably, the comparing whether there are a first target key-value pair and a second target key-value pair with equal primary key values between the first set of key-value pairs and the second set of key-value pairs further comprises:
acquiring a first target key value pair of which the primary key value exists only in the first key value pair set, and identifying a first-level entry node corresponding to the first target key value pair in a specified mode to represent that the first-level entry node exists only in the first target data;
and acquiring a second target key value pair of which the primary key value only exists in the second key value pair set, and identifying a first-level entry node corresponding to the second target key value pair in a specified mode to represent that the first-level entry node only exists in the second target data.
Preferably, the comparing whether there is a difference in data information of each target configuration item under the first-level entry node corresponding to the first target key-value pair and the first-level entry node corresponding to the second target key-value pair includes:
acquiring target configuration items needing to be checked from the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair in sequence;
judging whether a sub-entry exists under the target configuration item;
and if the sub-entry exists under the target configuration item, the target configuration item is used as the sub-target data of the first target data and the second target data to carry out recursive comparison.
Preferably, after the determining whether there is a sub-entry under the target configuration item, the method further includes:
if the sub-item does not exist under the target configuration item, comparing whether the data information under the target configuration item is equal or not;
if the first-level item node and the second-level item node are equal, taking out the next target configuration item from the first-level item node for comparison until the data information under all the target configuration items are equal, and identifying the first-level item node in the first target data and the second target data in a specified manner to represent that the data information of the first-level item node in the first target data and the second target data is equal;
if not, identifying the first-level entry node in the first target data and the second target data in a specified manner to represent that the data information of the first-level entry node in the first target data is not equal to that of the second target data.
Preferably, the check result includes a check result summary and check result details, and the check method further includes:
outputting a checking result abstract in a table form, wherein the checking result abstract comprises: the values of the configuration items with the keywords corresponding to the first-level entry nodes of the first target data and the second target data are differentiated by different background colors;
and after a check detail button in the checking result abstract is selected, outputting checking details through a directory tree interface.
Preferably, the establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library includes:
inputting a configuration block protocol in a protocol management system to generate a network protocol definition file, wherein each network protocol definition file comprises configuration items contained in the configuration block protocol, attribute information of each configuration item and the front-back sequence of the configuration items;
and importing the network protocol definition file into a code generation system, and compiling to obtain a corresponding data processing library, wherein the data processing library is used for realizing the data processing functions of Class2XML, XML2Class, Class2PB and PB2 Class.
Preferably, the data processing library comprises a dynamic link library and a Jar package.
Preferably, the first target data and the second target data are XML format data.
According to another aspect of the present invention, there is provided a checking apparatus comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions programmed to perform the verification method of the present invention.
Generally, compared with the prior art, the technical scheme of the invention has the following beneficial effects: the invention provides a method and a device for checking network protocol data, wherein the checking method comprises the following steps: establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library; acquiring a check rule, first data to be checked and second data to be checked, wherein the check rule comprises a target configuration item to be compared; format conversion is carried out on the first data to be checked based on the data processing base to obtain first target data, and format conversion is carried out on the second data to be checked based on the data processing base to obtain second target data; and traversing the first target data and the second target data, comparing whether the data information of the target configuration item in the first target data and the second target data has difference or not, and outputting a checking result.
In the invention, the network protocol definition file and the data processing base are used for comparing the data to be checked, traversing the data to find out the configuration items with data message differences, ensuring the integrity of checking, and visually outputting the checking result, thus being beneficial to assisting users to check the protocol data of the network equipment more conveniently and rapidly, finding and clearing the residual protocol data of the network equipment, and being beneficial to the convenient and rapid maintenance and extension of developers.
Drawings
Fig. 1 is a schematic flowchart of a method for checking network protocol data according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a network protocol provided by an embodiment of the present invention;
FIG. 3 is a diagram illustrating data to be checked according to the network protocol shown in FIG. 2;
FIG. 4 is a schematic diagram illustrating a display of a verification result provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a calibration 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 are not intended to 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.
Example 1:
referring to fig. 1, the present embodiment provides a method for checking network protocol data, where the method includes the following steps:
step 101: establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library. In this embodiment, a network protocol (which may also be referred to as a configuration block) is entered into a protocol management system to generate network protocol definition files, where each of the network protocol definition files includes configuration items included in the configuration block protocol and attribute information of each configuration item.
The network protocol definition file is an xsd file, as shown in fig. 2, is a network protocol definition file corresponding to a "flow classification" network protocol, one network protocol definition file may include one or more primary entry nodes, each primary entry node includes a plurality of configuration items, and each configuration item may further include a sub-entry, as shown in fig. 2, "qos _ class _ module _ item" is a primary entry node, and the primary entry node includes 5 configuration items (xsd: element), and each configuration item has a plurality of attribute information, for example, the attribute information includes: name, Chinese name w: cn, English name w: en, default value default, value range w: range, keyword w: key, etc., in FIG. 2, the English names (w: en) corresponding to the 5 configuration items are "classfier _ name", "classfier _ name _ index", "operator _ type", "qos _ classfier _ match _ rule" and "backup 15".
Wherein, the network co-definition file also comprises the front and back sequence of the configuration items.
And importing the network protocol definition file into a code generation system, converting the network protocol definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library. The data processing source code has a format conversion function, and may convert the network configuration data into Class of c + + programming language, convert Class into xml, convert xml into Class, convert Class into PB (protocol buffers), convert PB into Class, and the like, for example.
The data processing library is used for realizing the data processing functions of Class2XML, XML2Class, Class2PB and PB2 Class.
The specific type of the data processing library depends on a specific operating system and a programming language, and the data processing library includes a dynamic link library and a Jar package, for example, in a Windows system, the data processing library may be a C + + source code file, in which a C + + data structure of a network protocol is defined, and a Class2XML (Class-to-XML, in C + +, an "object" is described by a "Class", so-called "object" refers to everything in the real world), XML2Class, Class2PB (Class-to-PB, PB is a data description language, structured data can be serialized similarly to XML, and the data processing library can be used for various data processing functions of data storage, communication protocols, and the like), PB2Class, and the like.
In an actual application scenario, the network co-definition file of xsd is added into a code system to obtain a corresponding C + + source code, and the generated C + + source code file is added into a public network protocol data processing source code project to be compiled to generate a DLL (Dynamic Link Library). In Windows, many applications are not a complete executable file, and they are partitioned into relatively independent dynamically linked libraries that are placed in the system. When a program is executed, the corresponding DLL file is called. In actual use, after the network protocol definition file and the dynamic link library are established, the network protocol definition file and the dynamic link library are added into the checking device, and the checking device checks the network protocol data by adopting the network protocol definition file and the dynamic link library.
Step 102: and acquiring a check rule, first data to be checked and second data to be checked, wherein the check rule comprises a target configuration item to be compared.
Before data checking, a setting interface of a checking rule is popped up, all configuration items are displayed on the setting interface, a user can select the configuration items needing to be compared according to needs, the user can edit conditions needing to be met by the network protocol data participating in comparison, and the conditions needing to be met by the configuration items needing to be compared and the network protocol data participating in comparison can be kept as templates or static setting parameters. When setting the checking rule, the user can directly select the existing template.
Step 103: and performing format conversion on the first data to be checked based on the data processing library to obtain first target data, and performing format conversion on the second data to be checked based on the data processing library to obtain second target data.
The first data to be checked can be external data generated by the network equipment, the second data to be checked can be network management data, and the difference between the external data and the network management data is found out by checking the external data and the network management data, so that whether the network equipment has residual data or not is determined, and the residual data is deleted.
In this embodiment, the first target data and the second target data are data in XML format. And converting the first data to be checked and the second data to be checked into XML format data through the data processing library.
As shown in fig. 3, fig. 3 shows xml data, which is external data configured based on the network protocol shown in fig. 2, where the external data includes three flow classification data, and the names of the corresponding flow classification templates are name1, name2, and name3, respectively.
Step 104: and traversing the first target data and the second target data, comparing whether the data information of the target configuration item in the first target data and the second target data has difference or not, and outputting a checking result.
Specifically, first-level entry nodes of the first target data and the second target data are traversed respectively, and if the first-level entry nodes meet the precondition in the check rule, configuration items with keywords are acquired under the first-level entry nodes. The configuration item with the keyword refers to a configuration item with attribute information of "keyword w: key", for example, a configuration item with a Chinese name of "flow classification template name" in fig. 2.
In an actual application scenario, searching a configuration block protocol definition corresponding to the first target data and the second target data in the network protocol definition file, thereby obtaining a configuration item with a keyword; and acquiring values actually given to the configuration items with the keywords from the first target data and the second target data respectively.
For each primary entry node of the first target data, taking the value of the configuration item with the keyword as a primary key value, and forming a key value pair by the primary key value and the corresponding primary entry node to establish a first key value pair set; and aiming at each primary entry node of the second target data, taking the value of the configuration item with the key as a primary key value, and forming a key value pair by using the primary key value and the corresponding primary entry node to establish a second key value pair set.
Taking fig. 2 as an example, a qos _ class _ module _ item node is a piece of data, and the piece of data is characterized by a value of a class _ name (name is a class _ name with w: key 1), so that the value actually given to the class _ name and the qos _ class _ module _ item node form a key-value pair; a "qos _ class _ match _ rule" node is a piece of data, characterized by a match _ type (name with w: key 1), and the value to which the match _ type is actually assigned and the qos _ class _ match _ rule node constitute a key-value pair.
After determining a first set of key-value pairs and a second set of key-value pairs, comparing whether a first target key-value pair and a second target key-value pair with equal primary key values exist between the first set of key-value pairs and the second set of key-value pairs, wherein the first target key-value pair belongs to the first set of key-value pairs, and the second target key-value pair belongs to the second set of key-value pairs; and if so, comparing whether the data information of each target configuration item under the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair is different.
In an actual application scene, acquiring a first target key value pair of which the primary key value exists only in the first key value pair set, and identifying a primary entry node corresponding to the first target key value pair in a specified manner to represent that the primary entry node exists only in the first target data; and acquiring a second target key value pair of which the primary key value only exists in the second key value pair set, and identifying a first-level entry node corresponding to the second target key value pair in a specified mode to represent that the first-level entry node only exists in the second target data.
It can be understood that, in the checking process, the primary key values a of the key values are sequentially taken out from the first key value pair set, and whether the primary key values B equal to the primary key values a exist in the second key value pair set is searched, where the key values to which the primary key values a belong are first target key value pairs, and the key values to which the primary key values B belong are second target key value pairs.
The comparing whether the data information of each target configuration item under the first-level entry node corresponding to the first target key-value pair and the first-level entry node corresponding to the second target key-value pair has a difference specifically includes:
acquiring target configuration items needing to be checked from the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair in sequence; judging whether a sub-entry exists under the target configuration item; and if the sub-entry exists under the target configuration item, the target configuration item is used as the sub-target data of the first target data and the second target data to carry out recursive comparison. In conjunction with fig. 2, assuming that "qos _ class _ module _ item" is a level entry node, and "qos _ class _ match _ rule" is a target configuration item to be compared this time, since two configuration items ("match _ type" and "match _ value") are included under "qos _ class _ match _ rule", it is described that a sub-entry is also included under "qos _ class _ match _ rule", and "qos _ class _ match _ rule" is a sub-node of "qos _ class _ model _ item", and then "qos _ class _ match _ rule" is used as sub-target data to perform recursive comparison in the manner of step 104.
If the sub-item does not exist under the target configuration item, comparing whether the data information under the target configuration item is equal or not; and if so, taking out the next target configuration item from the primary entry node for comparison until the data information under all the target configuration items is equal, and identifying the primary entry node in the first target data and the second target data in a specified manner to represent that the data information of the primary entry node in the first target data and the second target data is equal.
If not, identifying the first-level entry node in the first target data and the second target data in a specified manner to represent that the data information of the first-level entry node in the first target data is not equal to that of the second target data.
In an actual application scenario, outputting a checking result abstract in a table form, wherein the checking result abstract comprises: the values of the configuration items with the keywords corresponding to the first-level entry nodes of the first target data and the second target data are differentiated by different background colors; and after a check detail button in the checking result abstract is selected, outputting checking details through a directory tree interface.
Taking fig. 4 as an example, the external data (the first data to be checked) and the network management data (the second data to be checked) in fig. 3 are checked, where the external data includes three stream classification data, and the names of the corresponding stream classification templates are name1, name2, and name3, respectively. The network management data comprises three flow classification data, the names of the corresponding flow classification templates are name2, name3 and name4 respectively, if the result shows that the name4 only exists in the network management data, and the name1 only exists in the external data. The comparison result of the name2 of the external data and each configuration item of the name2 of the network management data is as follows: the logical relationship of the name2 of the network management data is "OR", the logical relationship of the name2 of the external data is "AND", and the two are different, and the specified color can be adopted for filling.
In this embodiment, the network co-definition file and the data processing library are used for comparing the data to be checked, finding out the configuration items with data message differences, and outputting the checking result, which is beneficial to assisting the user to check the protocol data of the network device more conveniently and quickly, find the residual protocol data of the network device and clear the residual protocol data, and is also beneficial to the development personnel to maintain and expand conveniently and quickly.
In an actual application scenario, a developer can also expand or optimize the scheme of the embodiment, for example, add a check result export report, and implement detection and deletion of network device residual data on the basis of the check result.
Example 2:
referring to fig. 5, fig. 5 is a schematic structural diagram of a checking apparatus according to an embodiment of the present invention. The checking apparatus of the present embodiment includes one or more processors 41 and a memory 42. In fig. 5, one processor 41 is taken as an example.
The processor 41 and the memory 42 may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The memory 42, which is a non-volatile computer-readable storage medium based on the verification method, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, the methods of the above embodiments, and corresponding program instructions. The processor 41 implements the methods of the foregoing embodiments by executing non-volatile software programs, instructions, and modules stored in the memory 42 to thereby execute various functional applications and data processing.
The memory 42 may include, among other things, high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 42 may optionally include memory located remotely from processor 41, which may be connected to processor 41 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
It should be noted that, for the information interaction, execution process and other contents between the modules and units in the apparatus and system, the specific contents may refer to the description in the embodiment of the method of the present invention because the same concept is used as the embodiment of the processing method of the present invention, and are not described herein again.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the embodiments may be implemented by associated hardware as instructed by a program, which may be stored on a computer-readable storage medium, which may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
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 (9)
1. A method for checking network protocol data is characterized in that the checking method comprises the following steps:
establishing a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library; wherein, the establishing of the network co-definition file comprises: inputting a configuration block protocol in a protocol management system to generate a network protocol definition file, wherein each network protocol definition file comprises configuration items contained in the configuration block protocol, attribute information of each configuration item and the front-back sequence of the configuration items;
acquiring a check rule, first data to be checked and second data to be checked, wherein the check rule comprises a target configuration item to be compared;
format conversion is carried out on the first data to be checked based on the data processing base to obtain first target data, and format conversion is carried out on the second data to be checked based on the data processing base to obtain second target data;
traversing the first target data and the second target data, comparing whether the data information of the target configuration item in the first target data and the second target data is different, and outputting a checking result; the method comprises the following steps:
respectively traversing the primary entry nodes of the first target data and the second target data, and if the primary entry nodes meet the precondition in the check rule, acquiring configuration items with keywords under the primary entry nodes;
for each primary entry node of the first target data, taking the value of the configuration item with the keyword as a primary key value, and forming a key value pair by the primary key value and the corresponding primary entry node to establish a first key value pair set; for each primary entry node of the second target data, taking the configured value with the keyword as a primary key value, and forming a key value pair by the primary key value and the corresponding primary entry node to establish a second key value pair set;
comparing whether a first target key-value pair and a second target key-value pair with equal primary key values exist between the first key-value pair set and the second key-value pair set, wherein the first target key-value pair belongs to the first key-value pair set, and the second target key-value pair belongs to the second key-value pair set;
and if so, comparing whether the data information of each target configuration item under the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair is different or not, and outputting a checking result.
2. The checking method of claim 1, wherein comparing whether there are first and second target key-value pairs with equal primary key values between the first and second sets of key-value pairs further comprises:
acquiring a first target key value pair of which the primary key value exists only in the first key value pair set, and identifying a first-level entry node corresponding to the first target key value pair in a specified mode to represent that the first-level entry node exists only in the first target data;
and acquiring a second target key value pair of which the primary key value only exists in the second key value pair set, and identifying a first-level entry node corresponding to the second target key value pair in a specified mode to represent that the first-level entry node only exists in the second target data.
3. The checking method according to claim 1, wherein the comparing whether there is a difference in data information of each target configuration item under the primary entry node corresponding to the first target key-value pair and the primary entry node corresponding to the second target key-value pair includes:
acquiring target configuration items needing to be checked from the first-level entry node corresponding to the first target key value pair and the first-level entry node corresponding to the second target key value pair in sequence;
judging whether a sub-entry exists under the target configuration item;
and if the sub-entry exists under the target configuration item, the target configuration item is used as the sub-target data of the first target data and the second target data to carry out recursive comparison.
4. The checking method according to claim 3, wherein after determining whether there is a sub-entry under the target configuration item, further comprising:
if the sub-item does not exist under the target configuration item, comparing whether the data information under the target configuration item is equal or not;
if the first-level item node and the second-level item node are equal, taking out the next target configuration item from the first-level item node for comparison until the data information under all the target configuration items are equal, and identifying the first-level item node in the first target data and the second target data in a specified manner to represent that the data information of the first-level item node in the first target data and the second target data is equal;
if not, identifying the first-level entry node in the first target data and the second target data in a specified manner to represent that the data information of the first-level entry node in the first target data is not equal to that of the second target data.
5. The checking method according to claim 1, wherein the checking result comprises a checking result summary and checking result details, and the checking method further comprises:
outputting a checking result abstract in a table form, wherein the checking result abstract comprises: the values of the configuration items with the keywords corresponding to the first-level entry nodes of the first target data and the second target data are differentiated by different background colors;
and after a check detail button in the checking result abstract is selected, outputting checking details through a directory tree interface.
6. The checking method according to claim 1, wherein the creating a network co-definition file, converting the network co-definition file into a data processing source code, and compiling the data processing source code to obtain a corresponding data processing library comprises:
and importing the network protocol definition file into a code generation system, and compiling to obtain a corresponding data processing library, wherein the data processing library is used for realizing the data processing functions of Class2XML, XML2Class, Class2PB and PB2 Class.
7. The verification method of claim 1, wherein the data processing library comprises a dynamic link library and a Jar package.
8. The verification method according to claim 1, wherein the first object data and the second object data are XML-formatted data.
9. A verification device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor and programmed to perform a method of checking as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110069633.8A CN112799673B (en) | 2021-01-19 | 2021-01-19 | Network protocol data checking method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110069633.8A CN112799673B (en) | 2021-01-19 | 2021-01-19 | Network protocol data checking method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112799673A CN112799673A (en) | 2021-05-14 |
CN112799673B true CN112799673B (en) | 2022-03-25 |
Family
ID=75810433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110069633.8A Active CN112799673B (en) | 2021-01-19 | 2021-01-19 | Network protocol data checking method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112799673B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114422610A (en) * | 2022-01-11 | 2022-04-29 | 国电南瑞南京控制系统有限公司 | Plug-and-play protocol model conversion device and conversion method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629263A (en) * | 2012-02-29 | 2012-08-08 | 上海安捷力信息系统有限公司 | Method and system for format conversion of interactive business data among enterprises |
CN105337968A (en) * | 2015-10-19 | 2016-02-17 | 江苏中威科技软件系统有限公司 | Cross platform communication protocol code conversion method and system |
CN107957871A (en) * | 2017-11-15 | 2018-04-24 | 杭州安恒信息技术有限公司 | A kind of front and back end synchronization canonical method of calibration based on JSR303 |
CN109408247A (en) * | 2018-09-17 | 2019-03-01 | 天津龙拳风暴科技有限公司 | Interaction data processing method and device |
CN111309593A (en) * | 2020-01-16 | 2020-06-19 | 中国平安财产保险股份有限公司 | JSON interface verification method, device and equipment and computer readable storage medium |
CN111460629A (en) * | 2020-03-16 | 2020-07-28 | 南京南瑞继保电气有限公司 | Graphic data checking method and device, electronic equipment and computer storage medium |
CN111598382A (en) * | 2020-04-01 | 2020-08-28 | 深圳壹账通智能科技有限公司 | Service chain data checking method and device based on block chain, storage medium and electronic equipment |
CN112148509A (en) * | 2020-10-16 | 2020-12-29 | 腾讯科技(深圳)有限公司 | Data processing method, device, server and computer readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231679B (en) * | 2011-06-29 | 2014-06-04 | 烽火通信科技股份有限公司 | Method for realizing configuration synchronization of network elements and webmaster |
US10296312B2 (en) * | 2016-05-20 | 2019-05-21 | Arizona Board Of Regents On Behalf Of Arizona State University | Methods, apparatuses, and systems for zero silent data corruption (ZDC) compiler technique |
CN107357985A (en) * | 2017-07-03 | 2017-11-17 | 国网江苏省电力公司南京供电公司 | A kind of check scheme on distribution main website feeder line topological model |
-
2021
- 2021-01-19 CN CN202110069633.8A patent/CN112799673B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629263A (en) * | 2012-02-29 | 2012-08-08 | 上海安捷力信息系统有限公司 | Method and system for format conversion of interactive business data among enterprises |
CN105337968A (en) * | 2015-10-19 | 2016-02-17 | 江苏中威科技软件系统有限公司 | Cross platform communication protocol code conversion method and system |
CN107957871A (en) * | 2017-11-15 | 2018-04-24 | 杭州安恒信息技术有限公司 | A kind of front and back end synchronization canonical method of calibration based on JSR303 |
CN109408247A (en) * | 2018-09-17 | 2019-03-01 | 天津龙拳风暴科技有限公司 | Interaction data processing method and device |
CN111309593A (en) * | 2020-01-16 | 2020-06-19 | 中国平安财产保险股份有限公司 | JSON interface verification method, device and equipment and computer readable storage medium |
CN111460629A (en) * | 2020-03-16 | 2020-07-28 | 南京南瑞继保电气有限公司 | Graphic data checking method and device, electronic equipment and computer storage medium |
CN111598382A (en) * | 2020-04-01 | 2020-08-28 | 深圳壹账通智能科技有限公司 | Service chain data checking method and device based on block chain, storage medium and electronic equipment |
CN112148509A (en) * | 2020-10-16 | 2020-12-29 | 腾讯科技(深圳)有限公司 | Data processing method, device, server and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
UDP, ICMP, IP 协议校验和的计算;zwh8800;《https://www.zybuluo.com/zwh8800/note/816468》;20170823;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112799673A (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
De Medeiros et al. | Process mining: extending the alpha-algorithm to mine short loops | |
US20170308380A1 (en) | Apparatus and method for detecting code cloning of software | |
CN110515973B (en) | Data query optimization method, device, equipment and storage medium | |
US8250536B2 (en) | Analysis of a legacy source code application | |
CN106469049B (en) | File scanning method and device | |
Delfmann et al. | The generic model query language GMQL–Conceptual specification, implementation, and runtime evaluation | |
CN105320681A (en) | Database content combination method and device | |
Motahari-Nezhad et al. | Deriving protocol models from imperfect service conversation logs | |
Oluwagbemi et al. | Automatic generation of test cases from activity diagrams for UML based testing (UBT) | |
CN112799673B (en) | Network protocol data checking method and device | |
CN113568604B (en) | Method and device for updating wind control strategy and computer readable storage medium | |
JP2010140408A (en) | Source code converting device | |
CN113515303B (en) | Project transformation method, device and equipment | |
Abushark et al. | Early Detection of Design Faults Relative to Requirement Specifications in Agent-Based Models. | |
Hue et al. | A transformation-based method for test case automatic generation from use cases | |
Hauschildt et al. | WOFLAN: a Petri-net-based Workflow Analyzer | |
CN110188432B (en) | System architecture verification method, electronic device and computer-readable storage medium | |
Ameloot et al. | Deciding eventual consistency for a simple class of relational transducer networks | |
US10540157B2 (en) | Systems to remove object relational mappings from a software project | |
Baldassari et al. | PROTOB a hierarchical object-oriented CASE tool for distributed systems | |
Boucher et al. | Transforming workflow models into automated end-to-end acceptance test cases | |
Agape et al. | P4fuzz: A compiler fuzzer for securing p4 programmable dataplanes | |
Sahu et al. | Computing dynamic slices of feature--oriented programs using execution trace file | |
CN111159203B (en) | Data association analysis method, platform, electronic equipment and storage medium | |
Leemans | Hierarchical process mining for scalable software analysis |
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 |