Can data receiving method and apparatus for automatic train operation system

By comparing packet count and serial number in dual CAN bus communication, abnormal channels are identified and data is classified and stored, solving the problems of data loss and duplication in the automatic train operation system, realizing accurate and continuous data reception, and improving the reliability of the system.

WO2025246227A1PCT designated stage Publication Date: 2025-12-04CRSC RESEARCH & DESIGN INSTITUTE GROUP CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/134664
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-29
Filing Date
2024-11-26
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

In existing automatic train operation systems, redundant CAN bus communication suffers from data packet loss, duplicate packets, and data being actively discarded when the data buffer is full under abnormal conditions, resulting in insufficient data reliability.

Method used

The system employs dual CAN bus communication. By comparing the number of packets and data serial numbers on the two CAN buses, abnormal channels are identified and stored in different FIFOs. Data packets are received based on the serial number comparison results to ensure data accuracy and continuity.

Benefits of technology

It improves the reliability of redundant CAN communication, ensures the accuracy and continuity of data, makes full use of the advantages of redundant channels, and avoids data loss and duplication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024134664_04122025_PF_FP_ABST
    Figure CN2024134664_04122025_PF_FP_ABST
Patent Text Reader

Abstract

A CAN data receiving method and apparatus for an automatic train operation system. The method comprises: when the data packet count on either CAN0 or CAN1 channel is greater than 0, detecting CAN channel communication by comparing the packet count on CAN0 with the packet count on CAN1, and receiving data; identifying a CAN ID serial number of the received data, and comparing same with an expected serial number; and receiving data packets on the basis of a serial number comparison result. In the method, by means of the redundancy generated by communication using two CAN channels, the CAN ID serial numbers for the same type of data in redundant channels are respectively identified and compared with an expected serial number of this type of data, then packets determined to be correct are received, and packets determined to be abnormal are discarded or retained. By means of the effect of redundant transmission, the method ensures that each data packet received undergoes type and serial number verification against the data in two communication channels, ensuring data accuracy and continuity.
Need to check novelty before this filing date? Find Prior Art

Description

A CAN data receiving method and apparatus for an automatic train operation system Technical Field

[0001] This disclosure relates to the field of rail communication technology, and in particular to a CAN data receiving method and apparatus for an automatic train operation system. Background Technology

[0002] In existing automatic train operation systems, CAN bus communication is still used for data transmission between boards and devices. Current technology employs two CAN buses for redundant communication, which effectively improves data reliability compared to single-CAN bus communication. During reception, redundant data from both CAN buses is received, and the number of packets on each bus is compared. If the bus with more packets is received, and an anomaly occurs where the sending end repeatedly transmits the same packet, the duplicate packet will be received, causing subsequent logic problems. If the bus with fewer packets is received, and an anomaly occurs where bus data is lost, less data will be received, also causing subsequent logic problems. If the number of packets received from both CAN buses is equal, an anomaly on either bus will prevent data from being received, leading to a full data buffer and the data being actively discarded.

[0003] To address the problems caused by the above receiving method, a more effective redundant channel receiving method is needed. Summary of the Invention

[0004] To address the aforementioned issues, this disclosure provides a CAN data receiving method and apparatus for a train automatic operation system, which improves the reliability of redundant CAN communication.

[0005] A first aspect includes a CAN data receiving method for a train automatic operation system, the method comprising:

[0006] When the number of data packets in either CAN0 or CAN1 channel is greater than 0, CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, and data is collected.

[0007] Identify the CAN ID sequence number of the received data and compare it with the desired sequence number;

[0008] Data packets are received based on the serial number comparison result.

[0009] Specifically, the serial number is collected incrementally. For example, if the serial number of the previous package was 3, then the serial number of the next package will be 4.

[0010] Furthermore, the number of data packets on either CAN0 or CAN1 channel is greater than 0, including:

