Communication method, apparatus, vehicle, computer readable storage medium and product

CN122824599APending Publication Date: 2026-09-25JIANGSU GUOINNOVATION ENERGY COMMERCIAL VEHICLE INNOVATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611316559.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-25

AI Technical Summary

Benefits of technology

[0024]本公开中的通信方法,在CAN通信过程中实时监测接收邮箱的健康值,在接收邮箱的健康值处于异常状态的情况下,更新配置文件,以便利用更新后的配置文件进行通信。本公开能够实时监测接收邮箱的状态,并更新配置文件,这样能够对通信状态进行实时调整,提升接收邮箱对报文的处理能力,从而提升通信质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122824599A_ABST
    Figure CN122824599A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a communication method, device, vehicle, computer readable storage medium and product, and relates to the technical field of communication. The communication method comprises: in the process of communication based on a controller area network (CAN), a health value of a receiving mailbox is monitored in real time, wherein the receiving mailbox is used to receive a message; in the case that the health value of the receiving mailbox is in an abnormal state, a configuration file is updated, wherein the configuration file comprises a corresponding relationship between the receiving mailbox and the message; and communication is performed by using the updated configuration file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a communication method, apparatus, vehicle, computer-readable storage medium, and product. Background Technology

[0002] The vehicle gateway is the core hub in intelligent connected vehicles that connects a large number of terminal devices with the cloud platform and various electronic control units in the vehicle. Its communication performance, reliability and maintainability directly affect the response speed, stability and security of the entire vehicle network system.

[0003] With the continuous enrichment of intelligent connected vehicle functions, the number of in-vehicle terminal devices has surged, and the amount of communication data has increased significantly, placing higher demands on the real-time communication capabilities of in-vehicle gateways. Summary of the Invention

[0004] One of the technical problems that this disclosure aims to solve is: how to improve the quality of CAN communication in a controller area network.

[0005] According to a first aspect of some embodiments of the present disclosure, a communication method is provided, comprising: during communication based on a Controller Area Network (CAN), monitoring the health value of a receiving mailbox in real time, wherein the receiving mailbox is used to receive messages; when the health value of the receiving mailbox is in an abnormal state, updating a configuration file, wherein the configuration file includes a correspondence between the receiving mailbox and messages; and using the updated configuration file for communication.

[0006] In some embodiments, real-time monitoring of the health value of the receiving mailbox includes: real-time monitoring of the congestion value and abnormal value of the receiving mailbox, wherein the congestion value is determined by the message processing pressure of the receiving mailbox, and the abnormal value is determined by the communication status of the messages corresponding to the receiving mailbox; and the health value of the receiving mailbox is determined based on the congestion value and the abnormal value.

[0007] In some embodiments, message processing pressure is reflected by the offset rate of the actual forwarding cycle of the message corresponding to the receiving mailbox relative to the preset forwarding cycle.

[0008] In some embodiments, real-time monitoring of the congestion value of the receiving mailbox includes: at each monitoring time, determining one or more packets corresponding to the receiving mailbox; for each of the one or more packets, determining the offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet; and determining the congestion value of the receiving mailbox based on the maximum offset rate among the offset rates corresponding to the one or more packets.

[0009] In some embodiments, determining the offset rate of the actual forwarding period of a message relative to the preset forwarding period of the message includes: determining the offset rate of the actual forwarding period of a message relative to the preset forwarding period of the message based on the ratio of a first difference to the preset forwarding period of the message, wherein the first difference is the difference between the actual forwarding period of the message and the preset forwarding period of the message.

[0010] In some embodiments, determining the congestion value of the receiving mailbox based on the maximum offset rate among the offset rates corresponding to one or more messages includes: setting the congestion value of the receiving mailbox to 1 when the maximum offset rate is greater than a first value; setting the congestion value of the receiving mailbox to 0 when the maximum offset rate is less than a second value; and setting the congestion value of the receiving mailbox to the maximum offset rate when the maximum offset rate is not less than the second value and not greater than the first value.

[0011] In some embodiments, the communication status of a message is reflected by whether the message is an abnormal message.

[0012] In some embodiments, real-time monitoring of abnormal values ​​in the receiving mailbox includes: at each monitoring time, identifying one or more messages corresponding to the receiving mailbox; for each of the one or more messages, determining the probability that the actual forwarding period of the message exceeds the first threshold based on the number of times the actual forwarding period of the message exceeds the first threshold and the total number of forwardings of the message; determining whether the message is an abnormal message based on the probability; and determining the abnormal value of the receiving mailbox based on the abnormal messages in the one or more messages.

[0013] In some embodiments, determining the abnormal value of the receiving mailbox based on abnormal messages in one or more messages includes: setting the abnormal value of the receiving mailbox to 1 if an abnormal message appears in one or more messages; and determining the abnormal value of the receiving mailbox to 0 if no abnormal message appears in one or more messages.

[0014] In some embodiments, updating the configuration file includes: re-determining the receiving mailbox corresponding to the abnormal message.

[0015] In some embodiments, re-determining the receiving mailbox corresponding to the abnormal message includes: determining the communication frequency of the abnormal message based on the actual forwarding cycle of the abnormal message; and re-determining the receiving mailbox corresponding to the abnormal message based on the communication frequency of the abnormal message, the health value of the mailbox currently corresponding to the abnormal message, and the health values ​​of other receiving mailboxes.

