CN-122018912-A - Data verification method, system and equipment for interlocking products
Abstract
The invention relates to the technical field of railway signal safety control, and provides a data verification method, a system and equipment for interlocking products, wherein the method comprises the following steps: analyzing the interlocked engineering data configuration file, extracting data type definition and variable definition, constructing a type multi-way tree and a data multi-way tree, performing progressive hierarchical expansion on multi-dimensional array nodes in the data multi-way tree, traversing non-leaf nodes through stacks, constructing child nodes according to the structure type and variable names of the nodes with array marks until expansion is completed, checking the expanded data multi-way tree with standard design data, and outputting a checking result. According to the data verification method, system and equipment for the interlocking products, the verification accuracy and efficiency are improved, and the reliability of the interlocking data configuration is ensured by progressively expanding the multidimensional array nodes.
Inventors
- YU WENBIN
- QIU ZHAOYANG
Assignees
- 北京全路通信信号研究设计院集团有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260104
Claims (10)
- 1. A method of verifying data of an interlocking product, the method comprising: s1, analyzing engineering data configuration files of interlocking software and constructing a data multi-way tree; Step S2, performing progressive hierarchical expansion on multi-dimensional array nodes in the data multi-way tree, wherein the step S2 comprises the following steps: initializing a stack oriStack, pushing the head node of the multi-way tree to the stack, judging whether the stack oriStack is empty, and acquiring a stack top element of the stack oriStack when the stack oriStack is not empty; if the acquired stack top element is a non-leaf node and the node is not traversed, stacking all child nodes of the node; If the popped node has an array mark, an extended traversing stack exdStack is constructed, and the node with the array mark is added into the constructed extended traversing stack exdStack; judging whether the extended traversing stack exdStack is empty or not, and when the extended traversing stack exdStack is not empty, executing a pop operation to obtain a structure type name and a structure variable name of a pop element top variable; acquiring the current dimension, the dimension and the remaining dimension of the array according to the structure type name and the structure variable name, constructing a corresponding number of child nodes on the current node according to the current dimension, and continuously judging whether the extended traversing stack exdStack is empty or not until all the node processing is completed; And step S3, checking the expanded data multi-way tree with standard design data, and outputting a checking result.
- 2. The method for verifying data of an interlocking product according to claim 1, wherein in step S1, constructing a data multi-way tree comprises defining a multi-way tree of a construction type according to data types, creating nodes for each data type, using a basic type as a leaf node, using a composite type as an intermediate node, expressing a data nesting structure through a parent-child relationship, and adding dimension attributes for the nodes of a group type.
- 3. The method for verifying data of an interlocking product according to claim 1, wherein the data multi-way tree is constructed according to variable definitions and type multi-way tree, the type multi-way tree is traversed by adopting a subsequent traversing algorithm, a node stack management traversing process is used, and the data in the data list is assigned to the corresponding node according to the type structure by monitoring stacks traStack to match curly brackets.
- 4. The method for verifying data of an interlocking product of claim 3, If the current read data element is a number and the current node popped from the node stack is a leaf node, assigning the number to the node, and advancing the access position of the data list by one bit; If the currently read data element is a left curly brace and the currently traversed node is a non-leaf node, assigning the left curly brace to the node, advancing the access position of the data list by one bit, and pushing the current node into a monitoring stack; If the currently read data element is a left curly brace and the currently traversed node is a leaf node, checking whether only one data element exists between the immediately following right curly brace and the next right curly brace, if yes, assigning the unique value to the current leaf node, and moving the data list access point to the position behind the right curly brace, otherwise, judging that the data is wrong, and ending the flow; If the currently read data element is a right curly brace and the currently traversed node is a leaf node, assigning a number 0 to the node; If the currently read data element is a right curly brace and the currently traversed node is a non-leaf node, checking whether the stack top element of the monitoring stack traStack is the current node, if so, executing a pop operation, and simultaneously advancing the data list access position by one bit, otherwise, ignoring the right curly brace and traversing the next node.
- 5. The method for verifying data of an interlocking product according to claim 1, wherein in step S2, when a corresponding number of child nodes are built on a current node according to a current dimension, if the remaining dimension is 0, the child nodes are directly assigned as top variables, if the remaining dimension is not 0, a new node is built, the remaining dimension is updated and recorded, and parameters of the top variables are copied to the built new node.
- 6. The interlocking product data verification method according to claim 1, wherein step S3 comprises: Performing consistency check on the expanded data multi-way tree and standard design data, and judging that the data multi-way tree and the standard design data do not pass the check when the data multi-way tree and the standard design data are inconsistent; and when the two are consistent, verifying the logic relationship between the expanded data multi-way tree and the standard design data, judging that the verification is passed when the logic relationship between the two accords with the interlocking logic rule, judging that the verification is not passed when the logic relationship between the two does not accord with the interlocking logic rule, and outputting a verification result.
- 7. A data verification system for an interlocking product, the system comprising a verification server, the verification server comprising: The analysis construction module is used for analyzing engineering data configuration files of the interlocking software and constructing a data multi-way tree; the expansion module is used for carrying out progressive hierarchical expansion on the multidimensional array nodes in the data multi-way tree; and the verification module is used for verifying the expanded data multi-way tree with the standard design data and outputting a verification result.
- 8. The interlocking product data verification system of claim 7 wherein, The expansion module comprises: An initializing unit, configured to initialize the stack oriStack, push the head node of the multi-way tree to the stack, determine whether the stack oriStack is empty, and obtain a top element of the stack oriStack when the stack oriStack is not empty; The main traversing unit is used for pushing all child nodes of the node to stack if the acquired stack top element is a non-leaf node and the node is not traversed, and executing a stack pulling operation by the stack oriStack if the stack top element is a leaf node; The array detection unit constructs an extended traversing stack exdStack if the node which is popped off has an array mark, and adds the node with the array mark into the constructed extended traversing stack exdStack; The expansion processing unit is used for judging whether the expansion traversing stack exdStack is empty or not, and when the expansion traversing stack exdStack is not empty, executing a pop operation to obtain the structure type name and the structure variable name of the pop element top variable; The dynamic circulation unit is used for acquiring the current dimension, the dimension and the remaining dimension of the array according to the structure type name and the structure variable name, constructing a corresponding number of child nodes on the current node according to the current dimension, and continuously judging whether the extended traversing stack exdStack is empty or not until all the node processing is completed.
- 9. The system for verifying the data of the interlocking product according to claim 8, wherein when the corresponding number of child nodes are constructed on the current node according to the current dimension, if the remaining dimension is 0, the child nodes are directly assigned as top variables, if the remaining dimension is not 0, a new node is constructed, the remaining dimension is updated and recorded, and the parameters of the top variables are copied to the constructed new node.
- 10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1-6 when the program is executed.
Description
Data verification method, system and equipment for interlocking products Technical Field The invention relates to the technical field of railway signal safety control, in particular to a data verification method, system and equipment for an interlocking product. Background The interlocking equipment is key safety equipment in a railway signal system, and has the main functions of controlling the approach, the turnout and the signal machine in a station by technical means and ensuring that strict restriction relation is established between the equipment, thereby ensuring train driving safety, improving working efficiency and reducing labor intensity. As the core high-safety equipment of the control signal in the railway system, the interlocking system can take countermeasures in time when equipment or system faults occur, so that the accident expansion is prevented, and the method has a vital effect on safety production. Failure of the interlock system can lead to serious consequences and immeasurable economic losses, and it is extremely important to adequately verify the interlock system. At present, each interlocking equipment manufacturer tests and verifies the interlocking system through various technologies and management means before delivering the product so as to strive to ensure the correctness of functions and the accuracy of data configuration. The test verification work mainly comprises two parts, namely functional verification and data verification. The data verification is particularly critical as an important link of user acceptance, even if the software functions are correct, if the bottom data configuration is wrong, the wrong signal command can still be caused, so that the interlocking equipment is invalid, potential safety hazards are buried, and even catastrophic results are caused. In the prior art, software of a computer interlocking system consists of two parts, namely application software and engineering data. On the premise that the logic function of the application software is verified, different stations need to generate corresponding engineering data, such as attributes of routes, sections, annunciators, turnouts and the like and association relations thereof, according to actual investigation and engineering design data. Currently, manufacturers rely mainly on black box test methods to verify explicit data, for example, by checking whether data configuration is correct through item-by-item test route setting. However, the black box test cannot fully cover implicit data errors (such as redundancy configuration, error association, data out-of-range, etc.), and still relies heavily on manual completion for validity checking, logic consistency checking, etc. of the data, which is not only inefficient, but also difficult to ensure the sufficiency and reliability of verification. In addition, the existing verification method has a remarkable contradiction between the sufficiency of data verification and the execution efficiency, and has become a bottleneck for restricting the production efficiency of the interlocking products. Chinese patent publication No. CN119718888a discloses a method for verifying interlocking software data, wherein two independent software tools (DataVerisoft and AutoStampTool) process interlocking data from different sources respectively, and finally, the data consistency verification is realized by comparing text reports generated by the two independent software tools. Specifically, dataVerisoft (C++ development) reads the interlocking table, IO bitmap and DGG file, generates a text report according to a predefined rule, autoStampTool (Python development) analyzes the design document in PDF format, extracts data based on the same rule and generates another text report, and compares whether the contents of the two reports are consistent or not in a manual or automatic mode to judge whether the data are correct or not. In practical application, the method has the following defects that 1, the method cannot go deep into the data structure, and only text-level comparison of final report content is carried out, so that the method belongs to black box type verification. Details such as structures, types, nesting relations or multidimensional array values inside the data cannot be analyzed and checked, logic errors, association errors or configuration redundancy hidden in the deep data structure cannot be found easily, and verification sufficiency is insufficient. The AutoStampTool tool is severely dependent on the input document in the PDF format, and the analysis effect is directly influenced by the format and typesetting change of the PDF document. Once the document structure or the content presentation mode changes, the tool may not be able to extract the information correctly, and the parsing rule needs to be readjusted or developed, which has high maintenance cost and weak adaptability. 3. The verification process needs to go through multi-tool, multi-format and