[0011] The data received by CAN0 and CAN1 are classified and stored in different FIFOs (FIFO stands for First In First Out, which is a type of first-in-first-out data storage and buffer) according to the bus and data type.

[0012] Obtain the number of FIFO packets of the same type for CAN0 and CAN1. When the number of packets for CAN0 or CAN1 is greater than 0, detect CAN channel communication by comparing the number of packets for CAN0 with the number of packets for CAN1.

[0013] Furthermore, the data received from CAN0 and CAN1 is categorized and stored in different FIFOs according to the bus and data type, including:

[0014] The automatic train operation system uses redundant CAN bus communication, namely CAN0 and CAN1. The bus contains various types of communication data, identifies the data type information in the CAN ID of each data packet, and classifies the data.

[0015] Data of different data types in the CAN0 and CAN1 buses are stored in different FIFOs.

[0016] Furthermore, data of different data types from the CAN0 and CAN1 buses are stored in different FIFOs, including:

[0017] Data packets are periodically received from the CAN0 and CAN1 channels via the communication port. The number of packets in each channel is read. The data type information in the CAN ID of each data packet is read in a loop based on the number of packets. The type of each data packet is determined by the difference in the type information.

[0018] Different data types in the CAN0 bus are stored in different FIFOs: the first type of data is stored in CAN0-1 FIFO, the second type of data is stored in CAN0-2 FIFO, and so on, the Xth type of data is stored in CAN0-X FIFO;

[0019] Different data types in the CAN1 bus are stored in different FIFOs: the first type of data is stored in CAN1-1 FIFO, the second type of data is stored in CAN1-2 FIFO, and so on, the Xth type of data is stored in CAN1-X FIFO.

[0020] Furthermore, the number of FIFO packets of the same type for CAN0 and CAN1 is obtained. When the number of packets for CAN0 or CAN1 is greater than 0, CAN channel communication is detected by comparing the number of packets for CAN0 with the number of packets for CAN1, including:

[0021] Read the number of data packets stored in the two FIFOs of the same type of data in CAN0 and CAN1, and compare whether the two packet counts are greater than 0;

[0022] When any data packet is greater than 0, CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets.

[0023] Furthermore, CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, and data is collected, including:

[0024] Compare the number of packets in CAN0 FIFO and CAN1 FIFO for the same data type, specifically including:

[0025] When the number of CAN0 packets is greater than the number of CAN1 packets, and the difference exceeds the allowable threshold, the CAN1 channel is judged to be abnormal; the CAN0 channel is the only trusted channel, and all data is received.

[0026] When the number of CAN1 packets is greater than the number of CAN0 packets, and the difference exceeds the allowable threshold, the CAN0 channel is judged to be abnormal; the CAN1 channel is the only trusted channel, and all data is received.

[0027] If the difference between the number of CAN0 packets and the number of CAN1 packets is less than the allowable threshold, or if the number of packets is the same, the subsequent packet receiving cycle will proceed according to the minimum number of packets.

[0028] The allowable threshold can be set or adjusted according to the actual communication situation.

[0029] Furthermore, the received data is identified by its CAN ID serial number, and compared with the desired serial number, including:

[0030] The CAN ID serial number is compared with the desired serial number to determine the data details, including:

[0031] When the data CAN ID sequence number equals the desired sequence number, it is defined as correct.

[0032] If the CAN ID sequence number of the data is less than the desired sequence number, it is defined as a duplicate packet and is discarded.

[0033] If the data CAN ID serial number is greater than the desired serial number, it is defined as a packet loss, retained in the next cycle, and then compared with the desired serial number.

[0034] Furthermore, data packets are received based on the comparison results of the serial numbers, including:

[0035] When a CAN0 packet is defined as correct, a CAN1 packet will not be processed under any circumstances, and the correct CAN0 packet will be accepted.

[0036] When a CAN0 packet is defined as a lost or duplicate packet, and a CAN1 packet is defined as a correct packet, the CAN1 packet is included.

[0037] If both CAN0 and CAN1 data packets are defined as lost, then this round is skipped, the desired serial number is incremented once, and the process proceeds to the next round of serial number comparison.

[0038] Secondly, a CAN data receiving device for an automatic train operation system includes: a channel detection unit, a serial number comparison unit, and a data packet receiving unit;

[0039] The channel detection unit is used to detect CAN channel communication and collect data when the number of data packets in either CAN0 or CAN1 channel is greater than 0 by comparing the number of CAN0 packets with the number of CAN1 packets.

[0040] The serial number comparison unit is used to identify the CAN ID serial number of the received data and compare it with the serial number to be received;

[0041] The data packet receiving unit is used to receive data packets based on the comparison result of the serial number.

[0042] Thirdly, a CAN data transmission method for an automatic train operation system includes:

[0043] In the automatic train operation system, dual CAN buses are used for data transmission;

[0044] Dual CAN buses, including CAN0 and CAN1;

[0045] At the transmitting end, the same data is sent once via CAN0 and then once via CAN1;

[0046] When the receiving end receives data packets from CAN0 and CAN1 channels, the above-described CAN data receiving method for a train automatic operation system is used to receive the data.

[0047] Fourthly, an electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus.

[0048] Memory, which stores computer programs;

[0049] When the processor executes a computer program stored in the memory, it implements the above-described CAN data receiving method for an automatic train operation system.

[0050] Fifthly, a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned CAN data receiving method for an automatic train operation system.

[0051] This disclosure has at least the following beneficial effects:

[0052] This design fully utilizes the redundancy of two CAN communication channels. It identifies the CAN ID sequence number of the same type of data in the redundant channels and compares it with the sequence number of the data to be received. If the match is correct, the data is received; otherwise, it is discarded or retained. This fully leverages the redundancy of transmission, ensuring that each received data packet has been verified for type and sequence number in both communication channels, thus guaranteeing data accuracy and continuity.

[0053] Other features and advantages of this disclosure will be set forth in the following description, or will be apparent in part from the description, or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description and the accompanying drawings. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 is a flowchart of a CAN data receiving method according to an embodiment of this disclosure;

[0056] Figure 2 is a schematic diagram of redundant CAN communication within the automatic train operation system;

[0057] Figure 3 is a structural diagram of a CAN communication receiving device;

[0058] Figure 4 is a schematic diagram of the redundant CAN communication data receiving method;

[0059] Figure 5 is a schematic diagram of the method for identifying redundant CAN ID serial numbers during reception;

[0060] Figure 6 is a schematic diagram of the CAN data receiving device according to an embodiment of this disclosure;

[0061] Figure 7 is a schematic diagram of the electronic device structure. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0063] Compared to single-channel communication, redundant channels can improve the reliability of system communication. If one channel fails, the other can be used to ensure normal communication.

[0064] This disclosure first distinguishes the data received from the two redundant CAN channels by type and places them into their respective CAN FIFOs (FIFO stands for First In First Out, a type of first-in-first-out data storage and buffer). Then, it identifies the number of data packets in the two redundant CAN FIFOs of the same data type. If the number of packets is greater than 0, it executes the ID serial number identification and reception logic. Finally, it redundantly receives data according to the ID serial number. This reception method of the present disclosure utilizes redundant data reception from two CAN channels and receives data in sequential order, improving the reliability of the train automatic operation system data.

[0065] As shown in Figure 1, a CAN data receiving method for a train automatic operation system includes:

[0066] S101: When the number of data packets in either CAN0 or CAN1 channel is greater than 0, CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, and data is collected.

[0067] S102, identify the CAN ID serial number of the received data and compare it with the serial number you want to receive;

[0068] S103, receive data packets based on the serial number comparison result.

[0069] The specific implementation details are as follows:

[0070] Figure 2 illustrates a schematic diagram of redundant CAN communication within a train automatic operation system according to an embodiment of this disclosure. As shown in Figure 2, the train automatic operation system mainly consists of a main board and various types of function boards. Different types of function boards are configured to meet the communication interface requirements of the system, adapting to the needs of various train models. In Figure 2, the main board and function boards are connected via two redundant CAN buses to achieve data interaction between the various boards of the train automatic operation system. The two CAN communication buses are CAN0 and CAN1, respectively. The main board, as the core logic control part of the train automatic operation system, is used to implement output control of the function boards. Through the inter-system redundant CAN bus, the main board sends various types of control commands to the function boards, thereby realizing communication between the train automatic operation system and external devices through various interfaces. External devices connect to the communication interface on the function board to send data to the train automatic operation system. The function board receives various types of communication data from the external system, converts them into CAN data, and sends them to the main board via the inter-system redundant CAN bus. The main board receives CAN data packets containing various communication data from the function board, such as external 422 communication data, MVB communication data, Ethernet communication data, etc. The redundant CAN communication means that at the transmitting end, the same data is sent once through CAN0 and then once through CAN1, with identical data packets on both buses; at the receiving end, the same data packets can be received from both CAN0 and CAN1 channels.

[0071] Figure 3 shows a structural diagram of a CAN communication receiving device according to an embodiment of the present disclosure. As shown in Figure 3, the redundant CAN data is sent from the data sending port, reaches the data receiving end through the CAN line, and is received through the CAN communication interface. After data classification, it is placed into different FIFOs. The number of packets received by CAN0 and CAN1 of the same type of data is judged. If it is greater than 0, the redundant receiving process of ID serial number identification is entered.

[0072] Based on the receiving device structure diagram disclosed in Figure 3 above, Figures 4 and 5 detail the process of receiving redundant CAN data identification ID serial numbers.

[0073] Figure 4 shows a schematic flowchart of a redundant CAN communication data receiving method according to an embodiment of the present disclosure. The train automatic operation system adopts redundant CAN bus communication, namely CAN0 and CAN1. The bus contains various types of communication data. As shown in Figure 4, data packets in the CAN0 and CAN1 channels are periodically received through the communication port. The number of packets in each channel is read. Taking the number of packets as the cycle, the information representing the data type in the CAN ID of each data packet is read. The type of each data packet is determined by the difference in the type information. Then, the data of different data types in the CAN0 bus are stored in different FIFOs (for example, the first type of data is stored in CAN0-1 FIFO, the second type of data is stored in CAN0-2 FIFO, ... the Xth type of data is stored in CAN0-X FIFO). The data of different data types in the CAN1 bus are stored in different FIFOs (for example, the first type of data is stored in CAN1-1 FIFO, the second type of data is stored in CAN1-2 FIFO, ... the Xth type of data is stored in CAN1-X FIFO). This step plays a very important role in the subsequent redundant reception according to the ID serial number. Then, read the number of data packets in the two FIFOs storing the same type of data in CAN0 and CAN1, such as the CAN0-1 FIFO data packets and CAN1-1 FIFO data packets shown in the figure, and compare whether the two packet counts are greater than 0. If either data packet is greater than 0, the process of obtaining the identification ID serial number will begin.

[0074] After data classification and packet count identification as shown in Figure 4, the process proceeds to the flow shown in Figure 5. Figure 5 illustrates a flowchart of a method for identifying redundant CAN ID serial numbers in an embodiment. As shown in Figure 5, a comparison is first made between the number of CAN0 FIFO packets and the number of CAN1 FIFO packets of a certain type of data. Three comparison results are provided:

[0075] One method is to determine if the number of CAN0 packets is greater than the number of CAN1 packets, and exceeds the allowable threshold for the difference in packet count between redundant channels in one cycle. If so, the CAN1 channel is considered to have an abnormal fault and is treated as an untrusted channel; all data received in the CAN1 FIFO is read out and dropped. The CAN0 channel, as the only trusted channel, receives all data in its CAN0 FIFO.

