Test sequence generation method and device, computer equipment and readable storage medium

By constructing a time automaton model of the railway signaling system and combining object interaction and test logic information, test sequences are generated, solving the problem of inaccurate test sequence generation in existing technologies. This achieves more efficient and accurate test sequence generation, improving the test integrity and safety of the railway signaling system.

CN121597579APending Publication Date: 2026-03-03SHENHUA BAOSHEN RAILWAY GRP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511790735.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing technologies, the test sequence generation methods for railway signaling systems cannot accurately generate test sequences, resulting in a lack of test integrity and potential safety hazards. Furthermore, test sequence design is prone to repeated execution and improper selection of test points, and it cannot fully cover complex scenarios.

Method used

A time automaton model of a railway signaling system is constructed. By combining object interaction information and test logic information, test sequences are generated. The time automaton model is used to simulate environmental parameters, solve problems such as information delay and control command conflict, and ensure the accuracy of the test sequences.

Benefits of technology

It improves the accuracy of test sequence generation, avoids the randomness and repetitive operations of traditional manual testing, ensures that the test sequences are closer to reality, and improves testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597579A_ABST
    Figure CN121597579A_ABST
Patent Text Reader

Abstract

The invention relates to a test sequence generation method and device, computer equipment and a readable storage medium. The method comprises the following steps: obtaining object interaction information among a plurality of auxiliary test objects in a test process aiming at a test task in a railway signal system, and test logic information of the test task; according to the object interaction information and the test logic information, a timed automaton model of the test task is constructed, and the timed automaton model is used for representing interaction time sequence information among the multiple auxiliary test objects and state transition information corresponding to the test task under different environment conditions; multiple pieces of preset environment parameter information are simulated through a timed automaton model, a test sequence corresponding to each piece of environment parameter information is obtained, and each test sequence is a continuous state transition sequence of the test task from an initial state to a termination state; and detecting a target test sequence of the test task according to the plurality of test sequences. By adopting the method, the test sequence can be accurately generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technology, and in particular to a test sequence generation method, apparatus, computer device, and readable storage medium. Background Technology

[0002] A test sequence is a test scenario formed by linking multiple test cases together, and it is a core element in ensuring the effectiveness of testing. Therefore, how to generate test sequences is particularly important.

[0003] In current technologies, test sequences for laboratory simulation testing are primarily written manually. Testers combine their experience and knowledge to manually create test cases and design test sequences based on system requirements and specifications. In software testing of safety-critical systems, model-based testing methods are typically used for functional testing. This involves first constructing and verifying the formal model required by the system, and then selecting appropriate test coverage criteria and employing suitable search algorithms to automate the generation of test sequences.

[0004] However, current test sequence generation methods still cannot accurately generate test sequences. Summary of the Invention

[0005] Therefore, it is necessary to provide an accurate test sequence generation method, apparatus, computer device, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0006] Firstly, this application provides a test sequence generation method, including:

[0007] Acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of a test task, as well as the test logic information of the test task;

[0008] Based on the object interaction information and the test logic information, a time automaton model of the test task is constructed, wherein the time automaton model is used to characterize the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions.

[0009] Using the time automata model, multiple preset environmental parameter information are simulated to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state;

[0010] The target test sequence of the test task is detected based on multiple test sequences.

[0011] In one embodiment, constructing the time automaton model of the test task based on the object interaction information and the test logic information includes:

[0012] Multiple test states corresponding to the test task are obtained from the test logic information, and target state pairs with test triggering conditions are detected based on the object interaction information and the test logic information. The target state pairs include a first test state and a second test state, and the test triggering condition is the triggering condition for a state transition operation between the first test state and the second test state.

[0013] Each test state is mapped to the position information of a preset time automaton model;

[0014] Based on the test triggering condition information between the target state pairs, a guard condition for position transfer between the two position information corresponding to the target state pairs is added to the preset time automaton model.

[0015] In one embodiment, detecting the target test sequence of the test task based on the plurality of test sequences includes:

[0016] Detect multiple test states in each test sequence, as well as test subsequence information between each test state;

[0017] All the test states are determined as nodes to be constructed in the directed graph, and according to each test subsequence information, a directed edge is generated between the two nodes associated with the test subsequence information in the directed graph to be constructed, so as to obtain the constructed directed graph.

[0018] Determine the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges, and detect the target test sequence that matches the target path.

[0019] In one embodiment, determining the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges includes:

[0020] Determine the theoretical test path in the directed graph that covers all the directed edges and minimizes the total number of repeated traversals of all the directed edges, wherein the theoretical test path includes multiple directed edges;

[0021] When the first test state corresponding to the end node of the first directed edge in the theoretical test path does not match the second test state corresponding to the start node of the second directed edge, all connectable paths between the end node and the start node are detected, wherein the first directed edge is the previous directed edge of the second directed edge in the theoretical test path, and each connectable path includes at least one intermediate directed edge.

[0022] The weight of each of the intermediate directed edges is detected, and a target connecting path is selected from all the connecting paths based on the weights of all the intermediate directed edges in each of the connectable paths.

[0023] The target connection path is inserted between the end node and the start node of the theoretical test path, and the target test sequence that matches the updated theoretical test path is detected.

[0024] In one embodiment, the object interaction information is represented in the form of a sequence diagram, wherein the sequence diagram is used to describe the interaction process between the auxiliary test objects in chronological order;

[0025] The test logic information is represented in the form of an activity diagram, wherein the activity diagram is used to represent the test logic information corresponding to the test task through a logical sequence.

[0026] In one embodiment, the auxiliary test object includes at least a column head device and a column tail device; the test logic information of the test task includes at least:

[0027] When the head device detects that the head wind pressure is higher than a preset wind pressure threshold, it controls the tail device to detect the tail wind pressure.

[0028] If the tail wind pressure is lower than the preset wind pressure threshold, the test task fails.

[0029] If the tail wind pressure is higher than or equal to the preset wind pressure threshold, then the head wind pressure is controlled to be lower than the preset wind pressure threshold, and it is detected whether the tail wind pressure is lower than the preset wind pressure threshold within a preset first time period.

[0030] If the tail wind pressure is not lower than the preset wind pressure threshold within a preset first time period, the test task fails.

[0031] If the tail wind pressure is lower than the preset wind pressure threshold within a preset first time period, the head wind pressure is controlled to be higher than the preset wind pressure threshold, and it is detected whether the tail wind pressure is higher than or equal to the preset wind pressure threshold within a preset second time period to obtain the test result.

[0032] Secondly, this application also provides a test sequence generation apparatus, comprising:

[0033] The data acquisition module is used to acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of the test task, as well as the test logic information of the test task.

[0034] The model building module is used to build a time automaton model of the test task based on the object interaction information and the test logic information. The time automaton model is used to represent the interaction timing information between multiple auxiliary test objects and the state transition information of the test task under different environmental conditions.

[0035] The environment simulation module is used to simulate multiple preset environmental parameter information using the time automata model to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state.

