Test methods, apparatus, equipment and storage media for vehicle-mounted ATP devices
By acquiring and parsing control commands containing time and displacement information, the testing process of the vehicle-mounted ATP equipment was optimized, solving the problems of insufficient interface resources and high costs, and achieving more efficient testing.
Patent Information
- Application Number
- CN202410014971.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2044-01-04
AI Technical Summary
Existing testing methods for Automatic Train Protection (ATP) systems suffer from insufficient interface resources, low testing efficiency, and high costs. In particular, general-purpose instruments and embedded development solutions present challenges in hardware and software maintenance.
By acquiring the target test script, parsing and extracting control commands containing time and/or displacement information, and sequentially reading and executing these commands to test the functionality of the ATP device, the test process is optimized using linked lists and structured processing.
It improves the testing efficiency of vehicle-mounted ATP equipment, reduces testing complexity and cost, and achieves a more efficient testing process.
Smart Images

Figure CN117826766B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of rail transit technology, and in particular to a testing method, apparatus, equipment and storage medium for on-board ATP equipment. Background Technology
[0002] Automatic Train Protection (ATP) is a train operation control device applicable to various operating scenarios such as high-speed railways, conventional railways, and subways, under different signal control system systems. This device can automatically protect trains from speeding.
[0003] Currently, the main testing methods for on-board automatic protection equipment (ATP) are as follows: 1. For different functions of the ATP, a dedicated test circuit is built using general-purpose instruments, and then the ATP is tested through a host computer program control method. 2. A microcontroller combined with peripheral functional circuits is used to develop a general-purpose test program that meets the interface requirements of the on-board ATP equipment through embedded development, and the host computer is used to manage the test sequence and analyze the data of the ATP. The first approach has limitations because the on-board ATP equipment has a complex and numerous interface types, and the interface resources of general-purpose instruments cannot meet the needs of simultaneous testing of multiple interfaces. The problem of insufficient interface resources can only be solved by compromising test time and reducing test efficiency. Furthermore, general-purpose instruments are expensive, resulting in high R&D costs. The second approach requires consideration of the performance and universality requirements of each interface of the ATP equipment, placing high demands on embedded program development. Additionally, if the on-board ATP equipment is upgraded in the future, the hardware and software maintenance costs will be high. Summary of the Invention
[0004] This invention provides a testing method, apparatus, device, and storage medium for vehicle-mounted ATP devices, which can improve the testing efficiency and reduce the testing complexity of vehicle-mounted ATP devices.
[0005] In a first aspect, embodiments of the present invention provide a testing method for an on-board ATP device, comprising:
[0006] Obtain the target test script;
[0007] The target test script is parsed to obtain at least one control command; wherein the control command contains time information and / or displacement information;
[0008] Read the at least one control command sequentially and extract the time information and / or displacement information from the read control command;
[0009] Based on the time information and / or displacement information, the ATP device is controlled to execute the read control commands in order to test the corresponding functions of the ATP device.
[0010] Secondly, embodiments of the present invention also provide a testing apparatus for an on-board ATP device, comprising:
[0011] The target test script acquisition module is used to acquire the target test script;
[0012] The control command acquisition module is used to parse the target test script to obtain at least one control command; wherein the control command contains time information and / or displacement information;
[0013] The control command reading module is used to read the at least one control command in sequence and extract the time information and / or displacement information from the read control command.
[0014] The testing module is used to control the ATP device to execute the read control commands based on the time information and / or displacement information, so as to test the corresponding functions of the ATP device.
[0015] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the testing method for the vehicle-mounted ATP device according to the embodiments of the present invention.
[0019] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, which are used to cause a processor to execute and implement the testing method of the vehicle-mounted ATP device described in the embodiments of the present invention.
[0020] This invention discloses a testing method, apparatus, device, and storage medium for an in-vehicle ATP (Automatic Train Protection) device. The method involves: acquiring a target test script; parsing the target test script to obtain at least one control command; wherein the control command includes time information and / or displacement information; sequentially reading at least one control command and extracting the time information and / or displacement information from the read control command; and controlling the ATP device to execute the read control command based on the time information and / or displacement information to test the corresponding functions of the ATP device. The testing method for an in-vehicle ATP device provided by this invention, which sequentially reads at least one control command to test the ATP device, can improve the testing efficiency and reduce the testing complexity of in-vehicle ATP devices. Attached Figure Description
[0021] Figure 1 This is a flowchart of a testing method for an on-board ATP device according to Embodiment 1 of the present invention;
[0022] Figure 2 This is a flowchart of a testing method for an on-board ATP device according to Embodiment 1 of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of a test device for an on-board ATP device according to Embodiment 2 of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0025] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0026] Example 1
[0027] Figure 1 This is a flowchart of a testing method for an on-board ATP device according to Embodiment 1 of the present invention. This embodiment is applicable to the testing of ATP devices. The method can be executed by a testing device for the on-board ATP device, which can be implemented in software and / or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server. Specifically, it includes the following steps:
[0028] S110, Obtain the target test script.
[0029] The target test script can be understood as a test script containing control commands that is to be executed. In this embodiment, before testing the ATP device, N test scripts can be configured according to testing requirements and stored in a linked list. During the testing process, the test scripts are read sequentially from the linked list to perform the testing of the ATP device.
[0030] Specifically, the method for obtaining the target test script can be as follows: read the first test script in the first linked list; determine whether the first test script contains control commands; if the first test script contains control commands, then determine the first test script as the target test script; if the first test script does not contain control commands, then remove the first test script from the first linked list, making the second test script the new first test script, and return to execute the operation of reading the first test script in the first linked list, until the target test script is obtained.
[0031] The first linked list stores multiple test scripts. Test scripts are read sequentially from the first linked list as follows: The first test script is read; if it has been executed or does not contain control commands, it is deleted, making the second test script the new first test script, and so on, until all test scripts in the first linked list have been read. In this embodiment, if the first test script does not contain control commands, it indicates that the test script is invalid and cannot be used to test the ATP device.
[0032] S120: Parse the target test script to obtain at least one control command.
[0033] The control command includes time information and / or displacement information. The time information characterizes the execution time of the control command by the ATP device, and can be represented by the time interval between the start-up time of the ATP device and the time interval between the execution of a specific command. The displacement information characterizes the displacement of the ATP device during the execution of the control command, and can be represented by the distance between the start-up time of the ATP device and the distance between the execution of a specific command. In this embodiment, the time and displacement information can be determined by the testing requirements and the operating attributes of the ATP device, and are not limited here.
[0034] The test script includes one or more control commands. After obtaining the target test script, at least one control command contained in the target test script is extracted. The control command can be a command for testing the ATP equipment, and may include control commands related to speed, carrier frequency signal type, locomotive operating conditions, BTM information, transponder information, speed and distance measurement, normal / emergency braking, phase testing, etc.
[0035] S130, read at least one control command in sequence, and extract the time information and / or displacement information from the read control command.
[0036] Reading at least one control command in sequence can be understood as: reading at least one control command in order to control the ATP device to perform corresponding operations based on the read control command, thereby realizing the testing of the ATP device.
[0037] Specifically, the method for sequentially reading at least one control command can be as follows: sort at least one control command according to time information and / or displacement information; store the sorted at least one control command into a second linked list; and sequentially read at least one control command from the second linked list.
[0038] The sorting of at least one control command based on time and / or displacement information can be understood as either sorting a control command according to its chronological order or its displacement order. The control command at the top of the list is the one with the earliest time or displacement. The sorted control commands can be stored in the second linked list by placing the top-ranked command at the beginning of the list, and then storing the remaining commands sequentially. This ensures that the control commands are executed in a pre-defined order, guaranteeing orderly test execution and improving test efficiency.
[0039] Specifically, the method for sequentially reading at least one control command from the second linked list can be as follows: read the first control command in the second linked list; if the first control command is not executed by the ATP device, then read the first control command again; if the first control command is executed by the ATP device, then remove the first control command from the second linked list, making the second control command the new first control command, and return to execute the operation of reading the first control command in the second linked list until the control command reading in the second linked list is completed.
[0040] If the first control command is not executed by the ATP device, it means that the ATP device's running time or displacement has not met the conditions for executing the control command. The first control command needs to be read again until the ATP device's running time or displacement does not meet the conditions for executing the control command. Then, the ATP device is controlled to execute the control command, and the first control command is removed from the second linked list, making the second control command the new first control command. The process then returns to reading the first control command from the second linked list until the control command reading from the second linked list is completed.
[0041] Optionally, the control command may also include test content. After extracting the time information and / or displacement information from the read control command, the following steps may be added: performing structured processing on the time information, displacement information and test content to obtain control commands with new data structures; correspondingly, the way to store at least one sorted control command into the second linked list may be: storing at least one sorted control command with new data structures into the second linked list.
[0042] One method for structuring the time information, displacement information, and test content is to load these information into a defined structure, where the time and displacement information are used as key information. For example, this defined structure can be in key-value format, where the key represents the time and displacement information, and the value represents the test content. In this embodiment, structuring the time information, displacement information, and test content facilitates the subsequent reading of control commands.
[0043] S140, based on time information and / or displacement information, control the ATP device to execute the read control commands in order to test the corresponding functions of the ATP device.
[0044] Specifically, the method of controlling the ATP device to execute the read control command based on time information and / or displacement information can be as follows: if the running time of the ATP device matches the time information and / or the running displacement of the ATP device matches the displacement information, then control the ATP device to execute the read control command.
[0045] In this embodiment, if the running time of the ATP device matches the time information and / or the running displacement of the ATP device matches the displacement information, it indicates that the ATP currently meets the conditions for executing the control command, and the ATP device is controlled to execute the read control command. If the running time of the ATP device does not match the time information and the running displacement of the ATP device does not match the displacement information, it indicates that the ATP currently does not meet the conditions for executing the control command. In this case, it is necessary to read the time information and / or displacement information in the control command again until the ATP meets the conditions for executing the control command.
[0046] Specifically, the method for controlling the ATP device to execute the read control commands can be as follows: determine whether the ATP device meets the test conditions; if the ATP device meets the test conditions, control the ATP device to execute the read control commands; if the ATP device does not meet the test conditions, perform an initialization operation on the ATP device to make the ATP device meet the test conditions, and then read the control commands again.
[0047] One way to determine whether the ATP device meets the test conditions is to check whether all functional modules of the ATP device have been started and whether control commands can be executed. In this embodiment, after the ATP device is initialized and meets the test conditions, the control command is read again, causing the ATP device to execute the control command.
[0048] Based on the above embodiments, Figure 2 This is a flowchart of the testing method for the vehicle-mounted ATP device according to an embodiment of the present invention, such as... Figure 2As shown, the method includes the following steps:
[0049] S201, Configure N test scripts and store the N test scripts in the first linked list;
[0050] S202: Read the first test script in the first linked list and determine whether the first test script contains control commands; if it does, execute S203; otherwise, execute S12.
[0051] S203, the first test script is identified as the target test script, the target test script is parsed, and at least one control command is obtained;
[0052] S204, perform structured processing on at least one control command to obtain a control command with a new data structure;
[0053] S205, store at least one control command for a new data structure into the second linked list;
[0054] S206, Read the first control command in the second linked list and extract the time information and / or displacement information from the read control command;
[0055] S207: Determine whether the read control command is executable based on the time information and / or displacement information. If it is executable, execute S208; otherwise, return to execute S206.
[0056] S208: Determine whether the ATP equipment meets the test conditions. If it does, proceed to S209; otherwise, proceed to S210.
[0057] S209, control the ATP device to execute the read control command.
[0058] S210: Remove the first control command from the second linked list and determine whether the second linked list is empty. If it is not empty, return to execute S206; if it is empty, execute S212.
[0059] S211, perform initialization operations on the ATP device to make the ATP device meet the test conditions, and return to execution 206.
[0060] S212, remove the first test script from the first linked list, making the second test script the new first test script, and return to execution 202.
[0061] The technical solution of this embodiment involves obtaining a target test script; parsing the target test script to obtain at least one control command; wherein the control command contains time information and / or displacement information; sequentially reading at least one control command and extracting the time information and / or displacement information from the read control command; and controlling the ATP device to execute the read control command based on the time information and / or displacement information to test the corresponding function of the ATP device. The testing method for vehicle-mounted ATP devices provided in this embodiment, by sequentially reading at least one control command to test the ATP device, can improve the testing efficiency and reduce the testing complexity of vehicle-mounted ATP devices.
[0062] Example 2
[0063] Figure 3 This is a schematic diagram of the structure of a test device for an on-board ATP device provided in Embodiment 2 of the present invention, as shown below. Figure 3 As shown, the device includes:
[0064] The target test script acquisition module 310 is used to acquire the target test script;
[0065] The control command acquisition module 320 is used to parse the target test script to obtain at least one control command; wherein the control command includes time information and / or displacement information;
[0066] The control command reading module 330 is used to read the at least one control command in sequence and extract the time information and / or displacement information from the read control command.
[0067] The test module 340 is used to control the ATP device to execute the read control commands based on the time information and / or displacement information, so as to test the corresponding functions of the ATP device.
[0068] Optionally, the target test script acquisition module 310 is also used for:
[0069] Read the first test script in the first linked list;
[0070] Determine whether the first test script contains control commands;
[0071] If the first test script contains control commands, then the first test script is determined as the target test script;
[0072] If the first test script does not contain control commands, then the first test script is removed from the first linked list, making the second test script the new first test script, and the operation of reading the first test script in the first linked list is returned until the target test script is obtained.
[0073] Optionally, the control command reading module 330 is also used for:
[0074] The at least one control command is sorted according to the time information and / or displacement information;
[0075] Store at least one sorted control command into the second linked list;
[0076] Read the at least one control command sequentially from the second linked list.
[0077] Optionally, the control command reading module 330 is also used for:
[0078] Read the first control command in the second linked list;
[0079] If the first control command is not executed by the ATP device, then the first control command is read again;
[0080] If the first control command is executed by the ATP device, the first control command is removed from the second linked list, making the second control command the new first control command, and the operation of reading the first control command from the second linked list is returned until the control command reading from the second linked list is completed.
[0081] Optionally, it also includes: a structured module, used for:
[0082] The time information, displacement information, and test content are processed in a structured manner to obtain control commands with a new data structure;
[0083] Accordingly, at least one sorted control command is stored in the second linked list, including:
[0084] Store at least one control command of the sorted new data structure into the second linked list.
[0085] Optionally, test module 340 is also used for:
[0086] If the running time of the ATP device matches the time information and / or the running displacement of the ATP device matches the displacement information, then the ATP device is controlled to execute the read control command.
[0087] Optionally, test module 340 is also used for:
[0088] Determine whether the ATP device meets the test conditions;
[0089] If the ATP device meets the test conditions, then control the ATP device to execute the read control command;
[0090] If the ATP device does not meet the test conditions, an initialization operation is performed on the ATP device to make it meet the test conditions, and the control command is read again.
[0091] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.
[0092] Example 3
[0093] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0094] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0096] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the testing methods for in-vehicle ATP devices.
[0097] In some embodiments, the testing method for the in-vehicle ATP device can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the testing method for the in-vehicle ATP device described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the testing method for the in-vehicle ATP device by any other suitable means (e.g., by means of firmware).
[0098] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0102] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0103] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0104] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0105] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A testing method for an onboard ATP device, characterized in that, include: Obtaining the target test script includes: reading the first test script in the first linked list; determining whether the first test script contains control commands; if the first test script contains control commands, then determining the first test script as the target test script; if the first test script does not contain control commands, then removing the first test script from the first linked list, making the second test script the new first test script, and returning to execute the operation of reading the first test script in the first linked list until the target test script is obtained. The target test script is parsed to obtain at least one control command; wherein the control command contains time information and / or displacement information; The process involves sequentially reading at least one control command and extracting time information and / or displacement information from the read control commands; the sequential reading of at least one control command includes: sorting the at least one control command according to the time information and / or displacement information; storing the sorted at least one control command in a second linked list; and sequentially reading the at least one control command from the second linked list. The control command also includes test content. After extracting the time information and / or displacement information from the read control command, the method further includes: performing structured processing on the time information, displacement information, and test content to obtain a control command with a new data structure; the structured processing includes: loading the time information, displacement information, and test content into a set structure, wherein the set structure is in key-value form, where the key is the time information and displacement information, and the value is the test content; Accordingly, at least one sorted control command is stored in the second linked list, including: storing at least one sorted control command of the new data structure in the second linked list; Based on the time information and / or displacement information, the ATP device is controlled to execute the read control commands in order to test the corresponding functions of the ATP device.
2. The method according to claim 1, characterized in that, Reading the at least one control command sequentially from the second linked list includes: Read the first control command in the second linked list; If the first control command is not executed by the ATP device, then the first control command is read again; If the first control command is executed by the ATP device, the first control command is removed from the second linked list, making the second control command the new first control command, and the operation of reading the first control command from the second linked list is returned until the control command reading from the second linked list is completed.
3. The method according to claim 1 or 2, characterized in that, Based on the time information and / or displacement information, the ATP device is controlled to execute the read control commands, including: If the running time of the ATP device matches the time information and / or the running displacement of the ATP device matches the displacement information, then the ATP device is controlled to execute the read control command.
4. The method according to claim 3, characterized in that, Controlling the ATP device to execute the read control commands includes: Determine whether the ATP device meets the test conditions; If the ATP device meets the test conditions, then control the ATP device to execute the read control command; If the ATP device does not meet the test conditions, an initialization operation is performed on the ATP device to make it meet the test conditions, and the control command is read again.
5. A testing device for a vehicle-mounted ATP (Automatic Train Protection) device, characterized in that, include: The target test script acquisition module is used to acquire the target test script; The target test script acquisition module is also used to: read the first test script in the first linked list; Determine whether the first test script contains control commands; if the first test script contains control commands, then determine the first test script as the target test script. If the first test script does not contain control commands, then the first test script is removed from the first linked list, making the second test script the new first test script, and the operation of reading the first test script in the first linked list is returned until the target test script is obtained. The control command acquisition module is used to parse the target test script to obtain at least one control command; wherein the control command contains time information and / or displacement information; The control command reading module is used to read the at least one control command in sequence and extract the time information and / or displacement information from the read control command. The control command reading module is further configured to: sort the at least one control command according to the time information and / or displacement information; store the sorted at least one control command into a second linked list; and read the at least one control command sequentially from the second linked list. The structuring module is used to: perform structuring processing on the time information, the displacement information, and the test content to obtain control commands for a new data structure; the structuring processing includes: loading the time information, the displacement information, and the test content into a set structure, wherein the set structure is in key-value form, where the key is the time information and the displacement information, and the value is the test content; Accordingly, at least one sorted control command is stored in the second linked list, including: storing at least one sorted control command of the new data structure in the second linked list; The testing module is used to control the ATP device to execute the read control commands based on the time information and / or displacement information, so as to test the corresponding functions of the ATP device.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the test method of the vehicle-mounted ATP device according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the test method for the vehicle-mounted ATP device according to any one of claims 1-4.
Citation Information
Patent Citations
Test script automatic linking method and storage medium
CN109684223A
ATP peripheral equipment simulation method for testing ATP equipment and universal simulator
CN111090949A
Ordered batch test method and system, terminal and storage medium
CN111338964A
