CN-121984646-A - Photoelectric redundancy communication method, electronic device, storage medium, and program product
Abstract
The embodiment of the application provides an optoelectronic redundancy communication method, electronic equipment, a storage medium and a program product. The method comprises the steps of receiving first communication data transmitted by a first communication link and second communication data transmitted by a second communication link, wherein the first communication link is a gigabit Ethernet physical link based on electric signal transmission, the second communication link is an optical fiber physical link based on optical signal transmission, the first communication data and the second communication data are generated based on the same data packet, acquiring a first time stamp of the first communication data and a second time stamp of the second communication data, performing loop detection on the first communication data and the second communication data according to the first time stamp and the second time stamp, determining target communication data in the first communication data and the second communication data, and transmitting the target communication data to a next communication node. The method can improve the reliability of network communication.
Inventors
- SHI HUA
- WAN HONGYU
- ZHANG KAIRONG
- HU CHUANJIE
- FU CHUNLEI
- WANG LIANZHENG
Assignees
- 中车唐山机车车辆有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260104
Claims (12)
- 1. An optoelectronic redundant communication method applied to a communication node, comprising: receiving first communication data transmitted by a first communication link and second communication data transmitted by a second communication link, wherein the first communication link is a gigabit Ethernet physical link based on electric signal transmission, the second communication link is an optical fiber physical link based on optical signal transmission, and the first communication data and the second communication data are generated based on the same data packet; acquiring a first time stamp of the first communication data and a second time stamp of the second communication data; And carrying out loop detection on the first communication data and the second communication data according to the first timestamp and the second timestamp, determining target communication data in the first communication data and the second communication data, and sending the target communication data to a next communication node.
- 2. The method of claim 1, wherein determining target communication data among the first communication data and the second communication data based on the first timestamp and the second timestamp comprises: determining the first communication data as target communication data when the first timestamp and the second timestamp are normal; When the first time stamp is normal and the second time stamp is faulty, determining the first communication data as target communication data; And when the first time stamp is in failure and the second time stamp is in a preset time stamp range, determining the second communication data as target communication data.
- 3. The method of claim 1, wherein after receiving the first communication data transmitted by the first communication link and the second communication data transmitted by the second communication link, the method further comprises: Judging whether a first communication state of the first communication link and/or a second communication state of the second communication link is normal or not; Writing the first communication data and the second communication data into a cache area when the first communication state and the second communication state are normal; When the first communication state is abnormal and the second communication state is normal, writing the first communication data and the second communication data into a cache area; And when the first communication state is normal and the second communication state is abnormal, writing the first communication data and the second communication data into a loop-back area.
- 4. A method according to claim 3, characterized in that the method further comprises: When the first communication state is abnormal and the second communication state is normal, writing the data in the buffer area into the loop-back area; And executing the step of loop detection on the first communication data and the second communication data according to the first timestamp and the second timestamp on the data in the loop area.
- 5. A method according to claim 3, wherein before said determining whether the first communication state of the first communication link and/or the second communication state of the second communication link is normal, the method further comprises: judging whether the first communication data and/or the second communication data have conflict or not; and when the conflict exists, carrying out conflict processing on the first communication data and the second communication data.
- 6. The method of claim 3, further comprising re-receiving the first communication data transmitted by the first communication link and the second communication data transmitted by the second communication link when the first communication state and the second communication state are abnormal.
- 7. The method according to claim 1, wherein the first communication link and/or the second communication link comprises at least two sub-communication links for transmitting communication data using other communication links when at least one of the sub-communication links fails.
- 8. The method according to claim 1, characterized in that the first communication link and/or the second communication link are/is used for transmitting communication data between at least two communication nodes, which have a bypass function, which are used for transmitting communication data around the failed communication node when at least one communication node fails.
- 9. An optoelectronic redundant communication apparatus, the apparatus comprising: The device comprises a receiving module, a transmitting module and a receiving module, wherein the receiving module is used for receiving first communication data transmitted by a first communication link and second communication data transmitted by a second communication link, the first communication link is a gigabit Ethernet physical link based on electric signal transmission, the second communication link is an optical fiber physical link based on optical signal transmission, and the first communication data and the second communication data are generated based on the same data packet; The acquisition module is used for acquiring a first time stamp of the first communication data and a second time stamp of the second communication data; And the processing module is used for carrying out loop detection on the first communication data and the second communication data according to the first timestamp and the second timestamp, determining target communication data in the first communication data and the second communication data and sending the target communication data to a next communication node.
- 10. An electronic device is characterized by comprising a memory and a processor; the memory stores computer-executable instructions; the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-8.
- 11. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-8.
- 12. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-8.
Description
Photoelectric redundancy communication method, electronic device, storage medium, and program product Technical Field The present application relates to the field of train networking communication technologies, and in particular, to a photoelectric redundancy communication method, an electronic device, a storage medium, and a program product. Background Along with continuous improvement of the intelligent and automatic levels of the train, the communication in the train has higher requirements on the real-time performance, the reliability and the safety of data transmission. In the related art, hundred mega or gigabit Ethernet is often used as a network communication medium at the train level, however, the electromagnetic interference capability of the hundred mega or gigabit Ethernet is limited, and the problem of low network communication reliability exists. Disclosure of Invention The embodiment of the application provides an optoelectronic redundancy communication method, electronic equipment, a storage medium and a program product, which are used for improving the reliability of network communication. In a first aspect, an embodiment of the present application provides an optoelectronic redundancy communication method, including: Receiving first communication data transmitted by a first communication link and second communication data transmitted by a second communication link, wherein the first communication link is a gigabit Ethernet physical link based on electric signal transmission, the second communication link is an optical fiber physical link based on optical signal transmission, and the first communication data and the second communication data are generated based on the same data packet; acquiring a first time stamp of the first communication data and a second time stamp of the second communication data; and performing loop detection on the first communication data and the second communication data according to the first timestamp and the second timestamp, determining target communication data in the first communication data and the second communication data, and sending the target communication data to the next communication node. In one possible implementation, determining the target communication data from the first communication data and the second communication data according to the first timestamp and the second timestamp includes: determining the first communication data as target communication data when the first time stamp and the second time stamp are normal; When the first time stamp is normal and the second time stamp is faulty, determining the first communication data as target communication data; and when the first time stamp fails and the second time stamp is in a preset time stamp range, determining the second communication data as target communication data. In one possible implementation, after receiving the first communication data transmitted by the first communication link and the second communication data transmitted by the second communication link, the method further includes: judging whether the first communication state of the first communication link and/or the second communication state of the second communication link is normal or not; when the first communication state and the second communication state are normal, writing the first communication data and the second communication data into the cache area; when the first communication state is abnormal and the second communication state is normal, writing the first communication data and the second communication data into a cache area; and when the first communication state is normal and the second communication state is abnormal, writing the first communication data and the second communication data into the loop-back area. In one possible implementation, the method further includes: When the first communication state is abnormal and the second communication state is normal, writing the data in the buffer memory area into the loop-back area; And performing loop detection on the first communication data and the second communication data according to the first timestamp and the second timestamp on the data in the loop area. In one possible implementation, before determining whether the first communication state of the first communication link and/or the second communication state of the second communication link is normal, the method further includes: Judging whether the first communication data and/or the second communication data have conflict or not; And when the conflict exists, carrying out conflict processing on the first communication data and the second communication data. In one possible implementation, the method further includes re-receiving the first communication data transmitted by the first communication link and the second communication data transmitted by the second communication link when the first communication state and the second communication state are abnormal. In one possible implementation,