[0016] In some embodiments, real-time monitoring of congestion and outlier values ​​in the receiving mailbox includes: real-time monitoring of congestion values ​​in the receiving mailbox; and real-time monitoring of outlier values ​​in the receiving mailbox when the congestion value is detected to be greater than a second threshold after a specified number of consecutive occurrences.

[0017] In some embodiments, congestion values, outliers, and health values ​​are negatively correlated.

[0018] In some embodiments, the congestion value and outlier value are set to non-negative numbers not greater than 1. Determining the health value of the receiving mailbox based on the congestion value and outlier value includes: the health value includes the product of a first part and a second part, the first part includes 1 and a second difference of the congestion value, the second part includes the sum of a first weight and a third part, the third part includes the product of the second weight and a third difference, and the third difference is the difference between 1 and the outlier value.

[0019] According to a second aspect of some embodiments of the present disclosure, a communication device is provided, comprising: a monitoring module configured to monitor the health value of a receiving mailbox in real time during communication based on a controller local area network (CAN), wherein the receiving mailbox is used to receive messages; an update module configured to update a configuration file when the health value of the receiving mailbox is in an abnormal state, wherein the configuration file includes a correspondence between the receiving mailbox and messages; and a communication module configured to communicate using the updated configuration file.

[0020] According to a third aspect of some embodiments of this disclosure, a vehicle is provided, including: the communication device as described above.

[0021] According to a fourth aspect of some embodiments of the present disclosure, a communication apparatus is provided, comprising: a processor; and a memory coupled to the processor for storing instructions, which, when executed by the processor, cause the processor to perform the communication method as described above.

[0022] According to a fifth aspect of some embodiments of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, wherein the program, when executed by a processor, implements the communication method as described above.

[0023] According to a sixth aspect of some embodiments of the present disclosure, a computer program product is provided, including instructions that, when executed by a processor, cause the processor to perform the communication method as described above.

[0024] The communication method disclosed herein monitors the health value of the receiving mailbox in real time during CAN communication. If the health value of the receiving mailbox is abnormal, the configuration file is updated so that communication can be conducted using the updated configuration file. This disclosure enables real-time monitoring of the receiving mailbox's status and updating the configuration file, allowing for real-time adjustments to the communication status, improving the receiving mailbox's message processing capabilities, and thus enhancing communication quality.

[0025] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0026] 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 only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating a communication method according to some embodiments of the present disclosure is shown.

[0028] Figure 2 A flowchart illustrating a communication method according to other embodiments of the present disclosure is shown.

[0029] Figure 3 A schematic diagram of the structure of a communication device according to some embodiments of the present disclosure is shown.

[0030] Figure 4 A schematic diagram of the structure of a communication device according to other embodiments of the present disclosure is shown.

[0031] Figure 5 A schematic diagram of the structure of a communication device according to some embodiments of the present disclosure is shown.

[0032] Figure 6 A schematic diagram of the structure of a vehicle according to some embodiments of the present disclosure is shown. Detailed Implementation

[0033] 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. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0034] With the continuous development of CAN communication functions, the number of messages has also increased dramatically. For example, in vehicle communication scenarios, the CAN controller in the vehicle gateway needs to process a large number of CAN messages. In message receiving scenarios, when the number of messages to be received is large, problems such as mailbox congestion, message loss, and communication delays may occur, seriously affecting communication reliability and quality.

[0035] Based on this, this disclosure provides a communication method.

[0036] Figure 1A flowchart illustrating a communication method according to some embodiments of the present disclosure is shown. Figure 1 As shown, the method of this embodiment includes steps S11 to S13.

[0037] In step S11, during the communication process based on the Controller Area Network (CAN), the health value of the receiving mailbox is monitored in real time, wherein the receiving mailbox is used to receive messages.

[0038] In step S12, if the health value of the receiving mailbox is in an abnormal state, the configuration file is updated, wherein the configuration file includes the correspondence between the receiving mailbox and the message.

[0039] In step S13, communication is performed using the updated configuration file.

[0040] In the communication method disclosed herein, the health value of the receiving mailbox is monitored in real time during CAN real-time communication. Once an abnormal state is detected in the health value of the receiving mailbox, the configuration file is updated, that is, the correspondence between the receiving mailbox and the message is updated.

[0041] Updating the configuration file optimizes the mapping between receiving mailboxes and messages. For example, if some receiving mailboxes are congested while others still have message processing capacity, some messages corresponding to the congested receiving mailboxes can be distributed to other mailboxes. This balances the message processing pressure on each receiving mailbox and improves the overall message processing capacity of the receiving mailboxes.

[0042] The communication method disclosed herein monitors the health value of the receiving mailbox in real time during CAN communication. If the health value of the receiving mailbox is abnormal, the configuration file is updated so that communication can be conducted using the updated configuration file. This disclosure enables real-time monitoring of the receiving mailbox's status and updating the configuration file, allowing for real-time adjustments to the communication status, improving the receiving mailbox's message processing capabilities, and thus enhancing communication quality.

[0043] In some embodiments, real-time monitoring of the health value of the receiving mailbox includes: real-time monitoring of the congestion value and abnormal value of the receiving mailbox, wherein the congestion value is determined by the message processing pressure of the receiving mailbox, and the abnormal value is determined by the communication status of the messages corresponding to the receiving mailbox; and the health value of the receiving mailbox is determined based on the congestion value and the abnormal value.

[0044] The health of the receiving mailbox is measured by two metrics: congestion and outliers. Congestion, measured from the receiving mailbox's perspective, refers to the message processing pressure on the receiving mailbox. For example, the more messages the receiving mailbox needs to process simultaneously, the greater the message processing pressure. Outliers, measured from the perspective of the messages corresponding to the receiving mailbox, refer to the communication status of those messages. For example, the more frequent and severe the message delays, the worse the communication status of the messages corresponding to the receiving mailbox.

[0045] You can set congestion values, outlier values, and health values ​​to have a negative correlation.

[0046] For ease of calculation, in some embodiments, the congestion value and outlier value are set to non-negative numbers not greater than 1. Determining the health value of the receiving mailbox based on the congestion value and outlier value includes: the health value includes the product of a first part and a second part, the first part includes 1 and a second difference of the congestion value, the second part includes the sum of a first weight and a third part, the third part includes the product of the second weight and a third difference, and the third difference is the difference between 1 and the outlier value.

[0047] For example, let the health value be H, the congestion value be P, and the abnormal value be Q, then: H = (1-P) × [w1 + w2(1-Q)].

[0048] Here, w1 and w2 represent the first weight and the second weight, respectively, and the sum of the first weight and the second weight can be set to 1. The values ​​of the first weight and the second weight can be set according to the actual scenario.

[0049] An abnormal health value can be determined based on whether the health value is below a health threshold. For example, a health value less than 0.6 is considered abnormal. A health value in the range [0.6, 0.8) is considered sub-healthy; in this case, no configuration file update is needed, but a prompt to monitor the health value can be made. A health value greater than or equal to 0.8 is considered healthy.

[0050] Since the health value is measured by two indicators, it is necessary to monitor both indicator values. To improve monitoring efficiency and reduce computational burden, in some embodiments, real-time monitoring of the congestion and abnormal values ​​of the receiving mailbox includes: real-time monitoring of the congestion value of the receiving mailbox; and real-time monitoring of abnormal values ​​of the receiving mailbox when the congestion value is detected to be greater than a second threshold after a specified number of consecutive occurrences.

[0051] In other words, if abnormal congestion values ​​are detected multiple times in a row, further monitoring of abnormal values ​​will be conducted, and a health value will be calculated.

[0052] In some embodiments, message processing pressure is reflected by the offset rate of the actual forwarding cycle of the message corresponding to the receiving mailbox relative to the preset forwarding cycle.

[0053] The message forwarding cycle refers to the time between receiving the message and forwarding it. For example, in vehicle communication scenarios, for messages containing critical control signals such as braking, steering, and accelerator, a shorter forwarding cycle results in more timely vehicle control. Therefore, the message forwarding cycle is a key indicator of communication quality.

[0054] Typically, multiple messages are sent to the same receiving mailbox at the same time, and the receiving mailbox needs to process these messages one by one in a certain order. For example, it can process the messages one by one in a first-in, first-out (FIFO) order. Therefore, when the receiving mailbox has a large number of messages to process at the same time, it will cause queuing delays in the receiving queue, which in turn will cause delays in the single forwarding of messages.

[0055] In communication, assuming other factors remain constant—for example, the routing configuration of the same message remains unchanged—a greater forwarding delay indicates a greater processing load on the receiving mailbox. In other words, the processing load can be reflected in the forwarding delay. This forwarding delay can be represented by the offset rate between the actual forwarding period of the message corresponding to the receiving mailbox and the preset forwarding period.

[0056] The preset forwarding period refers to the forwarding period that is pre-set in the gateway's configuration file and is expected to be achieved. The actual forwarding period of a packet includes the packet forwarding delay time and the preset forwarding period. For example, if the preset forwarding period of a packet is 5ms and the delay time for the receiving mailbox to process the packet is 1ms, then the actual forwarding period of the packet is 6ms.

[0057] In other words, at each monitoring moment, determining the actual forwarding cycle of a message requires determining the moment the message was received and the moment it was forwarded. Therefore, the monitoring moment can be either the moment the message was forwarded or the moment after the message has been forwarded.

[0058] It should be noted that this disclosure does not limit the receiving mailbox to having messages that need to be counted and forwarded at every monitoring time. This disclosure uses the actual forwarding cycle of forwarded messages to reflect the message processing pressure on the receiving mailbox. For example, if there are no messages that need to be counted and forwarded at a certain monitoring time, the offset rate at that monitoring time can be considered to be 0.

[0059] A receiving mailbox often needs to process multiple messages simultaneously, each of which has its own actual forwarding period and preset forwarding period. In some embodiments, real-time monitoring of the congestion value of the receiving mailbox includes: at each monitoring moment, identifying one or more messages corresponding to the receiving mailbox; for each of the one or more messages, determining the offset rate of the message's actual forwarding period relative to the message's preset forwarding period; and determining the congestion value of the receiving mailbox based on the maximum offset rate among the offset rates corresponding to the one or more messages.

