Train route data construction method and electronic device
By constructing an automated method for train route data, the problem of low efficiency in manual operation during trackside ATP system testing is solved, achieving efficient automated testing, reducing human error, and applicable to the construction of train route data for rail transit signaling systems.
Patent Information
- Application Number
- CN202311700511.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-12-12
AI Technical Summary
The route testing of the trackside ATP system requires a lot of manual operation, resulting in low testing efficiency and the risk of human error.
By acquiring the train's raw data, establishing a data mapping and storing it in a data dictionary, generating initial route data, performing data verification and organization, generating target route data, and utilizing an efficient data storage structure to achieve automated testing.
It automates trackside ATP functional testing, reduces manual testing workload, improves testing efficiency, enables 24-hour uninterrupted testing, has strong scalability, and is suitable for automatic testing in multiple control areas.
Smart Images

Figure CN117622274B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail transit signaling technology, and in particular to a method for constructing train route data and an electronic device. Background Technology
[0002] The trackside ATP (Automatic Train Protection) system is a key component of the track signaling system, ensuring the safety and efficiency of train operation. However, due to the complexity of the trackside ATP system, its route testing requires a large amount of manual operation and processing, which is very labor-intensive and may lead to safety risks due to human error.
[0003] Currently, when releasing trackside ATP software, most systems rely on manual SWAT (Software Assessment Test) and regression testing. Since trackside ATP targets dynamic train positions, establishing train routes and verifying related functions are largely done manually. While this achieves the testing objectives, it is inefficient and incurs significant labor costs.
[0004] Therefore, how to construct route data to complete the functional tests related to trackside ATP, reduce human error and improve efficiency is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method for constructing train route data and an electronic device, which reduces human error and improves efficiency during trackside ATP function testing.
[0006] This application provides a method for constructing train route data, including: acquiring raw train data, establishing a data mapping and storing it in a data dictionary; processing the train's path data according to the data dictionary to generate initial route data; performing data verification on the initial route data to generate verified route data; and organizing the verified route data to generate target route data.
[0007] In one embodiment, the train's raw data includes raw equipment data files, interlocking tables, and input / output data tables.
[0008] In one embodiment, the data dictionary is in the form of key-value pairs.
[0009] In one embodiment, the step of acquiring the train's raw data, establishing a data mapping, and storing it in a data dictionary includes: obtaining configuration data corresponding to the train's equipment type; determining the equipment object corresponding to the equipment type based on the configuration data; and storing the equipment type as the key and the equipment object as the value in the data dictionary.
[0010] In one embodiment, the step of processing the train's path data according to the data dictionary to generate initial route data includes: determining the starting device whose equipment type matches the route type; and, starting from the starting device, traversing and searching each path according to the route direction based on the data dictionary to obtain the initial route data.
[0011] In one embodiment, the step of traversing and searching each path according to the route direction based on the data dictionary, starting from the originating device, to obtain initial route data includes:
[0012] In response to the existence of an adjacent device that is adjacent to the starting device and the direction of the adjacent device is the same as that of the starting device, a path is generated with the starting device as the starting point and the adjacent device as the ending point; the adjacent device is taken as the current device and the search continues to obtain at least all paths; the initial path data is obtained according to the data dictionary and the paths.
[0013] In one embodiment, the step of performing data verification on the initial route data to generate verification route data includes: in response to the initial route data being duplicate data, deleting duplicate initial route data to obtain verification route data.
[0014] In one embodiment, the step of performing data verification on the initial route data to generate verification route data includes: in response to the originating device being a virtual signal, deleting the initial route data where the virtual signal is the originating device, and obtaining the verification route data.
[0015] In one embodiment, the step of organizing the verification route data to generate target route data includes: adding data-related attribute elements to the verification route data to obtain the target route data.
[0016] This application also provides an electronic device, which includes: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the above-described train route data construction method.
[0017] The solution provided in the above embodiments of this application utilizes an efficient data storage structure to generate train route data to complete functional tests related to trackside ATP (Automatic Train Protection). Data tests from multiple control areas can be executed simultaneously, which helps to complete tests quickly and reduce test time. Test automation reduces the workload of manual testing and enables 24 / 7 test execution. This allows for the rational allocation of testing work, more efficient use of resources, and automated testing, allowing testers to focus on scenarios unsuitable for automated testing. Furthermore, this solution is highly scalable; a large portion of trackside ATP functionality is route-based, and based on a basic route, it can be extended to automated testing of other functions. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly described below.
[0019] Figure 1 This is a diagram showing the train's position during the ATP automated testing process along the track in the relevant technology.
[0020] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.
[0021] Figure 3 This is a flowchart illustrating a train route data construction method provided in an embodiment of this application;
[0022] Figure 4 This is a diagram of the train equipment data structure provided in the embodiments of this application;
[0023] Figure 5 This is a schematic diagram of a path search method provided in an embodiment of this application. Detailed Implementation
[0024] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0025] Similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0026] As described above, the purpose of this application is to propose a data construction method using an efficient data storage structure to meet the data requirements for automated verification of trackside ATP routes. To achieve this objective, it is necessary to analyze the testing requirements of trackside ATP functions in detail and reorganize the test cases used in manual testing into test cases suitable for automated testing. A detailed analysis of most of the functions of trackside ATP reveals that they are all related to train routes. Therefore, how to use automated scripts to set a train position to meet the testing requirements of most trackside ATP functions during automated trackside ATP testing is a problem that needs to be solved.
[0027] Figure 1This is a train position diagram used in the ATP (Automatic Train Protection) test along the trackside in related technologies. Analysis of subway operating timetables reveals that, currently, whether automated trains are added manually or through timetable-based automation, the starting point for their routes is always in front of the platform or signal. Therefore, when conducting automated train route verification, it is only necessary to automatically place the train in front of the platform or signal using a script.
[0028] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 100 can be used to execute the train route data construction method provided in an embodiment of this application; this electronic device is, for example, an onboard computer. Figure 1 As shown, the electronic device 100 includes: one or more processors 102 and one or more memories 104 storing processor-executable instructions. The processors 102 are configured to execute the train route data construction method provided in the following embodiments of this application.
[0029] The processor 102 may be a gateway, a smart terminal, or a device that includes a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and / or instruction execution capabilities. It can process data from other components in the electronic device 100 and control other components in the electronic device 100 to perform desired functions.
[0030] The memory 104 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may execute the program instructions to implement the train route data construction method described below. Various application programs and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the application programs.
[0031] In one embodiment, Figure 1 The illustrated electronic device 100 may further include an input device 106, an output device 108, and a data acquisition device 110, these components being interconnected via a bus system 112 and / or other forms of connection mechanisms (not shown). It should be noted that... Figure 1 The components and structure of the electronic device 100 shown are merely exemplary and not limiting; the electronic device 100 may also have other components and structures as needed.
[0032] The input device 106 may be a device used by a user to input commands, and may include one or more of a keyboard, mouse, microphone, and touchscreen. The output device 108 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, speaker, etc. The data acquisition device 110 may acquire raw data of the train, etc., and store the acquired data in the memory 104 for use by other components. For example, the data acquisition device 110 may be a camera.
[0033] In one embodiment, the components in the example electronic device 100 used to implement the train route data construction method of the present application embodiment can be integrated or distributed. For example, the processor 102, memory 104, input device 106 and output device 108 can be integrated into one unit, while the data acquisition device 110 can be separated.
[0034] In one embodiment, the example electronic device 100 for implementing the train route data construction method of the present application embodiment can be implemented as a smart terminal such as a smartphone, tablet computer, desktop computer, server, vehicle equipment, etc.
[0035] Figure 3 This is a flowchart illustrating a train route data construction method provided in an embodiment of this application. Figure 3 As shown, the method includes the following steps S210-S240.
[0036] Step S210: Obtain the train's raw data, establish a data mapping, and store it in the data dictionary.
[0037] In one embodiment, the train's raw data includes raw equipment data files, interlocking tables, and input / output data tables, and the data dictionary is in key-value pair format. The process of obtaining the train's raw data, establishing a data mapping, and storing it in the data dictionary specifically includes: obtaining configuration data corresponding to the train's equipment type; determining the equipment object corresponding to the equipment type based on the configuration data; and storing the equipment type as the key and the equipment object as the value in the data dictionary.
[0038] Step S220: Process the train's route data according to the data dictionary to generate initial route data.
[0039] In one embodiment, processing the train path data according to the data dictionary to generate initial route data specifically includes: determining the starting device whose device type matches the route type; using the starting device as the starting point, traversing and searching each path according to the route direction based on the data dictionary to obtain the initial route data. Using the starting device as the starting point, traversing and searching each path according to the route direction based on the data dictionary to obtain the initial route data specifically includes: in response to the existence of an adjacent device adjacent to the starting device, and the direction of the adjacent device being the same as the direction of the starting device, generating a route using the starting device as the starting point and the adjacent device as the ending point; using the adjacent device as the current device, continuing the search to obtain at least all routes; and obtaining the initial route data based on the data dictionary and the routes.
[0040] Step S230: Perform data verification on the initial route data to generate verification route data.
[0041] In one embodiment, the step of verifying the initial route data to generate verification route data specifically includes: in response to the initial route data being duplicated, deleting the duplicate initial route data to obtain verification route data; and in response to the originating device being a virtual signal kiosk, deleting the initial route data where the virtual signal kiosk is the originating device to obtain verification route data.
[0042] Step S240: Organize the verification route data to generate target route data.
[0043] In one embodiment, the step of organizing the verification route data to generate target route data specifically includes: adding data-related attribute elements to the verification route data to obtain the target route data. The target route data is the data required for trackside ATP automated testing.
[0044] The solution provided in the above embodiments of this application utilizes an efficient data storage structure to generate train route data to complete functional tests related to trackside ATP (Automatic Train Protection). Data tests from multiple control areas can be executed simultaneously, which helps to complete tests quickly and reduce test time. Test automation reduces the workload of manual testing and enables 24 / 7 test execution. This allows for the rational allocation of testing work, more efficient use of resources, and automated testing, allowing testers to focus on scenarios unsuitable for automated testing. Furthermore, this solution is highly scalable; a large portion of trackside ATP functionality is route-based, and based on a basic route, it can be extended to automated testing of other functions.
[0045] Regarding the above embodiments, some details still need to be explained, as follows:
[0046] This application also provides a train route data construction device, including: a data input processing module, a search record module, a data verification and checking module, and a data output processing module. This device automatically generates automatic test data for trackside ATP routes.
[0047] The data input processing module is used to acquire the train's raw data, establish data mapping, and store it in the data dictionary.
[0048] The search record module is used to process the train's path data according to the data dictionary to generate initial route data.
[0049] The data verification and checking module is used to verify the initial route data and generate verification route data.
[0050] The data output processing module is used to organize the verification route data and generate the target route data.
[0051] The specific details of each of the above modules are described below:
[0052] 1. Data Input Processing Module
[0053] The system takes raw device data files, interlock tables, I / O (input / output) data tables, etc., as input, parses the input files, saves them to data class objects, preprocesses and checks the input files, and sets up an index table to establish a data mapping between the input files and scripts, storing this mapping in a data dictionary. The raw data described above originates from user-provided basic data.
[0054] The steps to achieve the above include the following:
[0055] By inputting the file path through the configuration file, the system reads the basic information table, interlocking table, I / O data table, and interface information table with neighboring stations for the entire line control area, and saves the parsed data in the data dictionary.
[0056] In the embodiments of the present invention, the dictionary form refers to the key-value pair form. That is, after obtaining the data of each device, the device object data can be stored in the form of a dictionary according to the device type, such as in the form of key-value pairs.
[0057] This is because the data contains information about all the devices along the entire line, and each type of device in the line may have a mapping relationship.
[0058] For example, taking the signal in the data as an example, the signal equipment data information includes ID, control area ID, direction, associated platform, inner section of the route, protection section, etc. It can be seen that there must be a mapping relationship between the signal and the platform, section, etc.
[0059] To enable those skilled in the art to better understand the embodiments of this application, the methods for generating data structures for various devices will be described in detail below. First, the generation of signal controller data structures using the methods of this application's embodiments will be introduced. For example, the signal controller attributes of the original data are represented numerically, which is inconvenient to read and understand. The data structure generated by this application's embodiments uses macro definitions to replace numerical representations, making it easier to read and understand; at the same time, all data in the data structure generated by this application's embodiments is valid data. Furthermore, it should be noted that the data structure can also support different programming languages. Only by modifying the configuration symbol information in the configuration information can the data structure be transformed into different formats to support different programming languages.
[0060] The following describes in detail the process of generating the above signal machine data structure:
[0061] Step 1: Read raw data. First, based on the information about the signal controller in the interlocking table, data table, and I / O table, generate and read the signal controller configuration data.
[0062] Step 2: Define a signal controller class (a class is a term used in object-oriented programming). Based on the signal controller attributes (i.e., signal controller configuration data) provided in the table above, define member variables for the signal controller class. Member variables can be adjusted and added as needed. Methods for manipulating the signal controller class can also be defined.
[0063] Step 3: Add an empty dictionary for the signal type. Use "signal" as the key. Store all subsequently generated signal objects in this dictionary with "signal" as the key. This allows you to search by key-value pair; all signal objects can be found using the keyword "signal". All signal objects are also stored in a dictionary format.
[0064] Step 4: Iterate through the signal list in the table above, instantiating the signal class into individual signal objects. The set of signal objects is also stored in dictionary format, with the ID of each signal object as the key, and each signal object stored as a whole in a dictionary with "signal" as the key.
[0065] Step 5: Fill in the signal configuration information according to the required route data structure. This configuration information only uses symbols and variables. The variable "signal" is the signal keyword from Step 3. "index," "id," and "mcu_id" are member variables of the signal class. Route data generally has fixed format requirements, such as route ID, starting device ID and coordinates, ending device ID and coordinates, and route direction. Therefore, the signal configuration information includes the signal ID, coordinates, and signal direction.
[0066] Step 6: Write the list of data structures generated in Step 5 into a file line by line. By following these six steps, the signal controller data structure can be generated.
[0067] Figure 4 This is a data structure diagram of train equipment provided in the embodiments of this application. It can be understood that the data structures for track sections, routes, axle counting sections, turnouts, platforms, etc., generated by the method in these embodiments are similar to those for signals. Only the corresponding equipment object sets need to be traversed; joint lookups of multiple equipment object sets are not involved. This can basically meet the requirements for generating trackside ATP routes. The line information is indexed by ID and equipment name to establish data mappings between input files and logical relationships between devices. The data objects after data mapping are stored in a data dictionary. For details, please refer to... Figure 4 .
[0068] 2. Search History Module
[0069] Figure 5 This is a schematic diagram of a route search method provided in an embodiment of this application. The method involves processing path data, checking the kilometer markers at the start and end points of the path, searching for trackside elements, and establishing the topological relationships between these trackside elements. Devices along the path are then matched to determine their adjacent devices.
[0070] When generating a route, a starting device whose device type matches the route type is identified. For the mapping relationship on the path, starting from the starting device, a forward chain reasoning method is used to traverse and search each path according to the route direction. The following criteria are used to determine whether the starting device is adjacent to another device: starting from the starting device, determine the current path's upstream, check if there is an adjacent device ahead, and whether the direction of the preceding device is the same as the direction of the starting device. If the above conditions are met, a route is generated with the starting device as the starting point and the preceding adjacent device as the endpoint. This route data includes information such as the route's starting point, direction, and endpoint. Then, its adjacent devices are used as the current devices, and the search continues.
[0071] 3. Data verification module
[0072] The data verification module checks the route data for unsuitable or duplicate data, and deletes any unsuitable or duplicate data. Unsuitable data refers to situations where certain system requirements dictate that specific signals cannot be used as the starting point.
[0073] Check whether the starting signal is a physical signal or a virtual signal. A virtual signal cannot be used as the starting point of a route, so delete the data.
[0074] 4. Data output processing module
[0075] The verified route data is then organized and written to a file. Data organization includes adding relevant attribute elements, such as the signal ID, whether the signal is a physical or virtual signal, and which control zone the signal belongs to. Track attributes and turnout attributes along the route are also included.
[0076] Based on the attributes of the starting element (such as the starting signal), determine whether the signal is a section signal or an interlocking signal.
[0077] If the starting point is a section signal, add track element attributes inside the route based on the track information associated with the signal.
[0078] If it is an interlocking signal, you need to add the associated MB (Moving Block) route of the signal, and add information such as the associated turnout, protection turnout, and special conditions based on the associated MB route.
[0079] Based on terminal elements (such as terminal signals), add associated platform, platform screen door, emergency stop button information, route protection section, safety protection point and other information.
[0080] The devices, methods, and apparatuses disclosed in the several embodiments provided in this application can also be implemented in other ways. The device and method embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0081] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0082] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
Claims
1. A method for constructing train route data, characterized in that, include: Obtain the train's raw data, establish a data mapping, and store it in the data dictionary; Based on the data dictionary, the train's route data is processed to generate initial route data; Perform data verification on the initial route data to generate verification route data; Organize the verification route data to generate target route data; The process of acquiring the train's raw data, establishing a data mapping, and storing it in a data dictionary includes: Based on the train's equipment type, obtain the configuration data corresponding to the equipment type; Based on the configuration data, determine the device object corresponding to the device type; Store the device type as the key and the device object as the value in the data dictionary; The step of processing the train's route data according to the data dictionary to generate initial route data includes: Identify the starting equipment that matches the equipment type with the route type; Starting from the originating device, each path is traversed and searched according to the data dictionary and the route direction to obtain the initial route data. The step of performing data verification on the initial route data to generate verification route data includes: In response to the fact that the originating device is a virtual signal, the initial approach data of the virtual signal as the originating device is deleted, and the verification approach data is obtained.
2. The train route data construction method according to claim 1, characterized in that, The train's raw data includes raw equipment data files, interlocking tables, and input / output data tables.
3. The train route data construction method according to claim 2, characterized in that, The data dictionary is in the form of key-value pairs.
4. The train route data construction method according to claim 1, characterized in that, Starting from the originating device, the initial route data is obtained by traversing and searching each path according to the route direction based on the data dictionary, including: In response to the existence of an adjacent device that is adjacent to the starting device and the direction of the adjacent device is the same as that of the starting device, a path is generated with the starting device as the starting point and the adjacent device as the ending point. The adjacent device is used as the current device to continue the search, at least all paths are obtained; Based on the data dictionary and the route, the initial route data is obtained.
5. The train route data construction method according to claim 1, characterized in that, The step of performing data verification on the initial route data to generate verification route data includes: In response to the initial route data being duplicated, the duplicate initial route data is deleted, and the verification route data is obtained.
6. The train route data construction method according to claim 1, characterized in that, The step of organizing the verification route data to generate target route data includes: Add data-related attribute elements to the verification route data to obtain the target route data.
7. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor is configured to execute the train route data construction method according to any one of claims 1-6.
Citation Information
Patent Citations
Script parsing method used for automatic interlocking-software testing platform system
CN103885879A
Automatic test script generation system and method based on train control engineering data
CN108170124A