Communication fault diagnosis method, device, control unit and vehicle

By generating and verifying CRC values ​​and cycle count values ​​in the SOA vehicle communication system, the problem of the inability to effectively diagnose communication faults in the existing technology is solved, and timely detection of problems such as false messages, delays, losses and duplications is achieved, thereby improving the flexibility and security of the communication system.

CN116405156BActive Publication Date: 2025-10-10CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310268201.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2025-10-10
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

In vehicle communication systems based on service-oriented architecture (SOA), existing technologies are unable to effectively diagnose communication faults, especially unable to detect problems such as false messages, message delays, losses, duplications and sequence errors in non-periodic event communications.

Method used

The receiving end and the sending end respectively generate and verify the cyclic redundancy check (CRC) value and the cycle count value, generate an information identifier, generate a CRC value based on the business data and the sending end identifier, and verify the business message. The receiving end and the sending end determine the communication status based on the verification result, and send a feedback message or enter a safe state when necessary.

Benefits of technology

It realizes effective diagnosis of communication faults under the SOA vehicle architecture, can timely detect problems such as false messages, message delays, losses and duplications, and improves the flexibility and security of the communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405156B_ABST
    Figure CN116405156B_ABST
Patent Text Reader

Abstract

The application relates to a communication fault diagnosis method and device, a control unit and a vehicle, and relates to the technical field of communication. The communication fault diagnosis method is applied to a receiving end under a service-oriented architecture (SOA), and the method comprises the following steps: receiving a first service message sent by a sending end; the first service message comprises service data, a cyclic redundancy check (CRC) value and a cycle count value, and the CRC value is generated based on the service data, the identifier of the sending end and the cycle count value; the cycle count value and the CRC value are checked to obtain a check result of the first service message, and the communication state between the sending end and the receiving end is determined according to the check result of the first service message. The technical problem that communication faults cannot be effectively diagnosed under the SOA-based vehicle architecture in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, in particular to the field of communication technology of data within a vehicle, and specifically to a communication fault diagnosis method, device, control unit and vehicle. Background Art

[0002] With the development of in-vehicle communication technology, in-vehicle controller chips, in-vehicle operating systems and cloud service technology, a vehicle architecture based on service-oriented architecture (SOA) has emerged to meet users' diverse vehicle needs.

[0003] However, the current diagnosis of communication faults is generally based on periodic communication. However, since SOA's in-vehicle Ethernet communication is event-based, this will result in the inability to effectively diagnose communication faults under the SOA-based vehicle architecture. Summary of the Invention

[0004] The present invention provides a communication fault diagnosis method, device, control unit, and vehicle to solve the technical problem in the prior art that communication faults cannot be effectively diagnosed in a SOA-based vehicle architecture. The technical solution of the present invention is as follows:

[0005] According to a first aspect of the present invention, a communication fault diagnosis method is provided, which is applied to a receiving end in a service-oriented architecture, and comprises: receiving a first service message sent by a sending end; the first service message comprises service data, a cyclic redundancy check (CRC) value, and a cycle count value, wherein the CRC value is generated based on the service data, an identifier of the sending end, and the cycle count value; verifying the cycle count value and the CRC value to obtain a verification result of the first service message; and determining the communication status between the sending end and the receiving end based on the verification result of the first service message.

[0006] Based on the above technical means, the present invention can verify the cycle count value and CRC value to obtain a verification result of the first business message, and determine the communication status between the sending end and the receiving end based on the verification result of the first business message. For example, if the verification result of the first business message is an error, a communication failure has occurred between the sending end and the receiving end. Because the CRC value is generated based on the business data, the identifier of the sending end, and the cycle count value, verifying the CRC value can determine whether the first business message is a false message, thereby effectively diagnosing the communication failure.

[0007] In one possible implementation, the first business message also includes an identifier of the sending end and an information identifier; the information identifier is determined based on the cycle count value and the identifier of the sending end, and the above-mentioned "verifying the cycle count value and the CRC value to obtain the verification result of the first business message" includes: when the verification cycle count value passes, the CRC value is verified based on the information identifier and the business data to obtain the verification result of the first business message.

[0008] According to the above technical means, the present invention can first verify the cycle count value. If the verification passes, it is determined that there are no unexpected message duplications or that the order of the service messages sent by the sender is correct. If the verification passes, the CRC value is verified using the information identifier and the service data to obtain the verification result of the first service message, thereby more effectively diagnosing communication faults.

[0009] In a possible implementation, the method further includes: when the verification result is an error, sending a feedback message to the sending end; the feedback message includes a verification error identifier; and the feedback message is used to instruct the sending end to resend the first service message.

[0010] Based on the above technical measures, the present invention enables the receiving end to generate a feedback message upon receiving an erroneous service message. This message verifies the error flag and notifies the sending end that the received service message is an erroneous one, instructing the sending end to resend the first service message. This establishes a feedback mechanism that allows the sending end to determine whether the service message received by the receiving end is correct.

[0011] In one possible implementation, the method further includes: verifying a second service message sent by the sending end, obtaining a verification result of the second service message, and entering a security state corresponding to the receiving end if the verification result of the second service message is an error; the second service message is a message received within a first preset time period after sending the feedback message. Alternatively, if no message from the sending end is received within the first preset time period after sending the feedback message, entering a security state corresponding to the receiving end.

[0012] Based on the above technical means, the present invention allows the receiving end to not immediately enter a safe state upon receiving an error message. Instead, it reserves a first preset time period. By detecting a second service message sent by the sending end within the first preset time period and only entering the corresponding safe state if the verification result of the second service message is an error, the receiving end increases the flexibility of the control system.

[0013] According to a second aspect of the present application, a communication fault diagnosis method is provided, which is applied to a sending terminal in a service-oriented architecture. The method comprises: generating a first service message based on service data, a cyclic redundancy check (CRC) value and a cycle count value. The CRC value is determined based on the service data, an identifier of the sending terminal and the cycle count value. The first service message is sent to a receiving terminal, so that the receiving terminal checks the cycle count value and the CRC value to obtain a check result of the first service message, and determines a communication state between the sending terminal and the receiving terminal according to the check result of the first service message.

[0014] According to the above technical means, the first service message sent by the sending terminal comprises a CRC value. The CRC value is generated based on the service data, the identifier of the sending terminal and the cycle count value. Subsequently, the receiving terminal checks the CRC value to determine whether the first service message is a false message, thereby effectively diagnosing a communication fault.

