CN110868344B - Method, system, device and computer readable medium for simulating MVB - Google Patents

Method, system, device and computer readable medium for simulating MVB Download PDF

Info

Publication number
CN110868344B
CN110868344B CN201910989679.4A CN201910989679A CN110868344B CN 110868344 B CN110868344 B CN 110868344B CN 201910989679 A CN201910989679 A CN 201910989679A CN 110868344 B CN110868344 B CN 110868344B
Authority
CN
China
Prior art keywords
data
mvb
packet
socket
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910989679.4A
Other languages
Chinese (zh)
Other versions
CN110868344A (en
Inventor
孙二敬
吴培栋
李雪婧
白玉岭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN201910989679.4A priority Critical patent/CN110868344B/en
Publication of CN110868344A publication Critical patent/CN110868344A/en
Application granted granted Critical
Publication of CN110868344B publication Critical patent/CN110868344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a system, a device and a computer readable medium for simulating MVB, wherein the method comprises the steps of receiving first data according to a first time interval, forming the first data into a socket data packet, sending the socket data packet through Ethernet according to a second time interval, receiving the socket data packet sent through the Ethernet according to the second time interval, decomposing the socket data packet into second data, receiving and caching the second data, and sending the second data according to the first time interval. Through Socket and Ethernet simulation MVB transmission, the undifferentiated data transmission simulation experiment of the equipment software program can be realized through one PC, and the equipment software program can be rapidly debugged in real time through the PC, so that the development efficiency is improved, and the debugging cost is reduced.

Description

Method, system, device and computer readable medium for simulating MVB
Technical Field
The invention belongs to the field of rail transit, and particularly relates to a method, a system, a device and a computer readable medium for simulating MVB.
Background
The TCN (train control communication network) provides that a train communication network is divided into an MVB (multifunctional vehicle bus) and a WTB (hinged train bus), wherein the MVB is a bus topological structure and is specially used for communication between vehicle-mounted equipment in a vehicle, when the MVB carries out data transmission, the bus equipment outputs data at a certain time interval, a port is refreshed, and when other bus equipment needs the data, the data can be read from the corresponding port. The interoperability of MVBs requires real-time and accurate data transmission.
As shown in fig. 1 and 4, an MVB communication mode is adopted between actual train control vehicle-mounted ATP devices, and the MVB communication mode is characterized by interchangeability and interoperability, fixed data ports are provided for interactive data transmission between the devices, port data are periodically refreshed, and the bus devices realize communication and interaction through read-write ports.
Due to the characteristics of the MVB, the multifunctional vehicle bus is more commonly applied to train control vehicle-mounted ATP (automatic train protection), and the real MVB bus is difficult to use technically and cost in the debugging process of the PC; the establishment of the MVB bus needs a series of hardware support such as a bus controller, a gateway, a repeater, a connector and a terminator, the implementation cost is high in a laboratory environment, and the existing technical scheme based on MVB communication cannot meet the scene requirement.
Disclosure of Invention
In view of the above problems, the present invention provides a method, system, device and computer readable medium for simulating MVB.
The method for simulating MVB provided by the invention comprises the following steps
Receiving first data according to a first time interval;
forming the first data into a socket data packet;
according to a second time interval, sending a socket data packet through the Ethernet;
receiving a socket data packet sent by the Ethernet according to a second time interval, and decomposing the socket data packet into second data;
and receiving and buffering the second data, and sending the second data according to the first time interval.
Preferably, the Socket data packet includes at least one sub-packet, and the header of the sub-packet is written with the port number of the source port or the destination port;
and caching the socket data packet into a corresponding destination port based on the port number.
Preferably, a plurality of second data are received simultaneously, whether the size of the plurality of second data is larger than the cache space of the destination port is judged, and the following steps are executed according to the judgment result, wherein the steps include:
under the condition that the cache space of the plurality of destination ports is not larger than that of the plurality of destination ports, the plurality of second data are cached and enter the corresponding plurality of destination ports simultaneously;
and under the condition that the buffer space of the second data is larger than the buffer space of the plurality of destination ports, the plurality of second data enter the corresponding destination ports in a batch buffer mode.
Preferably, the socket data packet is written with an MVB identification.
Preferably, after receiving the first data, the first data is buffered.
Preferably, the second time interval is equal to or less than the first time interval.
The invention also provides a system for simulating MVB, comprising:
a sending module, configured to receive first data according to a first time interval;
the packaging module is used for forming the first data into a socket data packet;
the transmission module is used for sending the socket data packet through the Ethernet according to a second time interval;
the unpacking module is used for receiving the socket data packet sent by the Ethernet according to a second time interval and decomposing the socket data packet into second data;
and the reading module is used for receiving and caching the second data and sending the second data according to the first time interval.
Preferably, the Socket data packet includes at least one sub-packet, and the header of the sub-packet is written with the port number of the source port or the destination port;
and caching the socket data packet into a corresponding destination port based on the port number.
Preferably, the reading module receives a plurality of second data at the same time, and the reading module determines whether the size of the plurality of second data is larger than the cache space of the plurality of destination ports;
under the condition that the cache space of the plurality of destination ports is not larger than that of the plurality of destination ports, the plurality of second data are cached and enter the corresponding destination ports simultaneously;
and under the condition that the buffer space of the second data is larger than the buffer space of the plurality of destination ports, the plurality of second data enter the corresponding destination ports in a batch buffer mode.
Preferably, the socket data packet is written with an MVB identification.
Preferably, after receiving the first data, the sending module buffers the first data.
Preferably, the second time interval is equal to or less than the first time interval.
The invention also proposes a device for simulating an MVB, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method for simulating an MVB according to any one of claims 1 to 6 when executing the computer program.
The invention also proposes a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method of simulating an MVB according to any one of claims 1 to 6.
According to the method and the system for simulating the MVB, the MVB transmission is simulated through the Socket and the Ethernet, a non-differential data transmission simulation experiment of the equipment software program can be realized through one PC, the equipment software program can be rapidly debugged in real time through the PC, the development efficiency is improved, and the debugging cost is reduced.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 shows a schematic diagram of MVB transmission in the prior art;
FIG. 2 is a schematic diagram illustrating simulation of MVB in the present embodiment;
FIG. 3 is a diagram illustrating simulated MVB data transmission in the present embodiment;
FIG. 4 shows a schematic diagram of a prior art MVB port;
FIG. 5 is a schematic diagram illustrating simulation of MVB in the present embodiment;
fig. 6 is a flowchart illustrating a method for simulating MVB in this embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to simulate an information transmission environment of an ATP (automatic train protection device) platform device, a Socket (Socket) simulation MVB bus mode is adopted for communication in the embodiment, the MVB and the ethernet are set differently in a physical layer, a protocol layer, a link layer and the like of a computer network, the MVB data is stored in an MVB bus port on the premise that new data refreshing does not exist, a receiver can read the data for many times, but the ethernet data can be received only once after being sent, that is, the receiver cannot read the data again through an ethernet interface function after reading once; therefore, in this embodiment, a scheme of combining ethernet with socket is adopted to simulate the MVB.
Socket is an abstraction layer to complete data transmission between two application programs, the application programs can send or receive data through the Socket, and can perform operations such as opening, reading, writing and closing the data as files, and a Socket interface is adopted to simulate an MVB to perform data storage, so that rapid debugging and transplantation of equipment software programs are facilitated.
Referring to fig. 2, a common ethernet in a PC communication environment is selected to implement data interaction between two devices. In a PC (personal computer), simulating two train control vehicle-mounted devices, wherein each train control vehicle-mounted device comprises a train traction unit, a train brake unit, a vehicle door control unit, a display unit and the like, simulating two different train control vehicle-mounted device software in the PC according to actual test requirements, calling the simulated train control vehicle-mounted devices as virtual train control vehicle-mounted devices, adding a layer of virtual MVB software on the bottom layer of the application software of the virtual train control vehicle-mounted devices, wherein the virtual MVB software is provided with an MVB port, and the port of the virtual MVB is connected with the MVB port of the train control vehicle-mounted device software so as to realize data transmission and realize simulation of an MVB related interface function of the device application software; the virtual train control onboard device A, B and the virtual MVB workflow are as follows:
the device a/B (software program) calls the MVB related interface function to write the port, which is the virtual source port in the virtual MVB software, at a first time interval t 1.
The device A/B virtual MVB software enables data of the virtual source port to form a Socket data packet according to a certain protocol format;
every second time interval t2, the Socket data packet is sent to the device B/A through the Ethernet;
at intervals of a second time interval t2, reading Ethernet data by the B/A virtual MVB software of the equipment, splitting a Socket data packet according to a certain protocol format, and respectively storing the Socket data packet into virtual destination ports of the B/A virtual MVB software of the equipment;
and calling an MVB related interface function by the device B/A to read a port at a first time interval t1, wherein the port is a virtual destination port in virtual MVB software, so that data transmission between the device A and the device B is realized.
Fig. 3 shows a general flow of data transmission between a device a and a device B, where the device a packages data to be transmitted into a socket data packet, the socket data packet is transmitted to the device B via an ethernet, and the device B unpacks the socket data packet to obtain data.
Fig. 4 shows a schematic diagram of data transmission at an MVB port, the MVB data transmission has a fixed data port, data is packaged firstly between vehicle-mounted devices through MVB communication, the data is transmitted to an ATP device platform, the data is stored in the corresponding MVB port according to port numbers 1 to n and addresses, other devices can read the latest data from the corresponding port at any time according to requirements, and data transmission and periodic refreshing are achieved. Therefore, the virtual MVB software in this embodiment is also provided with a plurality of ports, and data is transmitted through the virtual ports of the virtual MVB software.
Specifically, referring to fig. 5, the present embodiment provides a system for simulating an MVB, that is, the virtual MVB software, including:
the system comprises a sending module, a packet module and a packet module, wherein the sending module is provided with n source ports, the source ports are provided with port numbers according to the sequence of 1-n, the sending module is used for receiving first data according to a first time interval t1, namely the virtual column control vehicle-mounted equipment in the PC writes the first data into the corresponding source port of the sending module at the time of every first time interval t1, and simultaneously sends the received first data to the packet module;
the packaging module receives the first data sent by the sending module and forms the first data into a socket data packet according to a preset protocol;
the transmission module is used for transmitting the socket data packet formed by the group package module to the unpacking module of the other simulation MVB system through the Ethernet according to a second time interval t 2;
the unpacking module is used for receiving a socket data packet sent by the transmission module of the other simulation MVB system through the Ethernet according to a second time interval t2, and decomposing the socket data packet into second data according to a preset protocol;
the reading module is provided with n destination ports, the destination ports are provided with port numbers according to the sequence of 1-n, the reading module is used for receiving second data, caching the second data to enter the corresponding destination ports, and sending the second data according to a first time interval t1, namely the virtual train control vehicle-mounted equipment in the PC reads the second data in the destination ports at the moment of every first time interval t 1.
In this embodiment, when performing packet packing, each Socket packet may include one or more source port data sub-packets, a packet header of the Socket data packet specifies a length, a data portion is formed by concatenating one or more sub-packets formed by one or more MVB port data, and each sub-packet header includes a port number and a sub-packet length. The unpacking module corresponds sub-packages to different destination port data caches according to a protocol for reading by the virtual train control vehicle-mounted equipment; specifically, the socket data packet is in the form of: the packet length (short), the packet header (short), the messages (string) + the packet tail (short), and the Message structure is as follows: [ sub-packet header 1 (length + source port number or destination port number) + sub-packet data 1] + [ sub-packet header 2 (length + source port number or destination port number) + sub-packet data 2] … … + [ sub-packet header n (length + source port number or destination port number) + sub-packet data n ]; the unpacking module is used for decomposing the socket data packet into a plurality of sub-packets after receiving the socket data packet, decomposing the sub-packets into a plurality of second data, and caching the plurality of second data to corresponding destination ports according to the port numbers written in the packet heads of the sub-packets.
According to the size of data written into a source port, the data of the source port are reasonably packaged, a sub-packet is formed by the data of each source port, and a plurality of sub-packets are connected in series to form a socket data packet and are sent together on the premise that the length of the socket data packet does not exceed the allowable length. Exemplarily, the device a sends data to the device B, where the first time interval t1 is 100ms, the second time interval t2 is 40ms, the device a writes the first data to the source port 1 and the source port 2 of the sending module every 100ms, and the sending module sends the first data to the group packet module after receiving the first data.
The first data of packet group module with source port 1 constitutes sub-packet 1, and port number 1 is write into to the packet head of sub-packet 1, constitutes sub-packet 2 with the first data of source port 2, and port number 2 is write into to the packet head of sub-packet 2, constitutes the socket data package with sub-packet 1 and sub-packet 2, and the socket data package format is: packet length (short) + packet header (short) + [ sub-packet 1 header (length + port number 1) + sub-packet 1 data ] + [ sub-packet 2 header (length + port number 2) + sub-packet 2 data ] + packet end (short).
And the transmission module sends the socket data packet to an unpacking module of virtual MVB software at the bottom layer of the device B through the Ethernet every 40 ms.
The unpacking module is used for decomposing the socket data packet to obtain a sub-packet 1 and a sub-packet 2, identifying that the port number of the packet head of the sub-packet 1 is 1, the port number of the packet head of the sub-packet 2 is 2, and then decomposing the sub-packet 1 to obtain second data, and decomposing the sub-packet 2 to obtain second data.
The reading module stores the second data analyzed by the sub-packet 1 into a destination port 1 of the reading module based on the port number of the packet head of the sub-packet 1, stores the second data analyzed by the sub-packet 2 into a destination port 2 of the reading module, and the device B reads the second data in the destination port every 100 ms; therefore, data are transmitted from the equipment A to the equipment B, and the purpose of socket and Ethernet analog MVB transmission is achieved.
Therefore, in the embodiment, the communication environment simulation of the vehicle-mounted equipment is mainly used, the socket and the Ethernet are used for simulating the MVB to perform data transmission and updating, a non-differential data transmission simulation experiment of the equipment software program can be realized through one PC, the equipment software program can be rapidly debugged in real time through the PC, the development efficiency is improved, and the debugging cost is reduced.
The n destination ports of the reading module share one storage space, and when the reading module receives a plurality of second data at the same time;
the reading module judges whether the sum of the second data is larger than the cache space;
under the condition that the cache space is not larger than the cache space, a plurality of second data are cached and enter corresponding destination ports at the same time;
and when the data size is larger than the cache space, a plurality of second data are cached in batches and enter the corresponding destination ports, and the stored data are read out and then are put into the next batch of data, so that the data loss is avoided.
For example, the storage space of the destination port is 100M, and the received second data to enter the destination port 1 is 50M, and the received second data to enter the destination port 2 is 40M, obviously, the storage space can accommodate the next two sets of second data at the same time, and therefore, the two sets of second data can be stored in the destination port 1 and the destination port 2 at the same time;
if the received second data to be entered into the destination port 1 is 50M, that is, the received second data to be entered into the destination port 2 is 60M, it is obvious that the storage space cannot accommodate the next two sets of second data, and therefore, the second data with the size of 50M may be stored into the destination port 1, and after the virtual train control onboard device reads the second data with the size of 50M, the second data with the size of 60M may be stored into the destination port 2.
The socket data packet is written with an MVB identifier, the unpacking module is identified as an MVB information packet through the MVB identifier, and the analysis is carried out according to a specified protocol.
Illustratively, the packaging module and the unpacking module agree with each other, an int value is added in front of each socket data packet of the packaging module, the unpacking module identifies the int value, and then the data in the data packet is determined to be MVB data, and the unpacking module analyzes the data.
Further, after receiving the first data, the sending module caches the first data, and organizes the data of the source port according to task scheduling.
In order to ensure the integrity and the real-time performance of data transmission, the second time interval t2 is less than or equal to the first time interval t 1; for example, the first time interval t1 is 100ms, the second time interval t2 is 40ms, and since transmission is performed every 40ms, and a socket packet is formed every 100ms, the socket packet will not be lost due to delayed transmission;
if the first time interval t1 is 40ms and the second time interval t2 is 100ms, since the transmission is performed every 100ms and the socket data packet is composed every 40ms, the transmission speed is lower than the packet-packing speed, which may result in packet loss.
In this embodiment, the socket of the emulated MVB system adopts a semi-coherent description, and performs data transmission in a streaming socket format according to the port and the local address of the virtual MVB software, and the streaming socket provides a reliable, connection-oriented, bidirectional data transmission service, and realizes error-free and repeat-free data transmission. The streaming socket is provided with flow control, and the transmitted data is regarded as a byte stream without record boundaries. In the TCP/IP protocol cluster, the TCP protocol is used to realize the transmission of byte stream, and when a user wants to send a large amount of data or has a high requirement on data transmission, a streaming socket can be used.
Referring to fig. 6, this embodiment further provides a method for simulating an MVB, including the following steps:
receiving first data at a first time interval t 1;
forming a socket data packet by the first data according to a preset protocol;
sending the socket data packet through the Ethernet according to a second time interval t 2;
receiving a socket data packet sent by the Ethernet according to a second time interval t2, and decomposing the socket data packet into second data;
and receiving and buffering the second data, and sending the second data according to the first time interval t 1.
In this embodiment, when performing packet packing, each Socket packet may include one or more source port data sub-packets, a packet header of the Socket data packet specifies a length, a data portion is formed by concatenating one or more sub-packets formed by one or more MVB port data, and each sub-packet header includes a port number and a sub-packet length. The unpacking module corresponds sub-packages to different destination port data caches according to a protocol for reading by the virtual train control vehicle-mounted equipment; specifically, the socket data packet is in the form of: the packet length (short), the packet header (short), the messages (string) + the packet tail (short), and the Message structure is as follows: [ sub-packet header 1 (length + source port number or destination port number) + sub-packet data 1] + [ sub-packet header 2 (length + source port number or destination port number) + sub-packet data 2] … … + [ sub-packet header n (length + source port number or destination port number) + sub-packet data n ]; the unpacking module is used for decomposing the socket data packet into a plurality of sub-packets after receiving the socket data packet, decomposing the sub-packets into a plurality of second data, and caching the plurality of second data to corresponding destination ports according to the port numbers written in the packet heads of the sub-packets.
According to the size of data written into a source port, the data of the source port are reasonably packaged, a sub-packet is formed by the data of each source port, and a plurality of sub-packets are connected in series to form a socket data packet and are sent together on the premise that the length of the socket data packet does not exceed the allowable length.
If a plurality of second data are received simultaneously;
judging whether the sum of the sizes of the plurality of second data is larger than the cache space of the destination port or not;
under the condition that the cache space of the destination port is not larger than that of the destination port, a plurality of second data are cached and enter a plurality of corresponding destination ports at the same time;
and under the condition that the buffer space of the destination port is larger than the buffer space of the destination port, the second data enter the corresponding destination ports in a batch buffer mode.
For example, the storage space of the destination port is 100M, and the received second data to enter the destination port 1 is 50M, and the received second data to enter the destination port 2 is 40M, obviously, the storage space can accommodate the next two sets of second data at the same time, and therefore, the two sets of second data can be simultaneously stored in the ports;
if the received second data to be entered into the destination port 1 is 50M, that is, the received second data to be entered into the destination port 2 is 60M, it is obvious that the storage space cannot accommodate the next two sets of second data, and therefore, the second data with the size of 50M may be stored into the destination port 1, and after the virtual train control onboard device reads the second data with the size of 50M, the second data with the size of 60M may be stored into the destination port 2.
The socket data packet is written with an MVB identifier, is identified as an MVB information packet through the MVB identifier, and is analyzed according to a specified protocol.
Illustratively, an int value is added in front of each socket data packet, and when the int value is identified, the data in the data packet is judged to be MVB data, and the socket data packet is analyzed.
And after receiving the first data, caching the first data, and organizing the data of the sending source port according to task scheduling.
In order to ensure the integrity and the real-time performance of data transmission, the second time interval t2 is less than or equal to the first time interval t 1; for example, the first time interval t1 is 100ms, the second time interval t2 is 40ms, and since transmission is performed every 40ms, and a socket packet is formed every 100ms, the socket packet will not be lost due to delayed transmission;
if the first time interval t1 is 40ms and the second time interval t2 is 100ms, since the transmission is performed every 100ms and the socket data packet is composed every 40ms, the transmission speed is lower than the packet-packing speed, which may result in packet loss.
In this embodiment, the socket of the simulation MVB method adopts semi-correlation description, and performs data transmission in a streaming socket format according to the port and the local address of the virtual MVB software, and the streaming socket provides a reliable, connection-oriented, bidirectional data transmission service, and realizes error-free and repeated data transmission. The streaming socket is provided with flow control, and the transmitted data is regarded as a byte stream without record boundaries. In the TCP/IP protocol cluster, the TCP protocol is used to realize the transmission of byte stream, and when a user wants to send a large amount of data or has a high requirement on data transmission, a streaming socket can be used.
The embodiment also provides a device for simulating an MVB, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for simulating an MVB when executing the computer program.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the apparatus for simulating the MVB. For example, the computer program may be divided into a sending module, a packaging module, a transmission module, an unpacking module and a reading module, and the specific functions of the modules are as follows:
a sending module, configured to receive first data according to a first time interval t 1;
the packaging module is used for forming the first data into a socket data packet;
the transmission module is used for sending the socket data packet through the Ethernet according to a second time interval t 2;
the unpacking module is used for receiving the socket data packet sent by the Ethernet according to a second time interval t2 and decomposing the socket data packet into second data;
and the reading module is used for receiving and buffering the second data, and sending the second data according to the first time interval t 1.
The device for simulating the MVB can be a desktop computer, a notebook, a palm computer, a cloud server and other computing equipment. The means for simulating an MVB may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that fig. 5 is merely an example of a means for emulating an MVB and does not constitute a limitation of means for emulating an MVB and may include more or fewer components than shown or some components in combination or different components, e.g., the means for emulating an MVB may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the device that simulates the MVB, and connects the various parts of the entire device that simulates the MVB using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement the various functions of the apparatus for simulating an MVB by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The computer program, when executed by a processor, implements the steps of the method of simulating an MVB.
The device-integrated modules/units simulating the MVB, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for simulating MVB is characterized in that:
simulating a virtual train control onboard device A and a virtual train control onboard device B;
adding virtual MVB software on the virtual train control vehicle-mounted equipment A and the virtual train control vehicle-mounted equipment B, wherein the virtual MVB software is provided with an MVB port;
the virtual train control vehicle-mounted equipment A and the virtual train control vehicle-mounted equipment B realize information transmission through an MVB port, wherein the MVB port is used for transmitting information;
the virtual train control vehicle-mounted equipment A receives first data through a write port according to a first time interval, and the first data form a socket data packet;
according to a second time interval, the virtual train control vehicle-mounted equipment A sends a socket data packet through the Ethernet; wherein the second time interval is less than or equal to the first time interval;
according to a second time interval, the virtual train control onboard equipment B receives a socket data packet sent by the Ethernet and decomposes the socket data packet to form second data;
the virtual train control vehicle-mounted equipment B receives and caches the second data, and the read port sends the second data according to the first time interval;
the virtual train control vehicle-mounted device B receives the plurality of second data at the same time, judges whether the size of the plurality of second data is larger than the cache space of the destination port, and executes the following steps according to the judgment result, wherein the steps comprise:
under the condition that the cache space of the plurality of destination ports is not larger than that of the plurality of destination ports, the plurality of second data are cached and enter the corresponding plurality of destination ports simultaneously;
and under the condition that the buffer space of the second data is larger than the buffer space of the plurality of destination ports, the plurality of second data enter the corresponding destination ports in a batch buffer mode.
2. The method of claim 1, wherein a Socket packet comprises at least one sub-packet, and a header of the sub-packet is written to a port number of a source port or a destination port;
and caching the socket data packet into a corresponding destination port based on the port number.
3. The method of any one of claims 1-2, wherein the socket data packet is written with an MVB identifier.
4. The method of any of claims 1-2, wherein the first data is buffered after receiving the first data.
5. A system for simulating an MVB, the system configured to:
simulating a virtual train control onboard device A and a virtual train control onboard device B;
adding virtual MVB software on the virtual train control vehicle-mounted equipment A and the virtual train control vehicle-mounted equipment B, wherein the virtual MVB software is provided with an MVB port;
virtual train control on-board equipment A and virtual train control on-board equipment B realize information transmission through the MVB port, wherein, the system includes:
the sending module is used for receiving first data by the writing port according to a first time interval;
the packaging module is used for forming the first data into a socket data packet;
the transmission module is used for sending the socket data packet through the Ethernet according to a second time interval; wherein the second time interval is less than or equal to the first time interval;
the unpacking module is used for receiving the socket data packet sent by the Ethernet according to a second time interval and decomposing the socket data packet into second data;
the reading module is used for receiving and caching the second data, and the reading port sends the second data according to the first time interval;
the reading module receives a plurality of second data at the same time, and judges whether the size of the plurality of second data is larger than the cache space of the plurality of destination ports;
under the condition that the cache space of the plurality of destination ports is not larger than that of the plurality of destination ports, the plurality of second data are cached and enter the corresponding destination ports simultaneously;
and under the condition that the buffer space of the second data is larger than the buffer space of the plurality of destination ports, the plurality of second data enter the corresponding destination ports in a batch buffer mode.
6. The system of claim 5, wherein the Socket packet includes at least one sub-packet, and a header of the sub-packet is written to a port number of the source port or the destination port;
and caching the socket data packet into a corresponding destination port based on the port number.
7. A system for simulating an MVB according to any one of claims 5 to 6, wherein a socket packet is written with an MVB identifier.
8. The system of any one of claims 5-6, wherein the sending module buffers the first data after receiving the first data.
9. An apparatus for simulating an MVB comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for simulating an MVB of any of claims 1-4 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of simulating an MVB according to any one of claims 1 to 4.
CN201910989679.4A 2019-10-17 2019-10-17 Method, system, device and computer readable medium for simulating MVB Active CN110868344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910989679.4A CN110868344B (en) 2019-10-17 2019-10-17 Method, system, device and computer readable medium for simulating MVB

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910989679.4A CN110868344B (en) 2019-10-17 2019-10-17 Method, system, device and computer readable medium for simulating MVB

Publications (2)

Publication Number Publication Date
CN110868344A CN110868344A (en) 2020-03-06
CN110868344B true CN110868344B (en) 2022-04-19

Family

ID=69652301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910989679.4A Active CN110868344B (en) 2019-10-17 2019-10-17 Method, system, device and computer readable medium for simulating MVB

Country Status (1)

Country Link
CN (1) CN110868344B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348199A (en) * 2022-07-07 2022-11-15 株洲中车时代电气股份有限公司 Vehicle-mounted network debugging system and method based on MVB bus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514074A (en) * 2013-09-06 2014-01-15 清华大学 MVB network card development method and platform
CN106254348A (en) * 2016-08-08 2016-12-21 中国地质大学武汉 A kind of Wireless LAN communication method based on Android
CN106790162A (en) * 2016-12-29 2017-05-31 中国科学院计算技术研究所 Virtual network optimization method and system
CN109525684A (en) * 2018-12-11 2019-03-26 杭州数梦工场科技有限公司 Message forwarding method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114156Y (en) * 2007-08-06 2008-09-10 谢步明 GPRS-MVB gateway based on 8051CPU core
CN201690463U (en) * 2010-03-05 2010-12-29 中国铁道科学研究院机车车辆研究所 Vehicle communication network analyzer
CN101887379B (en) * 2010-06-18 2013-03-06 北京航空航天大学 Virtual network card-based wireless channel simulation method
CN102621436B (en) * 2012-05-02 2014-10-29 中国铁道科学研究院机车车辆研究所 Single vehicle debugging test stand and debugging method
US10180994B2 (en) * 2012-06-11 2019-01-15 Synopsys, Inc. Dynamic model adaptation to interface protocols
CN105049439B (en) * 2015-08-06 2018-04-13 株洲南车时代电气股份有限公司 A kind of locomotive display device data communications method based on protocol configuration
CN107390549A (en) * 2017-09-04 2017-11-24 中车青岛四方车辆研究所有限公司 CRH5 types car control logic analogue system and method
CN109600278A (en) * 2018-12-10 2019-04-09 浪潮(北京)电子信息产业有限公司 A kind of data communications method, device, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514074A (en) * 2013-09-06 2014-01-15 清华大学 MVB network card development method and platform
CN106254348A (en) * 2016-08-08 2016-12-21 中国地质大学武汉 A kind of Wireless LAN communication method based on Android
CN106790162A (en) * 2016-12-29 2017-05-31 中国科学院计算技术研究所 Virtual network optimization method and system
CN109525684A (en) * 2018-12-11 2019-03-26 杭州数梦工场科技有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN110868344A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN110909460B (en) V2X simulation test method, device, equipment and storage medium for Internet of vehicles
CN107092541A (en) A kind of method that utilization virtual machine carries out storage performance test
CN109743291A (en) A kind of telemetry real time processing system and method based on round-robin queue
WO2017005010A1 (en) Audio processing method and device, and computer storage medium
US7817654B2 (en) Test device and a test method
CN108123894B (en) Method for realizing low-delay transmission of sampled data stream based on Intel gigabit network card
CN112861468B (en) Software and hardware collaborative simulation verification method, device and medium
CN110719215B (en) Flow information acquisition method and device of virtual network
CN102395958B (en) Concurrent processing method and device for data packet
CN116028292B (en) Simulation verification system and method for remote direct memory access simulation verification
CN115905061B (en) Data transfer device, DMA device, electronic apparatus, and data transfer method
CN109951494A (en) Emulate data processing method, device, emulator and storage medium
CN108462649B (en) Method and device for reducing high-priority data transmission delay in congestion state of ONU
CN107391285A (en) Internal memory sharing method and system
CN111343148A (en) FGPA communication data processing method, system and device
CN110868344B (en) Method, system, device and computer readable medium for simulating MVB
CN104378161A (en) FCoE protocol acceleration engine IP core based on AXI4 bus formwork
EP3982268A2 (en) Chassis simulation method and apparatus, server, storage medium and program product
CN109857553A (en) EMS memory management process and device
CN113590408B (en) Data access method, data access device, simulation device and simulation TCAM chip
CN102333003B (en) Simulation test system of data casting distribution network
CN109558107B (en) FC message receiving management method for shared buffer area
CN108107750B (en) Real-time IO data processing method and system for power system simulation
CN106911715B (en) A kind of communication control unit and communication control method separating Read-write Catrol
CN104635661A (en) Data transmission device and data transmission method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant