Simulation method and device of interlocking system, equipment and storage medium

By calling the receiving command interface and protocol conversion components on the simulation platform of the interlocking system, the target board command message is converted into a single-frame command combination message and sent to the board simulation system, which solves the problem of complex interlocking system testing logic in the existing technology and realizes efficient simulation of the interlocking system based on VxWorks.

CN119903642APending Publication Date: 2025-04-29BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853583.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the prior art, the interlocking system based on VxWorks has complex testing logic, which is not conducive to the development and testing of application logic, and lacks effective simulation methods.

Method used

By calling the receiving command interface on the simulation platform, the target board command message is placed into the VxWorks task structure, and the protocol conversion component is used to convert and integrate according to the device mapping relationship table, forming a single-frame command combination message, and issuing it to the board simulation system for control and simulation.

Benefits of technology

It realizes the simulation of VxWorks-based interlocking systems in a complex simulation environment, simplifies the development and testing process and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903642A_ABST
    Figure CN119903642A_ABST
Patent Text Reader

Abstract

The invention provides a simulation method, device and equipment of an interlocking system and a storage medium, and relates to the technical field of railway signals.The method is applied to a simulation platform in a simulation system of the interlocking system, and the simulation system comprises the simulation platform and a board card simulation system. The basic application layer of the simulation platform runs in a simulation environment of a computing board card or a virtual board card. The method comprises the following steps of: putting at least two target board card command messages into a first VxWorks task structure body, and converting and integrating the target board card command messages according to an equipment mapping relation table to obtain converted and integrated single-frame command combined messages; the converted and integrated single-frame command combination message is issued to a board card simulation system; and receiving and processing board card simulation data, wherein the simulation data comprises the state data of each device. According to the invention, simulation of the interlocking system based on VxWorks is realized without a complex simulation environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of railway signal technology, and in particular to a simulation method, device, equipment and storage medium for an interlocking system. Background Art

[0002] An interlocking system is a safety system, usually used in rail or road traffic, that ensures that vehicles do not collide with other vehicles or pedestrians when passing through intersections or entering specific areas. This system controls traffic flow through lights, barriers or other barriers to prevent accidents.

[0003] In the prior art, as a high-reliability system, the interlocking system uses VxWorks as its operating system to ensure the reliability and stability of the system to the greatest extent. However, the development of the interlocking system on the VxWorks real-time operating system is limited by the fact that the interlocking system is implemented using a two-by-two-out-of-two platform, which results in complex test logic for the interlocking system after application data development, which is not conducive to the development and testing of application logic.

[0004] Therefore, how to simulate the interlocking system based on VxWorks has become a technical problem that needs to be solved urgently in the industry. Summary of the invention

[0005] The present invention provides a simulation method, device, equipment and storage medium for an interlocking system, which realizes the simulation of the interlocking system based on VxWorks without a complicated simulation environment.

[0006] In a first aspect, the present invention provides a simulation method for an interlocking system, which is applied to a simulation platform in a simulation system of the interlocking system, wherein the simulation system of the interlocking system comprises: the simulation platform and a board simulation system, wherein the simulation platform comprises a basic application layer, wherein the basic application layer runs in a computing board or a virtual board simulation environment, wherein the simulation platform is connected to the board simulation system, and wherein the method comprises the following steps: Using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Receive board card simulation data and process the board card simulation data; the board card simulation data is obtained after the board card simulation system performs simulation operation on the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains simulation data of each of the devices.

[0007] According to a simulation method for an interlocking system provided by the present invention, the calling of the receiving command interface of the simulation platform to put all the command messages of at least two target boards into the first VxWorks task structure includes: Calling the command receiving interface to receive the target board command message, and storing the target board command message in the first message queue; Sequentially taking out each of the target board command messages from the first message queue, performing multi-board protocol conversion on each of the target board command messages, and obtaining converted target board command messages; The converted target board command messages are parsed and placed in the first VxWorks task structure.

[0008] According to a simulation method of an interlocking system provided by the present invention, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message, including: Traversing the pointers of the target board command messages in the first VxWorks task structure through the target interface function; According to the pointer of each target board command message and the preset device mapping relationship table, each target board command message is converted and integrated to obtain the converted and integrated single-frame command combination message.

[0009] According to a simulation method for an interlocking system provided by the present invention, the board simulation data is a single-frame status message; the receiving board simulation data includes: Receiving the single-frame status message according to the provisions of the transmission control protocol and / or the Internet protocol; Put the single-frame status message into the second message queue.

[0010] According to a simulation method for an interlocking system provided by the present invention, the processing of the board simulation data includes: When it is determined that there is data in the second message queue, taking out the latest single-frame status message from the second message queue; According to the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code bit sequence to obtain the device status corresponding to the latest single-frame status message; The device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure; Utilizing the basic application layer, and obtaining the device status corresponding to the latest single-frame status message in each of the second VxWorks task structures through an interface function between the application and the simulation platform; Clearing the latest single-frame status message in the second message queue to obtain an updated second message queue; The corresponding latest single-frame status message is taken out again from the updated second message queue within a fixed period until the processing time reaches the time of the fixed period.