[0036] A test sequence generation module is used to detect a target test sequence for the test task based on a plurality of test sequences.

[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0038] Acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of a test task, as well as the test logic information of the test task;

[0039] Based on the object interaction information and the test logic information, a time automaton model of the test task is constructed, wherein the time automaton model is used to characterize the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions.

[0040] Using the time automata model, multiple preset environmental parameter information are simulated to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state;

[0041] The target test sequence of the test task is detected based on multiple test sequences.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0043] Acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of a test task, as well as the test logic information of the test task;

[0044] Based on the object interaction information and the test logic information, a time automaton model of the test task is constructed, wherein the time automaton model is used to characterize the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions.

[0045] Using the time automata model, multiple preset environmental parameter information are simulated to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state;

[0046] The target test sequence of the test task is detected based on multiple test sequences.

[0047] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0048] Acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of a test task, as well as the test logic information of the test task;

[0049] Based on the object interaction information and the test logic information, a time automaton model of the test task is constructed, wherein the time automaton model is used to characterize the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions.

[0050] Using the time automata model, multiple preset environmental parameter information are simulated to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state;

[0051] The target test sequence of the test task is detected based on multiple test sequences.

[0052] The aforementioned test sequence generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product, for the testing process of test tasks in railway signaling systems, not only consider the logical correlation of the test task itself, but also need to combine the object interaction information between multiple auxiliary test objects to construct a time automaton model for the test task. This time automaton model can fully cover various states and interactions of equipment during system operation, effectively avoiding the randomness and repetitive operations caused by traditional manual testing. Furthermore, when generating test sequences, since the time automaton model is used to represent the interaction timing information between multiple auxiliary test objects, as well as the state transition information corresponding to the test task under different environmental conditions, the simulation of multiple preset environmental parameter information using the time automaton model can solve the problems of information delay, control command conflict, unexpected actions, and other timing disorder and resource conflict that are easily caused in the test sequence generation process, making the test sequence generation process closer to reality, and the generation of test sequences corresponding to each environmental parameter information is more accurate; thus, the accuracy of detecting the target test sequence of the test task based on multiple test sequences is also greatly improved. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a diagram illustrating the application environment of the test sequence generation method in one embodiment;

[0055] Figure 2 This is a flowchart illustrating a test sequence generation method in one embodiment;

[0056] Figure 3 This is a flowchart illustrating the test sequence generation method in another embodiment;

[0057] Figure 4 This is a schematic diagram of a time automata model in one embodiment;

[0058] Figure 5 This is a sequence diagram illustrating object interaction information between multiple auxiliary test objects in one embodiment;

[0059] Figure 6 This is an activity diagram illustrating the integrity test between the column head device and the column tail device in one embodiment;

[0060] Figure 7This is a flowchart illustrating the test sequence generation method in yet another embodiment;

[0061] Figure 8 This is a structural block diagram of a test sequence generation device in one embodiment;

[0062] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0064] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0065] A test sequence is a test scenario formed by linking multiple test cases together, and it is a core element in ensuring the effectiveness of testing. Therefore, how to generate test sequences is particularly important.

[0066] Taking railway signaling systems and their subsystems, which are demanding safety systems, as an example, their reliability is paramount. A malfunction can reduce transportation efficiency in minor cases and potentially lead to major accidents in severe cases. Therefore, comprehensive testing is necessary before the system is put into operation. Due to the complexity of the equipment and the frequent interactions involved, on-site testing of railway signaling systems is difficult. Laboratory simulation testing is required to verify the system's safety and reliability, aiming to shorten the testing cycle, reduce testing costs, and improve testing efficiency. However, with the innovative breakthroughs in the architecture and functional logic of key subsystems of the new generation of signaling systems, such as the integrated design of train control and interlocking, existing system function testing methods are no longer sufficient to meet the multi-dimensional and highly complex testing requirements. Therefore, it is urgent to build an intelligent testing system for complex operational scenarios, and to meet the verification needs of system function scenarios by studying the automatic generation and optimization technology of test sequences.

[0067] In the generation and optimization of test sequences for signal systems, the following key issues exist:

[0068] (1) Test sequence generation issues. For functional testing, a test sequence is a test scenario formed by stringing together multiple test cases, and it is a core element in ensuring test effectiveness. Currently, test sequences for laboratory simulation testing are mainly written manually. Testers combine their experience and knowledge to manually compile test cases and design test sequences according to system requirements specifications. In software testing of safety-critical systems, model-based testing methods are usually used to implement functional testing. That is, first, a formal model required by the system is constructed and verified, and then appropriate test coverage criteria and appropriate search algorithms are selected to achieve automated generation of test sequences. In general, the manual writing of test sequences is prone to the following problems:

[0069] 1.1 Test integrity cannot be guaranteed: The test sequences for current laboratory simulation tests are still manually written, which is inefficient and makes it difficult to achieve comprehensive scenario coverage, thus affecting test integrity.

[0070] 1.2 Security risks exist: Testers manually compile test cases and design test sequences based on their own experience and knowledge according to system requirements and specifications, which makes it difficult to identify all potential defects and poses security risks.

[0071] 1.3 Defects in test sequence design: Test sequence design is prone to problems such as repeated execution of cases and inappropriate selection of test points.

[0072] 1.4 Incomplete test scenario coverage: With the upgrading and transformation of the signal system, the new operating scenarios and complex environmental conditions it faces exceed the existing experience of testers. How to build test cases and test sequences that can fully cover functional scenarios has become an urgent problem to be solved.

[0073] (2) Research on the optimization of testing methods mainly focuses on the following two directions:

[0074] 2.1 Addressing the multi-dimensional test sequence optimization problem. Current test sequence optimization methods mainly focus on constructing the optimal sequence by analyzing the state correlation between test cases or test subsets, simplifying the problem into a mathematical model that minimizes test costs while ensuring full coverage of all test cases.

[0075] 2.2 Addressing the issue of generating test cases for complex scenarios with multiple spatial dimensions. Signal system devices exhibit high coupling and complex internal information interaction. Through summarizing previous tests, analyzing operational failures, and conducting manufacturer surveys, it was found that the correctness of system functionality depends not only on the correctness and reliability of individual modules but also on complex factors such as the timing of information interaction and the rationality of resource allocation. When scenarios are superimposed (e.g., multi-task concurrency, multi-system interaction), it is easy to trigger timing errors and resource conflicts, such as information delays, control command conflicts, and unexpected actions.