[0060] Determining the offset rate of the actual forwarding period of a message relative to the preset forwarding period of the message includes: determining the offset rate of the actual forwarding period of the message relative to the preset forwarding period of the message based on the ratio of the first difference to the preset forwarding period of the message, wherein the first difference is the difference between the actual forwarding period of the message and the preset forwarding period of the message.

[0061] If the preset forwarding period of a message is T0 and the actual forwarding period is T1, then the offset rate K can be expressed as K = (T1 - T0) / T0.

[0062] In other words, for each monitoring moment, the maximum offset rate generated by multiple messages corresponding to that monitoring moment can be used as the congestion value of that receiving mailbox. Of course, other statistical analysis methods based on the offset rates generated by these multiple messages can also be used as the congestion value of that receiving mailbox.

[0063] Congestion value is an indicator for assessing health, and it needs to be used in conjunction with outlier indicators. For the sake of reasonableness and convenience in assessment, in some embodiments, determining the congestion value of the receiving mailbox based on the maximum offset rate among the offset rates corresponding to one or more packets includes: setting the congestion value of the receiving mailbox to 1 if the maximum offset rate is greater than a first value; setting the congestion value of the receiving mailbox to 0 if the maximum offset rate is less than a second value; and setting the congestion value of the receiving mailbox to the maximum offset rate if the maximum offset rate is not less than the second value and not greater than the first value.

[0064] In some embodiments, the first value is 1 and the second value is 0. Let the congestion value of the receiving mailbox be P, then the congestion value P can be set as: P=min(1,max(0,K)).

[0065] The above embodiment uses the message forwarding cycle to determine the congestion value of the receiving mailbox. Abnormal values ​​in the receiving mailbox can also be measured using the message forwarding cycle.

[0066] Anomalies are determined by the communication status of messages corresponding to the receiving mailbox. In some embodiments, the communication status of a message is reflected by whether the message is an anomaly message, and whether a message is an anomaly message can be determined based on the message's forwarding cycle.

[0067] In other words, based on the message forwarding cycle, abnormal messages in the message corresponding to the receiving mailbox are determined, and the abnormal value of the receiving mailbox is determined based on the abnormal messages.

[0068] In some embodiments, real-time monitoring of abnormal values ​​in the receiving mailbox includes: at each monitoring time, identifying one or more messages corresponding to the receiving mailbox; for each of the one or more messages, determining the probability that the actual forwarding period of the message exceeds the first threshold based on the number of times the actual forwarding period of the message exceeds the first threshold and the total number of forwardings of the message; determining whether the message is an abnormal message based on the probability; and determining the abnormal value of the receiving mailbox based on the abnormal messages in the one or more messages.

[0069] For example, the ratio of the number of times the actual forwarding cycle of a message exceeds the first threshold to the total number of times the message is forwarded is the probability that the actual forwarding cycle of the message exceeds the first threshold. If the probability exceeds a specified value, the message is determined to be an abnormal message.

[0070] The first threshold is used to assess the specific delay status of the actual forwarding cycle of the packet. For example, the first threshold is greater than the preset forwarding cycle of the packet. That is, the first threshold can be used to determine the probability that the packet will experience severe forwarding delay. When the probability of the packet experiencing severe forwarding delay is high, it indicates that the packet is abnormal.

[0071] The abnormal value of the receiving mailbox is determined based on abnormal messages in one or more messages, including: setting the abnormal value of the receiving mailbox to 1 if an abnormal message appears in one or more messages; and determining the abnormal value of the receiving mailbox to 0 if no abnormal message appears in one or more messages.

[0072] In other words, if an abnormal message appears in the message corresponding to the receiving mailbox, the abnormal value of the receiving mailbox is considered to be 1; otherwise, it is 0.

[0073] Of course, other methods can also be used. For example, if the number of abnormal messages in the messages corresponding to the receiving mailbox is greater than a specified number, the abnormal value of the receiving mailbox is considered to be 1; otherwise, it is 0.

[0074] In addition to setting the outlier value to 0 or 1, other value options can be configured. For example, the correspondence between the number of outlier packets and the outlier value can be configured, with the outlier value including multiple values, each belonging to the range [0,1]. For instance, when the number of outlier packets is less than 2, the outlier value is 0; when the number of outlier packets is not less than 2 but less than 4, the outlier value is 0.2, ..., and when the number of outlier packets is more than 8, the outlier value is 1.

[0075] The above embodiments describe how congestion values ​​and outliers are determined. Based on congestion values ​​and outliers, health values ​​can be determined, and then it can be determined whether the configuration file needs to be updated.

[0076] In some embodiments, updating the configuration file includes: re-determining the receiving mailbox corresponding to the abnormal message.

[0077] In other words, for each receiving mailbox, there may be multiple anomalies from the overall perspective of messages. For example, the message processing pressure may be too high due to the large number of messages being processed at the same time. There may also be anomalies from the perspective of individual messages, such as the forwarding delay of certain message IDs being large. Therefore, the health value of the receiving mailbox is evaluated by congestion value and anomaly value.