[0015] In a possible implementation, the method further comprises: receiving a feedback message sent by the receiving terminal, and sending a second service message to the receiving terminal if the feedback message comprises a check error identifier; the second service message is regenerated based on the service data.

[0016] According to the above technical means, the present application configures a retransmission mechanism. When it is determined that the receiving terminal receives an error service message, the sending terminal re-sends the service message to the receiving terminal.

[0017] In a possible implementation, the method further comprises: if no message sent by the receiving terminal is received within a second preset time period after the first service message is sent, entering a corresponding safe state of the sending terminal.

[0018] According to the above technical means, if no feedback message sent by the receiving terminal is received within a preset time period after the first service message is sent, it is determined that the message is lost, thereby determining a communication fault and entering a corresponding safe state. In this way, message loss can be confirmed in time, and a communication fault can be diagnosed in time.

[0019] In a possible implementation, the method further comprises: receiving a feedback message sent by the receiving terminal, and determining a feedback time interval between a first time and a second time; the first time is a time when the first service message is sent, and the second time is a time when the feedback message is received. If the feedback time interval is greater than or equal to a preset time interval, it is determined that the feedback message is a delayed message.

[0020] According to the above technical means, if the sending terminal confirms that the feedback message is received beyond a preset time, it is confirmed that a message delay occurs in the communication system. In this way, a communication fault can be diagnosed in time.

[0021] In one possible implementation, the first service message is generated based on the service data, a cyclic redundancy check (CRC) value, and a cycle count value. The method further includes: determining an information identifier based on the cycle count value and a sender identifier, and determining a CRC value based on the information identifier and the service data. The first service message is generated based on the CRC value and the service data.

[0022] According to the above technical means, the transmitting end of the present invention uses the cycle count value and the transmitting end identifier to generate a message identifier, and determines the CRC value based on the message identifier and the service data. In this way, when the CRC value is checked, it is possible to effectively confirm whether the service message is a false message, thereby effectively diagnosing communication faults.

[0023] According to a third aspect of the present invention, a communication fault diagnosis device is provided, which is applied to a receiving end in a service-oriented architecture and includes a receiving unit, a processing unit, and a determining unit. The receiving unit is configured to receive a first service message sent by a sending end. The first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value, where the CRC value is generated based on the service data, an identifier of the sending end, and the cycle count value. The processing unit is configured to verify the cycle count value and the CRC value to obtain a verification result for the first service message. The determining unit is configured to determine the communication status between the sending end and the receiving end based on the verification result of the first service message.

[0024] In one possible embodiment, the first business message also includes an identifier of the sending end and an information identifier; the information identifier is determined based on the cycle count value and the identifier of the sending end, and the processing unit is specifically used to verify the CRC value based on the information identifier and the business data when the verification cycle count value passes, to obtain the verification result of the first business message.

[0025] In one possible implementation, the communication fault diagnosis device further includes a sending unit. The sending unit is configured to send a feedback message to the sending end if the verification result is an error; the feedback message includes a verification error identifier; and the feedback message is configured to instruct the sending end to resend the first service message.

[0026] In one possible embodiment, the processing unit is further configured to verify a second service message sent by the sending end, obtain a verification result of the second service message, and enter a security state corresponding to the receiving end if the verification result of the second service message is an error; the second service message is a message received within a first preset time period after sending the feedback message. Alternatively, the processing unit is further configured to enter a security state corresponding to the receiving end if no message sent by the sending end is received within the first preset time period after sending the feedback message.

[0027] According to a fourth aspect of the present invention, a communication fault diagnosis device is provided, which is applied to a receiving end in a service-oriented architecture and includes a generating unit and a sending unit. The generating unit is configured to generate a first service message based on service data, a cyclic redundancy check (CRC) value, and a cycle count value; the CRC value is determined based on the service data, an identifier of the sending end, and the cycle count value. The sending unit is configured to send the first service message to the receiving end so that the receiving end verifies the cycle count value and the CRC value, obtains a verification result of the first service message, and determines the communication status between the sending end and the receiving end based on the verification result of the first service message.

[0028] In one possible implementation, the communication fault diagnosis apparatus further includes a receiving unit. The receiving unit is configured to receive a feedback message sent by a receiving end. The sending unit is further configured to, if the feedback message includes a checksum error flag, send a second service message to the receiving end; the second service message is regenerated based on the service data.

[0029] In a possible implementation, the communication fault diagnosis device further includes a processing unit configured to enter a safety state corresponding to the sending end if no message sent by the receiving end is received within a second preset time period after sending the first service message.

[0030] In one possible implementation, the receiving unit is further configured to receive a feedback message sent by the receiving end. The processing unit is further configured to determine a feedback time interval between a first time and a second time, where the first time is the time when the first service message is sent, and the second time is the time when the feedback message is received. If the feedback time interval is greater than or equal to a preset time interval, the feedback message is determined to be a delayed message.

[0031] In one possible implementation, the generating unit is specifically configured to: determine the information identifier based on the cycle count value and the identifier of the transmitting end, determine the CRC value based on the information identifier and the service data, and generate the first service message based on the CRC value and the service data.

[0032] According to the fifth aspect provided by the present invention, a control unit is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement a method of any possible implementation of the first aspect or the second aspect above.

[0033] According to the sixth aspect provided by the present invention, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device is enabled to execute a method of any possible implementation of the above-mentioned first aspect or second aspect.

[0034] According to the seventh aspect provided by the present invention, a computer program product is provided, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes a method of any possible implementation method of the first aspect or the second aspect mentioned above.

[0035] According to an eighth aspect of the present invention, there is provided a vehicle comprising the control unit according to the fifth aspect.

[0036] The communication fault diagnosis method provided by the present invention has the following beneficial effects: the cycle count value and the CRC value can be verified to obtain a verification result of the first service message, and the communication status between the sending end and the receiving end can be determined based on the verification result of the first service message. For example, if the verification result of the first service message is an error, a communication fault has occurred between the sending end and the receiving end. Because the CRC value is generated based on the service data, the identifier of the sending end, and the cycle count value, verifying the CRC value can determine whether the first service message is a false message, thereby effectively diagnosing the communication fault.

[0037] It should be noted that the technical effects brought about by any implementation method in the second to eighth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.

[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of the structure of a communication fault diagnosis system provided by an embodiment of the present invention;

[0040] Figure 2 One of the flow charts of the communication fault diagnosis method provided by an embodiment of the present invention;

[0041] Figure 3 Flowchart 2 of the communication fault diagnosis method provided by an embodiment of the present invention;

[0042] Figure 4 Flowchart 3 of the communication fault diagnosis method provided by an embodiment of the present invention;

[0043] Figure 5 Flowchart 4 of the communication fault diagnosis method provided by an embodiment of the present invention;

[0044] Figure 6 Flowchart 5 of the communication fault diagnosis method provided by an embodiment of the present invention;

[0045] Figure 7 Flowchart 6 of the communication fault diagnosis method provided by an embodiment of the present invention;

[0046] Figure 8 A schematic diagram of the structure of a transmitting end and a receiving end provided in an embodiment of the present invention;

[0047] Figure 9 Flowchart seven of the communication fault diagnosis method provided by an embodiment of the present invention;

[0048] Figure 10 A schematic structural diagram of a communication fault diagnosis device provided by an embodiment of the present invention;

[0049] Figure 11 A schematic structural diagram of another communication fault diagnosis device provided by an embodiment of the present invention;

[0050] Figure 12 A schematic structural diagram of a control unit provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to enable ordinary persons in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0052] It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0053] Before introducing the transaction method provided by the present invention in detail, a brief introduction is first given to the relevant elements, application scenarios, and implementation environment involved in the present invention.

[0054] First, the relevant elements involved in the present invention are briefly introduced.

[0055] A cyclic redundancy check (CRC) is a hash function that generates a short, fixed-number checksum based on data such as online packets or computer files. It is primarily used to detect or verify errors that may occur during data transmission or storage. The generated number is calculated and appended to the data before transmission or storage. The receiving party then verifies whether the data has changed.

[0056] SOA: Defines a method for reusing software components through service interfaces. These interfaces use common communication standards that can be quickly incorporated into new applications without requiring deep integration each time.

[0057] Safety island: Also known as a "safety island" or "security island." This refers to the secure core in a control chip and a collection of surrounding IP addresses designed to meet security requirements, including secure storage, secure peripherals, and a secure bus.

[0058] Next, the application scenarios of the present invention are briefly introduced.

[0059] With the development of in-vehicle communication technology, in-vehicle controller chips, in-vehicle operating systems and cloud service technology, a SOA-based vehicle architecture has emerged to meet users' diverse vehicle needs.

[0060] However, the current diagnosis of communication faults is generally based on periodic communication. However, since SOA's in-vehicle Ethernet communication is event-based, this will result in the inability to effectively diagnose communication faults under the SOA-based vehicle architecture.

[0061] Specifically, vehicle functional safety development is conducted according to the automotive functional safety standard GB / T 34590. Low communication diagnostic coverage for bus communication must address the following communication node failures: message corruption, message delay, message loss, and unexpected message duplication. Medium communication diagnostic coverage, in addition to low diagnostic coverage, must also address sequence errors and message insertion. High diagnostic coverage, in addition to medium diagnostic coverage, must also address spurious message diagnosis. After diagnosing a communication failure, a reasonable mechanism must be in place to enter a safe state.

[0062] The design of fault diagnosis mechanisms must be both applicable to SOA-based in-vehicle Ethernet communications and ensure accurate coverage of the required failure modes, which poses a challenge to communication diagnosis. Existing fault upload mechanisms are based on the characteristics of periodic messages. Message delays and message loss are determined by the time interval between two message frames. However, SOA in-vehicle Ethernet communications use non-periodic, timed messages. The time interval between two message frames is uncertain and can vary from short to long. Therefore, functional safety diagnostic mechanisms based on periodic messages are not fully applicable, resulting in the inability to effectively diagnose communication faults in SOA-based vehicle architectures.

[0063] To address the above-mentioned issues, the present invention provides a communication fault diagnosis method, which is applied to a receiving end in a service-oriented architecture. The method comprises: receiving a first service message sent by a sending end; the first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value, where the CRC value is generated based on the service data, an identifier of the sending end, and the cycle count value. The cycle count value and the CRC value are verified to obtain a verification result of the first service message, and the communication status between the sending end and the receiving end is determined based on the verification result of the first service message.

[0064] In this way, the cycle count value and the CRC value can be verified to obtain a verification result of the first service message. Based on the verification result of the first service message, the communication status between the sender and the receiver can be determined. For example, if the verification result of the first service message is an error, a communication failure has occurred between the sender and the receiver. Because the CRC value is generated based on the service data, the sender's identifier, and the cycle count value, verifying the CRC value can determine whether the first service message is a false message, thereby effectively diagnosing the communication failure.

[0065] Finally, the implementation environment (implementation architecture) involved in the method provided by the present invention is briefly introduced.

[0066] The communication fault diagnosis method provided by the embodiment of the present invention can be applied to the communication fault diagnosis system. Figure 1 Figure 2 shows a structural diagram of the communication fault diagnosis system. Figure 1 As shown, the communication fault diagnosis system 10 includes a transmitter 11 and a receiver 12. The transmitter 11 is connected to the receiver 12. The transmitter 11 and the receiver 12 can be connected in a wired manner or wirelessly, which is not limited in the embodiment of the present invention.

[0067] In some embodiments, the transmitter 11 may be a master controller in a vehicle, and the receiver 12 may be a slave controller in the vehicle. The transmitter 11 and the receiver 12 are connected via a controller area network (CAN). There may be one or more transmitters 11 and one or more receivers 12.

[0068] Exemplarily, the transmitting end 11 is a central control chip, and the receiving end 12 is a chip for controlling the light switch.

[0069] As another example, the transmitting end 11 is a central control chip, and the receiving end 12 is a chip for controlling the windshield wipers.

[0070] In some embodiments, the transmitting end 11 may be a microcontroller (MCU), a system on chip (SoC), or other controllers, which is not limited in the embodiments of the present invention.

[0071] In some embodiments, the receiving end 12 may be an MCU, an SoC, or other controllers, which is not limited in the embodiments of the present invention.

[0072] In some embodiments, the transmitting end 11 can also serve as a receiving end to receive service messages. Correspondingly, the receiving end 12 can also serve as a transmitting end to send service messages. Both the transmitting end 11 and the receiving end 12 include Ethernet transceiver modules. Both the transmitting end 11 and the receiving end 12 include a safety island.

[0073] Transmitter 11 is configured to receive a first service message sent by a transmitter. The first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value. The CRC value is generated based on the service data, a transmitter identifier, and the cycle count value. Transmitter 11 is further configured to verify the cycle count value and the CRC value to obtain a verification result of the first service message, and determine the communication status between the transmitter and the receiver based on the verification result of the first service message.

[0074] The receiving end 12 is configured to generate a first service message based on the service data, a cyclic redundancy check (CRC) value, and a cycle count value. The CRC value is determined based on the service data, an identifier of the transmitting end, and the cycle count value. The receiving end 12 is further configured to send the first service message to the receiving end, so that the receiving end verifies the cycle count value and the CRC value to obtain a verification result of the first service message, and determines the communication status between the transmitting end and the receiving end based on the verification result of the first service message.

[0075] For ease of understanding, the communication fault diagnosis method provided by the present invention is described in detail below with reference to the accompanying drawings.

[0076] In order to effectively diagnose communication failures, Figure 2 FIG. 1 is a flow chart showing a method for diagnosing a communication fault according to an exemplary embodiment. Figure 2 As shown, the communication fault diagnosis method includes the following steps: S201-S203.

[0077] S201: A receiving end receives a first service message sent by a sending end.

[0078] The first service message includes service data, a cyclic redundancy check CRC value and a cycle count value, and the CRC value is generated based on the service data, the identifier of the sending end and the cycle count value.

[0079] As a possible implementation manner, the Ethernet transceiver module of the receiving end receives the first service message sent by the sending end through the CAN bus.

[0080] For example, taking the receiving end as a vehicle light controller and the sending end as a main controller as an example, the vehicle light controller receives a first service message sent by the main controller.

[0081] In some embodiments, the first service message also includes an identifier of the sending end.

[0082] S202: The receiving end checks the cycle count value and the CRC value to obtain a verification result of the first service message.

[0083] As a possible implementation method, after receiving the first service message, the receiving end parses the first service message to obtain service data, a reference counting (RC) value, and a CRC value. Further, the receiving end verifies the RC value to obtain a verification result of the RC value, and if the verification result of the RC value is correct, the receiving end verifies the CRC value to obtain a verification result of the CRC value. Subsequently, if the verification result of the CRC value is correct, the receiving end obtains a verification result of the first service message.

[0084] In some embodiments, when the verification result of the RC value is wrong, the receiving end obtains that the verification result of the first service message is wrong.

[0085] In some embodiments, when the verification result of the RC value is correct, the receiving end verifies the CRC value to obtain a verification result of the CRC value. Subsequently, when the verification result of the CRC value is correct, the receiving end obtains that the verification result of the first service message is correct.

[0086] In some embodiments, when the verification result of the RC value is correct, the receiving end verifies the CRC value to obtain a verification result of the CRC value. Subsequently, when the verification result of the CRC value is incorrect, the receiving end obtains that the verification result of the first service message is incorrect.

[0087] Specifically, in one scenario, when the first service message includes the identifier of the sender, the receiving end verifies the RC value to obtain a verification result of the RC value. If the verification result of the RC value is correct, the receiving end determines the information identifier based on the identifier of the sender and the RC value. Furthermore, the receiving end generates a target CRC value based on the information identifier, the service data, and a preset algorithm, and verifies the CRC value in the first service message based on the target CRC value to obtain a verification result of the CRC value. Subsequently, if the verification result of the CRC value is correct, the receiving end determines that the verification result of the first service message is correct.

[0088] In another scenario, when the first service message includes the sender's identifier and the information identifier, the receiving end verifies the RC value to obtain a verification result of the RC value. If the verification result of the RC value is correct, the receiving end generates a target CRC value based on the information identifier, the service data, and a preset algorithm, and verifies the CRC value in the first service message based on the target CRC value to obtain a verification result of the CRC value. Subsequently, if the verification result of the CRC value is correct, the receiving end verifies that the verification result of the first service message is correct. The information identifier is determined based on the sender's identifier and the RC value.

[0089] It should be noted that the preset algorithm is pre-set in the receiving end by the operation and maintenance personnel.

[0090] S203: The receiving end determines the communication status between the sending end and the receiving end according to the verification result of the first service message.

[0091] As a possible implementation manner, when the receiving end determines that the verification result of the first service message is wrong, it determines that the communication between the sending end and the receiving end is abnormal, thereby diagnosing the communication failure.

[0092] Exemplarily, when the verification result of the RC value is wrong, the receiving end determines that unexpected message duplication or service messages with wrong sequence have occurred in the communication between the sending end and the receiving end.

[0093] Exemplarily, when the check result of the CRC value is an error, the receiving end determines that a false message has occurred in the communication between the sending end and the receiving end.

[0094] In some embodiments, when diagnosing a communication failure, the receiving end enters a corresponding safe state through a safety island in the receiving end.

[0095] For example, if the receiving end is a headlight controller and the corresponding safety state of the receiving end is turning on the headlight, the receiving end turns on the headlight or keeps the headlight on when determining that the CRC value check result is an error.

[0096] As a possible implementation manner, when the receiving end determines that the verification result of the first service message is correct, the receiving end determines that the communication between the sending end and the receiving end is normal.

[0097] Subsequently, the receiving end obtains the business data and operates according to the business data.

[0098] For example, the receiving end is used to control the sound system in the vehicle, and the service data is a command to switch to the next song. When the receiving end determines that the first service message is correct, it switches to the next song.

[0099] The communication fault diagnosis method provided by an embodiment of the present invention has the following beneficial effects: the cycle count value and the CRC value can be verified to obtain a verification result of the first service message, and the communication status between the sending end and the receiving end can be determined based on the verification result of the first service message. For example, if the verification result of the first service message is an error, a communication fault has occurred between the sending end and the receiving end. Because the CRC value is generated based on the service data, the identifier of the sending end, and the cycle count value, verifying the CRC value can determine whether the first service message is a false message, thereby effectively diagnosing the communication fault.

[0100] In one design, in order to more effectively diagnose communication failures, the first service message further includes a sender identifier and an information identifier, and S202 provided by the embodiment of the present invention includes: S2021.

[0101] S2021. When the verification cycle count value passes, the receiving end verifies the CRC value based on the information identifier and the service data to obtain the verification result of the first service message.