[0076] To address this, this application provides a test sequence generation method. For the testing process of a test task in a railway signaling system, it not only considers the logical correlation of the test task itself, but also needs to combine the object interaction information between multiple auxiliary test objects to construct a time automaton model for the test task. This time automaton model can fully cover various states and interactions of equipment during system operation, effectively avoiding the randomness and repetitive operations caused by traditional manual testing. Furthermore, when generating test sequences, since the time automaton model is used to represent the interaction timing information between multiple auxiliary test objects, as well as the state transition information corresponding to the test task under different environmental conditions, the time automaton model can be used to simulate multiple preset environmental parameter information. This can solve the problems of information delay, control command conflict, unexpected actions, and other timing disorder and resource conflict that are easily caused in the test sequence generation process, making the test sequence generation process closer to reality, and the generation of test sequences corresponding to each environmental parameter information is more accurate. Consequently, the accuracy of detecting the target test sequence of the test task based on multiple test sequences is also greatly improved.

[0077] The test sequence generation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0078] The user triggers the test sequence generation control on the test sequence generation interface of terminal 102. Terminal 102 responds to the trigger operation of the test sequence generation control, generates a test sequence generation request, and sends the test sequence generation request to server 104. Server 104 responds to the test sequence generation request and obtains the object interaction information between multiple auxiliary test objects in the test process of the test task in the railway signaling system, as well as the test logic information of the test task. The information obtained by server 104 can be input by the user and carried in the test sequence generation request, or it can be obtained by server 104 from the database.

[0079] Server 104 constructs a time automaton model for the test task based on object interaction information and test logic information. This time automaton model represents the interaction sequence information between multiple auxiliary test objects and the state transition information corresponding to the test task under different environmental conditions. Using the time automaton model, multiple preset environmental parameters are simulated to obtain a test sequence corresponding to each environmental parameter. Each test sequence is a continuous state transition sequence of the test task from its initial state to its final state. Based on these multiple test sequences, the target test sequence of the test task is detected. Further, server 104 pushes the target test sequence of the test task to terminal 102.

[0080] Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0081] In one exemplary embodiment, such as Figure 2 As shown, a test sequence generation method is provided, which can be applied to... Figure 1 Let's take server 104 as an example for explanation. Specifically:

[0082] S200 acquires object interaction information between multiple auxiliary test objects during the test process of a test task in the railway signaling system, as well as the test logic information of the test task.

[0083] The railway signaling system is a core technology system for ensuring railway transportation safety and improving transportation efficiency. Testing tasks are specific test activity plans developed to verify whether the railway signaling system (or its subsystems and equipment) meets design specifications, safety requirements, and usage needs. These include integrity testing and functional testing. Object interaction information refers to the structured data, instructions, and status feedback transmitted between various auxiliary test objects (subsystems / equipment) within the railway signaling system, or between auxiliary test objects within the signaling system and external auxiliary test objects (such as trains, dispatching centers, and station terminals), to achieve functional coordination. This information has a temporal order of interaction. Test logic information is a set of rule-based, structured information that supports the execution of test tasks. It clarifies how to achieve test objectives through input, operation, and judgment, including test preconditions, input-output mapping relationships, judgment rules, exception handling logic, and process jump conditions.

[0084] Specifically, the server acquires object interaction information between various devices within the railway signaling system during the testing process of the test task, as well as object interaction information between internal devices and external related objects within the railway signaling system. This acquired information is then used as object interaction information between multiple auxiliary test objects. Simultaneously, the server also needs to acquire the test logic information of the test task to analyze the execution flow and data / control flow of the test task, clarifying how the inputs are transformed into outputs through a series of actions during the test process. It can be considered that the object interaction information between multiple auxiliary test objects and the test logic information of the test task are different manifestations of the same test task. The object interaction information focuses more on the temporal sequence, while the test logic information focuses more on the control logic. Combining the two leads to a more accurate analysis of the test task.

[0085] S400: Based on object interaction information and test logic information, construct a time automaton model for the test task. The time automaton model is used to represent the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions.

[0086] Among them, the time automaton is a formal model that introduces clock variables on the basis of the finite state automaton. Its core elements include position (state), edge (transition), clock constraint, action label, etc. Different environmental conditions can be such as the wind pressure at the head of the train being lower than the preset wind pressure threshold, the wind pressure at the head of the train being higher than or equal to the preset wind pressure threshold, the train speed being lower than the preset speed threshold, and the speed of the train being higher than or equal to the preset speed threshold. Different environmental conditions are closely related to the logical branches in the test logic information.

[0087] Specifically, based on the preset model mapping rules, the object interaction information and test logic information are converted into a time automaton model. That is, by combining the interaction timing information between multiple auxiliary test objects represented by the object interaction information, and the state transition information corresponding to the test task under different environmental conditions represented by the test logic information, a time automaton model of the test task is generated.

[0088] In one embodiment, a model validation tool can be used to verify the performance of the time automata model, thereby assessing whether the real-time performance of the time automata model meets the expected requirements. The key properties of the time automata model can then be thoroughly verified using the language corresponding to the model validation tool, ensuring that both functional and real-time requirements are met. In practical applications, model validation tools can include UPPAAL, Kronos, etc. Taking UPPAAL as an example, UPPAAL is a toolset for real-time system modeling, simulation, and validation. Its core is based on time automata theory, supporting the analysis of concurrent systems with time constraints. The language corresponding to UPPAAL is BNF (Backus-Naur Form).

[0089] The S600 uses a time automaton model to simulate multiple preset environmental parameters and obtain a test sequence corresponding to each environmental parameter.

[0090] Each test sequence is a continuous state transition sequence from the initial state to the final state of the test task. Environmental parameter information is different from environmental conditions. Environmental conditions are states, while environmental parameters are specific values. For example, an environmental condition could be that the wind pressure at the head of the column is lower than a preset wind pressure threshold, while environmental parameter information is the specific value of the wind pressure at the head of the column. However, in some cases, environmental conditions can also have the same meaning as environmental parameter information.

[0091] Specifically, multiple preset environmental parameters are input into the time automaton model. Based on these parameters, the model automatically simulates a test sequence corresponding to each parameter. For example, the input environmental conditions are used as triggers for state transitions. If the input value satisfies the wind pressure constraint of a transition edge in the time automaton model (e.g., input wind pressure 300 ≥ constraint 280), the transition edge is triggered, and the model jumps from the current state to the next. The test sequence is essentially a sequence of states formed by the model continuously triggering valid transition edges under wind pressure input. By recording the trajectory of state transitions, the model ultimately outputs a continuous state transition sequence of the executable test task under that environmental condition, from the initial state to the final state. Furthermore, each test sequence reflects the internal decision-making mechanism of the train integrity check unit and generates corresponding test cases for the integrity check function.

[0092] In practical applications, this simulation process can also use tools such as UPPAAL to simulate various environmental parameters. In other embodiments, the environmental parameters also include the distance between the front and rear ends, the difference in vehicle length, and the difference in speed between the front and rear ends.

[0093] S800 detects the target test sequence of a test task based on multiple test sequences.

[0094] Specifically, the test sequence at this time is the test sequence corresponding to different environmental parameter information. The target test sequence of the test task of this application needs to fully test all environmental parameter information. At this time, the test sequences corresponding to all environmental parameter information can be combined into a final path. That is to say, all test sequences need to be fully traversed to obtain the final target test sequence of the test task. In the process of fully traversing all test sequences, the traversal cost needs to be as low as possible.

