Tunnel-based vehicle-mounted DMS data transmission method
By adopting the tunnel-based DMS data transmission method in the train control vehicle-mounted equipment to automatically encapsulate and decapsulate data packets, the problems of data transmission complexity and development difficulty in the existing technology are solved, and efficient and flexible data transmission is achieved, which is suitable for Any Linux system.
Patent Information
- Application Number
- CN202410940709.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-27
AI Technical Summary
In the existing train control on-vehicle dynamic monitoring and transmission system, the on-vehicle equipment lacks unified specifications in the data collection and transmission process, resulting in complex development and difficult maintenance. Each data type requires repeated protocol encapsulation and parsing, which wastes manpower.
The tunnel-based vehicle DMS data transmission method is used to realize automatic encapsulation and decapsulation of data packets by creating a DMS tunnel interface and registering the DMS protocol stack, and uses the FOU module or application layer UDP socket for protocol conversion to simplify the data transmission process.
It effectively decouples data collection, processing and transmission, reduces development difficulty and equipment maintenance complexity, improves data transmission efficiency and reliability, has high flexibility and scalability, and is suitable for any Linux system.
Smart Images

Figure CN118713960A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of train control vehicle-mounted dynamic monitoring and transmission systems (DMS), and in particular to rail transit data communication of vehicle-mounted data acquisition equipment. Background Art
[0002] The dynamic monitoring and transmission system of onboard train control equipment (DMS) is a key technical system for train operation control in railway transportation. Its main function is to monitor the running status of the train in real time and transmit the data to the ground control center to ensure the safety and efficiency of train operation. DMS consists of two parts: onboard equipment and ground equipment. The onboard equipment includes onboard data acquisition equipment and onboard monitoring information integrated transmission platform (MIT); the ground equipment includes the DMS data center equipment of the National Railway Group and the DMS data center equipment of the Railway Bureau Group.
[0003] The on-board equipment is divided into two parts: on-board data acquisition equipment and MIT equipment. The data acquisition equipment is responsible for the real-time collection of the operating status information of on-board equipment such as the train overspeed protection system (ATP) and the locomotive integrated wireless communication equipment (CIR), and the MIT is responsible for the wireless transmission of monitoring data between the EMU and the ground. The on-board data acquisition equipment and the MIT equipment communicate data through the on-board communication protocol defined in the "Technical Specifications for Train Control On-board Dynamic Monitoring and Transmission System" (hereinafter referred to as the "Transmission Technical Specifications").
[0004] The DMS data center consists of the ground access gateway of the transmission platform and its supporting business systems. The business systems include data application analysis servers, data storage and processing servers, data intelligent analysis servers, comprehensive database servers, etc.
[0005] When the DMS system is running, the vehicle-mounted data acquisition equipment communicates with the business system through MIT and the ground access gateway.
[0006] When the vehicle-mounted equipment uses the TCP / UDP access method to communicate with MIT, it is necessary to encapsulate each data packet in accordance with relevant technical specifications, such as Appendix A in the "Transmission Technical Specifications". However, there is currently no unified specification to tell vehicle-mounted equipment developers how to encapsulate the collected data into vehicle protocols. Each vehicle-mounted equipment developer needs to implement protocol encapsulation, protocol parsing, data packet response, and packet assembly according to the "Transmission Technical Specifications". The above operations need to be repeated for each additional type of data, which wastes a lot of manpower and makes equipment maintenance more complicated.
[0007] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0008] The main purpose of the present invention is to solve the problems existing in the above-mentioned background technology and provide a tunnel-based vehicle-mounted DMS data transmission method.
[0009] To achieve the above object, the present invention adopts the following technical solutions:
[0010] A tunnel-based vehicle-mounted DMS data transmission method, comprising:
[0011] Create a DMS tunnel interface to implement the routing of application network data packets and the encapsulation of the DMS protocol;
[0012] Register the DMS protocol stack to parse the encapsulated DMS data packets and send the parsed data packets to the kernel network protocol stack for further processing, and to receive the DMS data packets delivered by the kernel network protocol stack and parse them to extract application network data;
[0013] Using a network configuration tool, creating and configuring a DMS tunnel according to the attributes required by the DMS tunnel interface;
[0014] The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the network protocol; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and preferably performs CRC check to form a DMS encapsulated data packet and pass it to the DMS protocol stack; the DMS protocol stack performs DMS protocol processing on the DMS encapsulated data packet, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attribute of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle-mounted monitoring information integrated transmission platform MIT through the FOU module using the pre-configured FOU socket interface;
[0015] The vehicle-mounted end receives data, and the process includes: the FOU socket interface listens to and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is received by the kernel network protocol stack, and the UDP header is stripped through the FOU module, and then the DMS data packet is passed to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the FOU module and the FOU socket interface; the upper-layer application listens to the network port, receives and processes the parsed application network data.
[0016] A tunnel-based vehicle-mounted DMS data transmission method, comprising:
[0017] Create a DMS tunnel interface to implement the routing of application network data packets and the encapsulation of the DMS protocol;
[0018] Create a UDP socket at the application layer to communicate with the DMS tunnel interface;
[0019] Register the DMS protocol stack to parse the encapsulated DMS data packets and send the parsed data packets to the kernel network protocol stack for further processing, and to receive the DMS data packets delivered by the kernel network protocol stack and parse them to extract application network data;
[0020] Configure netfilter rules to implement packet delivery and communication between the DMS tunnel interface, DMS protocol stack, and application layer UDP socket;
[0021] The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the UDP socket; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and preferably performs CRC check, forming a DMS encapsulated data packet and passing it to the DMS protocol stack; the DMS protocol stack performs DMS protocol processing on the DMS encapsulated data packet, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attribute of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle monitoring information integrated transmission platform MIT through the application layer UDP socket;
[0022] The vehicle-mounted end receives data, and the process includes: the application layer UDP socket listens and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is passed to the kernel network protocol stack through the netfilter rule, and the kernel network protocol stack strips the UDP header and passes the DMS data packet to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the DMS protocol stack and netfilter rules; the upper-layer application listens to the network port, receives and processes the parsed application network data.
[0023] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the tunnel-based vehicle-mounted DMS data transmission method is implemented.
[0024] A computer program product includes a computer program, and when the computer program is executed by a processor, the tunnel-based vehicle-mounted DMS data transmission method is implemented.
[0025] The present invention has the following beneficial effects:
[0026] The main technical advantage of the present invention is that it provides an innovative tunnel-based vehicle-mounted DMS data transmission method, which can be implemented on a Linux system, effectively decouples the data acquisition, processing and transmission processes, and significantly reduces the complexity and development difficulty of integrating the DMS data protocol into vehicle-mounted equipment. By creating a DMS tunnel interface and registering a DMS protocol stack, the present invention realizes the automatic encapsulation and decapsulation of data packets, eliminating the need for developers to repeatedly implement encapsulation protocols for different data types, thereby saving manpower and simplifying equipment maintenance. In addition, the present invention uses tunnels and FOU modules (or creates UDP sockets through the application layer) to automatically complete the conversion from the DMS protocol to the UDP protocol, further improving the efficiency of data transmission.
[0027] Another significant advantage of the present invention is its high flexibility and scalability. Users can implement multiple DMS links on a single vehicle-mounted device by establishing multiple tunnels, thereby flexibly configuring the DMS protocol to meet different communication needs. At the same time, through the supporting iproute2 tool, developers can easily set and manage DMS protocol properties, such as source device number, target device number, etc., further enhancing the configurability and ease of use of the system.
[0028] In addition, the DMS protocol stack and tunnel interface of the present invention can automatically complete the interaction of the DMS protocol, including packet sequence number sorting, protocol time maintenance and datagram ACK response, etc., ensuring the accuracy and reliability of data transmission. Finally, the versatility and compatibility of the present invention enable it to be widely used in any Linux system, providing an efficient, flexible and easy-to-manage solution for the development and application of train control on-board equipment.
[0029] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flow chart of data transmission and reception of an on-vehicle device according to an embodiment of the present invention;
[0031] Figure 2 This is a communication diagram between the vehicle-mounted device and the MIT device according to an embodiment of the present invention;
[0032] Figure 3 A schematic diagram of encapsulating application network data into DMS data according to an embodiment of the present invention;
[0033] Figure 4 This is an illustration of encapsulating DMS data as UDP data in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.
[0035] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0036] The present invention provides a universal DMS protocol integration method, through which data processing and transmission can be decoupled, and data producers and consumers only need to focus on the processing of the data itself without paying attention to how the data is transmitted in the DMS system and how to obtain actual business data from the DMS system.
[0037] See also Figure 1 to Figure 2 , a tunnel-based vehicle-mounted DMS data transmission method according to an embodiment includes:
[0038] Creating a DMS tunnel interface for implementing the routing of application network data packets and encapsulation of the DMS protocol; registering a DMS protocol stack for parsing encapsulated DMS data packets and sending the parsed data packets to the kernel network protocol stack for further processing, and receiving DMS data packets transmitted by the kernel network protocol stack and parsing them to extract application network data; using a network configuration tool to create and configure a DMS tunnel according to the properties required by the DMS tunnel interface;
[0039] The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the network protocol; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and performs CRC check, and forms a DMS encapsulated data packet and passes it to the DMS protocol stack; the DMS protocol stack performs necessary processing on the DMS encapsulated data packet, such as adding or updating specific fields required by the DMS protocol, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attributes of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle-mounted monitoring information integrated transmission platform MIT through the FOU module using the pre-configured FOU socket interface;
[0040] The vehicle-mounted end receives data, and the process includes: the FOU socket interface listens to and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is received by the kernel network protocol stack, and the UDP header is stripped through the FOU module, and then the DMS data packet is passed to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the FOU module and the FOU socket interface; the upper-layer application listens to the network port, receives and processes the parsed application network data.
[0041] In some embodiments, at least two DMS links are implemented by establishing multiple tunnels on the vehicle-mounted device.
[0042] Another embodiment of a tunnel-based vehicle-mounted DMS data transmission method includes:
[0043] Create a DMS tunnel interface to implement the routing of application network data packets and the encapsulation of the DMS protocol; create a UDP socket at the application layer to communicate with the DMS tunnel interface; register the DMS protocol stack to parse the encapsulated DMS data packets and send the parsed data packets to the kernel network protocol stack for further processing, and to receive the DMS data packets transmitted by the kernel network protocol stack and parse them to extract application network data; configure netfilter rules to implement data packet transmission and communication between the DMS tunnel interface, the DMS protocol stack and the application layer UDP socket;
[0044] The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the UDP socket; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and performs CRC check, and forms a DMS encapsulated data packet and passes it to the DMS protocol stack; the DMS protocol stack performs necessary processing on the DMS encapsulated data packet, such as adding or updating specific fields required by the DMS protocol, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attributes of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle monitoring information integrated transmission platform MIT through the application layer UDP socket;
[0045] The vehicle-mounted end receives data, and the process includes: the application layer UDP socket listens and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is passed to the kernel network protocol stack through the netfilter rule, and the kernel network protocol stack strips the UDP header and passes the DMS data packet to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the DMS protocol stack and netfilter rules; the upper-layer application listens to the network port, receives and processes the parsed application network data.
[0046] Compared with the previous embodiment, this embodiment does not use the FOU module, but directly creates a UDP socket at the application layer, and then implements the communication between the DMS tunnel, the DMS protocol stack and the UDP socket through the netfilter rule, and can also implement the encapsulation and decapsulation of the vehicle-mounted DMS protocol.
[0047] The present invention provides an innovative tunnel-based vehicle-mounted DMS data transmission method, which can be implemented on a Linux system, effectively simplifying the process of integrating the DMS data protocol into vehicle-mounted equipment and reducing the difficulty of development. By creating a DMS tunnel interface and registering a DMS protocol stack, the present invention realizes the automatic encapsulation and decapsulation of data packets, avoiding duplication of work due to different data types, saving manpower and simplifying maintenance work. The automatic filling protocol header of the DMS tunnel interface and the automatic response mechanism of the DMS protocol stack further improve the efficiency and reliability of data transmission.
[0048] In addition, the embodiment of the present invention utilizes a tunnel in combination with a FOU module (or a UDP socket created by the application layer and a netfilter rule) to achieve a seamless conversion from the DMS protocol to the UDP protocol, making the data transmission process smoother. This method not only improves development efficiency, but also simplifies packet sequence number sorting and protocol management by sending data through a unified DMS interface, thereby reducing the complexity of device development. Users can use network configuration tools such as iproute2 to conveniently set and manage DMS protocol properties, such as source device numbers and target device numbers, increasing the flexibility and configurability of the system.
[0049] The present invention also supports the realization of multiple DMS links by establishing multiple tunnels on one onboard device, which greatly enhances the scalability of the train control onboard device. When developing train control onboard devices, developers only need to focus on the collection of train operation information without having to deeply understand the specific processing of the DMS protocol, because the data can be automatically sent to the ground through the tunnel. At the same time, the received DMS data is already general data that has been decapsulated, and the upper-layer application can use it directly without having to worry about the processing details of the DMS protocol.
[0050] According to the present invention, the system can automatically complete the interaction of the DMS protocol, such as packet sequence number sorting, protocol time maintenance and ACK response, etc., to ensure the accuracy of data transmission. This automated and simplified process makes the method of the present invention not only applicable to vehicle-mounted equipment, but also widely applicable to any Linux system, showing its versatility and compatibility, and providing an efficient, flexible and easy-to-manage solution for the development and application of train control vehicle-mounted equipment.
[0051] The specific embodiments of the present invention are further described below.
[0052] According to the definition of "Transmission Technical Specifications", the vehicle-mounted equipment and MIT equipment must communicate using the UDP / IP protocol. The encapsulation format refers to its Appendix A. The communication data encapsulated in Appendix A below can be referred to as DMS protocol data.
[0053] The specific implementation is as follows:
[0054] 1. Based on the existing network and tunnel framework of Linux, two network modules are added to the kernel. These two network modules are used to realize the conversion between application network data packets (including train sensor data) and DMS protocol. The main contents are as follows:
[0055] (1) DMS Tunnel Interface
[0056] After loading this kernel module, the system can create a new network interface: DMS tunnel interface, which is used to route application network packets and encapsulate the DMS protocol. According to the definition of the "Transmission Technical Specification", the DMS tunnel has the following attributes:
[0057] DMS protocol attributes: including source device identification, source device service type, target device identification, and target device service type. These attributes are used to fill in DMS protocol related fields.
[0058] Tunnel IP attributes: including local IP, remote IP, tunnel IP and mask, which are used for routing of application network data packets and filling of outer IP header. The tunnel IP is in the same network segment as the private IP of the ground business system.
[0059] Encap properties: Set the FOU (Foo-over-UDP kernel a network module) properties associated with the tunnel, including local port, remote IP (MIT IP), and remote port (MIT UDP port).
[0060] When the application network data packet is transmitted outward through the DMS network interface, the interface adds the DMS protocol header and tail to the application data according to its own attributes, and then encapsulates the UDP header through the FOU module and sends the data to MIT.
[0061] (2) DMS protocol stack module
[0062] Used to parse DMS encapsulated data packets. The DMS protocol stack will register the protocol with the protocol number IPPROTO_DMS in the system. When the kernel protocol stack receives network data with the corresponding protocol number, it will send the data packet to the DMS protocol stack for processing. The DMS protocol stack can parse the application network data packet from the DMS protocol encapsulation and then send it to the kernel network protocol stack for further processing.
[0063] 2. Based on iproute2 (a network configuration tool), add a tunnel protocol type: DMS. And according to the properties required by the DMS network interface, add the corresponding property setting function to facilitate the creation and modification of DMS tunnels in the system.
[0064] 3. Vehicle-mounted data transmission and reception process:
[0065] Preparation stage:
[0066] (1) Use the iproute2 tool to create a DMS tunnel interface in the system, and set the corresponding DMS protocol attributes according to the actually assigned source device ID, source device service type, target device ID, and target device service type; set the tunnel IP attributes according to the actual network topology. At this time, a route in the same network segment will be generated inside the system, and the network interface of the route is the DMS tunnel; set the Encap attribute according to the MIT device port number for filling the outer UDP header.
[0067] (2) Use the iproute2 tool to create a FOU socket in the system to listen to the UDP data packets sent by MIT to the on-board equipment. The listening port number is determined according to the actual network topology.
[0068] Sending process:
[0069] (1) When the upper-layer application needs to transmit data, it uses the appropriate network protocol to open the network interface, and the destination address is the same network segment address as the tunnel IP.
[0070] (2) Based on the destination address of the upper-layer network data, the application network data packet is routed to the DMS tunnel interface.
[0071] (3) After the application network data packet arrives at the tunnel interface, the DMS tunnel performs DMS encapsulation on the data according to the DMS protocol attributes, fills in the source and target device identifiers, fills in the packet sequence number, calculates CRC, etc., and continues to send the data to the kernel tunnel layer.
[0072] (4) According to the Encap attribute, the vehicle DMS protocol is encapsulated as a UDP protocol at the tunnel layer. Its source port is the local port of the FOU and its destination port is the remote port (MIT UDP port). The data packet is then sent to the IP layer.
[0073] (5) According to the IP attribute of the DMS tunnel, the UDP protocol is encapsulated as the IP protocol, with the source address being the local IP and the destination address being the IP of the MIT.
[0074] At this point, the vehicle-mounted DMS protocol is encapsulated and the data packet is sent to the UDP port of MIT.
[0075] Receiving process:
[0076] (1) After the FOU socket is established, it continuously listens to the specified local port, and the MIT vehicle DMS data packet will be sent to this port via the UDP protocol.
[0077] (2) After receiving the UDP data, the kernel protocol stack passes it to the UDP protocol stack for processing.
[0078] (3) The UDP protocol stack strips off the UDP header through the FOU module, returns the IPPROTO_GRE protocol number, and passes the inner DMS data packet to the kernel protocol stack for processing.
[0079] (4) The kernel protocol stack passes the data to the DMS protocol stack for processing according to the protocol number of IPPROTO_GRE.
[0080] (5) The DMS protocol stack parses the application network data packet from the DMS protocol encapsulation and passes the inner layer application network data packet to the kernel protocol stack.
[0081] At the same time, according to the sequence number of the received DMS packet, a DMS ACK response packet is constructed, and the ACK is sent to the MIT device through the FOU module to complete the DMS protocol send and receive closed loop.
[0082] (6) The upper-layer application obtains application network data through the monitored network port.
[0083] Figure 1 The data transmission and reception process of the vehicle-mounted device in an embodiment of the present invention is shown. Figure 2 The communication process between the vehicle-mounted device and the MIT device according to the embodiment of the present invention is shown.
[0084] At this point, the on-board DMS protocol sent from MIT to the on-board device has been decapsulated and received, and the upper-layer application has received valid business data.
[0085] Through the above technical solutions, no matter what kind of network data is transmitted or how many types of network data are transmitted at the same time, there is no need to worry about the data encapsulation of the DMS protocol layer. You only need to set the corresponding IP and port to realize the encapsulation and decapsulation of the vehicle-mounted DMS protocol, which greatly improves the development efficiency and reduces the difficulty of equipment development. And by sending data out through a unified DMS interface, the packet numbers in the DMS protocol can also be easily sorted.
[0086] In some embodiments, based on the above-mentioned single tunnel sending and receiving method, multiple DMS links can also be implemented on one vehicle-mounted device by establishing multiple tunnels, and the DMS protocol can be flexibly configured.
[0087] In some embodiments, Figure 3As shown, the DMS tunnel interface encapsulates the application network data specifically by: receiving business data including sensor data, and identifying the business system LAN IP and port of the business data; encapsulating the identified data in the IP header and TCP / UDP header to form a basic business data packet; adding a DMS header on the basis of the business data packet, including source device identification, target device identification and other information; after encapsulating the business data, adding a DMS tail, including CRC check, cutoff character, etc., to ensure the reliability and integrity of data transmission.
[0088] In some embodiments, Figure 4 As shown, encapsulating DMS data into UDP data specifically includes: constructing a DMS data packet, which is composed of a DMS header, device service data and a DMS tail, wherein the DMS header contains information such as a source device identifier and a target device identifier; encapsulating the DMS data packet as a payload in a FOU (Foo-over-UDP) module to form a FOU encapsulated data unit; adding an IP header outside the FOU encapsulated data unit, wherein the header contains a source IP address and a destination IP address for routing selection; adding a UDP header above the IP header, wherein the header contains the MIT device port number as the destination port and the corresponding source port number, which is used to send and receive data at the UDP level; through the above encapsulation form, it is ensured that the DMS data packet can be effectively transmitted to the designated IP address and port of the vehicle-mounted monitoring information integrated transmission platform MIT through the UDP protocol.
[0089] Compared with the prior art, the main advantages of the embodiments of the present invention are:
[0090] By adopting the tunnel approach, when developing train control on-board equipment, you only need to worry about the collection of train operation information. When it needs to be sent to the ground, the data can be sent to the ground through the tunnel without worrying about DMS protocol processing.
[0091] When receiving DMS data sent from the ground to the vehicle, the application layer obtains the decapsulated general data, and the upper layer does not need to worry about the processing of the DMS protocol.
[0092] Through the DMS protocol stack and tunnel interface, the system can automatically complete the DMS protocol interaction, such as DMS packet sequence number sorting, DMS protocol time, DMS datagram ACK response, etc.
[0093] Through the supporting iproute2 tool, you can easily set DMS protocol items such as source device number and target device number, and flexibly configure DMS protocol properties.
[0094] By establishing multiple tunnels, multiple DMS transmission chains can be established on one device, greatly enhancing the scalability and development convenience of train control on-board equipment.
[0095] The method of the present invention can be applied to any Linux system and has strong versatility and compatibility.
[0096] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.
[0097] An embodiment of the present invention further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute at least the method described above when executing the computer program.
[0098] An embodiment of the present invention further provides a processor, wherein the processor executes a computer program and at least executes the method described above.
[0099] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The storage medium described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0100] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0101] The units described above 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 distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0102] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0103] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
[0104] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0105] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0106] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.
[0107] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0108] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A tunnel-based vehicle-mounted DMS data transmission method, characterized in that: include: Create a DMS tunnel interface to implement the routing of application network data packets and the encapsulation of the DMS protocol; Register the DMS protocol stack to parse the encapsulated DMS data packets and send the parsed data packets to the kernel network protocol stack for further processing, and to receive the DMS data packets delivered by the kernel network protocol stack and parse them to extract application network data; Using a network configuration tool, create and configure a DMS tunnel according to the attributes required by the DMS tunnel interface; The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the network protocol; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and preferably performs CRC check, and forms a DMS encapsulated data packet and passes it to the DMS protocol stack; the DMS protocol stack performs DMS protocol processing on the DMS encapsulated data packet, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attribute of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle-mounted monitoring information integrated transmission platform MIT through the FOU module using the pre-configured FOU socket interface; The vehicle-mounted end receives data, and the process includes: the FOU socket interface listens to and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is received by the kernel network protocol stack, and the UDP header is stripped through the FOU module, and then the DMS data packet is passed to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the FOU module and FOUsocket interface; the upper-layer application listens to the network port, receives and processes the parsed application network data.
2. The tunnel-based vehicle-mounted DMS data transmission method according to claim 1, characterized in that: The creation of the DMS tunnel interface includes: adding at least two network modules based on the Linux kernel network and tunnel framework to achieve data packet conversion.
3. The tunnel-based vehicle-mounted DMS data transmission method according to claim 1 or 2, characterized in that: The registration of the DMS protocol stack module includes: registering a protocol with a protocol number of IPPROTO_DMS in the system, so that the kernel protocol stack can identify and process DMS protocol data packets.
4. The tunnel-based vehicle-mounted DMS data transmission method according to any one of claims 1 to 3, characterized in that: The using of the network configuration tool includes: using the iproute2 tool to set the DMS tunnel protocol type and to set the properties of the DMS tunnel interface.
5. The tunnel-based vehicle-mounted DMS data transmission method according to any one of claims 1 to 4, characterized in that: This includes establishing multiple tunnels on the vehicle-mounted equipment to achieve at least two DMS links.
6. A tunnel-based vehicle-mounted DMS data transmission method, characterized in that: include: Create a DMS tunnel interface to implement the routing of application network data packets and the encapsulation of the DMS protocol; Create a UDP socket at the application layer to communicate with the DMS tunnel interface; Register the DMS protocol stack to parse the encapsulated DMS data packets and send the parsed data packets to the kernel network protocol stack for further processing, and to receive the DMS data packets delivered by the kernel network protocol stack and parse them to extract application network data; Configure netfilter rules to implement packet delivery and communication between the DMS tunnel interface, DMS protocol stack, and application layer UDP socket; The vehicle-mounted end sends data, and the process includes: the application layer generates data and sends it to the DMS tunnel interface through the UDP socket; the DMS tunnel interface encapsulates the data, adds the necessary DMS protocol header information and preferably performs CRC check, and forms a DMS encapsulated data packet and passes it to the DMS protocol stack; the DMS protocol stack performs DMS protocol processing on the DMS encapsulated data packet, and then passes the processed DMS encapsulated data packet to the kernel network protocol stack; the kernel network protocol stack further encapsulates the DMS encapsulated data packet into UDP format according to the IP attribute of the DMS tunnel interface, and sends the data encapsulated in UDP format to the IP address of the vehicle monitoring information integrated transmission platform MIT through the application layer UDP socket; The vehicle-mounted end receives data, and the process includes: the application layer UDP socket listens and receives UDP data packets from the vehicle-mounted monitoring information integrated transmission platform MIT; the UDP data packet is passed to the kernel network protocol stack through the netfilter rule, and the kernel network protocol stack strips the UDP header and passes the DMS data packet to the DMS protocol stack for parsing; the DMS protocol stack parses the DMS encapsulation, extracts the application network data packet, and constructs the DMS ACK response packet according to the sequence number of the received DMS data packet; the ACK response packet is sent back to MIT through the DMS protocol stack and netfilter rules; the upper-layer application listens to the network port, receives and processes the parsed application network data.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the tunnel-based vehicle-mounted DMS data transmission method according to any one of claims 1 to 6 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the tunnel-based vehicle-mounted DMS data transmission method according to any one of claims 1 to 6 is implemented.
