Railway system interface code position automatic testing method and system
Through the automatic testing method, the problem of time-consuming and difficult to ensure integrity of the interface code position test in traditional railway systems is solved, automated testing is realized, manpower and time consumption is reduced, and the comprehensiveness of the test is ensured.
Patent Information
- Application Number
- CN202210126643.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-02-10
AI Technical Summary
The traditional railway system interface code point testing method consumes a lot of manpower and time, and it is difficult to ensure the integrity of the test, and there is a possibility of code point testing missing.
An automatic test method for the interface code bit of the railway system is adopted. By determining the type of code bit to be tested, a code bit test sequence table, test instructions and time information are generated, and the data packet capture time is calculated to realize automatic testing.
Automatic testing of railway system interface code points is realized, reducing manpower and time consumption, ensuring the integrity of the test, and avoiding test omissions.
Smart Images

Figure CN115145237B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of railway system interface testing, and in particular to a railway system interface code position automatic testing method. Background Art
[0002] The interlocking system is the core safety-related subsystem in the railway signal control system. Ensuring the accuracy of the system's logic, interface, data and other aspects is the basis for ensuring the safety of the railway signal control system. The interlocking system has interface connections with multiple subsystems, including the ATS subsystem, ZC subsystem, LEU subsystem, and on-board subsystem. The data communication between the interlocking and ZC subsystem and LEU subsystem contains a large amount of code control information. The code control information includes sequential coding information and control instruction information for the equipment or module. The order of magnitude of the code control information, the complexity of the coding information and the control instruction information are determined by the actual working conditions of the line. Complex line working conditions correspond to more code control information. In the actual use of the railway signal control system, in order to ensure the correctness of the code control information and make the command and execution results consistent, it is necessary to test and verify all equipment or modules on the line, including signal machines, approaches, switches, track sections, screen doors, emergency stop buttons, etc., one by one, to test and verify whether the code control information of the equipment or module can take effect correctly. In the prior art, one method of code position testing is to manually check one by one according to the code position table through the human-machine interface. This method can ensure the integrity of the code position test, but it requires a lot of repetitive labor time. Another method is to verify the correctness of the code position during the functional test to ensure that the command and execution result are consistent. This method has the possibility of missing code position tests. Summary of the invention
[0003] The present invention solves the problems that the traditional railway system interface code position testing method consumes a lot of manpower and time and the integrity of the code position testing is difficult to ensure. A railway system interface code position automatic testing method is provided to achieve automatic testing of the code position on the basis of ensuring the integrity of the code position testing.
[0004] The specific technical solutions are as follows:
[0005] A railway system interface code position automatic testing method comprises the following steps:
[0006] Step S1: Determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested;
[0007] Step S2: Generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table;
[0008] Step S3: Calculate the data packet capture time according to the code type to be tested and the code test time information;
[0009] Step S4: sending a code position test instruction according to the code position test sequence table and the code position test time information, and capturing data at the data capture time corresponding to the code position to be tested, to complete the automatic test.
[0010] Furthermore, the code position types to be tested include at least: route, turnout, section occupancy, and scattered quantity;
[0011] The code position test instruction includes control command information and collected data information, wherein the control command information includes two types: route command and switch command; the collected data information includes section occupancy information and scattered variable information.
[0012] Further, for the route command and the turnout command, the test instruction includes a control command index value and a control command value;
[0013] Obtain all entities in the interlocking control area, classify and number all entities in the interlocking control area, generate control command index values corresponding to each entity in the interlocking control area, and generate control command values corresponding to each entity in the interlocking control area according to the control operations on each entity in the interlocking control area.
[0014] Furthermore, for the section occupancy information and scattered variable information, all entities and entity types within the interlocking control area are obtained, and control command values corresponding to each entity in the interlocking control area are generated. The control command values are classified according to the entity type of each entity, and the control command values are sorted in order of entity type to generate a control command value list. The control command value list is bit-encoded according to byte type data to generate instructions for issuance.
[0015] Further, the step S2 includes: if the code position type to be tested is a route, determining the starting end and the ending end of the route, generating a command corresponding to the starting end of the route and a command corresponding to the ending end of the route, and obtaining a code position test instruction;
[0016] The sending time of the command at the beginning of the route and the sending time of the command at the end of the route are determined according to the preset time limit rule and the code position test sequence table, and the code position test time information corresponding to the route is obtained.
[0017] Further, the step S2 comprises: if the code position type to be tested is a turnout, generating a turnout positioning test instruction and a turnout reverse position test instruction in pairs to obtain a turnout code position test instruction, each test instruction comprising a command index and a command value;
[0018] Determine the effective time of the switch positioning test instruction and the switch reverse position test instruction, calculate the interval time of the switch positioning test instruction and the switch reverse position test instruction based on the effective time, determine the sending time of the switch positioning test instruction and the switch reverse position test instruction pair according to the code position test sequence table and the interval time, and obtain the code position test time information corresponding to the switch.
[0019] Furthermore, the step S2 includes: if the code position type to be tested is an axle counting segment code position and a scattered quantity information code position, determining the axle counting status information and the scattered quantity information in the interlocking control area, transforming the axle counting status information or the scattered quantity information one by one to generate code position test instructions corresponding to the axle counting segment code position and the scattered quantity information code position, and generating code position test time information according to the code position test sequence table.
[0020] Further, the step S3 includes: if the code type to be tested is an entry, calculating the packet capture time and the time interval between issuing the entry code test instruction according to the action sequence of the entry code test instruction, and calculating the data packet capture time according to the code test moment information and the time interval;
[0021] If the code type to be tested is a turnout, the packet capture time is calculated according to the action sequence of the turnout code test instruction and the code test time information;
[0022] If the code type to be tested is the axle counting segment code and the scattered quantity information code, the time for sending the code test instruction is determined according to the code test time information, and the packet capture time is calculated according to the code test instruction sending time and the communication cycle.
[0023] A railway system interface code position automatic testing system, specifically comprising:
[0024] A sequence generation module is used to determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested;
[0025] An instruction and time generation module, used to generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table;
[0026] The packet capture time calculation module is used to calculate the data packet capture time according to the code type to be tested and the code test time information;
[0027] The automatic test module is used to send code position test instructions according to the code position test sequence table and the code position test time information, and capture data at the data capture time corresponding to the code position to be tested to complete the automatic test. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flowchart of a railway system interface code position automatic testing method provided by an embodiment of the present invention;
[0029] Figure 2It is the multi-threaded control process of the interlocking code position automation test system;
[0030] Figure 3 It is the information representation after the large queue of the segment occupancy information and scattered variable test instructions;
[0031] Figure 4 It is the action timing diagram of the code position test instruction of the entry route;
[0032] Figure 5 This is the action timing diagram of the code position test instruction of the turnout. DETAILED DESCRIPTION
[0033] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0034] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusion, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units but may include other units not expressly listed or inherent to such processes, methods, products or apparatus.
[0035] Embodiment 1
[0036] The first embodiment of the present invention relates to a railway system interface code automatic testing method, the process of which is as follows: Figure 1 As shown,
[0037] The method designed by the present invention is used for automatic testing of the code data sent by the interlock to the ZC and the interlock to the LEU. The automatic test terminal is connected to the interlock logic machine, and periodically sends test information according to the existing system interface protocol. At the same time, during the test information sending cycle, the communication data between the interlock and the ZC, and the interlock and the LEU is captured and parsed according to the interface protocol, and the test information is compared with the packet capture and parsing information to check the correctness of the code sent by the interlock.
[0038] A railway system interface code position automatic testing method comprises the following steps:
[0039] Step S1: Determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested;
[0040] The present invention classifies and processes different types of automatic test commands, automatic sending mechanisms, and sending and packet capture decoding opportunities. There are multiple code positions to be tested, and the code positions to be tested include different types. Further, the types of code positions to be tested include at least: approach, turnout, section occupancy, and scattered quantity.
[0041] In the actual process of automated testing, due to the constraints of interlocking relationships, the control commands corresponding to various code positions to be tested cannot be sent at the same time. For example, when sending route control command information, the switch action command or axle counting occupancy information should not be sent at the same time. Therefore, after determining the type of code position to be tested, the test sequence table of different types of information code positions is determined according to the type of code position to be tested. From the perspective of the code position to be tested, an automatic test mechanism for different types of code positions is generated. Furthermore, the design of the interlocking code position automated test system adopts multi-threaded control. Different thread control processes are as follows: Figure 2 As shown, the multithreading specifically includes: a command generation thread, a command sending thread, a packet capture parsing thread and a data comparison thread. Among them, the command generation thread is used to generate different types of control commands according to different code position test objects, and add them to the command queue. Specifically, when the type of the code position test object belongs to any one of the access, turnout, section occupancy, and scattered quantity, a code position test instruction corresponding to the code position test object is generated. The command sending thread is used to determine the command sending method and record the sending time for different types of control commands. Specifically, the type of the code position test object determines the sending method of the test instruction, and sends the command according to the sending method and the generated sending time and records the sending time. The packet capture parsing thread is used to determine the packet capture time and the packet capture object, and classify and analyze the packet capture data and store it. The data comparison thread is used to compare the test command with the packet capture information according to the sending time and the packet capture time, and finally complete the automatic test.
[0042] In order to test the code positions of different types of data such as routes, switches, track sections and scattered quantities, a test instruction is sent to the interlocking system. The test instruction includes two types of information: control command information and collected data information. The control command information includes route commands and switch commands; the collected data information includes section occupancy information and scattered variable information. The scattered variable information includes emergency stop commands, vehicle detention commands, and screen door commands.
[0043] The code information of the tests corresponding to the different types of information sent are as follows: ① The route command corresponds to the route number code sent by the test interlocking to ZC; ② The switch command corresponds to the test switch number code; ③ The section occupancy information corresponds to the test axle counting code; ④ The scattered variable information corresponds to the test platform code.
[0044] For route commands and turnout commands, the test instructions sent by the automatic test terminal to the interlocking include a control command index value and a control command value. All entities within the interlocking control area are obtained, and all entities within the interlocking control area are classified and numbered to generate control command index values corresponding to each entity within the interlocking control area. All entities include at least: signals, turnsouts, and platforms. The control operations on each entity within the interlocking control area are obtained, and control command values corresponding to each entity within the interlocking control area are generated based on the control operations on each entity within the interlocking control area. For example, a control command value is assigned to each control operation such as positioning and reversing of the turnout.
[0045] For section occupancy information and scattered variables, the test instructions use a large information queue method. Specifically, all entities and entity types in the interlocking control area are obtained, and control command values corresponding to each entity in the interlocking control area are generated. The control command values are classified according to the entity type of each entity, and the control command values are sorted in order of entity type. A control command value list is generated, and the control command value list is bit-encoded according to byte type data to generate instructions for sending. Furthermore, for the occupation or idle information of the axle counting section sent to the interlocking, two bits are used to represent the information corresponding to an axle counting section. For a control area with n axle counting sections, the information after large queuing is represented as follows Figure 3 shown.
[0046] Step S2: Generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table;
[0047] For each different code position type to be tested, the corresponding code position test instructions are generated respectively, and the code position test time information is generated according to the order in the code position test sequence table. Specifically, the code position types to be tested include: approach, turnout, section occupancy, and scattered quantity.
[0048] If the code position type to be tested is a route, determine the starting and ending points of the route, generate commands corresponding to the starting point of the route and commands corresponding to the ending points of the route, and obtain code position test instructions. Determine the sending time of the command at the beginning of the route and the sending time of the command at the ending point of the route according to the preset time limit rules and the code position test sequence table, and obtain the code position test moment information corresponding to the route. The preset time limit rules specifically include that the sending time of the command at the beginning of the route and the sending time of the command at the ending point of the route are greater than a command sending cycle, and are less than the interval time threshold required by the interlocking. As an optional embodiment, the preset time limit rules include setting the time interval generated by arranging 2 commands corresponding to a route to 1s. Each time a route arrangement command is generated, it is added to a preset command queue, and the commands in the queue are sent out by a timer cycle, and the sending cycle of all control commands is set to 1s.
[0049] Furthermore, after a code position test instruction is sent in each cycle, the command type attribute flag is determined according to the control command index value and control command value of the sent code position test instruction to determine the type of the test instruction. If it belongs to a permutation route related command, the control command index value and control command value corresponding to the test instruction are added to the permutation route command queue for use in the next step of packet capture data parsing. The action timing of the permutation route code position test instruction is as follows: Figure 4 As shown, t1 indicates the time when the terminal command of the route is generated; t2 indicates the time when the terminal command of the route is issued; t3 indicates the time when the terminal command of the route is successfully executed; t4 indicates the time when canceling the route is generated; and t5 indicates the time when the cancel command is issued.
[0050] If the code position type to be tested is a turnout, generate a pair of turnout positioning test instructions and turnout reverse position test instructions to obtain a turnout code position test instruction, and each test instruction includes a command index and a command value. Determine the action effectiveness time of the turnout positioning test instruction and the turnout reverse position test instruction, calculate the interval time of the turnout positioning test instruction and the turnout reverse position test instruction based on the action effectiveness time, determine the sending time of the turnout positioning test instruction and the turnout reverse position test instruction pair according to the code position test sequence table and the interval time, and obtain the code position test time information corresponding to the turnout. Specifically, the turnout code position test instruction is a single command control mode, that is, a turnout control command contains only one control action, such as a positioning or reverse position operation instruction for a specific turnout. Each time a control command for the turnout is sent, only the positioning and reverse position operations of the turnout are completed.
[0051] Furthermore, each time a switch code position test instruction is generated, the command is added to the command queue, and the commands in the queue are sent out by the timer cycle. The positioning and reverse position operation commands for the same switch should be generated in pairs to facilitate determining the timing of code position packet capture and analysis. As an optional embodiment, the period of the switch positioning test instruction and the switch reverse position test instruction pair is set to 10s, and the action time of a single switch test instruction does not exceed 2s, that is, the time from the issuance of the switch test instruction to the switch action is within 2s, and the generation interval of the positioning and reverse position operation commands for the same switch is 4s. The action sequence is as follows Figure 5 As shown, T1 represents the time when the current switch code position test instruction is generated; T2 represents the time when the current switch code position test instruction is issued; T3 represents the time when the current switch code position test instruction is executed; T4 represents the time when the next switch code position test instruction for the current switch is generated; T5 represents the time when the next switch code position test instruction for the current switch is issued.
[0052] If the code position type to be tested is the axle counting segment code position and the scattered quantity information code position, determine the axle counting status information and scattered quantity information in the interlocking control area, transform the axle counting status information or scattered quantity information one by one to generate the code position test instructions corresponding to the axle counting segment code position and the scattered quantity information code position, and generate the code position test time information according to the code position test sequence table. Each code position test instruction is different in only one axle counting status information or scattered quantity information, and each code position test instruction includes a control instruction for the axle counting status information and scattered quantity information in the interlocking control area. The code position test instructions corresponding to the axle counting segment code position and the scattered quantity information code position adopt the information large queuing method. Each time a code position test instruction is sent, the goal of achieving simultaneous control of all axle counting status information and scattered quantity information is completed. As an optional embodiment, when the control area containing n axle counting segments is automatically tested for code positions, the first axle counting segment is set to an occupied state, and the remaining axle counting segments are set to an idle state, and the test instruction is sent.
[0053] Step S3: Calculate the data packet capture time according to the code type to be tested and the code test time information;
[0054] For each different code position type to be tested, the present invention provides a different data capture time calculation method. Therefore, for each code position test instruction to be tested in step S2, the data capture time is calculated according to the code position type to be tested and the code position test time information. Specifically, the code position types to be tested specifically include: route, turnout, section occupancy, and scattered quantity.
[0055] If the code type to be tested is an approach, the packet capture time and the time interval between issuing the approach code test instruction are calculated according to the action sequence of the approach code test instruction, and the data packet capture time is calculated according to the code test moment information and the time interval. Specifically, in order to complete the automatic test, after realizing the function of automatic route arrangement, it is necessary to capture and parse the interlocking and ZC, interlocking and LEU interface data, so as to check whether the relevant code is correct under the condition that the specific approach arrangement is successful. The packet capture time should be between the successful approach arrangement and the time when the route cancellation command is sent, which is the duration of the approach. The time interval between the packet capture time and the issuance of the route code position test instruction is calculated according to the action sequence of the route code position test instruction, specifically including: determining the time difference between each action sequence of the route code position test instruction, including the time difference between the issuance time of the route terminal command and the generation time of the route terminal command, the time difference between the successful execution time of the route terminal command and the issuance time of the route terminal command, the time difference between the cancellation time and the generation time of the route terminal command, and the time difference between the issuance time of the cancellation command and the generation time of the route terminal command; calculating the duration time according to the time difference between each action sequence of the route code position test instruction, and obtaining the time interval between the packet capture time and the issuance of the route code position test instruction.
[0056] As an optional embodiment, the command sending cycle is set to 1 second, and after the route arrangement command is sent, the route arrangement is successful after 7 seconds. The relationship between the various moments is as follows:
[0057] 0≤t2-t1≤1s (1)
[0058] t3-t2=7s (2)
[0059] t4-t1=9s (3)
[0060] 0≤t5-t4≤1s (4)
[0061] According to equations (1) to (4), using the operation rules of inequalities, we can get
[0062] 1≤t5-t3≤3 (5)
[0063] 8≤t5-t2≤10 (6)
[0064] Formula (5) indicates that the access duration from t3 to t5 lasts 1 to 3 seconds, and packet capture and decoding should be performed within this period. If the duration lasts 1 to 3 seconds, the time t5 when the cancellation command is issued is at least 8 seconds different from the time t2 when the access terminal command is issued. Then, a query timer is set to regularly check the access command queue. When the number in the command queue is greater than 2, the first 2 bits of data in the queue are taken out to confirm the sent access information, and the data is captured after a delay of 7 seconds. This ensures that the packet capture time falls within the access duration, thereby completing the acquisition of the code position information of the corresponding access, and further realizing automatic comparison.
[0065] If the code position type to be tested is a turnout, the packet capture time is calculated according to the action sequence of the turnout code position test instruction and the code position test time information. Specifically, according to the action sequence of the turnout code position test instruction, the time interval between the time when the current turnout code position test instruction is issued and the time when the current turnout code position test instruction is generated, the time interval between the time when the current turnout code position test instruction is executed and the time when the current turnout code position test instruction is issued, the time interval between the time when the next turnout code position test instruction for the current turnout is generated and the time when the current turnout code position test instruction is generated, and the time interval between the time when the next turnout code position test instruction for the current turnout is issued and the time when the current turnout code position test instruction is generated, so as to calculate the time interval between the time when the next turnout code position test instruction for the current turnout is issued and the time when the current turnout code position test instruction is executed as the packet capture time period, and calculate the packet capture time according to the code position test time information and the packet capture time period.
[0066] As an optional embodiment, the cycle of generating a pair of switch code position test instructions is set to 10s. The action time of a single switch does not exceed 2s, that is, the time from the issuance of the switch operation command to the switch action is within 2s. If the generation interval of the positioning and reverse position operation commands for the same switch is 4s, then:
[0067] 0≤T2-T1≤1 (7)
[0068] T3-T2=2s (8)
[0069] T4-T1=4s (9)
[0070] 0≤T5-T4≤1 (10)
[0071] It can be concluded that 1≤T5-T3≤3, and the packet capture code position analysis should be performed within the period of T3 to T5.
[0072] Set the query timer with a period of 500ms to check the switch command queue regularly. When the number in the command queue is greater than 1, take out the first bit of data in the queue, delay for 2s, and perform data packet capture, analysis and comparison. This will enable automatic code position testing of the switch command based on the command index and command value. Continue to take out the next command and perform the same operation to complete the automatic code position testing of the group of switches.
[0073] If the code type to be tested is the axle counting section code and the scattered quantity information code, the code test instruction issuance time is determined according to the code test time information, and the packet capture time is calculated according to the code test instruction issuance time and the communication cycle. After the code test instruction is sent, the interlocking collects the occupancy status information of the axle counter and executes it. The execution process takes a very short time and can be ignored. Therefore, it is only necessary to consider the CI-ZC interface information packet capture after the communication cycle after the code test instruction is sent, and parse the axle counting status information and scattered quantity information of all axle counting sections to determine whether the test passes.
[0074] Step S4: sending a code position test instruction according to the code position test sequence table and the code position test time information, and capturing data at the data capture time corresponding to the code position to be tested to complete the automatic test.
[0075] The code position test sequence table determines the sequence relationship between different types of code position test instructions and the same type of code position test instructions. The code position test time information is used to characterize the action sequence time information of different code position test instructions. The two constitute an automatic test plan. The code position test instructions are sent according to the code position test sequence table and the code position test time information, and the instructions are taken out one by one and sent out. At the data capture time corresponding to each code position test instruction, data is captured to achieve automatic comparison to complete the automatic test.
[0076] The railway system interface code automatic testing method provided by the embodiment of the present invention determines the process of automatic testing from two dimensions: sending and receiving. In the sending dimension, the code test sequence table is first determined according to the code type to be tested, that is, the sequence relationship between different types of code test instructions and the same type of code test instructions is determined from a macro level; then for each code test instruction, the action sequence moment information of the code test instruction is determined, that is, the timing of the automatic test is determined from a micro level. In the receiving dimension, the corresponding packet capture time is calculated according to the code type to be tested, thereby obtaining a macro sending sequence-micro sending moment-packet capture time, a whole automatic process from sending to receiving. On the one hand, the sequential testing of various code test instructions that need to be tested ensures the integrity of the code test. On the other hand, the automatic design of the entire process from sending to receiving reduces the manpower and time consumption in the railway system interface code test method.
[0077] Embodiment 2
[0078] Furthermore, a second embodiment of the present invention relates to a railway system interface code position automatic testing system, specifically comprising:
[0079] A sequence generation module is used to determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested;
[0080] The present invention classifies and processes different types of automatic test commands, automatic sending mechanisms, and sending and packet capture decoding opportunities. There are multiple code positions to be tested, and the code positions to be tested include different types. Further, the types of code positions to be tested include at least: approach, turnout, section occupancy, and scattered quantity.
[0081] In the actual process of automated testing, due to the constraints of interlocking relationships, the control commands corresponding to various code positions to be tested cannot be sent at the same time. For example, when sending route control command information, the switch action command or axle counting occupancy information should not be sent at the same time. Therefore, after determining the type of code position to be tested, the test sequence table of different types of information code positions is determined according to the type of code position to be tested. From the perspective of the code position to be tested, an automatic test mechanism for different types of code positions is generated. Furthermore, the design of the interlocking code position automated test system adopts multi-threaded control. Different thread control processes are as follows: Figure 2As shown, the multithreading specifically includes: a command generation thread, a command sending thread, a packet capture parsing thread and a data comparison thread. Among them, the command generation thread is used to generate different types of control commands according to different code position test objects, and add them to the command queue. Specifically, when the type of the code position test object belongs to any one of the access, turnout, section occupancy, and scattered quantity, a code position test instruction corresponding to the code position test object is generated. The command sending thread is used to determine the command sending method and record the sending time for different types of control commands. Specifically, the type of the code position test object determines the sending method of the test instruction, and sends the command according to the sending method and the generated sending time and records the sending time. The packet capture parsing thread is used to determine the packet capture time and the packet capture object, and classify and analyze the packet capture data and store it. The data comparison thread is used to compare the test command with the packet capture information according to the sending time and the packet capture time, and finally complete the automatic test.
[0082] In order to test the code positions of different types of data such as routes, switches, track sections and scattered quantities, a test instruction is sent to the interlocking system. The test instruction includes two types of information: control command information and collected data information. The control command information includes route commands and switch commands; the collected data information includes section occupancy information and scattered variable information. The scattered variable information includes emergency stop commands, vehicle detention commands, and screen door commands.
[0083] The code information of the tests corresponding to the different types of information sent are as follows: ① The route command corresponds to the route number code sent by the test interlocking to ZC; ② The switch command corresponds to the test switch number code; ③ The section occupancy information corresponds to the test axle counting code; ④ The scattered variable information corresponds to the test platform code.
[0084] For the route command and turnout command information, the test instructions sent by the automatic test terminal to the interlocking include the control command index value and the control command value. All entities in the interlocking control area are obtained, and all entities in the interlocking control area are classified and numbered to generate control command index values corresponding to each entity in the interlocking control area. All entities include at least: signals, turnsouts, and platforms; the control operations on each entity in the interlocking control area are obtained, and control command values corresponding to each entity in the interlocking control area are generated according to the control operations on each entity in the interlocking control area. For example, a control command value is assigned to each control operation such as positioning and reversing of the turnout.
[0085] For section occupancy information and scattered variables, the test instructions use a large information queue method. Specifically, all entities and entity types in the interlocking control area are obtained, and control command values corresponding to each entity in the interlocking control area are generated. The control command values are classified according to the entity type of each entity, and the control command values are sorted in order of entity type. A control command value list is generated, and the control command value list is bit-encoded according to byte type data to generate instructions for sending. Furthermore, for the occupation or idle information of the axle counting section sent to the interlocking, two bits are used to represent the information corresponding to an axle counting section. For a control area with n axle counting sections, the information after large queuing is represented as follows Figure 3 shown.
[0086] An instruction and time generation module, used to generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table;
[0087] For each different code position type to be tested, the corresponding code position test instructions are generated respectively, and the code position test time information is generated according to the order in the code position test sequence table. Specifically, the code position types to be tested include: approach, turnout, section occupancy, and scattered quantity.
[0088] If the code position type to be tested is a route, determine the starting and ending points of the route, generate commands corresponding to the starting point of the route and commands corresponding to the ending points of the route, and obtain code position test instructions. Determine the sending time of the command at the beginning of the route and the sending time of the command at the ending point of the route according to the preset time limit rules and the code position test sequence table, and obtain the code position test moment information corresponding to the route. The preset time limit rules specifically include that the sending time of the command at the beginning of the route and the sending time of the command at the ending point of the route are greater than a command sending cycle, and are less than the interval time threshold required by the interlocking. As an optional embodiment, the preset time limit rules include setting the time interval generated by arranging 2 commands corresponding to a route to 1s. Each time a route arrangement command is generated, it is added to a preset command queue, and the commands in the queue are sent out by a timer cycle, and the sending cycle of all control commands is set to 1s.
[0089] Furthermore, after a code position test instruction is sent in each cycle, the command type attribute flag is determined according to the control command index value and control command value of the sent code position test instruction to determine the type of the test instruction. If it belongs to a permutation route related command, the control command index value and control command value corresponding to the test instruction are added to the permutation route command queue for use in the next step of packet capture data parsing. The action timing of the permutation route code position test instruction is as follows: Figure 4As shown, t1 indicates the time when the terminal command of the route is generated; t2 indicates the time when the terminal command of the route is issued; t3 indicates the time when the terminal command of the route is successfully executed; t4 indicates the time when canceling the route is generated; and t5 indicates the time when the cancel command is issued.
[0090] If the code position type to be tested is a turnout, generate a pair of turnout positioning test instructions and turnout reverse position test instructions to obtain a turnout code position test instruction, and each test instruction includes a command index and a command value. Determine the action effectiveness time of the turnout positioning test instruction and the turnout reverse position test instruction, calculate the interval time of the turnout positioning test instruction and the turnout reverse position test instruction based on the action effectiveness time, determine the sending time of the turnout positioning test instruction and the turnout reverse position test instruction pair according to the code position test sequence table and the interval time, and obtain the code position test time information corresponding to the turnout. Specifically, the turnout code position test instruction is a single command control mode, that is, a turnout control command contains only one control action, such as a positioning or reverse position operation instruction for a specific turnout. Each time a control command for the turnout is sent, only the positioning and reverse position operations of the turnout are completed.
[0091] Furthermore, each time a switch code position test instruction is generated, the command is added to the command queue, and the commands in the queue are sent out by the timer cycle. The positioning and reverse position operation commands for the same switch should be generated in pairs to facilitate determining the timing of code position packet capture and analysis. As an optional embodiment, the period of the switch positioning test instruction and the switch reverse position test instruction pair is set to 10s, and the action time of a single switch test instruction does not exceed 2s, that is, the time from the issuance of the switch test instruction to the switch action is within 2s, and the generation interval of the positioning and reverse position operation commands for the same switch is 4s. The action sequence is as follows Figure 4 As shown, T1 represents the time when the current switch code position test instruction is generated; T2 represents the time when the current switch code position test instruction is issued; T3 represents the time when the current switch code position test instruction is executed; T4 represents the time when the next switch code position test instruction for the current switch is generated; T5 represents the time when the next switch code position test instruction for the current switch is issued.
[0092] If the code position type to be tested is the axle counting segment code position and the scattered quantity information code position, determine the axle counting status information and scattered quantity information in the interlocking control area, transform the axle counting status information or scattered quantity information one by one to generate the code position test instructions corresponding to the axle counting segment code position and the scattered quantity information code position, and generate the code position test time information according to the code position test sequence table. Each code position test instruction is different in only one axle counting status information or scattered quantity information, and each code position test instruction includes a control instruction for the axle counting status information and scattered quantity information in the interlocking control area. The code position test instructions corresponding to the axle counting segment code position and the scattered quantity information code position adopt the information large queuing method. Each time a code position test instruction is sent, the goal of achieving simultaneous control of all axle counting status information and scattered quantity information is completed. As an optional embodiment, when the control area containing n axle counting segments is automatically tested for code positions, the first axle counting segment is set to an occupied state, and the remaining axle counting segments are set to an idle state, and the test instruction is sent.
[0093] The packet capture time calculation module is used to calculate the data packet capture time according to the code type to be tested and the code test time information;
[0094] For each different code position type to be tested, the present invention provides a different data capture time calculation method. Therefore, for each code position test instruction to be tested in step S2, the data capture time is calculated according to the code position type to be tested and the code position test time information. Specifically, the code position types to be tested specifically include: route, turnout, section occupancy, and scattered quantity.
[0095] If the code type to be tested is an approach, the packet capture time and the time interval between issuing the approach code test instruction are calculated according to the action sequence of the approach code test instruction, and the data packet capture time is calculated according to the code test moment information and the time interval. Specifically, in order to complete the automatic test, after realizing the function of automatic route arrangement, it is necessary to capture and parse the interlocking and ZC, interlocking and LEU interface data, so as to check whether the relevant code is correct under the condition that the specific approach arrangement is successful. The packet capture time should be between the successful approach arrangement and the time when the route cancellation command is sent, which is the duration of the approach. The time interval between the packet capture time and the issuance of the route code position test instruction is calculated according to the action sequence of the route code position test instruction, specifically including: determining the time difference between each action sequence of the route code position test instruction, including the time difference between the issuance time of the route terminal command and the generation time of the route terminal command, the time difference between the successful execution time of the route terminal command and the issuance time of the route terminal command, the time difference between the cancellation time and the generation time of the route terminal command, and the time difference between the issuance time of the cancellation command and the generation time of the route terminal command; calculating the duration time according to the time difference between each action sequence of the route code position test instruction, and obtaining the time interval between the packet capture time and the issuance of the route code position test instruction.
[0096] As an optional embodiment, the command sending cycle is set to 1 second, and after the route arrangement command is sent, the route arrangement is successful after 7 seconds. The relationship between the various moments is as follows:
[0097] 0≤t2-t1≤1s (1)
[0098] t3-t2=7s (2)
[0099] t4-t1=9s (3)
[0100] 0≤t5-t4≤1s (4)
[0101] According to equations (1) to (4), using the operation rules of inequalities, we can get
[0102] 1≤t5-t3≤3 (5)
[0103] 8≤t5-t2≤10 (6)
[0104] Formula (5) indicates that the access duration from t3 to t5 lasts 1 to 3 seconds, and packet capture and decoding should be performed within this period. If the duration lasts 1 to 3 seconds, the time t5 when the cancellation command is issued is at least 8 seconds different from the time t2 when the access terminal command is issued. Then, a query timer is set to regularly check the access command queue. When the number in the command queue is greater than 2, the first 2 bits of data in the queue are taken out to confirm the sent access information, and the data is captured after a delay of 7 seconds. This ensures that the packet capture time falls within the access duration, thereby completing the acquisition of the code position information of the corresponding access, and further realizing automatic comparison.
[0105] If the code position type to be tested is a turnout, the packet capture time is calculated according to the action sequence of the turnout code position test instruction and the code position test time information. Specifically, according to the action sequence of the turnout code position test instruction, the time interval between the time when the current turnout code position test instruction is issued and the time when the current turnout code position test instruction is generated, the time interval between the time when the current turnout code position test instruction is executed and the time when the current turnout code position test instruction is issued, the time interval between the time when the next turnout code position test instruction for the current turnout is generated and the time when the current turnout code position test instruction is generated, and the time interval between the time when the next turnout code position test instruction for the current turnout is issued and the time when the current turnout code position test instruction is generated, so as to calculate the time interval between the time when the next turnout code position test instruction for the current turnout is issued and the time when the current turnout code position test instruction is executed as the packet capture time period, and calculate the packet capture time according to the code position test time information and the packet capture time period.
[0106] As an optional embodiment, the cycle of generating a pair of switch code position test instructions is set to 10s. The action time of a single switch does not exceed 2s, that is, the time from the issuance of the switch operation command to the switch action is within 2s. If the generation interval of the positioning and reverse position operation commands for the same switch is 4s, then:
[0107] 0≤T2-T1≤1 (7)
[0108] T3-T2=2s (8)
[0109] T4-T1=4s (9)
[0110] 0≤T5-T4≤1 (10)
[0111] It can be concluded that 1≤T5-T3≤3, and the packet capture code position analysis should be performed within the period of T3 to T5.
[0112] Set the query timer with a period of 500ms to check the switch command queue regularly. When the number in the command queue is greater than 1, take out the first bit of data in the queue, delay for 2s, and perform data packet capture, analysis and comparison. This will enable automatic code position testing of the switch command based on the command index and command value. Continue to take out the next command and perform the same operation to complete the automatic code position testing of the group of switches.
[0113] If the code type to be tested is the axle counting section code and the scattered quantity information code, the code test instruction issuance time is determined according to the code test time information, and the packet capture time is calculated according to the code test instruction issuance time and the communication cycle. After the code test instruction is sent, the interlocking collects the occupancy status information of the axle counter and executes it. The execution process takes a very short time and can be ignored. Therefore, it is only necessary to consider the CI-ZC interface information packet capture after the communication cycle after the code test instruction is sent, and parse the axle counting status information and scattered quantity information of all axle counting sections to determine whether the test passes.
[0114] The automatic test module is used to send code position test instructions according to the code position test sequence table and the code position test time information, and capture data at the data capture time corresponding to the code position to be tested to complete the automatic test.
[0115] The code position test sequence table determines the sequence relationship between different types of code position test instructions and the same type of code position test instructions. The code position test time information is used to characterize the action sequence time information of different code position test instructions. The two constitute an automatic test plan. The code position test instructions are sent according to the code position test sequence table and the code position test time information, and the instructions are taken out one by one and sent out. At the data capture time corresponding to each code position test instruction, data is captured to achieve automatic comparison to complete the automatic test.
[0116] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0117] The above examples are only specific implementations of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field can modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the relevant technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A railway system interface code position automatic testing method, used for automatic testing of code position data sent by interlocking to ZC and interlocking to LEU, comprising the following steps: Step S1: Determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested; Step S2: Generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table; The step S2 comprises: 1) If the code position type to be tested is a route, determine the start and end of the route, generate a command corresponding to the start and end of the route, and obtain a code position test instruction; Determine the sending time of the command at the beginning of the route and the sending time of the command at the end of the route according to the preset time limit rule and the code position test sequence table, and obtain the code position test time information corresponding to the route; 2) If the code position type to be tested is a turnout, a turnout positioning test instruction and a turnout reverse position test instruction are generated and combined into a pair to obtain a turnout code position test instruction, each test instruction including a command index and a command value; Determine the action effective time of the switch positioning test instruction and the switch reverse position test instruction, calculate the interval time of the switch positioning test instruction and the switch reverse position test instruction based on the action effective time, determine the sending time of the switch positioning test instruction and the switch reverse position test instruction pair according to the code position test sequence table and the interval time, and obtain the code position test time information corresponding to the switch; 3) If the code type to be tested is the axle counting section code and the scattered quantity information code, determine the axle counting state information and the scattered quantity information in the interlocking control area, transform the axle counting state information or the scattered quantity information one by one to generate the code test instructions corresponding to the axle counting section code and the scattered quantity information code, and generate the code test time information according to the code test sequence table; Step S3: Calculate the data packet capture time according to the code type to be tested and the code test time information; The step S3 comprises: if the code type to be tested is an entry, calculating the time interval between the packet capture time and the issuance of the entry code test instruction according to the action sequence of the entry code test instruction, and calculating the data packet capture time according to the code test time information and the time interval; If the code type to be tested is a turnout, the packet capture time is calculated according to the action sequence of the turnout code test instruction and the code test time information; If the code type to be tested is the axle counting section code and the scattered quantity information code, the code test instruction issuing time is determined according to the code test time information, and the packet capture time is calculated according to the code test instruction issuing time and the communication cycle; Step S4: sending a code position test instruction according to the code position test sequence table and the code position test time information, and capturing data at the data capture time corresponding to the code position to be tested, to complete the automatic test; The code position test sequence table determines the order relationship between different types of code position test instructions and code position test instructions of the same type. The code position test time information is used to characterize the action sequence time information of different code position test instructions. The two constitute an automatic test scheme. The code position test instructions are sent according to the code position test sequence table and the code position test time information, and the instructions are taken out one by one and sent. At the data capture time corresponding to each code position test instruction, the data is captured to realize automatic comparison to complete the automatic test. The code position types to be tested include at least: route, turnout, section occupancy, and scattered quantity; The code position test instruction includes control command information and collected data information, wherein the control command information includes two types: route command and switch command; the collected data information includes section occupancy information and scattered variable information; For route commands and turnout commands, the test instructions include control command index value and control command value; Obtain all entities in the interlocking control area, classify and number all entities in the interlocking control area, generate control command index values corresponding to each entity in the interlocking control area, and generate control command values corresponding to each entity in the interlocking control area according to control operations on each entity in the interlocking control area; For the section occupancy information and scattered variable information, all entities and entity types in the interlocking control area are obtained, and control command values corresponding to each entity in the interlocking control area are generated. The control command values are classified according to the entity type of each entity, and the control command values are sorted in order of entity type to generate a control command value list. The control command value list is bit-encoded according to byte type data to generate instructions for issuance.
2. A railway system interface code automatic test system, used for automatic testing of code data sent from interlocking to ZC and interlocking to LEU, using the test method as claimed in claim 1, specifically comprising: A sequence generation module is used to determine the type of code position to be tested, and determine a code position test sequence table based on the type of code position to be tested; An instruction and time generation module, used to generate code position test instructions and code position test time information according to the code position type to be tested and the code position test sequence table; The packet capture time calculation module is used to calculate the data packet capture time according to the code type to be tested and the code test time information; The automatic test module is used to send code position test instructions according to the code position test sequence table and the code position test time information, and capture data at the data capture time corresponding to the code position to be tested to complete the automatic test.
Citation Information
Patent Citations
Computer interlocking system code bit-level redundancy method
CN101580073A
Method for automatically testing webpage downloading time of browser and system thereof
CN102624576A