[0095] In the aforementioned test sequence generation method, for the testing process of a test task in a railway signaling system, not only is the logical correlation of the test task itself considered, but also the object interaction information between multiple auxiliary test objects needs to be combined to construct a time automaton model for the test task. This time automaton model can fully cover various states and interactions of equipment during system operation, effectively avoiding the randomness and repetitive operations caused by traditional manual testing. Furthermore, when generating test sequences, since the time automaton model is used to represent the interaction timing information between multiple auxiliary test objects, as well as the state transition information corresponding to the test task under different environmental conditions, the simulation of multiple preset environmental parameter information using the time automaton model can solve the problems of information delay, control command conflict, unexpected actions, and other timing disorder and resource conflict that are easily caused in the test sequence generation process. This makes the test sequence generation process closer to reality, and the generation of test sequences corresponding to each environmental parameter information is more accurate. Consequently, the accuracy of detecting the target test sequence of the test task based on multiple test sequences is also greatly improved.

[0096] In one exemplary embodiment, such as Figure 3 As shown, S400 includes:

[0097] S420: Obtain multiple test states corresponding to the test task from the test logic information, and detect target state pair information with test triggering conditions based on object interaction information and test logic information. The target state pair information includes a first test state and a second test state, and the test triggering condition is the triggering condition for a state transition operation between the first test state and the second test state.

[0098] S440 maps each test state to the position information of a preset time automaton model.

[0099] S460, based on the test triggering condition information between target state pairs, adds guarding conditions for position transfer between two position information corresponding to the target state pairs in the preset time automaton model.

[0100] Specifically, the main body of test logic information consists of the internal test logic judgments of the test task. Multiple judgment conditions cause the test task to transition from one state to another, omitting the information interaction process with external devices. Its model mainly consists of multiple test states and judgment statements. Therefore, multiple test states corresponding to the test task can be obtained from the test logic information, and each test state can be mapped to the position information of a preset time automaton model. Furthermore, since the essence of object interaction information is that an object in a specific state sends a certain type of message in a time sequence, and another object receives it and triggers its own state change, object interaction information can essentially be mapped to a time automaton model. The sending and receiving of messages in the process allows for the combination of object interaction information and test logic information to detect target state pairs with test triggering conditions. These target state pairs are state pairs that have undergone state transition operations, meaning that when the test triggering conditions are met, the state of the test task transitions from the first test state to the second test state. At this point, the test triggering condition information between the target state pairs can be mapped to guard conditions in the time automaton model. In other words, guard conditions for position transitions between the two position information corresponding to the target state pairs are added to the preset time automaton model. Finally, the completed time automaton model of the test task is obtained.

[0101] In one embodiment, a time automaton model is as follows: Figure 4 As shown, at the start of the test, the wind pressure at the head of the column is first confirmed to be high, followed by the wind pressure at the tail of the column. At this point, the receiving environment for the wind pressure information at the tail of the column is simulated using the edge selection expression in a time automata model: the wind pressure at the tail of the column is set within a range, for example, " During simulation, the wind pressure value can be randomly or manually selected to simulate the received tail-end wind pressure information. Then, the process moves to the position of judging the tail-end wind pressure. When the tail-end wind pressure is less than the preset wind pressure threshold (set to 280), indicating a low wind pressure state, the process moves to the test failure position via a guard condition (tail-end wind pressure < 280), and the test ends. If the tail-end wind pressure is higher than the threshold, the test continues. After the ATP onboard equipment performs emergency braking, the head of the train updates to a low wind pressure state, and then the process moves to judging whether the tail-end wind pressure drops to a low wind pressure within a limited time. To perform the first judgment from the start of timing instead of directly failing to judge due to timeout, a guard condition (limited braking duration threshold T1 ≥ 120 && a ≥ 1) is used to simulate the judgment logic, judging within the limited braking duration threshold T1. Next, if the tail-end air pressure still has not decreased to a low air pressure, the test fails. If the air pressure decreases to a low air pressure within the limited braking time threshold T1, the system moves to the position where the ATP on-board equipment alleviates emergency braking, then moves to the position where the head of the train returns to a high air pressure state, and continues to determine whether the tail-end air pressure returns to a high air pressure state within the limited braking release time threshold T2. A guard condition (braking release time threshold T2 > 600 && b ≥ 1) is used to simulate the judgment logic, and the system judges whether the braking release time T2 is within the limited braking release time. If the tail air pressure does not return to high air pressure, the test fails; if it returns to high air pressure within the time limit T2 for releasing the brake, the test succeeds.

[0102] In the above embodiments, by mapping each test state in the test logic information to the position information of a preset time automaton model, and mapping the test triggering conditions obtained from the object interaction information and the test logic information to guard conditions, the accuracy of constructing the time automaton model of the test task is improved.

[0103] In one exemplary embodiment, detecting the target test sequence of a test task based on multiple test sequences includes:

[0104] Detect multiple test states in each test sequence, as well as test subsequence information between each test state; determine all test states as nodes to be constructed in the directed graph, and generate directed edges between two nodes associated with the test subsequence information in the directed graph to be constructed based on the information of each test subsequence, thus obtaining the constructed directed graph; determine the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges, and detect the target test sequence that matches the target path.

[0105] In this context, the test state refers to the discrete stage in the test process where the train or equipment is located. It identifies the core characteristics of the current test segment. For example, test states can include idle, low-pressure state at the end of the train, wind pressure judgment state, emergency braking state, emergency braking release time status, test success, and test failure. Test sub-sequence information is the transition logic between two test states, containing triggering conditions and action instructions, used to describe how to transition from the current state to the next state.

[0106] Specifically, multiple test states are detected in each test sequence, and test subsequence information is obtained in the test sequence according to the transition logic from one test state to another. Since there is more than one test sequence, the test subsequence information between two test states may also represent more than one. When there is no transition logic between two test states, the test subsequence information may also represent 0.

[0107] Taking the functional testing of in-vehicle equipment as an example, after the in-vehicle equipment starts up, it first enters a self-test program. After passing the verification, it enters a standby state. The construction of the test sequence follows a specific mode transition logic: starting from the standby mode, after a series of mode transitions, it finally returns to the standby mode to complete the test. At this time, a test sequence containing multiple test states can be: standby mode → wake-up mode → navigation mode → multimedia mode → abnormal mode → prepare for standby mode → standby mode. At this time, the test sub-sequence information between each test state includes: standby mode → wake-up mode, wake-up mode → navigation mode, navigation mode → multimedia mode, multimedia mode → abnormal mode, and abnormal mode → standby mode.

[0108] Then, all test states are identified as nodes in the directed graph to be constructed. Based on the information of each test subsequence, two nodes in the directed graph to be constructed that are associated with the test subsequence information are determined. A directed edge is generated between the two nodes associated with the test subsequence information, and the direction of the directed edge matches the path direction corresponding to the test subsequence information. Finally, the constructed directed graph is obtained. Furthermore, there can be any number of directed edges between two nodes in the directed graph; for example, there may be no directed edges or there may be multiple directed edges. This is not limited here.