[0078] Both congestion and outlier values ​​can be determined using the packet forwarding cycle, making outlier packets a significant factor affecting the health of the receiving mailbox. This is because outlier packets not only affect outlier values ​​but also congestion values; their presence leads to higher congestion levels. Therefore, handling outlier packets can alleviate the health issues of the receiving mailbox.

[0079] In some embodiments, re-determining the receiving mailbox corresponding to the abnormal message includes: determining the communication frequency of the abnormal message based on the actual forwarding cycle of the abnormal message; and re-determining the receiving mailbox corresponding to the abnormal message based on the communication frequency of the abnormal message, the health value of the mailbox currently corresponding to the abnormal message, and the health values ​​of other receiving mailboxes.

[0080] Forwarding period and communication frequency are inversely proportional. For example, the reciprocal of the average forwarding period of abnormal packets can be used to determine the communication frequency of abnormal packets.

[0081] Based on the communication frequency of the abnormal message, the health value of the mailbox currently corresponding to the abnormal message, and the health values ​​of other receiving mailboxes, the receiving mailbox corresponding to the abnormal message is re-determined. In other words, by reallocating abnormal messages, the overall health value of all receiving mailboxes is optimized.

[0082] In some embodiments, the optimization objective can be set to minimize the congestion value of all receiving mailboxes. Since the outlier value of the receiving mailbox reflects the outlier packet itself, the outlier value no longer affects the health value of the receiving mailbox when the outlier packet is reallocated, thus allowing the outlier packet to be reallocated based on the congestion value of the receiving mailbox.

[0083] The higher the communication frequency of abnormal messages, the lower the congestion value of the receiving mailbox that needs to handle the abnormal messages, that is, the receiving mailbox needs to have enough resources to process the abnormal messages.

[0084] In some embodiments, the abnormal message ID is placed in an allocation pool; the corresponding receiving mailbox for the abnormal message ID is re-determined according to an optimization algorithm. The optimization algorithm is, for example, a greedy algorithm or a genetic algorithm.

[0085] After re-identifying the receiving mailbox corresponding to the abnormal message, update the configuration file and conduct communication based on the updated configuration file.

[0086] Figure 2 A flowchart illustrating a communication method according to other embodiments of the present disclosure is shown. The communication method in this embodiment is executed by a communication device, which includes an online execution domain and an offline processing domain. That is, parts of the communication method of the present disclosure can be executed online during communication, and parts can be executed offline.

[0087] In step S201, during the initial operation phase, old configuration files are imported into the Personal Computer (PC) software through the offline processing domain, so that the old configuration and health value data can be processed by the optimization core engine in the offline optimization and configuration management domain.

[0088] In step S202, the core engine is optimized to generate the initial static route file.

[0089] The core engine optimization includes a loading and analysis module, a health value analyzer, and a route optimizer. The loading and analysis module parses old configuration data, and the health value analyzer assumes the initial data has a health value of 1 by default. The route optimizer optimizes the mailbox configuration and then generates the initial static route file through the initial configuration generation service.

[0090] In step S203, the initial static routing file is written to the original data area through the initial write service.

[0091] In step S204, after the initial static routing file is written to the original data area, an atomic switch is triggered to update the A (original data area flag) and B (backup data area flag) flags.

[0092] In step S205, the configuration loader reads the current activation flag from the storage component (e.g., flash memory (Data Flash, DFlash)) and then loads the configuration file from the corresponding area after restarting the communication device.

[0093] In step S206, the configuration loader transmits the configuration file to the online scheduling engine, which provides real-time communication routing support for the CAN or CAN with Flexible Data-Rate (CAN FD) driver.

[0094] In step S207, during communication operation, the congestion value is collected and calculated in real time by the health value monitoring module of the operation monitoring layer in the online operation domain. When the congestion value is greater than the threshold of 0.1 for three consecutive times, the health value is calculated.

[0095] In step S208, when the health value reaches an abnormal state, a prompt is made to update the static configuration file.

[0096] In step S209, the monitoring status is maintained as long as the health value does not reach an abnormal state.

[0097] In step S210, before powering down for this operation, an abnormal message identifier (ID) is recorded, and an update process is triggered to obtain and read the old configuration file information on the PC. Recording the abnormal message ID may include updating the ID communication frequency update flag to the currently active area of ​​the DFlash. The ID communication frequency update flag may indicate that the configuration file needs to be updated.

[0098] In step S211, the offline optimization and configuration management domain generates an optimized configuration file, i.e., a new configuration file, based on the old configuration file and health value data. This includes determining the algorithmic redistribution of the message ID-mailbox relationship based on the congestion value of the receiving mailbox and the update flag information.

[0099] In step S212, the optimized configuration file is written to the backup area of ​​DFlash.

[0100] In step S213, the A and B flags are updated again.

[0101] In step S214, the configuration loader reads the current activation flag from DFlash and loads the configuration file from the corresponding area.

[0102] In step S215, the configuration loader transmits the backup area content to the online scheduling engine, which, after restarting the communication device, can be used to provide routing support for real-time communication for CAN or CAN FD drivers.

[0103] In other words, the communication method disclosed herein includes the following steps.

[0104] The online operation and monitoring steps are executed by the vehicle gateway, including: managing its communication resources based on dynamic allocation strategies and collecting and persistently storing operational health data.