[0102] As one possible implementation, the receiving end verifies the cycle count value and, if the cycle count value passes the verification, inputs the information identifier and service data into a preset algorithm to generate a target CRC value. Furthermore, the receiving end verifies the CRC in the first service message based on the target CRC value to obtain a verification result for the first service message.

[0103] As will be appreciated, the present invention can first verify the cycle count value. If the verification passes, it is determined that there are no unexpected message duplications or that the order of the service messages sent by the sender is correct. If the verification passes, the CRC value is verified using the information identifier and the service data to obtain a verification result for the first service message, thereby more effectively diagnosing communication faults.

[0104] In one design, in order to establish a feedback mechanism, the sending end can connect to the receiving end to determine whether the service message received is correct. The communication fault diagnosis method provided by the embodiment of the present invention includes: S204.

[0105] S204: When the verification result is an error, the receiving end sends a feedback message to the sending end.

[0106] The feedback message includes a verification error identifier and is used to instruct the sending end to resend the first service message.

[0107] As a possible implementation method, if a CRC or RC check error occurs, the receiving end generates a first feedback message including a check error bit, and sends the feedback message to the sending end through the Ethernet transceiver module.

[0108] In some embodiments, the first feedback message further includes an acknowledgment flag (ACK), an RC value, and a CRC value.

[0109] For example, taking the check error bit 1 as a check error indicator, the ACK flag bit 1, and the RC value 8 as an example, when the check result is an error, the receiving end generates a first feedback message, wherein the check error bit is 1, the ACK flag bit is 1, the RC value is 8, and the CRC value.

[0110] It's important to note that the loop counter value on the receiver is independent of the loop counter on the transmitter. Each end counts based on the content being sent. After power-up, the count starts at 0, and each transmission increments by 1. When the count reaches a preset threshold, the next counter starts again at 0.

[0111] As another possible implementation manner, if the CRC or RC check is correct, the receiving end generates a first feedback message including a check error, and sends the feedback message to the sending end through the Ethernet transceiver module.

[0112] For example, taking the check error bit 0 as a check correctness indicator, the ACK flag bit 1, and the RC value 9 as an example, when the check result is correct, the receiving end generates a second feedback message, wherein the check error bit is 0, the ACK flag bit is 1, the RC value is 9, and the CRC value.

[0113] In one design, in order to increase the flexibility of the control system. Figure 3 As shown, the communication fault diagnosis method provided by the embodiment of the present invention further includes: S205-S207.

[0114] S205: The receiving end verifies the second service message sent by the sending end and obtains a verification result of the second service message.

[0115] The second service message is a message received within a first preset time period after the feedback message is sent.

[0116] As a possible implementation method, the receiving end receives the second service message sent by the initiating end within a first preset time period after sending the feedback message, and verifies the second service message to obtain a verification result of the second service message.

[0117] Specifically, upon receiving the second service message, the receiving end parses the second service message to obtain a CRC value and an RC value. Further, the receiving end parses the CRC value and the RC value.

[0118] For example, taking the first preset time period as 0.5 milliseconds, the receiving end receives the second service message within 0.5 milliseconds after sending the feedback message. Further, the receiving end verifies the second service message and obtains a verification result of the second service message.

[0119] The verification process for the second business message can refer to the verification process for the first business message and will not be repeated here.

[0120] S206: When the verification result of the second service message is wrong, the receiving end enters a security state corresponding to the receiving end.

[0121] S207: If the receiving end does not receive a message sent by the sending end within a first preset time period after sending the feedback message, the receiving end enters a security state corresponding to the receiving end.

[0122] For example, taking the first preset time period as 0.5 ms, if the receiving end does not receive a message sent by the sending end within 0.5 ms after sending the feedback message, the receiving end enters a security state corresponding to the receiving end.

[0123] It is understood that when the receiving end receives an error message, it does not need to immediately enter a safe state. Instead, it reserves a first preset time period. By detecting the second service message sent by the sending end within the first preset time period and only entering the corresponding safe state if the verification result of the second service message is an error, the receiving end increases the flexibility of the control system.

[0124] In order to effectively diagnose communication failures, Figure 4 FIG. 1 is a flow chart of a communication fault diagnosis method according to an exemplary embodiment. Figure 4 As shown, the communication fault diagnosis method includes the following steps:

[0125] S301-S302.

[0126] S301. The sending end generates a first service message based on service data, a cyclic redundancy check CRC value, and a cycle count value.

[0127] The CRC value is determined based on the service data, the identifier of the sending end, and the cycle count value.

[0128] As one possible implementation, the sending end generates service data in response to the service guidance and determines a cycle count value based on the count value of the cycle counter. Furthermore, the sending end determines an information identifier based on the sending end identifier and the cycle count value, and generates a CRC value based on the information identifier, the service data, and a preset algorithm. Subsequently, the sending end generates a first service message based on the CRC value, the service data, and the cycle count value.

[0129] For example, let's take the sender's loop counter as an example, where the count value is 5. In response to the "turn on the lights" command sent by the user, the sender generates the "turn on the lights" service data, and based on the loop counter's count value of 5, determines that the loop count value of the service message sent this time is 6. Furthermore, based on the loop count value of 6 and the sender's identifier, the sender generates an information identifier, data ID, and generates a CRC value based on the information identifier, the service data, and a preset algorithm. Subsequently, the sender generates a first service message based on the CRC value, the service data, and the loop count value.

[0130] In some embodiments, the first service message may further include an information identifier and an identifier of the sending end.

[0131] S302. The sending end sends a first service message to the receiving end, so that the receiving end verifies the cycle count value and the CRC value to obtain a verification result of the first service message, and determines the communication status between the sending end and the receiving end based on the verification result of the first service message.

[0132] As a possible implementation manner, the sending end sends the first service message to the receiving end through an Ethernet transceiver model.

[0133] The communication fault diagnosis method provided by an embodiment of the present invention has the following beneficial effects: a CRC value is based on service data, a sender's identifier, and a cycle count value. Furthermore, the sender sends a first service message to the receiver, causing the receiver to verify the cycle count value and the CRC value to obtain a verification result of the first service message. Based on the verification result of the first service message, the communication status between the sender and the receiver is determined. In this way, it is possible to determine whether the first service message is a false message, thereby effectively diagnosing communication faults.

[0134] In one design, to ensure that the business is executed. Figure 5 As shown, the traffic fault diagnosis method disclosed in the embodiment of the present invention further includes: S303-S304.

[0135] S303: The sending end receives the feedback message sent by the receiving end.

[0136] As a possible implementation manner, the sending end, in a case that the message sent by the receiving end is received, parses the message sent by the receiving end, and in a case that it is determined that the message sent by the receiving end comprises the confirmation identifier, determines that the message is the feedback message.

[0137] S304, in a case that the feedback message comprises the check error identifier, the sending end sends the second service message to the receiving end.

[0138] The second service message is regenerated based on service data.

[0139] As a possible implementation manner, the sending end parses the feedback message, and if the check error bit is the check error identifier, generates second service data based on the service data in the first service message, and sends the second service message to the receiving end.

[0140] For example, the service data in the first service message is the service data of "turning on the car light", and the check error identifier is 1. In a case that the error identifier bit in the feedback message is 1, the sending end generates second service data based on the service data of "turning on the car light".

[0141] It should be noted that the second service data can further comprise an identifier of the sending end, a CRC value and a cycle count value.

[0142] In a design, in order to diagnose message loss, the communication fault diagnosis method provided by the embodiment of the application further comprises S305.

[0143] S305, in a case that the sending end does not receive the message sent by the receiving end within a second preset time period after sending the first service message, the sending end enters a corresponding safe state.

[0144] For example, the second preset time period is 0.5 ms. In a case that the sending end does not receive the message sent by the receiving end within 0.5 ms after sending the first service message, the sending end enters the safe state.

[0145] It should be noted that the first preset time period and the second preset time period can be the same or different, and the embodiment of the application does not limit this. The first preset time period and the second preset time period can be set to different values according to specific operation conditions.

[0146] It can be understood that the sending end detects whether the feedback message is received within the second preset time period after sending the first service message. If the feedback message is detected, it is determined that the first service message is not lost; if the feedback message is not detected, it is determined that the second service message is lost, and the safe state is entered. In this way, it can be determined whether there is a communication fault.

[0147] In one design, to diagnose message delays. Figure 6 As shown, the communication fault diagnosis method provided by the embodiment of the present invention further includes: S306-S308.

[0148] S306: The sending end receives the feedback message sent by the receiving end.

[0149] S307: The sending end determines a feedback time interval between the first time and the second time.

[0150] The first time is the time of sending the first service message, and the second time is the time of receiving the feedback message.

[0151] S308: When the feedback time interval is greater than or equal to the preset time interval, the sending end determines that the feedback message is a delayed message.

[0152] As a possible implementation, the sending end determines that the feedback time interval is greater than or equal to the preset time interval when obtaining the feedback time interval. Further, the sending end determines that the feedback message is a delayed message when the feedback time interval is greater than or equal to the preset time interval.

[0153] Subsequently, the sender enters a safe state.

[0154] It is understood that in order to determine whether there is a communication delay problem in vehicle communication, after sending the first service message, the sending end uses a timer to calculate the time interval from sending the first service message to receiving the feedback message. If the time interval is less than or equal to the preset time interval, a communication delay problem is determined. If the time interval is greater than or equal to the preset time interval, a communication delay problem is determined, thereby diagnosing feedback message delay.

[0155] In one design, in order to diagnose communication failures more effectively. Figure 7 As shown, S301 provided in the embodiment of the present invention further includes: S3011-S3013.

[0156] S3011. The sending end determines an information identifier based on the cycle count value and the sending end identifier.

[0157] In some embodiments, when the cycle count value and the identifier of the sending end are obtained, the information identifier is determined based on the cycle count value and the identifier of the sending end.

[0158] It should be noted that the specific implementation method of generating the information identifier in the embodiment of the present invention is not limited.

[0159] S3012. The sending end determines the CRC value based on the information identifier and service data.

[0160] S3013, the sending end generates a first service message based on the CRC value and the service data.

[0161] It can be understood that, in the embodiment of the application, the CRC value is generated based on the information identifier and the service data. In this way, when checking the CRC value, the receiving end avoids being unable to accurately detect the false message, and can more effectively diagnose the communication fault.

[0162] In order to facilitate the understanding of the communication fault diagnosis method in the embodiment of the application, the embodiment of the application also includes Figure 8 and Figure 9 . Figure 8 A communication fault diagnosis schematic diagram of a sending end and a receiving end is shown. In Figure 8 , the sending end includes a security island, an Ethernet transceiver module, and an RC counter. The service message generated by the sending end includes a CRC value, wherein the CRC is generated based on the information identifier. The receiving end includes a security island, an Ethernet transceiver module, and an RC counter. The sending end sends a first service message (including a CRC value, an information identifier, service data, and a cycle count value) to the receiving end. Correspondingly, the receiving end sends a feedback message (including an ACK, a CRC value, a check error bit identifier, and a cycle count value) to the receiving end.

[0163] Figure 9 A communication fault diagnosis flowchart of a sending end and a receiving end is shown. Figure 9 The following steps are shown: S1, the sending end starts counting the cycle count value in the service message from 0 after power-on.

[0164] S2, the sending end generates a first service message based on the target service data, the identifier of the sending end, the cycle count value, and a preset algorithm.

[0165] In some embodiments, the preset algorithm can be a cyclic redundancy check algorithm.

[0166] S3, the sending end sends the first service message to the receiving end. Correspondingly, the receiving end receives the first service message.

[0167] S4, the receiving end checks the cycle count value and the CRC in the first service message.

[0168] S5, the receiving end generates a feedback message in the case of failing to check the cycle count value or the CRC.

[0169] The feedback message includes an ACK identifier and a check error identifier.

[0170] S6, the receiving end sends the feedback message to the sending end. Correspondingly, the sending end receives the feedback message.

[0171] S7. When the sender detects a verification error flag, the sender generates a second service message based on the target service data.

[0172] In another case, the receiving end ends the communication when detecting a check error flag.

[0173] In some embodiments, the receiving end enters a safe state when a check error flag is detected.

[0174] S8. The sending end sends a second service message to the receiving end. Correspondingly, the receiving end receives the second service message.

[0175] In some embodiments, if the receiving end does not receive the second service message (retransmitted message) within the first preset time, it enters a safe state.

[0176] In some embodiments, if the sending end does not receive a verification success identifier sent by the receiving end within a second preset time, the sending end enters a safe state.