[0109] The constructed directed graph includes all test states and test subsequence information between all test states. Therefore, based on this directed graph, the generation of test sequences can be transformed into a path optimization problem in graph theory. Its core objective is to minimize the number of repeated traversals of directed edges while covering all directed edges, thus determining the target path that covers all directed edges and minimizes the total number of repeated traversals. Furthermore, it detects the target test sequence that matches the target path, that is, identifying the nodes in the target path as test states of the target test sequence and the directed edges between nodes in the target path as test subsequence information of the target test sequence. In practical applications, the target path optimization problem can be further formalized as the Chinese Postal Route Problem, which involves finding the optimal closed path for all directed edges in the directed graph, allowing for repeated traversals of directed edges, to obtain the optimal target path.

[0110] In the above embodiments, by transforming the generation of test sequences into a path optimization problem in graph theory, the problem of frequent initial state setting of equipment caused by independently executing test subsets can be solved, while ensuring the integrity of the test scenario and the continuity of test execution, thus improving the efficiency and feasibility of train control system testing. Furthermore, by transforming the path optimization problem in graph theory into the Chinese postal route problem, the generated test sequences not only achieve complete coverage of test subsequences but also meet the various requirements of actual testing, thereby improving testing efficiency.

[0111] In an exemplary embodiment, determining the target path in a directed graph that covers all directed edges and minimizes the total number of repeated traversals of all directed edges includes:

[0112] Determine the theoretical test path in the directed graph that covers all directed edges and minimizes the total number of repeated traversals of all directed edges. The theoretical test path includes multiple directed edges. When the first test state corresponding to the end node of the first directed edge in the theoretical test path does not match the second test state corresponding to the start node of the second directed edge, detect all connectable paths between the end node and the start node. The first directed edge is the previous directed edge of the second directed edge in the theoretical test path, and each connectable path includes at least one intermediate directed edge. Detect the weight of each intermediate directed edge and, based on the weights of all intermediate directed edges in each connectable path, select a target connecting path from all connectable paths. Insert the target connecting path between the end node and the start node of the theoretical test path and detect the target test sequence that matches the updated theoretical test path.

[0113] Specifically, determine the theoretical test path in the directed graph that covers all directed edges and minimizes the total number of repeated traversals of all directed edges. The theoretical test path includes multiple directed edges. Furthermore, the theoretical test path is an unoptimized path that may contain a large number of directed edge connections where the test states of the nodes do not match.

[0114] Test state mismatch refers to a mismatch between the first test state corresponding to the end node of the first directed edge and the second test state corresponding to the start node of the second directed edge. For example, if the first test state corresponding to the end node of the first directed edge represents a fault state, and the second test state corresponding to the start node of the second directed edge represents a normal operating state, then the first and second directed edges cannot be connected. Therefore, it is necessary to query the directed graph for the target connection path used to connect the first and second directed edges, so as to insert the target connection path between the end node of the first directed edge and the start node of the second directed edge to obtain the target test sequence.

[0115] The target connection path can be a previously traversed test subsequence. Since the target connection path has already been traversed, there's no need to repeat the traversal. Therefore, when detecting all connectable paths between the end node and the start node, the shortest path information provided by the directed graph is used to filter the target connection path from all connectable paths. That is, the weight of each directed edge in each connectable path is detected, and combined with the weights of all directed edges corresponding to each connectable path, the total weight of each connectable path is obtained. Then, based on the total weight of each connectable path, the connectable path with the lowest total weight is considered the shortest path and is used as the target connection path.

[0116] In one embodiment, a directed graph is provided. ,in Include 1 node (respectively) )and Directed edges (respectively) According to the directed graph, the graph... It may contain multiple edges, i.e., two nodes. arrive There may be multiple directed edges between nodes in the graph. Therefore, when solving for the shortest distance and the corresponding shortest path between nodes in the graph, it is necessary to first analyze the graph. The simplified directed graph is obtained by simplification. The simplification rules are as follows:

[0117] (1) Keep one side: If the figure Two nodes in and If there is only one directed edge between them, then that edge is retained;

[0118] (2) Keep the edge with the minimum weight: if two nodes and If there are multiple directed edges, only the directed edge with the smallest weight value is retained; if there are multiple edges with the same weight value, any edge with the smallest weight value can be selected for retention.

[0119] By applying the above simplification rules, the final directed graph is a single-edge directed graph, where there is at most one directed edge between each pair of nodes.

[0120] In one embodiment, the weight of each directed edge can be the number of cases under different environmental parameter information during the corresponding state transition process.

[0121] In the above embodiments, when constructing the test sequence, the start and end states of each test sub-sequence need to be taken into consideration. When the end state of the test sub-path does not match the start state of the next test sub-path, the shortest path information provided by the directed graph can be used to determine the target connection path with the shortest path, thereby improving the efficiency of subsequent testing according to the target test sequence.

[0122] In an exemplary embodiment, object interaction information is represented in the form of a sequence diagram, wherein the sequence diagram is used to describe the interaction process between auxiliary test objects in chronological order; test logic information is represented in the form of an activity diagram, wherein the activity diagram is used to represent the test logic information corresponding to the test task in logical order.

[0123] Sequence diagrams are dynamic modeling diagrams that display the interactions between objects in chronological order. They clearly present the order in which messages are sent and received, as well as the temporal relationships of interactions, through a vertical timeline and horizontal object columns. Activity diagrams are dynamic modeling diagrams that display the execution order of a series of activities according to a logical flow. Through elements such as activity nodes, decision branches, parallel branching / merging, and control flow, they represent the behavioral flow of one or more objects, including sequential execution, conditional judgments, parallel operations, and exception handling.

[0124] Specifically, this application uses SysML sequence diagrams to describe the interaction sequence information between auxiliary test objects during the testing process. SysML sequence diagrams focus on the interaction process between auxiliary test objects in the system, and the core is to present the order of message passing between auxiliary test objects.

[0125] In one embodiment, such as Figure 5 As shown, taking the consistency judgment of wind pressure between the head and tail of a column as an example, a SysML sequence diagram is used to describe the object interaction information between multiple auxiliary test objects, including:

[0126] S1. When testing is performed, the ATP (Automatic Train Protection On-board Equipment) at the head of the train sends a message M155 to the equipment at the tail of the train to start a communication session.

[0127] S2. As part of the response process, the tail device replies to the ATP onboard device with its corresponding system version M32.

[0128] S3. After receiving the version data, the ATP onboard equipment executes different procedures based on the version information. If the versions are inconsistent, the ATP onboard equipment sends a system incompatibility command (M154) to the tail device, requiring the communication session to end. The ATP onboard equipment waits to deregister, and the tail device, upon receiving the command, also waits to deregister. The ATP onboard equipment then sends a terminal instruction message (M156) to the tail device, deregistering. The tail device, upon receiving the instruction, also deregisters. After deregistration, the tail device sends a terminal confirmation message (M39) to the ATP onboard equipment, confirming the end of the matching process. If the versions are consistent, the ATP onboard equipment sends a system version consistency message (M32) to the tail device, establishing a communication session between them. Then, the ATP onboard equipment sends a request (M136) to the tail device to query relevant tail information.