[0011] According to a simulation method for an interlocking system provided by the present invention, the task corresponding to receiving the board card simulation data and the task corresponding to the board card simulation data are two independent tasks, and the priorities of the two independent tasks are controlled based on the simulation platform.

[0012] In a second aspect, the present invention further provides a simulation device for an interlocking system, which is applied to a simulation platform in a simulation system of the interlocking system, wherein the simulation system of the interlocking system comprises: the simulation platform and a board simulation system, wherein the simulation platform comprises a basic application layer, wherein the basic application layer runs in a computing board or a virtual board simulation environment, wherein the simulation platform is connected to the board simulation system, and wherein the device comprises the following modules: The instruction issuing module is used to utilize the basic application layer to call the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; The data simulation module is used to receive board simulation data and process the board simulation data; the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains the simulation data of each device.

[0013] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a simulation method for an interlocking system as described above is implemented.

[0014] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a simulation method for an interlocking system as described in any one of the above.

[0015] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the simulation method of the interlocking system as described in any one of the above is implemented.

[0016] The simulation method, device, equipment and storage medium of the interlocking system provided by the present invention are applied to a simulation platform in the simulation system of the interlocking system. The simulation system of the interlocking system includes: a simulation platform and a board simulation system. The simulation platform includes a basic application layer. The basic application layer runs in a computing board or a virtual board simulation environment. The simulation platform is connected to the board simulation system. First, using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into a first VxWorks task structure, wherein the target board command message is a single-frame command message; then, using a protocol conversion component, according to a preset device mapping relationship table, each target board command message is converted and integrated to obtain a converted and integrated single-frame command combination message; then, the converted and integrated single-frame command combination message is sent to the board simulation system, wherein the board simulation system is used to control and simulate each device; then, the board simulation data is received and processed, wherein the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains the status data of each device.

[0017] In the present invention, since the basic application layer of the simulation platform runs in a computing board or a virtual board simulation environment, the basic application can be quickly debugged in a separate virtual environment without the need for a complex simulation environment. First, at least two target board command messages are all placed in a first VxWorks task structure, and then the target board command messages are converted and integrated to obtain a converted and integrated single-frame command combination message, and then the board simulation data is received and processed. The present invention realizes the simulation of an interlocking system based on VxWorks without the need for a complex simulation environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is one of the flow charts of the simulation method of the interlocking system provided by the present invention.

[0020] Figure 2 It is a software architecture diagram of the simulation system of the interlocking system provided by the present invention.

[0021] Figure 3 This is the second flow chart of the simulation method of the interlocking system provided by the present invention.

[0022] Figure 4 This is the third flow chart of the simulation method of the interlocking system provided by the present invention.

[0023] Figure 5 This is the fourth flow chart of the simulation method of the interlocking system provided by the present invention.

[0024] Figure 6 This is the fifth flow chart of the simulation method of the interlocking system provided by the present invention.

[0025] Figure 7 It is a schematic diagram of the security synchronization platform architecture in the prior art.

[0026] Figure 8 It is a structural schematic diagram of the simulation device of the interlocking system provided by the present invention.

[0027] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Combine the following Figure 1-Figure 9 The present invention describes the simulation method, device, equipment and storage medium of the interlocking system.

[0030] Figure 1 It is one of the flow diagrams of the simulation method of the interlocking system provided by the present invention. The method is applied to the simulation platform in the simulation system of the interlocking system. The simulation system of the interlocking system includes: a simulation platform and a board simulation system. The simulation platform includes a basic application layer. The basic application layer runs in a computing board or a virtual board simulation environment. The simulation platform is connected to the board simulation system, such as Figure 1 As shown, the method includes the following: Step 101: using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Specifically, the execution subject of this embodiment is a simulation platform in the simulation system of the interlocking system. The simulation system of the interlocking system includes: a simulation platform and a board simulation system. The simulation platform includes a basic application layer. The basic application layer runs in a computing board or a virtual board simulation environment. The simulation platform is connected to the board simulation system. Figure 2 is a software architecture diagram of the simulation system of the interlocking system provided by the present invention, such as Figure 2 As shown, the simulation platform runs in the Vxworks virtual board simulation environment, and the simulation platform is connected to the board simulation system, wherein the simulation platform is used to implement protocol unpacking, conversion, assembly, software operation cycle control, Transmission Control Protocol / Internet Protocol (TCP / IP) communication, Vxworks message queue processing, interface call; turnout control, status transmission; the board simulation system is used to implement signal control, status transmission; input board status transmission; output board control, status transmission, etc. Optionally, the simulation system of the interlocking system also includes a logical application layer ④A1, which is used to implement route arrangement, route unlocking, turnout control, and signal control. As can be seen in the software architecture diagram, the basic application layer, as a component of the simulation platform, runs together with the simulation platform on the computing board or VxWorks virtual simulation environment, and is connected to the board simulation system through the network.