[0105] The offline analysis and optimization steps are executed by the offline optimization terminal, including: acquiring operational health data; performing in-depth analysis on the operational health data; and triggering a deep optimization algorithm to generate optimized resource configuration data when resource anomalies are detected.

[0106] The secure closed-loop update process involves writing the optimized resource configuration data back to the vehicle gateway to update its communication resource configuration.

[0107] The dynamic allocation strategy for managing communication resources includes: performing hierarchical dynamic allocation of multiple receiver mailboxes of the CAN controller of the vehicle gateway. For example, the top N message IDs with the highest communication frequency can be fixedly and exclusively allocated to the top N mailboxes with the highest priority, where N is an integer greater than 1; the remaining message IDs are sorted by communication frequency and sequentially and exclusively allocated to multiple intermediate priority mailboxes; and the remaining low-frequency message IDs are evenly allocated to multiple lowest priority mailboxes using a balanced allocation algorithm.

[0108] The offline optimization endpoint can be integrated design software on a PC. The steps of acquiring and writing back resource configuration data can be implemented through the Unified Vehicle Diagnostic Service (UDS) protocol.

[0109] The security closed-loop update steps specifically include writing the optimized resource configuration data to the storage area of ​​the vehicle gateway through the 0x2E write data service of UDS, and performing integrity verification during the writing process.

[0110] Dynamic allocation strategies can be defined by configurable scripts and support remote updates via the cloud to dynamically adjust resource allocation logic.

[0111] The communication method disclosed herein enables predictive maintenance, improving the reliability of the communication system. By using health value indicators, potential faults such as fuel tank congestion can be warned in advance, shifting the maintenance mode from "passive repair after a fault" to "proactive optimization before a risk occurs." This significantly enhances the operational stability and security of the vehicle gateway throughout the vehicle's entire lifecycle, and substantially improves communication performance and resource utilization efficiency.

[0112] Furthermore, dynamic scheduling and global optimization effectively avoid mailbox congestion, message delays, and packet loss caused by uneven load, ensuring nanosecond-level response times for critical messages (such as engine speed), forming a complete resource management closed loop with self-evolution capabilities. This streamlines the entire process of "design-deployment-operation-monitoring-analysis-optimization-redeployment," enabling gateway communication configurations to continuously iterate and optimize based on actual road data and load changes, ensuring optimal performance over the long term.

[0113] Furthermore, the communication method disclosed herein exhibits good engineering feasibility and maintainability. The entire optimization process of the communication method can be based on the standard automotive diagnostic protocol (Unified Diagnostic Services, UDS), seamlessly compatible with existing automotive diagnostic, production flashing, and after-sales service systems. Optimization operations can be completed through a standardized toolchain, reducing the technical threshold and cost of operation and maintenance, and making it suitable for the deployment and management of large-scale vehicle platforms.

[0114] The communication method disclosed herein also exhibits strong compatibility and scalability. On the hardware side, it is compatible with mainstream single-core automotive-grade chips; on the software side, it supports standard network definition files such as Database Container (DBC) and AUTOSAR Extensible Markup Language (ARXML). Furthermore, the PC-side optimization algorithm can be flexibly iterated, easily adapting to different vehicle models and future communication needs.

[0115] Figure 3 A schematic diagram of a communication device according to some embodiments of the present disclosure is shown. For example... Figure 3 As shown, the first communication device 3 in this embodiment includes a monitoring module 31, configured to monitor the health value of the receiving mailbox in real time during communication based on the Controller Area Network (CAN), wherein the receiving mailbox is used to receive messages; an update module 32, configured to update the configuration file when the health value of the receiving mailbox is in an abnormal state, wherein the configuration file includes the correspondence between the receiving mailbox and the messages; and a communication module 33, configured to communicate using the updated configuration file.

[0116] In some embodiments, the monitoring module 31 is configured to monitor the congestion value and abnormal value of the receiving mailbox in real time, wherein the congestion value is determined by the message processing pressure of the receiving mailbox, and the abnormal value is determined by the communication status of the messages corresponding to the receiving mailbox; and the health value of the receiving mailbox is determined based on the congestion value and the abnormal value.

[0117] In some embodiments, message processing pressure is reflected by the offset rate of the actual forwarding cycle of the message corresponding to the receiving mailbox relative to the preset forwarding cycle.

[0118] In some embodiments, the monitoring module 31 is configured to, at each monitoring time, determine one or more packets corresponding to the receiving mailbox; for each of the one or more packets, determine the offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet; and determine the congestion value of the receiving mailbox based on the maximum offset rate among the offset rates corresponding to the one or more packets.

[0119] In some embodiments, the monitoring module 31 is configured to determine the offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet based on the ratio of the first difference to the preset forwarding period of the packet, wherein the first difference is the difference between the actual forwarding period of the packet and the preset forwarding period of the packet.

[0120] In some embodiments, the monitoring module 31 is configured to set the congestion value of the receiving mailbox to 1 when the maximum offset rate is greater than a first value; to set the congestion value of the receiving mailbox to 0 when the maximum offset rate is less than a second value; and to set the congestion value of the receiving mailbox to the maximum offset rate when the maximum offset rate is not less than the second value and not greater than the first value.