[0129] S4, the tail end equipment feedback request corresponds to the relevant tail end information M24 and is sent to the ATP on-board equipment.

[0130] S5. The ATP onboard equipment performs integrity testing based on the information returned by the tail equipment, that is, it evaluates whether the key functions of the software are fully implemented, verifies whether they meet the design requirements, and outputs two mutually exclusive results according to the judgment logic: (1) the integrity test fails, and the integrity test result displayed by the DMI (Driver Machine Interface) represents unknown; (2) the integrity test succeeds, and the integrity test result displayed by the DMI changes from unknown to complete. At this time, the train runs.

[0131] Furthermore, the device interaction process between the ATP onboard equipment and the tail equipment also requires the participation of an IP query server. That is, before the ATP onboard equipment and the tail equipment exchange information, the ATP onboard equipment needs to query the head IP from the IP (Internet Protocol) query server, and the tail equipment queries the tail IP from the IP query server to establish a communication connection between the head IP and the tail IP, so that messages can be sent normally.

[0132] In addition, this application also uses SysML activity diagrams to describe the complex control logic required during system testing. SysML activity diagrams focus on the execution flow of actions and data / control flow, highlighting how inputs are transformed into outputs through a series of actions, and are good at expressing complex control logic and parallel relationships.

[0133] In the above embodiments, SysML sequence diagrams are used to describe the interaction timing information between auxiliary test objects during the testing process, and SysML activity diagrams are used to describe the complex control logic required during the system testing process. This allows the same test process to be displayed from both the interaction timing and control logic perspectives, each focusing on different aspects, avoiding ambiguity or omissions caused by comprehensive analysis, facilitating a comprehensive and accurate analysis of its interaction timing and control logic, and improving the accuracy of test sequence generation.

[0134] In an exemplary embodiment, the auxiliary test objects include at least the column head device and the column tail device; the test logic information of the test task includes at least:

[0135] When the head device detects that the head wind pressure is higher than the preset wind pressure threshold, it controls the tail device to detect the tail wind pressure. If the tail wind pressure is lower than the preset wind pressure threshold, the test task fails. If the tail wind pressure is higher than or equal to the preset wind pressure threshold, the head wind pressure is controlled to be lower than the preset wind pressure threshold, and the tail wind pressure is checked to see if it is lower than the preset wind pressure threshold within a preset first time period. If the tail wind pressure is not lower than the preset wind pressure threshold within the preset first time period, the test task fails. If the tail wind pressure is lower than the preset wind pressure threshold within the preset first time period, the head wind pressure is controlled to be higher than the preset wind pressure threshold, and the tail wind pressure is checked to see if it is higher than or equal to the preset wind pressure threshold within a preset second time period, thus obtaining the test result.

[0136] Specifically, it should be noted that this embodiment takes the integrity test of the head device and tail device as an example. The test task of this application does not include this test task, but also includes other test tasks, such as testing the interlocking device.

[0137] A schematic diagram illustrating the integrity test of the head and tail devices using SysML activity diagrams is shown below. Figure 6As shown, firstly, the system detects whether the head-of-train wind pressure is higher than a preset wind pressure threshold. When the head-of-train device detects that the head-of-train wind pressure is higher than the preset wind pressure threshold, it confirms that the head-of-train is in a high wind pressure state. At this time, it is necessary to control the tail-of-train device to detect the tail-of-train wind pressure. Therefore, a node for judging the tail-of-train wind pressure is added to the SysML activity diagram, and a logic branch node is added to judge whether the tail-of-train wind pressure is lower than the preset wind pressure threshold. If the tail-of-train wind pressure is lower than the preset wind pressure threshold, the difference between the tail-of-train wind pressure and the head-of-train wind pressure is too large, and the train integrity test is directly output as failed. If the tail-of-train wind pressure is higher than or equal to the preset wind pressure threshold, the ATP on-board equipment is controlled to apply emergency braking to make the head-of-train wind pressure lower than the preset wind pressure threshold. Since the head-of-train wind pressure is reduced, the tail-of-train wind pressure should theoretically also be reduced. Then, a node for judging whether the tail-of-train wind pressure is lower than the preset wind pressure threshold within a preset first time period needs to be added. At this time, two judgment nodes need to be added: one for judging the emergency braking application time and the other for judging the tail-of-train wind pressure. That is, if the tail-end air pressure is not lower than the preset air pressure threshold within a preset first time period (preset emergency braking application time period), the train integrity test fails. If the air pressure does not decrease within the time period, the loop continues until timeout or the air pressure decreases and the loop ends. If the tail-end air pressure is lower than the preset air pressure threshold within the preset first time period, the ATP on-board equipment is controlled to release the brake, making the head-end air pressure higher than or equal to the preset air pressure threshold. At this time, a node is still needed to determine whether the tail-end air pressure is higher than or equal to the preset air pressure threshold within a preset second time period (preset emergency braking release time period). Similar to the above judgment logic, if the tail-end air pressure is higher than or equal to the preset air pressure threshold within the preset first time period, the final test result is obtained, indicating that the test is successful. If the tail-end air pressure is not higher than or equal to the preset air pressure threshold within the preset first time period, the final test result is obtained, indicating that the test fails. Generally, the head-end equipment can be the ATP on-board equipment.

[0138] In the above embodiments, taking the integrity test of the head device and tail device as an example, the composition of the test logic information of the test task is described, and how to represent the test logic information of the test task in the activity diagram is described, making the test sequence generation method clearer and more understandable.

[0139] In one exemplary embodiment, this application addresses the inefficiencies and subjective dependencies inherent in manually designing test sequences by implementing an intelligent test sequence generation method. That is, as shown... Figure 7As shown, various modeling methods are used to abstract complex functional requirements such as the requirements and technical specifications of relevant systems into specific system scenario models. Then, expected inputs are set, and the expected outputs corresponding to the expected inputs are obtained based on path search algorithms, ultimately generating test sequences. Furthermore, based on the generated test sequences, this application verifies the system functions through a laboratory testing platform. The actual outputs collected after executing the test sequences in the simulation environment of the new train control system are compared with the expected outputs, thereby achieving a comprehensive evaluation and in-depth analysis of the test results.

[0140] In one embodiment, this application first employs a SysML-based modeling method, using sequence diagrams to describe the entire information interaction process during testing. An integrity testing and monitoring scenario model is constructed using activity diagrams. Based on transformation rules, the SysML model is converted into a Timed Automata (TA) model. Finally, the UPPAAL verification tool is used to formally verify the system's functional correctness, safety attributes, and real-time performance. Depending on the various environmental conditions of the integrity testing and monitoring scenarios, these conditions are input into the model to generate test sequences for these scenarios through real-time simulation. The generated multiple test sequences better cover the complex operating environment of the new train control system, and the generated test subset covers all scenarios of the train integrity check function.