[0031] In the simulation method of the interlocking system provided in this embodiment, in the instruction issuing stage, the basic application layer is first used to call the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure, wherein the target board command message is a single-frame command message, that is, the basic application layer is used to call the receiving command interface of the simulation platform to put all the board commands into the VxWorks task structure.

[0032] Step 102: using the protocol conversion component, convert and integrate the command messages of each target board card according to the preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Specifically, it can be understood that the target board command message is the board command message that is originally obtained and needs to be converted and integrated. The preset device mapping relationship table includes the device information of multiple board command messages and the channel information corresponding to each board command message. The multiple board command messages are multiple board command messages preset according to the business scenario, and the preset device mapping table can be updated and maintained according to actual needs. It should be noted that the multiple board command messages include the target board command message, so the target board command message can be converted and integrated through the preset device mapping relationship table.

[0033] For example, the preset device mapping relationship table is as shown in Table 1 below, where each record in Table 1 represents a board command message: Table 1:

[0034] As can be seen from the table above, the order of each type of equipment is increasing. The board number defines the board to which the equipment belongs, and the channel information defines the position of the equipment on the board. The turnout board is a dual-channel board, and the number defines the channel order. When the number is 3, the dual-channel equipment needs to act at the same time. The signal board has 8 channels, and the value indicates the color of the signal light connected to each channel. For example, 0x00002135 means that the 8-5 light is not connected, and 2135 represents the color of the 4-1 channel connection light.

[0035] After placing all the target board command messages into the first VxWorks task structure, the simulation platform converts and integrates the board commands within the fixed period to form a converted and integrated single-frame command combination message (i.e., a single-frame instruction message). The format of the target board command message stored in the first VxWorks task structure is shown in Table 2 below: Table 2:

[0036] The converted and integrated single-frame command combination message obtained after the mapping relationship is a collection of the entire system signal device instructions, and the specific form is as shown in Table 3: Table 3:

[0037] Step 103: Send the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Specifically, after the converted and integrated single-frame command combination message is obtained, the simulation platform sends the converted and integrated single-frame command combination message to the board simulation system through the network, that is, the set of the entire system signal device instructions is sent to the board simulation system through the single-frame parsing protocol. Among them, the board simulation system is used to control and simulate various devices, for example, Figure 2 As shown, the board simulation system is used to realize signal machine control, status transmission; input board status transmission; output board control, status transmission, etc.

[0038] Step 104, receiving and processing the board card simulation data; the board card simulation data is obtained after the board card simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains the status data of each device.

[0039] Specifically, the board simulation system (Server) sends the board simulation data to the simulation platform through the network. The simulation platform converts the board simulation data into a single board state according to the mapping relationship in Table 1, and stores the state in the corresponding structure. The basic application retrieves the board data at one time through the interface. After each cycle is completed, the simulation platform clears the structure array to realize the reception and data processing of the board simulation data.

[0040] The method provided in this embodiment is applied to a simulation platform in a simulation system of an interlocking system. The simulation system of the interlocking system includes: a simulation platform and a board simulation system. The simulation platform includes a basic application layer. The basic application layer runs in a computing board or a virtual board simulation environment. The simulation platform is connected to the board simulation system. First, using the basic application layer, the simulation platform's command receiving interface is called to put at least two target board command messages into a first VxWorks task structure, wherein the target board command message is a single-frame command message; then, using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; then, the converted and integrated single-frame command combination message is sent to the board simulation system, wherein the board simulation system is used to control and simulate each device; then, the board simulation data is received and processed, wherein the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains status data of each device.

[0041] In the present invention, since the basic application layer of the simulation platform runs in a computing board or a virtual board simulation environment, the basic application can be quickly debugged in a separate virtual environment without the need for a complex simulation environment. First, at least two target board command messages are all placed in a first VxWorks task structure, and then the target board command messages are converted and integrated to obtain a converted and integrated single-frame command combination message, and then the board simulation data is received and processed. The present invention realizes the simulation of an interlocking system based on VxWorks without the need for a complex simulation environment.

[0042] According to a simulation method of an interlocking system provided by the present invention, calling a receiving command interface of a simulation platform to put all command messages of at least two target boards into a first VxWorks task structure includes: Calling a command receiving interface to receive command messages from each target board, and storing the command messages from each target board in a first message queue; Sequentially taking out each target board command message from the first message queue, performing multi-board protocol conversion on each target board command message, and obtaining each converted target board command message; The converted target board command messages are parsed and placed in the first VxWorks task structure.

[0043] Specifically, in some embodiments, the process of calling the receiving command interface of the simulation platform in step 101 to put all the command messages of at least two target boards into the first VxWorks task structure can be implemented by the following steps, including: First, the command receiving interface of the simulation platform is called to receive command messages of each target board, and each target board command message is stored in a first message queue, that is, command reception is implemented using a message queue.

