Search

CN-122018913-A - Interlocking product data analysis method, system and equipment

CN122018913ACN 122018913 ACN122018913 ACN 122018913ACN-122018913-A

Abstract

The invention relates to the technical field of railway signal safety control and provides an interlocking product data analysis method, system and equipment, which comprises the steps of analyzing program language data in interlocking software to obtain structure type definition and structure variables; the method comprises the steps of defining and constructing a multi-way tree according to a structure type, optimizing a multi-way tree model through node replacement, carrying out assignment analysis on a structure variable by adopting the multi-way tree subjected to optimization to obtain a structure variable value, checking the obtained structure variable value with input data, and outputting a checking result. According to the method, the system and the equipment for analyzing the interlocking product data, the structural analysis of interlocking program language data is realized by constructing the multi-tree model and performing node replacement optimization, a complex data structure is processed efficiently, correct supplement of unresolved nodes is ensured through queue traversal and a type replacement mechanism, and the integrity and the accuracy of data analysis are improved.

Inventors

  • YU WENBIN
  • QIU ZHAOYANG

Assignees

  • 北京全路通信信号研究设计院集团有限公司

Dates

Publication Date
20260512
Application Date
20260104

Claims (10)

  1. 1. A method of interlock product data analysis, the method comprising the steps of: S1, analyzing program language data in interlocking software to obtain structure type definition and structure variables; S2, constructing a multi-way tree according to the structural body type definition, and optimizing the multi-way tree model through node replacement, wherein the optimizing the multi-way tree model through node replacement comprises the following steps: Sequentially scanning the type of the globally stored parsed structure and the multi-tree thereof, and checking whether unresolved nodes exist; initializing a processing queue for the multi-way tree with unresolved nodes, and enqueuing head nodes; Dequeuing when the queue is not empty, traversing the child nodes, and enqueuing if the child nodes are non-leaf nodes; If the leaf node is the leaf node and is of an unresolved type, searching a corresponding type in global storage; if the corresponding type is found, replacing the current node with the copy of the multi-way tree of the type, and enqueuing the copied child nodes; if the corresponding type is not found, marking the multi-way tree as an unfinished state, and continuing to process the next child node; s3, carrying out assignment analysis on the structural variable by adopting an optimized multi-way tree to obtain the numerical value of the structural variable; And S4, checking the obtained structure body variable value with input data, and outputting a checking result.
  2. 2. The method for analyzing data of an interlocking product according to claim 1, wherein in step S1, analyzing the programming language data in the interlocking software includes analyzing macro definitions, custom types, structure data declarations, and structure data definitions in the C language according to programming grammar rules of the interlocking device.
  3. 3. The method according to claim 1, wherein in step S2, constructing a multi-tree model based on the structure type definition includes parsing the structure type definition using a finite state machine, constructing a multi-tree, and when parsing the structure whose member variable type is undefined, creating unresolved nodes and performing status marking.
  4. 4. The method according to claim 3, wherein the finite state machine includes a start state, a parse structure key state, a parse type name state, a parse left bracket state, a parse member variable state, a parse right bracket state, and an end state in step S2.
  5. 5. The method for analyzing interlocking product data according to claim 1, wherein in step S2, the multi-way tree model is optimized by node replacement, and further comprising storing only one multi-way tree structure per structure type, and pointing to the stored multi-way tree structure directly when nested referencing.
  6. 6. The method according to claim 1, wherein the step S3 includes searching for a corresponding structure type in the global variables declared by the structure type parsed by the header file using a finite state machine, obtaining a corresponding multi-way tree structure according to the searched structure type, and parsing assignment data according to the searched multi-way tree structure.
  7. 7. The method according to claim 6, wherein the finite state machine includes a start state, an analysis variable type state, an analysis variable name state, an analysis equal sign state, an analysis left bracket state, an analysis numerical value state, an analysis comma state, an analysis right bracket state, and an end state in step S3.
  8. 8. The interlocking product data analysis method according to claim 1, wherein step S4 comprises: carrying out consistency check on the obtained structure variable value and input data, and judging that the two are not in accordance with each other and the check is not passed; and when the two values are consistent, verifying the logic relationship between the obtained structure variable value and the input data, judging that the verification is passed when the logic relationship between the two values accords with the interlocking logic rule, judging that the verification is not passed when the logic relationship between the two values does not accord with the interlocking logic rule, and outputting a verification result.
  9. 9. An interlocking product data analysis system, the system comprising an analysis server, the analysis server comprising: The program language analysis module is used for analyzing the program language data in the interlocking software and obtaining the structure type definition and the structure variable; The structure type definition analysis module is used for constructing a multi-tree according to the structure type definition and optimizing the multi-tree model through node replacement; The structure variable analysis module is used for carrying out assignment analysis on the structure variable by adopting the multi-way tree of the optimization process to obtain the structure variable value; The verification module is used for verifying the obtained structure body variable value with the input data and outputting a verification result; wherein, structure body type definition analysis module is used for: Sequentially scanning the type of the globally stored parsed structure and the multi-tree thereof, and checking whether unresolved nodes exist; initializing a processing queue for the multi-way tree with unresolved nodes, and enqueuing head nodes; Dequeuing when the queue is not empty, traversing the child nodes, and enqueuing if the child nodes are non-leaf nodes; If the leaf node is the leaf node and is of an unresolved type, searching a corresponding type in global storage; if the corresponding type is found, replacing the current node with the copy of the multi-way tree of the type, and enqueuing the copied child nodes; If the corresponding type is not found, marking the multi-way tree as an unfinished state, and continuing to process the next child node.
  10. 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-8 when the program is executed.