[0141] Furthermore, based on the multiple test sequences generated in the previous step, a test framework is constructed, and the state transition relationships of the test sequences are modeled as a directed graph. This transforms the serialization problem of the on-board equipment test sequences for the new train control system into a Chinese postal route problem. During the problem modeling phase, several constraints are introduced, considering the actual testing experience and requirements of the testers. These constraints include setting the initial test state, the order requirements of key test subsets, and specific combination relationships (e.g., certain states cannot be the preceding states of others). An improved simulated annealing genetic algorithm is used to solve this constrained optimization problem, achieving the initial optimization of the test sequences. To further improve the engineering applicability of the test sequences, a second optimization is performed based on actual testing operation requirements.

[0142] The test sequence generation method of this application will be described below using a specific application example from a railway signaling system, specifically including:

[0143] Step 1: Use a SysML sequence diagram to describe the object interactions between the ATP onboard unit, the tail unit, and the IP query server in the integrity-related operational scenarios. When the ATP onboard unit sends a message to the tail unit to start a communication session, the tail unit responds with a system version. Upon receiving the version data, the ATP onboard unit executes different processes based on the version information. To accurately describe this critical decision point, the alt interaction operator in the sequence diagram can be used to distinguish between two mutually exclusive execution paths: If the versions are inconsistent, the ATP onboard unit sends a command to the tail unit to end the communication session; if the versions are consistent, the ATP onboard unit establishes a communication session with the tail unit, then the ATP onboard unit queries the relevant tail unit information and performs an integrity test based on the information replied by the tail unit. Based on the judgment logic, two mutually exclusive results are output: if the integrity test fails, the DMI displays the integrity as being in an unknown state; if the integrity test succeeds, the DMI displays the integrity as changing from an unknown state to a complete state.

[0144] SysML activity diagrams are used to describe the test logic information for the functional implementation in system integrity testing and integrity monitoring scenarios. Specifically: low wind pressure state is defined as the first preset wind pressure threshold, and high wind pressure state is defined as wind pressure higher than or equal to the preset wind pressure threshold. First, it is confirmed that the head of the train is in a high wind pressure state. Then, a node is added to judge the wind pressure at the tail of the train. If the wind pressure at the tail of the train is less than the preset wind pressure threshold, the integrity test is directly output as failed. If the wind pressure at the tail of the train is greater than or equal to the preset wind pressure threshold, the ATP on-board equipment applies emergency braking to reduce the head of the train to a low wind pressure state. Then, it is necessary to judge whether the wind pressure at the tail of the train has reduced to a low wind pressure state within a preset emergency braking duration threshold. Two judgment nodes are added: one to judge the emergency braking duration threshold, and the other to judge the wind pressure at the tail of the train. If the timeout occurs, the test is output as failed. If the wind pressure does not decrease within the emergency braking duration threshold, the loop continues until the timeout occurs or the wind pressure decreases and the loop is exited. Once the tail air pressure decreases within the emergency braking duration threshold, the ATP onboard equipment releases the brakes, and the head air pressure returns to a high air pressure state. At this time, it is still necessary to determine whether the tail air pressure returns to a high air pressure within the time range, which is similar to the judgment logic mentioned above.

[0145] Step 2: Obtain multiple test states corresponding to the test task from the SysML activity diagram. For example, the test states can be confirming the tail wind pressure, confirming the head wind pressure, etc. Based on the SysML sequence diagram and SysML activity diagram, detect target state pairs with test trigger conditions. The target state pairs include a first test state and a second test state, and the test trigger condition is the trigger condition for a state transition operation between the first test state and the second test state. For example, the test trigger condition is that the tail wind pressure is lower than a preset wind pressure threshold. Map each test state to the position information of a preset time automaton model. Based on the test trigger condition information between the target state pairs, add guard conditions for position transitions between the two position information corresponding to the target state pairs in the preset time automaton model.

[0146] Step 3: Using a time automata model, simulate multiple preset environmental parameter information to obtain the test sequence corresponding to each environmental parameter information.

[0147] Step 4: Detect multiple test states in each test sequence, as well as test subsequence information between each test state; determine all test states as nodes to be constructed in the directed graph, and generate directed edges between two nodes associated with the test subsequence information in the directed graph to be constructed based on the information of each test subsequence, thus obtaining the constructed directed graph.

[0148] Determine the theoretical test path in a directed graph that covers all directed edges and minimizes the total number of repeated traversals of all directed edges. The theoretical test path includes multiple directed edges.

[0149] When the first test state corresponding to the end node of the first directed edge in the theoretical test path does not match the second test state corresponding to the start node of the second directed edge, all connectable paths between the end node and the start node are detected. Here, the first directed edge is the previous directed edge of the second directed edge in the theoretical test path, and each connectable path includes at least one intermediate directed edge. The weight of each intermediate directed edge is detected, and a target connecting path is selected from all connectable paths based on the weights of all intermediate directed edges in each connectable path. The target connecting path is inserted between the end node and the start node of the theoretical test path, and a target test sequence matching the updated theoretical test path is detected.

[0150] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0151] Based on the same inventive concept, this application also provides a test sequence generation apparatus for implementing the test sequence generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more test sequence generation apparatus embodiments provided below can be found in the limitations of the test sequence generation method described above, and will not be repeated here.

[0152] In one exemplary embodiment, such as Figure 8 As shown, a test sequence generation device is provided, including: a data acquisition module 200, a model building module 400, an environment simulation module 600, and a test sequence generation module 800, wherein:

[0153] The data acquisition module 200 is used to acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of the test task, as well as the test logic information of the test task.

[0154] The model building module 400 is used to build a time automaton model of the test task based on the object interaction information and test logic information. The time automaton model is used to represent the interaction timing information between multiple auxiliary test objects and the state transition information of the test task under different environmental conditions.

[0155] The environment simulation module 600 is used to simulate multiple preset environmental parameter information using a time automaton model to obtain a test sequence corresponding to each environmental parameter information. Each test sequence is a continuous state transition sequence of the test task from the initial state to the final state.

[0156] The test sequence generation module 800 is used to detect the target test sequence of a test task based on multiple test sequences.

[0157] In one embodiment, the data acquisition module 200 is further configured to acquire multiple test states corresponding to the test task from the test logic information, and detect target state pairs with test triggering conditions based on object interaction information and test logic information, wherein the target state pairs include a first test state and a second test state, and the test triggering condition is the triggering condition for a state transition operation between the first test state and the second test state; map each test state to position information of a preset time automaton model; and add guarding conditions for position transition between two position information corresponding to the target state pairs in the preset time automaton model based on the test triggering condition information between the target state pairs.