[0044] Among them, a message queue is a communication method between applications that is used to store and forward messages. It allows applications to exchange data asynchronously, which helps improve the responsiveness and scalability of applications. The following are some key features and uses of message queues: Decoupling: Message queues allow producers (applications that send messages) and consumers (applications that receive messages) to exchange data without communicating directly, thus reducing the dependencies between them.

[0045] Asynchronous communication: Producers can send messages without having to wait for consumers to complete processing. Similarly, consumers can process messages at their own pace without having to synchronize with producers.

[0046] Buffering: Message queues can act as buffers, storing messages generated during times of high load until the system is able to process them.

[0047] Reliability: Many message queue implementations provide message persistence, ensuring that messages are not lost even after a system failure.

[0048] Scalability: Processing capacity can be easily scaled to handle increased message loads by adding more consumers.

[0049] Flexibility: Message queues support multiple messaging modes, such as point-to-point (one-to-one), publish / subscribe (one-to-many), etc. Multiple protocol support: Supports multiple communication protocols, such as AMQP (Advanced Message Queuing Protocol), MQTT (Message Queuing Telemetry Transport), etc.

[0050] Common message queue technologies include but are not limited to: RabbitMQ: An open source message broker that supports multiple messaging protocols.

[0051] Apache Kafka: A distributed stream processing platform for building real-time data pipelines and streaming applications.

[0052] ActiveMQ: A popular open source messaging server.

[0053] Amazon SQS: A fully managed queue service provided by Amazon.

[0054] Azure Service Bus: A cloud message queue service provided by Microsoft.

[0055] Message queues play a very important role in scenarios such as task scheduling, log collection, event-driven architecture, and inter-service communication in microservice architecture. In this embodiment, each target board command message is stored in the first message queue to facilitate subsequent protocol conversion and integration of the first board command.

[0056] Furthermore, each target board card command message is sequentially taken out from the first message queue, and a multi-board protocol conversion is performed on each target board card command message to obtain a converted target board card command message; then, each converted target board card command message is parsed and placed in the first VxWorks task structure, wherein the pointer to each converted target board card command message serves as an interface parameter between the simulation platform and the application, and can be obtained through the interface function between the application and the simulation platform.

[0057] It should be noted that VxWorks is a real-time operating system that uses tasks as its basic unit of execution. Each task has its own priority, stack space, and CPU register set. Tasks can be in multiple states, including ready, dormant, delayed, suspended, and running. Task creation can be achieved through the taskSpawn() function, which requires parameters such as task name, priority, options, stack size, and entry function. VxWorks task structures such as Task Control Block (TCB) are key data structures for managing tasks in VxWorks.

[0058] The method provided in this embodiment firstly calls the command receiving interface to receive the command messages of each target board card, and stores the command messages of each target board card in the first message queue; then, sequentially takes out the command messages of each target board card from the first message queue, performs multi-board protocol conversion on the command messages of each target board card, and obtains the converted command messages of each target board card; then, the converted command messages of each target board card are parsed and placed in the first VxWorks task structure, wherein the pointers of the converted command messages of each target board card are used as interface parameters with the application, and can be obtained through the interface function between the application and the simulation platform. In the present invention, the task structure of VxWorks is used to realize the reception of commands and protocol conversion, so that the basic application can be quickly debugged in a separate virtual environment without the need for a complex simulation environment.

[0059] According to a simulation method of an interlocking system provided by the present invention, each target board command message is converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message, including: Traverse the pointers of each target board command message in the first VxWorks task structure through the target interface function; According to the pointer of each target board command message and the preset device mapping relationship table, each target board command message is converted and integrated to obtain a converted and integrated single-frame command combination message.

[0060] Specifically, in some embodiments, the specific process of converting and integrating the target board command messages according to the preset device mapping relationship table to obtain the converted and integrated single-frame command combination message can be implemented by the following steps, including: First, the pointers of each target board command message in the first VxWorks task structure are traversed through the target interface function (that is, the interface function between the application and the simulation platform). It can be understood that each target board command message is stored in the first VxWorks task structure, and each message target board command message pointer can be used to be called. The pointers of each target board command message are traversed, and further, according to the pointers of each target board command message and the preset device mapping relationship table, each target board command message is converted and integrated to obtain a converted and integrated single-frame command combination message. Among them, the format of the target board command message stored in the first VxWorks task structure is shown in Table 2 above, and the preset device mapping relationship is shown in Table 1. Among them, the format example of the converted and integrated single-frame command combination message after conversion and integration is shown in Table 3.