[0121] In some embodiments, the communication status of a message is reflected by whether the message is an abnormal message.

[0122] In some embodiments, the monitoring module 31 is configured to, at each monitoring time, determine one or more messages corresponding to the receiving mailbox; for each of the one or more messages, determine the probability that the actual forwarding period of the message exceeds the first threshold based on the number of times the actual forwarding period of the message exceeds the first threshold and the total number of forwardings of the message; determine whether the message is an abnormal message based on the probability; and determine the abnormal value of the receiving mailbox based on the abnormal messages in the one or more messages.

[0123] In some embodiments, the monitoring module 31 is configured to set the abnormal value of the receiving mailbox to 1 when an abnormal message appears in one or more messages; and to determine the abnormal value of the receiving mailbox to 0 when no abnormal message appears in one or more messages.

[0124] In some embodiments, the update module 32 is configured to update the configuration file by: re-determining the receiving mailbox corresponding to the abnormal message.

[0125] In some embodiments, the update module 32 is configured to determine the communication frequency of the abnormal message based on the actual forwarding cycle of the abnormal message; and to re-determine the receiving mailbox corresponding to the abnormal message based on the communication frequency of the abnormal message, the health value of the mailbox currently corresponding to the abnormal message, and the health values ​​of other receiving mailboxes.

[0126] In some embodiments, the monitoring module 31 is configured to monitor the congestion value of the receiving mailbox in real time; and to monitor abnormal values ​​of the receiving mailbox in real time when the congestion value is detected to be greater than a second threshold after a specified number of consecutive times.

[0127] In some embodiments, congestion values, outliers, and health values ​​are negatively correlated.

[0128] In some embodiments, the congestion value and the outlier value are set to non-negative numbers not greater than 1. The monitoring module 31 is configured such that the health value includes the product of a first part and a second part, the first part includes 1 and a second difference of the congestion value, the second part includes the sum of a first weight and a third part, the third part includes the product of the second weight and a third difference, and the third difference is the difference between 1 and the outlier value.

[0129] The communication devices in the embodiments of this disclosure can be implemented by various computing devices or computer systems, as described below. Figure 4 as well as Figure 5 Describe it.

[0130] Figure 4 A schematic diagram of the structure of a communication device according to other embodiments of the present disclosure is shown. For example... Figure 4 As shown, the second communication device 4 in this embodiment includes a first memory 41 and a first processor 42 coupled to the first memory 41. The first processor 42 is configured to execute the communication methods in any of the embodiments of this disclosure based on instructions stored in the first memory 41.

[0131] The first memory 41 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory stores, for example, the operating system, application programs, boot loader, database, and other programs.

[0132] Figure 5 A schematic diagram of the structure of a communication device according to some embodiments of the present disclosure is shown. For example... Figure 5 As shown, the third communication device 5 in this embodiment includes a second memory 51 and a second processor 52, which are similar to the first memory 41 and the first processor 42, respectively. It may also include an input / output interface 53, a network interface 54, a storage interface 55, etc. These interfaces 53, 54, 55, and the second memory 51 and the second processor 52 can be connected, for example, via a bus 56. The input / output interface 53 provides a connection interface for input / output devices such as a display, mouse, keyboard, and touchscreen. The network interface 54 provides a connection interface for various networked devices, such as connecting to a database server or a cloud storage server. The storage interface 55 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0133] In addition, this disclosure also includes the implementation of, for example Figure 2 The communication device for the communication method shown includes an on-board gateway controller and an offline optimization device.

[0134] The vehicle gateway controller includes: a dynamic scheduling module configured to manage the controller's communication resources based on a dynamic allocation strategy; a health data acquisition and persistence module configured to acquire operational health data and store it in non-volatile memory; and a diagnostic service module configured to provide an access interface for operational health data and an update interface for optimized resource configuration data.

[0135] The offline optimization device includes: a data analysis module configured to acquire operational health data and perform in-depth analysis through a diagnostic service module; and a resource optimization module configured to, in response to the data analysis module identifying resource anomalies, execute a deep optimization algorithm to generate optimized resource configuration data, and send it to the vehicle gateway controller through the diagnostic service module.

[0136] The communication device disclosed herein monitors the health value of the receiving mailbox in real time during CAN communication. If the health value of the receiving mailbox is abnormal, the configuration file is updated so that communication can be performed using the updated configuration file. This communication device can monitor the status of the receiving mailbox in real time and update the configuration file, thus enabling real-time adjustment of the communication status, improving the receiving mailbox's message processing capability, and consequently improving communication quality.

[0137] Figure 6 A schematic diagram of the structure of a vehicle according to some embodiments of the present disclosure is shown. For example... Figure 6 As shown, vehicle 6 includes a communication device 61, which is the aforementioned first communication device 3, second communication device 4, or third communication device 5.

[0138] Embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements any of the aforementioned communication methods.

[0139] Embodiments of this disclosure also provide a computer program product including instructions that, when executed by a processor, cause the processor to perform any of the foregoing communication methods.