[0158] In one embodiment, the test sequence generation module 800 is further configured to detect multiple test states in each test sequence, as well as test sub-sequence information between each test state; determine all test states as nodes to be constructed in the directed graph, and generate directed edges between two nodes associated with the test sub-sequence information in the directed graph to be constructed according to each test sub-sequence information, thereby obtaining the constructed directed graph; determine the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges, and detect the target test sequence that matches the target path.

[0159] In one embodiment, the test sequence generation module 800 is further configured to determine the theoretical test path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges, wherein the theoretical test path includes multiple directed edges; when there is a mismatch between the first test state corresponding to the end node of the first directed edge and the second test state corresponding to the start node of the second directed edge in the theoretical test path, all connectable paths between the end node and the start node are detected, wherein the first directed edge is the previous directed edge of the second directed edge in the theoretical test path, and each connectable path includes at least one intermediate directed edge; the weight of each intermediate directed edge is detected, and a target connecting path is selected from all connectable paths according to the weights of all intermediate directed edges in each connectable path; the target connecting path is inserted between the end node and the start node of the theoretical test path, and a target test sequence matching the updated theoretical test path is detected.

[0160] In one embodiment, object interaction information is represented in the form of a sequence diagram, wherein the sequence diagram is used to describe the interaction process between auxiliary test objects in chronological order; test logic information is represented in the form of an activity diagram, wherein the activity diagram is used to represent the test logic information corresponding to the test task in logical order.

[0161] In one embodiment, the auxiliary test objects include at least the head device and the tail device; the test logic information of the test task includes at least: when the head device detects that the head wind pressure is higher than a preset wind pressure threshold, it controls the tail device to detect the tail wind pressure; if the tail wind pressure is lower than the preset wind pressure threshold, the test task fails; if the tail wind pressure is higher than or equal to the preset wind pressure threshold, it controls the head wind pressure to be lower than the preset wind pressure threshold and detects whether the tail wind pressure is lower than the preset wind pressure threshold within a preset first time period; if the tail wind pressure is not lower than the preset wind pressure threshold within the preset first time period, the test task fails; if the tail wind pressure is lower than the preset wind pressure threshold within the preset first time period, it controls the head wind pressure to be higher than the preset wind pressure threshold and detects whether the tail wind pressure is higher than or equal to the preset wind pressure threshold within a preset second time period, and obtains the test result.

[0162] Each module in the aforementioned test sequence generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0163] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as interaction information between multiple auxiliary test objects and test logic information for test tasks. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a test sequence generation method.

[0164] Those skilled in the art will understand that Figure 9 The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0165] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0166] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0167] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0168] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0169] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0170] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for generating test sequences, characterized in that, The method includes: Acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of a test task, as well as the test logic information of the test task; Based on the object interaction information and the test logic information, a time automaton model of the test task is constructed, wherein the time automaton model is used to characterize the interaction timing information between multiple auxiliary test objects, as well as the state transition information of the test task under different environmental conditions. Using the time automata model, multiple preset environmental parameter information are simulated to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state; The target test sequence of the test task is detected based on multiple test sequences.

2. The method according to claim 1, characterized in that, The step of constructing a time automaton model for the test task based on the object interaction information and the test logic information includes: Multiple test states corresponding to the test task are obtained from the test logic information, and target state pairs with test triggering conditions are detected based on the object interaction information and the test logic information. The target state pairs include a first test state and a second test state, and the test triggering condition is the triggering condition for a state transition operation between the first test state and the second test state. Each test state is mapped to the position information of a preset time automaton model; Based on the test triggering condition information between the target state pairs, a guard condition for position transfer between the two position information corresponding to the target state pairs is added to the preset time automaton model.

3. The method according to claim 1, characterized in that, The step of detecting the target test sequence for the test task based on the plurality of test sequences includes: Detect multiple test states in each test sequence, as well as test subsequence information between each test state; All the test states are determined as nodes to be constructed in the directed graph, and according to each test subsequence information, a directed edge is generated between the two nodes associated with the test subsequence information in the directed graph to be constructed, so as to obtain the constructed directed graph. Determine the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges, and detect the target test sequence that matches the target path.

4. The method according to claim 3, characterized in that, Determining the target path in the directed graph that covers all directed edges and has the minimum total number of repeated traversals of all directed edges includes: Determine the theoretical test path in the directed graph that covers all the directed edges and minimizes the total number of repeated traversals of all the directed edges, wherein the theoretical test path includes multiple directed edges; When the first test state corresponding to the end node of the first directed edge in the theoretical test path does not match the second test state corresponding to the start node of the second directed edge, all connectable paths between the end node and the start node are detected, wherein the first directed edge is the previous directed edge of the second directed edge in the theoretical test path, and each connectable path includes at least one intermediate directed edge. The weight of each of the intermediate directed edges is detected, and a target connecting path is selected from all the connecting paths based on the weights of all the intermediate directed edges in each of the connectable paths. The target connection path is inserted between the end node and the start node of the theoretical test path, and the target test sequence that matches the updated theoretical test path is detected.

5. The method according to claim 1, characterized in that, The object interaction information is represented in the form of a sequence diagram, wherein the sequence diagram is used to describe the interaction process between the auxiliary test objects in chronological order; The test logic information is represented in the form of an activity diagram, wherein the activity diagram is used to represent the test logic information corresponding to the test task through a logical sequence.

6. The method according to claim 1, characterized in that, The auxiliary test objects include at least the column head device and the column tail device; the test logic information of the test task includes at least: When the head device detects that the head wind pressure is higher than a preset wind pressure threshold, it controls the tail device to detect the tail wind pressure. If the tail wind pressure is lower than the preset wind pressure threshold, the test task fails. If the tail wind pressure is higher than or equal to the preset wind pressure threshold, then the head wind pressure is controlled to be lower than the preset wind pressure threshold, and it is detected whether the tail wind pressure is lower than the preset wind pressure threshold within a preset first time period. If the tail wind pressure is not lower than the preset wind pressure threshold within a preset first time period, the test task fails. If the tail wind pressure is lower than the preset wind pressure threshold within a preset first time period, the head wind pressure is controlled to be higher than the preset wind pressure threshold, and it is detected whether the tail wind pressure is higher than or equal to the preset wind pressure threshold within a preset second time period to obtain the test result.

7. A test sequence generation apparatus, characterized in that, The device includes: The data acquisition module is used to acquire object interaction information between multiple auxiliary test objects in the railway signaling system during the test of the test task, as well as the test logic information of the test task. The model building module is used to construct a time automaton model of the test task based on the object interaction information and the test logic information. The time automaton model is used to represent the interaction timing information between multiple auxiliary test objects and the state transition information of the test task under different environmental conditions. The environment simulation module is used to simulate multiple preset environmental parameter information using the time automata model to obtain a test sequence corresponding to each environmental parameter information, wherein each test sequence is a continuous state transition sequence of the test task from the initial state to the final state. A test sequence generation module is used to detect a target test sequence for the test task based on a plurality of test sequences.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.