Description

Interlocking product data analysis method, system and equipment Technical Field The invention relates to the technical field of railway signal safety control, in particular to an interlocking product data analysis method, an interlocking product data analysis system and interlocking product data analysis equipment. Background The railway signal interlocking equipment is a core control system for guaranteeing train driving safety, key equipment such as an approach, a turnout, a signal machine and the like in a station are precisely controlled through technical means, and a correct interlocking relationship is guaranteed between the equipment. With the development of technology, the interlocking system has evolved from early mechanical interlocking, electromechanical interlocking, relay interlocking to the currently mainstream computer interlocking system. The computer interlocking system takes software as a core, realizes the interlocking logic control of different stations through data configuration, and remarkably improves the driving safety and the operation efficiency. As high-safety equipment of a railway signal system, the interlocking system can timely take protective measures when equipment or system faults occur, so that the accident expansion is prevented, and the transportation safety is ensured. The test verification of the interlocking device comprises two key aspects of function verification and data verification. The data verification is an important link of acceptance of the interlocking equipment user, and the necessity is particularly prominent. In practical application, even if the logic of the software function is correct, if the data configuration of the load function is wrong, the system may still send error signals, so that the interlocking equipment is invalid, thereby generating serious safety problems and even causing catastrophic results. At present, manufacturers of interlocking equipment mainly verify display data through a black box test method, and the method can find out partial configuration errors, but has obvious limitations. Firstly, the black box test cannot fully cover the verification of invisible data, such as the validity check, the relevance check and the like of the data, which are mostly dependent on manual operation, not only has low efficiency, but also is easy to introduce errors due to human factors, secondly, the existing method is difficult to deeply analyze and comprehensively check the complex nested structure or complex type data configuration, and furthermore, although the method can detect partial hidden errors through the full-station automatic test, the method has high implementation cost, long period and does not have economic and popularization values. The prior art schemes have significant contradictions between sufficiency and efficiency of data validation. Although each manufacturer continuously tries to perfect a data verification method, the key technical problems that the systematic analysis capability of data in a program language form is lacking, and particularly complex grammar structures such as structure nesting, macro definition, custom type and the like in a C language are not perfect enough, the problems that analysis is difficult caused by mutual inclusion of head files and references of unresolved types cannot be effectively processed, and the efficient and accurate data consistency check and logic relation verification cannot be realized by the existing method, and the data configuration cannot be ensured to completely meet the requirements of investigation design and engineering design cannot be solved. These problems have become a technical bottleneck limiting the improvement of production efficiency and quality of the interlocking equipment. The Chinese patent with publication number CN107808020A discloses a computer interlocking software development and implementation system based on formal model development, and in practical application, the scheme has the following defects that 1, deep analysis and verification of data configuration are lacking, independent analysis and verification of engineering data (such as a data structure after reconnaissance design conversion) are not involved, data configuration errors cannot be effectively detected, and the risk of interlocking failure caused by data errors exists. 2. The SCADE tool can automatically generate codes and verify logic consistency, but cannot process conversion errors in the data configuration process. For example, if there is a nested structure error or a header referencing problem in the data configuration, the formalized model cannot identify such non-logical data defects. 3. The test coverage is limited by the lack of automated verification of data consistency (e.g., comparison with survey design data) and relevance (e.g., constraint relationship of approach and switch). The hidden data error (such as the error increase of the turnout at the tail of the data) needs to