CN109729003B - Passenger train time data transmission method and system - Google Patents
Passenger train time data transmission method and system Download PDFInfo
- Publication number
- CN109729003B CN109729003B CN201811619459.4A CN201811619459A CN109729003B CN 109729003 B CN109729003 B CN 109729003B CN 201811619459 A CN201811619459 A CN 201811619459A CN 109729003 B CN109729003 B CN 109729003B
- Authority
- CN
- China
- Prior art keywords
- message
- message body
- receiving
- sending
- queue
- 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
Links
Images
Abstract
The invention provides a passenger train time data transmission method, which comprises the following steps: s1: the database generates a message body, a message header and a message queue sending path formed by data files through the regular execution of a storage process; s2: a sending end writes a message body and a message title into a windows special message queue; s3: a sending end reads a message body from a windows special message queue, starts a thread and sends the message body to a receiving end appointed in a service configuration file; s4: after receiving the transmitted handshake signal, the receiving end receives the message body and stores the message body into a buffer area, and sends a receipt back to the sending end; s5: and after receiving the receipt, the sending end confirms the delivery. This approach can ensure that the message body is properly transmitted between the two systems. In addition, the invention also provides a passenger train time data transmission system.
Description
Technical Field
The invention relates to the field of communication of railway systems, in particular to a method and a system for transmitting passenger train time data.
Background
The passenger transport broadcasting system is an important subsystem of a railway passenger service system, and generally adopts a data interface mode to receive train time transmitted from a superior level, or a station broadcaster manually switches broadcasts according to command commands. When data is transmitted at the time of a train, the real-time performance and the integrity of the data are ensured, and the coordination and synchronization of a passenger transport broadcasting system and a guiding system are also considered, so that the requirements on data format definition and transmission are high.
The existing message transmission mechanism mostly adopts multicast, the transmission mechanism generally occupies more resources, and lacks effective control, and the quality of message transmission can not be ensured.
Disclosure of Invention
In order to solve the problems, the application provides a passenger train time data transmission method and system, which ensure that a message body is correctly transmitted between two systems.
The invention discloses the following technical scheme:
the embodiment of the invention provides a passenger train time data transmission method, which comprises the following steps:
s1: the database generates a message body, a message header and a message queue sending path formed by data files through the regular execution of a storage process;
s2: a sending end writes a message body and a message title into a windows special message queue;
s3: a sending end reads a message body from a windows special message queue, starts a thread and sends the message body to a receiving end appointed in a service configuration file;
s4: after receiving the transmitted handshake signal, the receiving end receives the message body and stores the message body into a buffer area, and sends a receipt back to the sending end;
s5: and after receiving the receipt, the sending end confirms the delivery.
Further, in step S2, the sender writes the message body and the message header into the windows-specific message queue through a CLR-format storage process.
Further, in step S3, the sender sends the message body to the receiver specified in the service profile via UDP or TCP/IP protocol.
Further, in step S4, after the receiving end receives the message body, it needs to convert the message body into the predefined ASCII or UNICODE message body format of the message queue, and starts a thread to write the message body into the local dedicated message queue, where the queue path is specified by the service configuration file.
The embodiment of the invention also provides a passenger train time data transmission system, which is used for realizing the method and comprises the following steps:
the data storage terminal is used for storing data and generating a message body, a message header and a message queue sending path formed by data files through the regular execution of the storage process;
the sending end is used for sending the message body and the message title generated by the data storage end to the receiving end by using the windows special message queue;
and the receiving end is used for receiving the message body and the message header sent by the sending end and feeding back the message body and the message header to the sending end.
Further, the transmitting end includes:
a sending preparation unit, configured to write the message body and the message header into the windows dedicated message queue according to the message queue sending path;
the sending and transmitting unit is used for reading the message body from the windows special message queue, starting a thread and sending the message body to a specified receiving end in the service configuration file;
and the sending confirmation unit is used for receiving the feedback of the receiving end and confirming the transmission result.
Further, the receiving end includes:
the receiving preparation unit is used for receiving handshake signals transmitted by the soldier confirmation transmitting end;
the receiving and transmitting unit is used for receiving the message body and storing the message body into the buffer area;
and the receiving feedback unit is used for sending the receiving receipt to the receiving end.
Further, the receiving end further includes:
an access preparation unit for converting the received message body into a message queue predefined ASCII or UNICODE message body format, initiating a thread, writing the message body into a native dedicated message queue, the queue path being specified by the service configuration file.
The beneficial effects of the invention are as follows:
and asynchronously transmitting data messages between the hosts by using a windows message queue mechanism, and storing the data messages in a specified folder for an opposite-end system to access. And after receiving the issued data message, the opposite terminal system sends a receiving receipt, and confirms the delivery after being received by the windows service program. The accurate delivery of the message body is ensured, and the disorder caused by the error information transmission is avoided.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a system according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. It will be appreciated by those of skill in the art that the following specific examples or embodiments are a series of presently preferred arrangements of the invention to further explain the principles of the invention, and that such arrangements may be used in conjunction or association with one another, unless it is expressly stated that some or all of the specific examples or embodiments are not in association or association with other examples or embodiments. Meanwhile, the following specific examples or embodiments are only provided as an optimized arrangement mode and are not to be understood as limiting the protection scope of the present invention.
Examples
As shown in fig. 1, an embodiment of the present invention provides a method for transmitting data at a time of a passenger train, where a windows message queue mechanism is used to asynchronously transmit data packets between hosts, and the data packets are stored in a designated folder for an opposite-end system to access.
The detailed principle of the mechanism is as follows:
1) the database generates a message body, a message header and a message queue transmission path formed by a data file through the regular execution of the storage process.
2) The transmitting end writes the message body and the message header into the special message queue through the CLR format storage process.
3) And the sending end reads the message body from the windows special message queue, starts a thread and sends the message body to the opposite end receiving address specified in the service configuration file through a UDP (user datagram protocol) or a TCP/IP (transmission control protocol/internet protocol).
4) After receiving UDP or TCP/IP handshake signals transmitted from the transmitting end, the receiving end receives the data message and stores the data message into a buffer area, and sends a receipt back to the transmitting end.
In this process, for the purpose of facilitating the next transmission or access, for the received message body, it is also necessary to convert to the predefined ASCII or UNICODE message body format of the message queue, start a thread, write the message body to the native dedicated message queue, and the queue path is specified by the service configuration file.
5) And after receiving the receipt, the sending end confirms the delivery.
As shown in fig. 2, an embodiment of the present invention further provides a passenger train time data transmission system, which is used for implementing the above method, and the system includes a data storage end, a transmitting end, and a receiving end.
The data storage terminal is used for storing data and generating a message body, a message header and a message queue sending path formed by data files through the regular execution of the storage process.
And the sending end is used for sending the message body and the message title generated by the data storage end to the receiving end by using the windows special message queue.
The transmitting end comprises: a sending preparation unit, configured to write the message body and the message header into the windows dedicated message queue according to the message queue sending path; the sending and transmitting unit is used for reading the message body from the windows special message queue, starting a thread and sending the message body to a specified receiving end in the service configuration file; and the sending confirmation unit is used for receiving the feedback of the receiving end and confirming the transmission result.
And the receiving end is used for receiving the message body and the message header sent by the sending end and feeding back the message body and the message header to the sending end.
The receiving end comprises: the receiving preparation unit is used for receiving handshake signals transmitted by the soldier confirmation transmitting end; the receiving and transmitting unit is used for receiving the message body and storing the message body into the buffer area; and the receiving feedback unit is used for sending the receiving receipt to the receiving end.
For subsequent access and transmission, the receiving end further comprises an access preparation unit for converting the received message body into a message queue predefined ASCII or UNICODE message body format, starting a thread, writing the message body into a local dedicated message queue, the queue path being specified by the service configuration file.
It should be noted that the above-described embodiments allow those skilled in the art to more fully understand the specific structure of the present invention, but do not limit the invention in any way. Therefore, although the present invention has been described in detail in the specification and drawings and the examples, it will be understood by those skilled in the art that the present invention may be modified and equivalents may be substituted; all technical solutions and modifications thereof which do not depart from the spirit and scope of the present invention are intended to be covered by the scope of the present invention.
Claims (2)
1. A passenger train time data transmission method is characterized by comprising the following steps:
s1: the database generates a message body, a message header and a message queue sending path formed by data files through the regular execution of a storage process;
s2: a sending end writes a message body and a message title into a windows special message queue;
in step S2, the sending end writes the message body and the message header into the windows dedicated message queue through the CLR format storage process;
s3: a sending end reads a message body from a windows special message queue, starts a thread and sends the message body to a receiving end appointed in a service configuration file;
in step S3, the sending end sends the message body to the receiving end specified in the service configuration file through UDP or TCP/IP protocol;
s4: after receiving the transmitted handshake signal, the receiving end receives the message body and stores the message body into a buffer area, and sends a receipt back to the sending end;
in step S4, after receiving the message body, the receiving end needs to convert the message body into an ASCII or UNICODE message body format predefined by the message queue, start a thread, write the message body into the message queue dedicated to the local machine, and the queue path is specified by the service configuration file;
s5: and after receiving the receipt, the sending end confirms the delivery.
2. A passenger train timekeeping data transmission system for implementing a passenger train timekeeping data transmission method according to claim 1, said system comprising:
the data storage terminal is used for storing data and generating a message body, a message header and a message queue sending path formed by data files through the regular execution of the storage process;
the sending end is used for sending the message body and the message title generated by the data storage end to the receiving end by using the windows special message queue;
the receiving end is used for receiving the message body and the message header sent by the sending end and feeding back the message body and the message header to the sending end;
the transmitting end comprises:
a sending preparation unit, configured to write the message body and the message header into the windows dedicated message queue according to the message queue sending path;
the sending and transmitting unit is used for reading the message body from the windows special message queue, starting a thread and sending the message body to a specified receiving end in the service configuration file;
a sending confirmation unit for receiving the feedback of the receiving end and confirming the transmission result;
the receiving end comprises:
the receiving preparation unit is used for receiving handshake signals transmitted by the soldier confirmation transmitting end;
the receiving and transmitting unit is used for receiving the message body and storing the message body into the buffer area;
the receiving feedback unit is used for sending a receiving receipt to the receiving end;
an access preparation unit for converting the received message body into a message queue predefined ASCII or UNICODE message body format, initiating a thread, writing the message body into a native dedicated message queue, the queue path being specified by the service configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811619459.4A CN109729003B (en) | 2018-12-28 | 2018-12-28 | Passenger train time data transmission method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811619459.4A CN109729003B (en) | 2018-12-28 | 2018-12-28 | Passenger train time data transmission method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109729003A CN109729003A (en) | 2019-05-07 |
CN109729003B true CN109729003B (en) | 2021-05-18 |
Family
ID=66296718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811619459.4A Active CN109729003B (en) | 2018-12-28 | 2018-12-28 | Passenger train time data transmission method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109729003B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110618881B (en) * | 2019-09-19 | 2022-04-12 | 中国银行股份有限公司 | Method and system for simulating message queue |
CN115426209B (en) * | 2022-11-07 | 2023-02-10 | 湖南三湘银行股份有限公司 | High-reliability message queue broadcast control method based on message processing |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101159711A (en) * | 2007-11-27 | 2008-04-09 | 航天东方红卫星有限公司 | Self-adaptive real time message subscribing and issuing system and method |
CN103645942A (en) * | 2013-12-12 | 2014-03-19 | 北京奇虎科技有限公司 | Message queue based write and read method and system of shared memory |
CN106713018A (en) * | 2016-12-08 | 2017-05-24 | 中国电信股份有限公司物联网分公司 | Message queue business data scheduling method and message queue implementation method |
CN107239380A (en) * | 2017-05-10 | 2017-10-10 | 杭州铭师堂教育科技发展有限公司 | A kind of message queue monitoring method based on zabbix |
CN108234606A (en) * | 2017-12-15 | 2018-06-29 | 浪潮软件股份有限公司 | A kind of information management method and managing device |
CN108667719A (en) * | 2018-04-26 | 2018-10-16 | 广州品唯软件有限公司 | A kind of real-time Message Passing method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8984184B2 (en) * | 2013-04-05 | 2015-03-17 | William Marsh Rice University | System and method for managing input/output data of peripheral devices |
-
2018
- 2018-12-28 CN CN201811619459.4A patent/CN109729003B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101159711A (en) * | 2007-11-27 | 2008-04-09 | 航天东方红卫星有限公司 | Self-adaptive real time message subscribing and issuing system and method |
CN103645942A (en) * | 2013-12-12 | 2014-03-19 | 北京奇虎科技有限公司 | Message queue based write and read method and system of shared memory |
CN106713018A (en) * | 2016-12-08 | 2017-05-24 | 中国电信股份有限公司物联网分公司 | Message queue business data scheduling method and message queue implementation method |
CN107239380A (en) * | 2017-05-10 | 2017-10-10 | 杭州铭师堂教育科技发展有限公司 | A kind of message queue monitoring method based on zabbix |
CN108234606A (en) * | 2017-12-15 | 2018-06-29 | 浪潮软件股份有限公司 | A kind of information management method and managing device |
CN108667719A (en) * | 2018-04-26 | 2018-10-16 | 广州品唯软件有限公司 | A kind of real-time Message Passing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN109729003A (en) | 2019-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3512755B2 (en) | Communication system, communication device, and communication system using this communication device | |
US7542438B2 (en) | Reliable multicast data retransmission method by grouping wireless terminals in wireless communication medium and apparatus for the same | |
CN111786748B (en) | Data retransmission method and system, network card, device, server and storage medium | |
EP2601757B1 (en) | Method and apparatus for converting a multicast session to a unicast session | |
CN109729003B (en) | Passenger train time data transmission method and system | |
CN103841002A (en) | Method and terminal for voice transmission, voice server and voice transmission system | |
CN102752283A (en) | Method and system for transmitting files with large data sizes | |
CN108886713B (en) | Data transmission method, data receiving equipment and data sending equipment | |
CN112737928A (en) | Instant communication message sending method and device | |
CN101488840B (en) | Data transmission method and apparatus | |
US20110038369A1 (en) | Communication method and apparatus based on user datagram protocol | |
CN111752579A (en) | Bluetooth terminal upgrading method and device, storage medium and electronic equipment | |
CN101369879A (en) | Method and apparatus for requesting data retransmission | |
CN103269376A (en) | Enterprise network large file transmission system authorized and managed in centralized mode and method | |
WO2022062851A1 (en) | Waiting duration determination method and apparatus | |
CN101494531A (en) | Method and apparatus for adjusting slide window | |
CN113300818A (en) | Data transmission system and method | |
JP5062121B2 (en) | Packet retransmission control method and apparatus in multicast communication | |
WO2022127448A1 (en) | Message transmission method, terminals and storage medium | |
US8942146B2 (en) | Signal transmission method and apparatus in wireless communication system | |
CN101465719B (en) | Data retransmission method and device | |
CN102170341B (en) | Method and apparatus for data transmission | |
CN113055080B (en) | High-reliability data transmission system based on iridium satellite and Beidou dual-mode communication | |
US20080263161A1 (en) | Terminal and method for distinguishing between email recipients using specific identifier | |
KR20010064867A (en) | Method for automatically repeating retransmission and receiving in data transfer system |
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 |