[0177] For example, taking the verification success flag as 0, if the sending end does not receive the message sent by the receiving end within 0.5ms after sending the first service message and the verification error bit is the verification success flag: 0, the sending end enters the safe state.

[0178] The above mainly introduces the solutions provided by the embodiments of the present invention from the perspective of methods. To achieve the above functions, the transaction device or electronic device includes hardware structures and / or software modules corresponding to performing each function. Those skilled in the art should readily appreciate that, in combination with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or in a hardware-driven manner by computer software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0179] In accordance with the above-mentioned method, the embodiment of the present invention can divide the functional modules of the exemplary communication fault diagnosis device or electronic device. For example, the communication fault diagnosis device or electronic device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical functional division. In actual implementation, other division methods may be used.

[0180] For example, Figure 10As shown, the embodiment of the present invention further provides a communication fault diagnosis device 40 , which is applied to a receiving end in a service-oriented architecture and includes a receiving unit 401 , a processing unit 402 , and a determining unit 403 .

[0181] The receiving unit 401 is configured to receive a first service message sent by a transmitter. The first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value. The CRC value is generated based on the service data, a transmitter identifier, and the cycle count value.

[0182] The processing unit 402 is configured to verify the cycle count value and the CRC value to obtain a verification result of the first service message.

[0183] The determining unit 403 is configured to determine the communication status between the sending end and the receiving end according to the verification result of the first service message.

[0184] Optionally, the first business message also includes the identifier of the sending end and the information identifier; the information identifier is determined based on the cycle count value and the identifier of the sending end, and the processing unit 402 is specifically used to verify the CRC value based on the information identifier and the business data when the verification cycle count value passes, to obtain the verification result of the first business message.

[0185] Optional, such as Figure 10 As shown, the communication fault diagnosis device 40 further includes a sending unit 404 .

[0186] The sending unit 404 is used to send a feedback message to the sending end when the verification result is an error. The feedback message includes a verification error identifier; the feedback message is used to instruct the sending end to resend the first service message.

[0187] Optionally, processing unit 402 is further configured to verify the second service message sent by the sending end, obtain a verification result of the second service message, and enter a security state corresponding to the receiving end if the verification result of the second service message is an error; the second service message is a message received within a first preset time period after sending the feedback message. Alternatively, processing unit 402 is further configured to enter a security state corresponding to the receiving end if no message sent by the sending end is received within the first preset time period after sending the feedback message.

[0188] like Figure 11 As shown, an embodiment of the present invention further provides a communication fault diagnosis device 50 , which is applied to a receiving end under a service-oriented architecture and includes a generating unit 501 and a sending unit 502 .

[0189] The generating unit 501 is configured to generate a first service message based on service data, a cyclic redundancy check (CRC) value, and a cycle count value; the CRC value is determined based on the service data, a sender identifier, and a cycle count value.

[0190] The sending unit 502 is used to send a first business message to the receiving end, so that the receiving end verifies the cycle count value and the CRC value to obtain the verification result of the first business message, and determines the communication status between the sending end and the receiving end based on the verification result of the first business message.

[0191] Optional, such as Figure 11 As shown, the communication fault diagnosis device 50 further includes a receiving unit 503 .

[0192] The receiving unit 503 is configured to receive a feedback message sent by the receiving end.

[0193] The sending unit 502 is further configured to send a second service message to the receiving end when the feedback message includes a verification error identifier; the second service message is regenerated based on the service data.

[0194] Optional, such as Figure 11 As shown, the communication fault diagnosis device 50 further includes a processing unit 504. The processing unit 504 is configured to enter a safety state corresponding to the sending end when no message sent by the receiving end is received within a second preset time period after sending the first service message.

[0195] Optionally, the receiving unit 503 is further configured to receive a feedback message sent by the receiving end.

[0196] The processing unit 504 is further configured to determine a feedback time interval between a first time and a second time, wherein the first time is the time of sending the first service message and the second time is the time of receiving the feedback message. If the feedback time interval is greater than or equal to a preset time interval, the feedback message is determined to be a delayed message.

[0197] Optionally, the generating unit 501 is specifically configured to: determine the information identifier based on the cycle count value and the identifier of the transmitting end, determine the CRC value based on the information identifier and the service data, and generate the first service message based on the CRC value and the service data.

[0198] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present invention provides a possible structural diagram of the control unit involved in the above-mentioned embodiment. Figure 12 As shown, the control unit 60 includes a processor 601, a memory 602 and a bus 603. The processor 601 and the memory 602 may be connected via the bus 603.

[0199] Processor 601 is the control center of the communication device and can be a single processor or a collective term for multiple processing elements. For example, processor 601 can be a general-purpose central processing unit (CPU) or other general-purpose processor. The general-purpose processor can be a microprocessor or any conventional processor.

[0200] As an embodiment, the processor 601 may include one or more CPUs, such as Figure 12 CPU 0 and CPU 1 are shown in Figure 1.

[0201] The memory 602 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0202] As a possible implementation, memory 602 can exist independently of processor 601 and be connected to processor 601 via bus 603 to store instructions or program code. When processor 601 calls and executes the instructions or program code stored in memory 602, the sensor determination method provided in this embodiment of the present invention can be implemented.

[0203] In another possible implementation, the memory 602 may also be integrated with the processor 601 .

[0204] Bus 603 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0205] It should be pointed out that Figure 12 The structure shown does not constitute a limitation on the control unit 60. Figure 12 In addition to the components shown, the control unit 60 may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0206] Optionally, the control unit 60 provided in this embodiment of the present invention may further include a communication interface 604 .

[0207] The communication interface 604 is used to connect to other devices via a communication network. The communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 604 can include a receiving unit for receiving data and a sending unit for sending data.

[0208] In one design, in the control unit 60 provided in an embodiment of the present invention, the communication interface may also be integrated into the processor.

[0209] In another hardware structure of a server provided by an embodiment of the present invention, the electronic device may include a processor and a communication interface. The processor is coupled to the communication interface.

[0210] The functions of the processor can refer to the description of the above processor. In addition, the processor also has a storage function, which can refer to the function of the above memory.

[0211] The communication interface is used to provide data to the processor. The communication interface can be an internal interface of the communication device or an external interface of the communication device.

[0212] It should be noted that the aforementioned another hardware structure does not constitute a limitation on the server. In addition to the aforementioned another hardware component, the server may include more or fewer components, or a combination of certain components, or different component arrangements.