[0061] The method provided in this embodiment firstly traverses the pointers of each target board command message in the first VxWorks task structure through the interface function between the application and the simulation platform; then, according to the pointers of each target board command message and the preset device mapping relationship table, the target board command message is converted and integrated to obtain a converted and integrated single-frame command combination message. The present invention solves the problem that the actual number of devices must be configured for interlocking calculations before debugging through the single-frame parsing function of the simulation platform, so that the basic application layer development environment can be easily built. It is convenient to realize the simultaneous development of multiple projects.

[0062] Figure 3 FIG. 2 is a flow chart of the simulation method of the interlocking system provided by the present invention, which shows the instruction issuing process of the simulation platform. Figure 3 As shown, the method includes: Step 301: The basic application layer calls the simulation platform to receive a command interface.

[0063] Step 302: Put all single board commands into the VxWorks task structure.

[0064] Step 303: Determine whether the number of boards is less than the maximum number.

[0065] If the result of step 303 is yes, execute step 304; If the execution result of step 303 is no, execute step 305; Step 304: Generate a single-frame message.

[0066] Step 305: Merge single-frame messages.

[0067] Step 306: Send the merged message to the board simulation system.

[0068] According to a simulation method for an interlocking system provided by the present invention, the board simulation data is a single-frame status message; receiving the board simulation data includes: receiving a single-frame status message as specified by the Transmission Control Protocol and / or the Internet Protocol; Put the single-frame status message into the second message queue.

[0069] Specifically, it should be noted that the board simulation data is a single-frame status message. Correspondingly, in some embodiments, the process of receiving the board simulation data in step 104 can be implemented by the following steps, including: It should be noted that TCP and IP are the two core protocols that form the foundation of the Internet. They work together to enable data to be transmitted between different devices in the network. Internet Protocol (IP): IP is a network layer protocol responsible for sending data packets between devices in the network. It uses IP addresses to identify each device on the network. The IP protocol is unreliable, meaning it does not guarantee the order, integrity, or reliability of data packets. If these features are required, they must be provided by upper layer protocols such as TCP.

[0070] Transmission Control Protocol (TCP): TCP is a transport layer protocol that works on top of the IP protocol and provides reliable byte stream services for applications. TCP ensures the order, integrity, and reliability of data. It establishes a connection through a three-way handshake, uses sequence numbers and confirmation mechanisms to ensure the order and integrity of data, and handles lost data packets through timeout and retransmission mechanisms.

[0071] In practical applications, TCP and IP are often used together to form the so-called TCP / IP protocol stack. This protocol stack defines how data is transmitted in the network, including data encapsulation, address resolution, routing, error detection and correction, etc. When you browse the web, send emails, or use any network services, your devices are using the TCP / IP protocol stack to send and receive data.

[0072] First, a single-frame status message is received according to the provisions of the transmission control protocol and / or the Internet protocol. The single-frame status message is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message. The board simulation data contains the status data of each device.

[0073] Furthermore, the received single-frame status message is put into the second message queue. The single-frame status message stored in the second message queue is used for subsequent data simulation processing by the simulation platform.

[0074] For example, Figure 4 FIG. 3 is a flow chart of the simulation method of the interlocking system provided by the present invention. Figure 4As shown in the figure, the process of receiving board simulation data is as follows: Step 401: Receive a single-frame status message of a simulation platform via TCP / IP.

[0075] Step 402: Put the message into the second message queue.

[0076] The method provided in this embodiment, first, receives a single-frame status message according to the provisions of the transmission control protocol and / or the Internet protocol, and puts the single-frame status message into the second message queue, thereby realizing the reception of board simulation data, facilitating the subsequent data simulation processing in the computing board or VxWorks virtual simulation environment, and realizing the simulation of the VxWorks-based interlocking system without the need for a complex simulation environment.

[0077] According to a simulation method of an interlocking system provided by the present invention, processing board simulation data includes: When it is determined that there is data in the second message queue, taking out the latest single-frame status message from the second message queue; According to the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code bit sequence to obtain the device status corresponding to the latest single-frame status message; The device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure; Using the basic application layer, the device status corresponding to the latest single-frame status message in each second VxWorks task structure is obtained through the interface function between the application and the simulation platform; Clear the latest single-frame status message in the second message queue to obtain an updated second message queue; The corresponding latest single-frame status message is taken out from the updated second message queue again within the fixed period until the processing time reaches the duration of the fixed period.

[0078] Specifically, in some embodiments, the process of processing simulation data in step 104 can be implemented by the following steps, including: First, a data processing task is established in the VxWorks operation. The specific implementation example of the data processing task is as follows: First, it is determined whether there is data in the second message queue. It is understandable that the second message queue stores single-frame status messages. When it is determined that there is data in the second message queue, the latest data, that is, the latest single-frame status message, is taken out from the second message queue.

[0079] Furthermore, based on the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code sequence to obtain the device status corresponding to the latest single-frame status message. That is, when processing data, it is necessary to match the single-frame status message with the corresponding device, so as to perform corresponding status processing of the corresponding device.

[0080] Further, for example, the device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure.

[0081] Furthermore, the basic application layer is used to obtain the device status corresponding to the latest single-frame status message in each second VxWorks task structure through the interface function between the application and the simulation platform, and the latest single-frame status message in the second message queue is cleared to obtain the updated second message queue. At this point, the data simulation corresponding to the single-frame status message is completed.

[0082] By analogy, the corresponding latest single-frame status message is taken out from the updated second message queue again within a fixed period, and the processing process of the single-frame status message is similar to the processing process of the latest single-frame message mentioned above, which will not be repeated here, until the processing time reaches the length of the fixed period. In other words, the cycle control technology used effectively simulates the cycle operation and ensures the same debugging effect as the real environment.

[0083] For example, Figure 5 FIG. 4 is a flow chart of the simulation method of the interlocking system provided by the present invention. Figure 5 As shown in Figure 2, the process of processing simulation data includes: Step 501: Processing data in the second message queue.

[0084] Step 502: Determine whether there is data in the second message queue.

[0085] If the result of step 502 is yes, execute step 503; If the execution result of step 502 is no, execute step 506; Step 503: Get the latest single-frame status message.

[0086] Step 504: parse the frame status message in the second message queue, and process each device status according to the device code bit sequence.

[0087] Step 505: Store into the task structure according to the board number.

[0088] Step 506: The basic application calls the interface to obtain data, clears the message queue, returns after a fixed period, and continues execution.

[0089] Figure 6 FIG. 5 is a flow chart of the simulation method of the interlocking system provided by the present invention. Figure 5 As shown, the simulation platform periodic operation process example is as follows: Step 601: The main process loads the simulation platform initialization data.

[0090] Step 602: Create a task for receiving data.

[0091] Step 603: Determine the super-period limit of the basic application task.

[0092] If the result of step 603 is yes, execute step 604; If the execution result of step 603 is no, execute step 601; Step 604: Terminate the task.

[0093] Step 605: Record basic application computing time.

[0094] Step 606: Create a basic application task and jump after reaching a fixed period.

[0095] The method provided in this embodiment firstly takes out the latest single-frame status message from the second message queue when it is determined that there is data in the second message queue; then, according to the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code sequence to obtain the device status corresponding to the latest single-frame status message; the device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure; the basic application layer is used to obtain the device status corresponding to the latest single-frame status message in each second VxWorks task structure through the interface function between the application and the simulation platform; and then, the latest single-frame status message in the second message queue is cleared to obtain the updated second message queue. In this embodiment, the periodic control technology is used to effectively simulate the periodic operation, ensuring the same debugging effect as the real environment.

[0096] According to a simulation method for an interlocking system provided by the present invention, the task corresponding to the processing of the receiving board simulation data and the task corresponding to the board simulation data are two independent tasks, and the priorities of the two independent tasks are controlled based on the simulation platform.

[0097] Specifically, in some embodiments, the task corresponding to the receiving board simulation data processing and the task corresponding to the board simulation data are two independent tasks, that is, the two tasks are in different threads, and the priorities of the two independent tasks are controlled based on the simulation platform.

[0098] For example, two VxWorks tasks are used to receive board simulation data and process board simulation data, and the task priority is controlled by the simulation platform. Among them, the data receiving task uses the second message queue provided by VxWorks to store data. The data processing task takes out the latest data in the second message queue, decomposes it, and after the parsing is completed, the second message queue is cleared, and the simulation platform main process generates a new data processing task according to a fixed period.

[0099] In the method provided in this embodiment, the task corresponding to the board simulation data processing and the task corresponding to the board simulation data are two independent tasks, and the priorities of the two independent tasks are controlled based on the simulation platform. This has the advantage of high efficiency in task processing.

[0100] Figure 7 It is a schematic diagram of the security synchronization platform architecture in the prior art, such as Figure 7 As shown, it includes basic service layer, logic application layer, security layer, communication interface layer, and interlocking equipment layer. The basic service layer is used for alarm log, operation log, and system self-check; the logic application layer is used for route arrangement, route unlocking, turnout control, and signal control; the security layer is used for intra-system instructions, status, and task synchronization voting; inter-system voting, reconstruction, and switching; data analysis and processing; protocol unpacking and assembly; the communication interface layer is used for connection status; automatic connection; message sending; message receiving; TCP / IP protocol stack; interlocking equipment layer Used for turnout control and status transmission; signal control and status transmission; input board status transmission; output board control and status transmission, etc.

[0101] Under this architecture, the operation of the basic application layer must complete the synchronous voting of the security platform before it can run downward. This figure shows that under the security synchronization platform architecture, if the basic application layer is debugged, at least two computing boards must be used, and synchronous comparison operations must be performed. There are many restrictions on the logic operation test of the basic application layer, which is inconvenient for the development of the basic application layer software.

[0102] However, the simulation platform in the present invention can realize the development and debugging of the basic application layer using a computing board or a virtual simulation environment, which provides strong support for the development of the interlocking basic application layer.

[0103] The single-frame parsing function of the simulation platform solves the problem of having to configure an actual number of devices for interlocking calculations before debugging, making it easy to build a basic application layer development environment. This facilitates the simultaneous development of multiple projects. The simulation device for the interlocking system provided by the present invention is described below. The simulation device for the interlocking system described below and the simulation method for the interlocking system described above can be referenced to each other.

[0104] Figure 8: is a structural schematic diagram of a simulation device for an interlocking system provided by the present invention, the device is applied to a simulation platform in a simulation system of an interlocking system, the simulation system of the interlocking system comprises: the simulation platform and a board simulation system, the simulation platform comprises a basic application layer, the basic application layer runs in a computing board or a virtual board simulation environment, the simulation platform is connected to the board simulation system, and the simulation device 800 of the interlocking system comprises the following modules: The instruction issuing module 810 is used to use the basic application layer to call the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; The data simulation module 820 is used to receive board simulation data and process the board simulation data; the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains the simulation data of each of the devices.

[0105] The device provided in this embodiment is applied to a simulation platform in a simulation system of an interlocking system. The simulation system of the interlocking system includes: a simulation platform and a board simulation system. The simulation platform includes a basic application layer. The basic application layer runs in a computing board or a virtual board simulation environment. The simulation platform is connected to the board simulation system. First, the instruction issuing module 810 is used to utilize the basic application layer to call the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure, wherein the target board command message is a single-frame command message; then, the protocol conversion component is used to convert and integrate the target board command messages according to the preset device mapping relationship table to obtain the converted and integrated single-frame command combination message; then, the converted and integrated single-frame command combination message is issued to the board simulation system, wherein the board simulation system is used to control and simulate each device; further, the data simulation module 820 is used to receive the board simulation data and process the board simulation data, wherein the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains the status data of each device.

[0106] In the present invention, since the basic application layer of the simulation platform runs in a computing board or a virtual board simulation environment, the basic application can be quickly debugged in a separate virtual environment without the need for a complex simulation environment. First, at least two target board command messages are all placed in a first VxWorks task structure, and then the target board command messages are converted and integrated to obtain a converted and integrated single-frame command combination message, and then the board simulation data is received and processed. The present invention realizes the simulation of an interlocking system based on VxWorks without the need for a complex simulation environment.

[0107] According to a simulation device 800 of an interlocking system provided by the present invention, the instruction issuing module 810 is specifically used for: Calling the command receiving interface to receive the target board command message, and storing the target board command message in the first message queue; Sequentially taking out each of the target board command messages from the first message queue, performing multi-board protocol conversion on each of the target board command messages, and obtaining converted target board command messages; The converted target board command messages are parsed and placed in the first VxWorks task structure.

[0108] According to a simulation device 800 for an interlocking system provided by the present invention, the instruction issuing module 810 is further used for: Traversing the pointers of the target board command messages in the first VxWorks task structure through the target interface function; According to the pointer of each target board command message and the preset device mapping relationship table, each target board command message is converted and integrated to obtain the converted and integrated single-frame command combination message.

[0109] According to a simulation device 800 for an interlocking system provided by the present invention, the board simulation data is a single-frame status message; The data simulation module 820 is specifically used for: Receiving the single-frame status message according to the provisions of the transmission control protocol and / or the Internet protocol; Put the single-frame status message into the second message queue.

[0110] According to a simulation device 800 for an interlocking system provided by the present invention, the data simulation module 820 is further used for: When it is determined that there is data in the second message queue, taking out the latest single-frame status message from the second message queue; According to the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code bit sequence to obtain the device status corresponding to the latest single-frame status message; The device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure; Utilizing the basic application layer, and obtaining the device status corresponding to the latest single-frame status message in each of the second VxWorks task structures through an interface function between the application and the simulation platform; Clearing the latest single-frame status message in the second message queue to obtain an updated second message queue; The corresponding latest single-frame status message is taken out again from the updated second message queue within a fixed period until the processing time reaches the time of the fixed period.

[0111] According to a simulation device 800 for an interlocking system provided by the present invention, the task corresponding to receiving the board card simulation data and the task corresponding to the board card simulation data are two independent tasks, and the priorities of the two independent tasks are controlled based on the simulation platform.

[0112] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the simulation method of the interlocking system, the method is applied to the simulation platform in the simulation system of the interlocking system, the simulation system of the interlocking system includes: the simulation platform and the board simulation system, the simulation platform includes a basic application layer, the basic application layer runs in a computing board or a virtual board simulation environment, the simulation platform is connected to the board simulation system, the method includes: Using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Receive board card simulation data and process the board card simulation data; the board card simulation data is obtained after the board card simulation system performs simulation operation on the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains simulation data of each of the devices.