[0140] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0141] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0142] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0143] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0144] The above description is only a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A communication method, comprising: During communication based on the Controller Area Network (CAN), the health value of the receiving mailbox is monitored in real time, wherein the receiving mailbox is used to receive messages; If the health value of the receiving mailbox is in an abnormal state, update the configuration file, wherein the configuration file includes the correspondence between the receiving mailbox and the message; Communicate using the updated configuration file.

2. The communication method according to claim 1, wherein, Real-time monitoring of the health value of the receiving mailbox includes: The congestion and abnormal values ​​of the receiving mailbox are monitored in real time. The congestion value is determined by the message processing pressure of the receiving mailbox, and the abnormal value is determined by the communication status of the messages corresponding to the receiving mailbox. The health value of the receiving mailbox is determined based on the congestion value and the outlier value.

3. The communication method according to claim 2, wherein, The message processing pressure is reflected by the offset rate of the actual forwarding cycle of the message corresponding to the receiving mailbox relative to the preset forwarding cycle.

4. The communication method according to claim 3, wherein, Real-time monitoring of the congestion value of the receiving mailbox includes: At each monitoring moment, one or more messages corresponding to the receiving mailbox are identified; For each of the one or more packets, determine the offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet; The congestion value of the receiving mailbox is determined based on the maximum offset rate among the offset rates corresponding to the one or more messages.

5. The communication method according to claim 4, wherein, Determining the offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet includes: The offset rate of the actual forwarding period of the packet relative to the preset forwarding period of the packet is determined based on the ratio of the first difference to the preset forwarding period of the packet, wherein the first difference is the difference between the actual forwarding period of the packet and the preset forwarding period of the packet.

6. The communication method according to claim 4, wherein, The congestion value of the receiving mailbox is determined based on the maximum offset rate among the offset rates corresponding to the one or more messages, including: If the maximum offset rate is greater than the first value, the congestion value of the receiving mailbox is set to 1; If the maximum offset rate is less than the second value, the congestion value of the receiving mailbox is set to 0; If the maximum offset rate is not less than the second value and not greater than the first value, the congestion value of the receiving mailbox is set to the maximum offset rate.

7. The communication method according to claim 2, wherein, The communication status of the message is reflected by whether the message is an abnormal message.

8. The communication method according to claim 7, wherein, Real-time monitoring of abnormal values ​​in the receiving mailbox includes: At each monitoring moment, one or more messages corresponding to the receiving mailbox are identified; For each of the one or more packets, the probability that the actual forwarding period of the packet exceeds the first threshold is determined based on the number of times the actual forwarding period of the packet exceeds the first threshold and the total number of forwardings of the packet. Determine whether the message is an abnormal message based on the probability; The abnormal value of the receiving mailbox is determined based on the abnormal message in one or more messages.

9. The communication method according to claim 8, wherein, Based on the abnormal messages in the one or more messages, the abnormal values ​​of the receiving mailbox are determined to include: If an abnormal message is found in one or more of the messages, the abnormal value of the receiving mailbox is set to 1; If no abnormal message appears in the one or more messages, the abnormal value of the receiving mailbox is determined to be 0.

10. The communication method according to claim 7, wherein, The updated configuration file includes: Re-determine the receiving mailbox corresponding to the abnormal message.

11. The communication method according to claim 10, wherein, The receiving mailbox corresponding to the abnormal message is re-determined as follows: The communication frequency of the abnormal message is determined based on the actual forwarding cycle of the abnormal message; Based on the communication frequency of the abnormal message, the health value of the mailbox currently corresponding to the abnormal message, and the health values ​​of other receiving mailboxes, the receiving mailbox corresponding to the abnormal message is re-determined.

12. The communication method according to claim 2, wherein, Real-time monitoring of congestion and outlier values ​​in the receiving mailbox includes: Real-time monitoring of the congestion level of the receiving mailbox; If the congestion value is detected to be greater than the second threshold after a specified number of consecutive occurrences, the abnormal value of the receiving mailbox is monitored in real time.

13. The communication method according to claim 2, wherein, The congestion value, the outlier value, and the health value are negatively correlated.

14. The communication method according to claim 13, wherein, The congestion value and outlier value are set to non-negative numbers not greater than 1; Determining the health value of the receiving mailbox based on the congestion value and the outlier value includes: The health value includes the product of a first part and a second part. The first part includes 1 and a second difference from the congestion value. The second part includes the sum of a first weight and a third part. The third part includes the product of the second weight and a third difference. The third difference is the difference between 1 and the outlier value.

15. A communication device, comprising: The monitoring module is configured to monitor the health value of the receiving mailbox in real time during communication based on the controller area network CAN, wherein the receiving mailbox is used to receive messages; The update module is configured to update the configuration file when the health value of the receiving mailbox is in an abnormal state, wherein the configuration file includes the correspondence between the receiving mailbox and the message; The communication module is configured to communicate using the updated configuration file.

16. A vehicle comprising: The communication device as described in claim 15.

17. A communication device, comprising: processor; as well as A memory coupled to the processor is used to store instructions that, when executed by the processor, cause the processor to perform the communication method as described in any one of claims 1 to 14.

18. A computer-readable storage medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the communication method as described in any one of claims 1 to 14.

19. A computer program product comprising instructions that, when executed by a processor, cause the processor to perform the communication method according to any one of claims 1 to 14.