[0076] Secondly, if the number of CAN1 packets is greater than the number of CAN0 packets, and exceeds the allowable threshold for the difference in packet count between redundant channels in one cycle, then the CAN0 channel is considered to have an abnormal fault. As an untrusted channel, all data received in the CAN0 FIFO is read out and discarded. The CAN1 channel, as the only trusted channel, receives all data in the CAN1 FIFO.

[0077] The third disclosure is that the difference between the number of CAN0 packets and the number of CAN1 packets is less than the allowable threshold of the difference in the number of packets of a redundant channel in one cycle, or even if the number of packets is the same. If the number of CAN0 packets is less than or equal to the number of CAN1 packets, then the number of CAN0 packets is selected as the number of subsequent cycles; if the number of CAN1 packets is less than the number of CAN0 packets, then the number of CAN1 packets is selected as the number of subsequent cycles, that is, the principle of cycling according to the minimum number of packets is adopted.

[0078] Based on the above three disclosures, after the number of cyclic packets is determined, CAN0 and CAN1 each copy one packet of data, identify the serial number information in the CAN ID, and determine whether the CAN ID serial number matches the desired serial number. Three comparison results are disclosed:

[0079] The data CAN ID serial number is publicly disclosed and is equal to the desired serial number, which is defined as correct.

[0080] If the CAN ID sequence number of the data is less than the desired sequence number, it is defined as a duplicate packet. That is, if the same sequence number packet has just been received, and the same sequence number is identified again, it may be caused by duplicate CAN transmission, and the packet is dropped.

[0081] The third part of the data is disclosed. If the CAN ID serial number is greater than the desired serial number, it is defined as a packet loss. That is, the desired serial number has not arrived, but a larger serial number packet has arrived. This may be caused by packet loss on the CAN line. The data is not read out and is retained in the next cycle, and then compared with the desired serial number.

[0082] Based on the comparison of the CAN ID serial numbers of the publicly available CAN0 and CAN1 data packets with the desired serial number, the process of receiving the packet is initiated:

[0083] Case 1: If the CAN0 packet is defined correctly, the CAN1 packet will not be accepted under any circumstances. Instead, the correct CAN0 packet will be accepted and processed according to the rule that CAN0 takes precedence over CAN1.

[0084] Scenario 2: If the CAN0 data packet is defined as a lost or duplicate packet, and the CAN1 data packet is defined as correct, then the CAN1 data packet is included to achieve redundant inclusion according to the serial number order.

[0085] Case 3: If CAN0 data packet is defined as lost and CAN1 data packet is also defined as lost, then the data packet with the desired serial number is not available on either CAN line. If the serial numbers from both CAN lines are greater than the desired serial number, then the desired serial number is incremented by one, this round is skipped, and the next round of serial number comparison process begins.

[0086] In other cases, no income will be recorded.

[0087] After the number of cyclic packets determined in the above-mentioned third disclosure is completed, the redundant reception of the CAN ID serial number of this type of data received in this cycle is completed.

[0088] In this embodiment of the disclosure, the CAN ID serial number redundancy reception function is applicable to both the main board and each functional board.

[0089] By using the processing method described in the embodiments of this disclosure, considering that the CAN ID serial number of each type of data at the sending end is incremented separately, the receiving end first performs data type classification so that the comparison in the subsequent processing logic is the same type of data, and the data with the correct serial number can be selected from the redundant channel.

[0090] Through the processing method described in this embodiment, the number of data packets of the same type in the redundant channels is compared, which serves as a self-test for the redundant CAN communication bus function. If the difference in the number of packets on the two channels is greater than the allowable difference, it proves that one of the buses is abnormal, and then enters the single communication bus mode to receive all data from the trusted channel.