[0213] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present invention provides a structural diagram of the middleware involved in the above-mentioned embodiment, which can refer to the structural diagram of the above-mentioned execution machine.

[0214] An embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the communication fault diagnosis method flow shown in the above method embodiment.

[0215] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the communication fault diagnosis method in the above method embodiment.

[0216] The embodiment of the present invention further provides a vehicle, comprising the above Figure 12 The control unit in.

[0217] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium in a suitable combination of the above, or a numerical value in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In embodiments of the present invention, computer-readable storage media may be any tangible media that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0218] Since the server, user equipment, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above method, the technical effects that can be obtained can also refer to the above method embodiments, and the embodiments of the present invention will not be repeated here.

[0219] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or replacements within the technical scope disclosed by the present invention should be included in the protection scope of the present invention.

Claims

1. A communication fault diagnosis method, characterized in that: Applied to a receiving end in a service-oriented architecture, the method includes: Receive a first service message sent by a sending end; the first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value, where the CRC value is generated based on the service data, an identifier of the sending end, and the cycle count value; Verifying the cycle count value and the CRC value to obtain a verification result of the first service message, and determining a communication state between the sending end and the receiving end according to the verification result of the first service message; If the verification result is an error, sending a feedback message to the sending end; the feedback message includes a verification error identifier; and the feedback message is used to instruct the sending end to resend the first service message; Verifying the second service message sent by the sending end to obtain a verification result of the second service message, and if the verification result of the second service message is incorrect, entering a security state corresponding to the receiving end; the second service message is a message received within a first preset time period after sending the feedback message; or In the case that no message sent by the sending end is received within a first preset time period after sending the feedback message, the receiving end enters a security state corresponding to the receiving end.

2. The communication fault diagnosis method according to claim 1, characterized in that: The first service message also includes an identifier of the sending end and an information identifier; the information identifier is determined based on the cycle count value and the identifier of the sending end, and the verifying the cycle count value and the CRC value to obtain a verification result of the first service message includes: When the verification of the cycle count value passes, the CRC value is verified based on the information identifier and the service data to obtain a verification result of the first service message.

3. A communication fault diagnosis method, characterized in that: Applied to a sending end in a service-oriented architecture, the method includes: Generate a first service message based on service data, a cyclic redundancy check (CRC) value, and a cycle count value; the CRC value is determined based on the service data, an identifier of the sending end, and the cycle count value; Sending the first service message to the receiving end, so that the receiving end verifies the cycle count value and the CRC value to obtain a verification result of the first service message, and determining a communication status between the sending end and the receiving end based on the verification result of the first service message; receiving a feedback message sent by the receiving end, and sending a second service message to the receiving end if the feedback message includes a check error identifier; the second service message is regenerated based on the service data; If no message sent by the receiving end is received within a second preset time period after sending the first service message, the sending end enters a security state corresponding to the sending end.

4. The communication fault diagnosis method according to claim 3, characterized in that: The method further comprises: receiving a feedback message sent by the receiving end, and determining a feedback time interval between a first time and a second time; the first time is a time for sending the first service message, and the second time is a time for receiving the feedback message; When the feedback time interval is greater than or equal to the preset time interval, it is determined that the feedback message is a delayed message.

5. The communication fault diagnosis method according to claim 3 or 4, characterized in that: The method further comprises generating a first service message based on the service data, a cyclic redundancy check (CRC) value, and a cycle count value: Determining an information identifier based on the cycle count value and an identifier of the transmitting end, and determining the CRC value based on the information identifier and the service data; The first service message is generated based on the CRC value and the service data.

6. A communication fault diagnosis device, characterized in that: Applied to the receiving end in a service-oriented architecture, including a receiving unit, a processing unit, a sending unit, and a determination unit; The receiving unit is configured to receive a first service message sent by a sending end; the first service message includes service data, a cyclic redundancy check (CRC) value, and a cycle count value, where the CRC value is generated based on the service data, an identifier of the sending end, and the cycle count value; The processing unit is configured to verify the cycle count value and the CRC value to obtain a verification result of the first service message; The determining unit is configured to determine a communication state between the sending end and the receiving end according to a verification result of the first service message; The sending unit is configured to send a feedback message to the sending end when the verification result is an error; the feedback message includes a verification error identifier; and the feedback message is used to instruct the sending end to resend the first service message; The processing unit is further configured to verify a second service message sent by the sending end, obtain a verification result of the second service message, and enter a security state corresponding to the receiving end if the verification result of the second service message is an error; the second service message is a message received within a first preset time period after sending the feedback message; or, In the case that no message sent by the sending end is received within a first preset time period after sending the feedback message, the receiving end enters a security state corresponding to the receiving end.

7. A communication fault diagnosis device, characterized in that: Applied to the sending end in a service-oriented architecture, including a generating unit, a receiving unit, a processing unit, and a sending unit; The generating unit is configured to generate a first service message based on service data, a cyclic redundancy check CRC value, and a cycle count value; The CRC value is determined based on the service data, the identifier of the sending end, and the cycle count value; The sending unit is configured to send the first service message to the receiving end, so that the receiving end verifies the cycle count value and the CRC value to obtain a verification result of the first service message, and determine the communication status between the sending end and the receiving end according to the verification result of the first service message; The receiving unit is configured to receive a feedback message sent by the receiving end; The sending unit is further configured to send a second service message to the receiving end when the feedback message includes a check error identifier; the second service message is regenerated based on the service data; The processing unit is configured to enter a security state corresponding to the sending end if no message sent by the receiving end is received within a second preset time period after sending the first service message.

8. A control unit, characterized in that: Deployed in the vehicle, including memory and processor; The memory is coupled to the processor; The memory is used to store computer program code, wherein the computer program code includes computer instructions; When the processor executes the computer instruction, the control unit executes the communication fault diagnosis method according to any one of claims 1 to 2 or claims 3 to 5.

9. A computer-readable storage medium storing instructions, characterized in that: When the instruction is executed on the control unit, the control unit is caused to execute the communication fault diagnosis method according to any one of claims 1 to 2 or claims 3 to 5.

10. A vehicle, characterized in that: Comprising a control unit as claimed in claim 8.

Citation Information

Patent Citations

  • Data communication method and device of vehicle-mounted bus and vehicle

    CN110213018A