[0113] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0114] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the simulation method of the interlocking system provided by the above methods, the method is applied to a simulation platform in a simulation system of the interlocking system, the simulation system of the interlocking system includes: the simulation platform and a board simulation system, the simulation platform includes a basic application layer, the basic application layer runs in a computing board or a virtual board simulation environment, the simulation platform is connected to the board simulation system, the method includes: Using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Receive board card simulation data and process the board card simulation data; the board card simulation data is obtained after the board card simulation system performs simulation operation on the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains simulation data of each of the devices.

[0115] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the simulation method of the interlocking system provided by the above methods, the method is applied to a simulation platform in a simulation system of the interlocking system, the simulation system of the interlocking system comprises: the simulation platform and a board simulation system, the simulation platform comprises a basic application layer, the basic application layer runs in a computing board or a virtual board simulation environment, the simulation platform is connected to the board simulation system, the method comprises: Using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Receive board card simulation data and process the board card simulation data; the board card simulation data is obtained after the board card simulation system performs simulation operation on the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains simulation data of each of the devices.

[0116] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A simulation method for an interlocking system, characterized in that: A simulation platform applied to a simulation system of an interlocking system, the simulation system of the interlocking system comprising: the simulation platform and a board simulation system, the simulation platform comprising a basic application layer, the basic application layer running in a computing board or a virtual board simulation environment, the simulation platform connected to the board simulation system, the method comprising: Using the basic application layer, calling the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; Receive board card simulation data and process the board card simulation data; the board card simulation data is obtained after the board card simulation system performs simulation operation on the corresponding device according to the converted and integrated single-frame command combination message, and the board card simulation data contains simulation data of each of the devices.

2. The simulation method of the interlocking system according to claim 1, characterized in that: The calling of the receiving command interface of the simulation platform to put all the at least two target board command messages into the first VxWorks task structure includes: Calling the command receiving interface to receive the target board command message, and storing the target board command message in the first message queue; Sequentially taking out each of the target board command messages from the first message queue, performing multi-board protocol conversion on each of the target board command messages, and obtaining converted target board command messages; The converted target board command messages are parsed and placed in the first VxWorks task structure.

3. The simulation method of the interlocking system according to claim 1, characterized in that: The step of converting and integrating the target board command messages according to the preset device mapping relationship table to obtain a converted and integrated single-frame command combination message includes: Traversing the pointers of the target board command messages in the first VxWorks task structure through the target interface function; According to the pointer of each target board command message and the preset device mapping relationship table, each target board command message is converted and integrated to obtain the converted and integrated single-frame command combination message.

4. The simulation method of the interlocking system according to claim 1, characterized in that: The board simulation data is a single-frame status message; The receiving board simulation data comprises: Receiving the single-frame status message according to the provisions of the transmission control protocol and / or the Internet protocol; Put the single-frame status message into the second message queue.

5. The simulation method of the interlocking system according to claim 4, characterized in that: The processing of the board simulation data includes: When it is determined that there is data in the second message queue, taking out the latest single-frame status message from the second message queue; According to the latest single-frame status message and the preset device mapping relationship table, the latest single-frame status message is decomposed and processed according to the device code bit sequence to obtain the device status corresponding to the latest single-frame status message; The device status corresponding to the latest single-frame status message is stored in the corresponding second VxWorks task structure; Utilizing the basic application layer, and obtaining the device status corresponding to the latest single-frame status message in each of the second VxWorks task structures through an interface function between the application and the simulation platform; Clearing the latest single-frame status message in the second message queue to obtain an updated second message queue; The corresponding latest single-frame status message is taken out again from the updated second message queue within a fixed period until the processing time reaches the time of the fixed period.

6. The simulation method of the interlocking system according to any one of claims 1 to 5, characterized in that: The task corresponding to receiving the board card simulation data for processing and the task corresponding to the board card simulation data are two independent tasks, and the priorities of the two independent tasks are controlled based on the simulation platform.

7. A simulation device for an interlocking system, characterized in that: A simulation platform used in a simulation system of an interlocking system, the simulation system of the interlocking system comprising: the simulation platform and a board simulation system, the simulation platform comprising a basic application layer, the basic application layer running in a computing board or a virtual board simulation environment, the simulation platform connected to the board simulation system, the device comprising: The instruction issuing module is used to utilize the basic application layer to call the receiving command interface of the simulation platform to put at least two target board command messages into the first VxWorks task structure; the target board command message is a single-frame command message; Using a protocol conversion component, the target board command messages are converted and integrated according to a preset device mapping relationship table to obtain a converted and integrated single-frame command combination message; Sending the converted and integrated single-frame command combination message to the board card simulation system; the board card simulation system is used to control and simulate each device; The data simulation module is used to receive board simulation data and process the board simulation data; the board simulation data is obtained after the board simulation system simulates the corresponding device according to the converted and integrated single-frame command combination message, and the board simulation data contains the simulation data of each device.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the simulation method of the interlocking system according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the simulation method of the interlocking system according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the simulation method of the interlocking system according to any one of claims 1 to 6 is implemented.