[0091] Through the processing method described in this embodiment, the CAN ID serial number is compared with the desired received serial number, thus realizing the function of receiving packets based on the CAN ID serial number. For incorrect serial numbers, the data status of lost and duplicate packets is determined, and different processing is performed on the packets to be retained or discarded, maximizing the redundancy of the channel. Differential processing is performed for different data definitions within the redundant channel; if CAN0 data is correct, CAN0 is received correctly; if CAN0 is incorrect, CAN1 is received correctly, thus leveraging the redundancy of the channel.

[0092] As shown in Figure 6, in a second aspect, a CAN data receiving device for a train automatic operation system includes: a channel detection unit 601, a serial number comparison unit 602, and a data packet receiving unit 603.

[0093] The channel detection unit 601 is used to detect CAN channel communication and collect data when the number of data packets in either CAN0 or CAN1 channel is greater than 0 by comparing the number of CAN0 packets with the number of CAN1 packets.

[0094] The serial number comparison unit 602 is used to identify the CAN ID serial number of the received data and compare it with the serial number to be received;

[0095] The data packet receiving unit 603 is used to receive data packets based on the comparison result of the serial number.

[0096] In practical implementation, the CAN data receiving device for the automatic train operation system disclosed herein corresponds one-to-one with the CAN data receiving method for the automatic train operation system.

[0097] A CAN data transmission method for an automatic train operation system includes:

[0098] In the automatic train operation system, dual CAN buses are used for data transmission;

[0099] Dual CAN buses, including CAN0 and CAN1;

[0100] At the transmitting end, the same data is sent once via CAN0 and then once via CAN1;

[0101] When the receiving end receives data packets from CAN0 and CAN1 channels, the above-described CAN data receiving method for a train automatic operation system is used to receive the data.

[0102] As shown in Figure 7, this disclosure provides an electronic device, including a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0103] Memory 703 stores computer programs;

[0104] The processor 701 implements the above method when executing a computer program stored in the memory 703.

[0105] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0106] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0107] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0108] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A CAN data receiving method for a train automatic operation system, characterized by, The method comprises: When the number of data packets of any one of CAN0 or CAN1 channel is greater than 0, the CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, and the data is collected; The collected data is identified with the serial number of CAN ID, and compared with the serial number of the desired collection; According to the serial number comparison result, the data packet is received.

2. The CAN data receiving method for the train automatic operation system according to claim 1, wherein when the number of data packets of any one of CAN0 or CAN1 channel is greater than 0, the CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, and the data is collected.

3. The CAN data receiving method for the train automatic operation system according to claim 2, wherein the data received by CAN0 and CAN1 is classified, and the data is stored in different FIFOs according to the bus and the data type, comprising: The train automatic operation system adopts redundant CAN bus communication, namely CAN0 and CAN1, and the bus contains various types of communication data. The data type information in the CAN ID of each data packet is identified, and the data is classified. The data of different data types in the CAN0 and CAN1 buses is stored in different FIFOs respectively.

4. The CAN data receiving method for the train automatic operation system according to claim 3, wherein the data of different data types in the CAN0 and CAN1 buses is stored in different FIFOs respectively, comprising: The data packets in the CAN0 and CAN1 channels are collected periodically through the communication port, the number of packets in each channel is read, and the data type of each data packet is determined by the different type information. The data of different data types in the CAN0 bus is stored in different FIFOs: the first type of data is stored in CAN0-1 FIFO, the second type of data is stored in CAN0-2 FIFO, and the Xth type of data is stored in CAN0-X FIFO. The data of different data types in the CAN1 bus is stored in different FIFOs: the first type of data is stored in CAN1-1 FIFO, the second type of data is stored in CAN1-2 FIFO, and the Xth type of data is stored in CAN1-X FIFO.

5. The CAN data receiving method for the train automatic operation system according to claim 2, wherein when the number of data packets of any one of CAN0 or CAN1 channel is greater than 0, the CAN channel communication is detected by comparing the number of CAN0 packets with the number of CAN1 packets, comprising: The number of data packets stored in the two FIFOs of the same type of data of CAN0 and CAN1 is read, and whether the two numbers are greater than 0 is compared. ​ ​ ​ ​ ​ ​ Detect CAN channel communication by comparing CAN0 packet number with CAN1 packet number when any one of the data packets is greater than 0.

6. The CAN data receiving method for a train automatic operation system according to claim 1, characterized in that, Detect CAN channel communication by comparing CAN0 packet number with CAN1 packet number, and collect data, comprising: Compare CAN0 FIFO and CAN1 FIFO packet numbers of the same type of data, specifically comprising: When the CAN0 packet number is greater than the CAN1 packet number, and the difference exceeds the allowable threshold, determine that the CAN1 channel is abnormal; the CAN0 channel is the only trusted channel, and all data is collected; When the CAN1 packet number is greater than the CAN0 packet number, and the difference exceeds the allowable threshold, determine that the CAN0 channel is abnormal; the CAN1 channel is the only trusted channel, and all data is collected; When the CAN0 packet number and the CAN1 packet number differ by less than the allowable threshold, or the packet numbers are the same, the minimum packet number is used for subsequent packet collection cycles.

7. The CAN data receiving method for a train automatic operation system according to claim 1, characterized in that, Identify the CAN ID serial number of the collected data, and compare it with the serial number to be collected, comprising: Compare the CAN ID serial number with the serial number to be collected to determine the data, specifically comprising: When the data CAN ID serial number is equal to the serial number to be collected, it is defined as correct; When the data CAN ID serial number is less than the serial number to be collected, it is defined as a repeated packet, and the packet is discarded; When the data CAN ID serial number is greater than the serial number to be collected, it is defined as a lost packet, and is retained to the next cycle for comparison with the serial number to be collected.

8. The CAN data receiving method for a train automatic operation system according to claim 1, characterized in that, Receive data packets according to the comparison results of the serial numbers, comprising: When the CAN0 data packet is defined as correct, the CAN1 data packet is processed regardless of any situation, and only the correct CAN0 packet is collected; When the CAN0 data packet is defined as a lost packet or a repeated packet, and the CAN1 data packet is defined as correct, the CAN1 data packet is collected; When the CAN0 data packet is defined as a lost packet, and the CAN1 data packet is also defined as a lost packet, the current round is empty, the serial number to be collected is incremented by one, and the next round of serial number comparison process is entered.

9. A CAN data receiving device for a train automatic operation system, characterized by comprising: Comprising: Channel detection unit, serial number comparison unit and data packet receiving unit; The channel detection unit is used to detect CAN channel communication by comparing CAN0 packet number with CAN1 packet number when any one of the data packets is greater than 0, and collect data; The serial number comparison unit is used to identify the CAN ID serial number of the collected data, and compare it with the serial number to be collected; The data packet receiving unit is used to receive data packets according to the comparison results of the serial numbers.

10. A CAN data transmission method for a train automatic operation system, characterized by, Comprising: In a train automatic operation system, double CAN bus is used for data transmission; The double CAN bus comprises: CAN0 and CAN1; The sending end sends the same data once through CAN0 and once through CAN1; When the receiving end receives data packets from the CAN0 and CAN1 channels, a CAN data receiving method for a train automatic operation system according to any one of claims 1-8 is used to receive data.

11. An electronic device, comprising: The computer device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The memory stores a computer program. The processor is used to execute the computer program stored on the memory, and a CAN data receiving method for a train automatic operation system according to any one of claims 1-8 is realized.

12. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor, and a CAN data receiving method for a train automatic operation system according to any one of claims 1-8 is realized.

Citation Information

Patent Citations

  • Dual-channel redundant data transmission processing method for railway signal CTC / TDCS system

    CN108183779A

  • Data transmission method, apparatus, machine readable storage medium and system

    CN108513701A

  • Data transmission method, device, equipment and storage medium

    CN113784388A

  • Redundant message processing method in CAN bus dual-channel backup

    CN114726676A

  • Dual-bus communication system and communication method based on SRIO protocol

    CN114928513A