Message transmission management and control method and device, electronic equipment and storage medium

By monitoring and adjusting the transmission strategy of packets between ECUs in automotive electronic systems, the problem of packet loss and detection timeliness is solved, and effective control and timely detection of packet transmission is realized.

CN119420673AActive Publication Date: 2025-02-11ZHEJIANG GEELY HLDG GRP CO LTD +2
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411532476.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-11
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The prior art cannot effectively prevent the loss of messages between automotive electronic control units (ECUs), and the loss of messages cannot be detected in time, affecting the normal operation of the automotive system.

Method used

After sending a message to the second electronic control unit, the message is monitored, and whether the confirmation is received within the preset time of receiving the confirmation is detected, and the monitoring parameters are adjusted according to the real-time network conditions and communication protocol requirements. Get the current loss rate of the message, determine the loss rate threshold, adjust the transmission policy when the loss rate reaches the threshold, and determine whether the message is lost through timeout detection.

Benefits of technology

It realizes the control of message transmission, prevents message loss, and detects message loss in a timely and accurate manner, improving the timeliness and accuracy of message loss detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420673A_ABST
    Figure CN119420673A_ABST
Patent Text Reader

Abstract

The invention provides a message transmission management and control method and device, electronic equipment and a storage medium, and the method comprises the steps: monitoring a message after the message is transmitted, and detecting whether a transmitting party of the message receives a receiving confirmation transmitted by a receiving party of the message within a preset time or not; monitoring parameters are adjusted according to the real-time network condition and the requirement of a real-time communication protocol, and the message is monitored through the adjusted monitoring parameters; obtaining a current loss rate of the message according to the monitoring result, and determining a loss rate threshold value of the message according to the monitoring result and the real-time network condition; when the current loss rate reaches a loss rate threshold value, adjusting a transmission strategy of the message to prevent the message from being lost; if it is detected that the sender of the message does not receive the receiving confirmation within the preset time, overtime detection is carried out, and whether the message is lost or not is judged according to the detection result of overtime detection. According to the message transmission management and control method provided by the invention, the message can be prevented from being lost in the transmission process, and the message loss can be detected in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a method, device, electronic device and storage medium for controlling message transmission. Background Art

[0002] As the degree of automobile electrification increases, there are more and more electronic control units (ECUs) inside the car, and the communication between ECUs is becoming more and more complicated. As an open standard in the field of automotive electronics, the Automotive Open System Architecture (AUTOSAR) provides a standardized way to achieve communication between ECUs. However, in actual applications, due to various reasons, the communication messages between ECUs may be lost, which will affect the normal operation of the automobile system.

[0003] At present, for the transmission of messages, the existing technology usually counts the total number of messages sent by the sender and the total number of messages received by the receiver after the sender has sent all the messages and the receiver has received all the messages, and determines whether message loss has occurred during the transmission process by comparing the two. However, this method not only cannot control the message transmission process to prevent message loss, but also cannot detect message loss in a timely manner.

[0004] Therefore, it is necessary to provide a technical solution to solve the above technical problems. Summary of the invention

[0005] The present application provides a method, device, electronic device and storage medium for controlling message transmission, which can control the transmission of messages to prevent message loss and detect message loss in a timely manner.

[0006] In a first aspect, the present application provides a message transmission control method, which is applied to an automotive electronic system, wherein the automotive electronic system includes a first electronic control unit and a second electronic control unit, and the message transmission control method includes:

[0007] After the first electronic control unit sends a message to the second electronic control unit, monitoring the message and detecting whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time;

[0008] According to the real-time network status and the requirements of the real-time communication protocol, the monitoring parameters for monitoring the message are adjusted, and the message is monitored with the adjusted monitoring parameters;

[0009] According to the monitoring result of monitoring the message, the current loss rate of the message is obtained, and according to the monitoring result and the real-time network status, the loss rate threshold of the message is determined;

[0010] When the current loss rate of the message reaches the loss rate threshold of the message, adjusting the transmission strategy of the message to prevent the message from being lost;

[0011] If it is detected that the first electronic control unit has not received the reception confirmation within the preset time, a timeout detection is performed, and it is determined whether the message is lost according to the detection result of the timeout detection.

[0012] Optionally, the monitoring the message includes:

[0013] Monitoring a network interface between the first electronic control unit and the second electronic control unit to capture the message transmitted in the network;

[0014] Analyze multiple attributes of the captured message to obtain data corresponding to the multiple attributes; wherein the multiple attributes at least include sending time, receiving time, transmission frequency and historical loss rate;

[0015] Collecting data of the multiple attributes obtained after capturing the message each time to form historical data of the message;

[0016] The number of times the message is sent and received during each transmission process is recorded.

[0017] Optionally, acquiring the current loss rate of the message according to a monitoring result of monitoring the message includes:

[0018] Calculate the number of times the message is lost during each transmission process according to the number of times the message is sent and received during each transmission process; wherein the number of times the message is lost is the difference between the number of times the message is sent and the number of times the message is received;

[0019] According to the number of times the message is sent and the number of times it is lost during each transmission process, the total number of times the message is currently sent and the total number of times it is lost are calculated, and according to the total number of times it is sent and the total number of times it is lost, the current loss rate of the message is calculated; wherein the current loss rate of the message is the ratio of the total number of times it is lost to the total number of times it is sent;

[0020] Determining the message loss rate threshold according to the monitoring result and the real-time network status includes:

[0021] The real-time network status is input into the prediction model to obtain the message loss rate threshold output by the prediction model; wherein the prediction model is established based on the historical data and trained by the historical data.

[0022] Optionally, adjusting the transmission strategy of the message to prevent the message from being lost includes:

[0023] The first electronic control unit is controlled to reduce a frequency of sending the message to the second electronic control unit, and the first electronic control unit is controlled to send the message to the second electronic control unit at the reduced frequency.

[0024] Optionally, the monitoring parameter includes a monitoring frequency, and the monitoring frequency is a frequency of checking the message;

[0025] The step of adjusting the monitoring parameters for monitoring the message according to the real-time network status and the requirements of the real-time communication protocol includes:

[0026] When the real-time network status meets the first transmission condition and the requirement of the real-time communication protocol meets the first preset requirement, reducing the monitoring frequency;

[0027] When the real-time network status meets the second transmission condition or the requirement of the real-time communication protocol meets the second preset requirement, increasing the monitoring frequency;

[0028] Among them, the first transmission condition is better than the second transmission condition, and the first preset requirement is lower than the second preset requirement.

[0029] Optionally, after determining whether the message is lost according to the detection result of the timeout detection, the message transmission control method further includes:

[0030] If it is determined that the message is lost, determining whether to retransmit the message according to the importance level of the message;

[0031] If it is determined to retransmit the message, a retransmission strategy for retransmitting the message is determined according to the importance level of the message and the real-time network status;

[0032] Control the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy.

[0033] Optionally, the retransmission strategy includes the number of retransmissions and the timing of retransmissions;

[0034] The step of determining a retransmission strategy for retransmitting the message according to the importance level of the message and the real-time network status includes:

[0035] Determining the number of retransmissions for retransmitting the message according to the importance level of the message and the correspondence between the preset importance level and the number of retransmissions;

[0036] Determining a time period when the real-time network status meets the first transmission condition as a retransmission opportunity for retransmitting the message;

[0037] The controlling the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy includes:

[0038] Before the number of retransmissions is reached, controlling the first electronic control unit to continue to retransmit the message to the second electronic control unit at the retransmission opportunity until the retransmission is successful;

[0039] When the number of retransmissions is reached, if the message is still not successfully retransmitted, the first electronic control unit is controlled to stop retransmitting the message to the second electronic control unit.

[0040] Optionally, the automotive electronic system further includes a third electronic control unit;

[0041] After controlling the first electronic control unit to stop retransmitting the message to the second electronic control unit, the message transmission control method further includes:

[0042] Controlling the second electronic control unit to request the third electronic control unit to back up the data corresponding to the message;

[0043] After determining that the second electronic control unit has received the data corresponding to the message, the status of the message is synchronized from the second electronic control unit.

[0044] Optionally, after synchronizing the state of the message from the second electronic control unit, the message transmission control method further includes:

[0045] Detecting whether the data corresponding to the message received by the second electronic control unit is complete;

[0046] If it is detected that the data corresponding to the message received by the second electronic control unit is incomplete, the second electronic control unit is controlled to request the third electronic control unit to back up the data corresponding to the message again.

[0047] In a second aspect, the present application provides a message transmission control device, which is applied to an automotive electronic system, wherein the automotive electronic system includes a first electronic control unit and a second electronic control unit, and the message transmission control device includes:

[0048] a monitoring module, configured to monitor the message after the first electronic control unit sends the message to the second electronic control unit, and detect whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time;

[0049] An adjustment module, used for adjusting the monitoring parameters of the message monitored by the monitoring module according to the real-time network status and the requirements of the real-time communication protocol, so that the monitoring module monitors the message with the adjusted monitoring parameters;

[0050] An acquisition module, used for acquiring a current loss rate of the message according to a monitoring result of the message monitored by the monitoring module, and determining a loss rate threshold of the message according to the monitoring result and a real-time network status;

[0051] A prevention module, configured to adjust a transmission strategy of the message to prevent loss of the message when a current loss rate of the message reaches a loss rate threshold of the message;

[0052] The judgment module is used to perform a timeout detection when the monitoring module detects that the first electronic control unit has not received the reception confirmation within the preset time, and judge whether the message is lost according to the detection result of the timeout detection.

[0053] In a third aspect, the present application provides an electronic device, comprising at least one processor, wherein the processor is used to implement the message transmission control method as described in any one of the first aspects.

[0054] In a fourth aspect, the present application provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the method for controlling message transmission as described in any one of the first aspects.

[0055] The message transmission control method, device, electronic device and storage medium provided in the present application monitor the message after the first electronic control unit sends the message to the second electronic control unit, flexibly adjust the monitoring parameters according to the real-time network status and the requirements of the real-time communication protocol, and adjust the message transmission strategy according to the monitoring results of the message, thereby realizing the control of message transmission and preventing message loss; and when the sender of the message has not received the reception confirmation of the message sent by the receiver of the message within a preset time period, a timeout detection is performed to determine whether the message is lost, and the dual measures of reception confirmation and timeout detection are used to avoid misjudging message delay as message loss, thereby ensuring timely and accurate detection of message loss, and improving the timeliness and accuracy of message loss detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0057] Figure 1 The figure shows a schematic diagram of a scenario to which the method for controlling message transmission according to an embodiment of the present application is applicable.

[0058] Figure 2 The figure shows a flow chart of a method for controlling message transmission according to an embodiment of the present application.

[0059] Figure 3 Shown is another flow chart of the message transmission control method according to an embodiment of the present application.

[0060] Figure 4 Shown is a structural block diagram of a message transmission control device according to an embodiment of the present application.

[0061] Figure 5 Shown is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0062] Here, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0063] The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the attached claims. It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0064] As the degree of automobile electrification increases, there are more and more electronic control units (ECUs) inside the car, and the communication between ECUs is becoming more and more complicated. As an open standard in the field of automotive electronics, the Automotive Open System Architecture (AUTOSAR) provides a standardized way to achieve communication between ECUs. However, in actual applications, due to various reasons, the communication messages between ECUs may be lost, which will affect the normal operation of the automobile system.

[0065] At present, for the transmission of messages, the existing technology usually counts the total number of messages sent by the sender and the total number of messages received by the receiver after the sender has sent all the messages and the receiver has received all the messages, and determines whether message loss has occurred during the transmission process by comparing the two. However, this method not only cannot control the message transmission process to prevent message loss, but also cannot detect message loss in a timely manner.

[0066] In order to solve the technical problem that the above-mentioned prior art cannot prevent message loss and cannot detect message loss in time, the embodiment of the present application provides a method for controlling message transmission. Figure 1 , Figure 1 The diagram shows a scenario in which the message transmission control method of the embodiment of the present application is applicable. The message transmission control method of the embodiment of the present application is applicable to an automotive electronic system. An automotive electronic system generally includes multiple ECUs and a bus for communication between ECUs, and each ECU is connected to the bus. For example, Figure 1 In the embodiment, the automotive electronic system 10 may include two ECUs, a first electronic control unit 11 and a second electronic control unit 12, and a bus, wherein the bus is connected to both the first electronic control unit 11 and the second electronic control unit 12, so that the first electronic control unit 11 and the second electronic control unit 12 can communicate with each other through the bus. It should be noted that the automotive electronic system 10 may also include multiple other ECUs, for example, the automotive electronic system 10 may also include a third electronic control unit 13, and the third electronic control unit 13 is also connected to the bus, so that the third electronic control unit 13 can communicate with the second electronic control unit 12 and the first electronic control unit 11 through the bus. The embodiment of the present application does not limit the specific number of ECUs included in the automotive electronic system 10.

[0067] See also Figure 1 and Figure 2 , Figure 2The figure shows a flow chart of a method for controlling message transmission according to an embodiment of the present application. The method for controlling message transmission provided by the embodiment of the present application includes but is not limited to the following steps S101 to S105.

[0068] S101, after the first electronic control unit sends a message to the second electronic control unit, the message is monitored, and whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time.

[0069] After the first electronic control unit sends a message to the second electronic control unit, the message is monitored to control the transmission of the message. After the second electronic control unit receives the message sent by the first electronic control unit, the second electronic control unit will send a reception confirmation to the first electronic control unit for the message. By detecting whether the first electronic control unit receives the reception confirmation within a preset time, it can be determined whether the second electronic control unit has received the message. Among them, the preset time can be set according to the time required for the message to be transmitted from the first electronic control unit to the second electronic control unit and the reception confirmation to be transmitted from the second electronic control unit to the first electronic control unit.

[0070] S102, adjusting monitoring parameters for monitoring the message according to the real-time network status and the requirements of the real-time communication protocol, and monitoring the message with the adjusted monitoring parameters.

[0071] Because the transmission situation of the message is different when the real-time network status and the requirements of the real-time communication protocol are different, it is necessary to flexibly adjust the monitoring parameters for monitoring the message according to the real-time network status and the requirements of the real-time communication protocol, and monitor the message with the adjusted monitoring parameters, so as to ensure that the monitoring process of the message can adapt to the transmission situation of the message.

[0072] S103, acquiring the current loss rate of the message according to the monitoring result of the message, and determining the loss rate threshold of the message according to the monitoring result and the real-time network status.

[0073] By monitoring the message, various data of the message can be obtained according to the monitoring result of the message, and then the current loss rate of the message can be obtained. Among them, the current loss rate of the message represents the current loss risk of the message. Because the loss risk of the message is different under different network conditions, the message is not easy to be lost during the transmission process when the network condition is good, and the message is easy to be lost during the transmission process when the network condition is poor. Therefore, by comprehensively considering the monitoring results of the message and the real-time network condition, the loss rate threshold of the message can be determined, that is, the maximum loss rate allowed for the message under the current real-time network condition.

[0074] It should be noted that the loss rate threshold in this article refers to the maximum message loss ratio allowed during network communication or data transmission. The loss rate threshold is used to monitor and evaluate network performance to determine the reliability of the system within an acceptable range. The loss rate threshold is related to the monitoring results and the real-time network status respectively.

[0075] S104: When the current loss rate of the message reaches the loss rate threshold of the message, adjust the transmission strategy of the message to prevent the message from being lost.

[0076] When the current loss rate of the message reaches the loss rate threshold of the message, it means that the current loss rate of the message has reached the maximum loss rate allowed for the message under the current real-time network conditions. At this time, the risk of the message being lost is relatively high. The message can be prevented from being lost by adjusting the transmission strategy of the message.

[0077] S105: If it is detected that the first electronic control unit has not received the reception confirmation within the preset time, a timeout detection is performed, and it is determined whether the message is lost according to the detection result of the timeout detection.

[0078] If it is detected that the first electronic control unit has not received the reception confirmation within the preset time, it means that the second electronic control unit has not received the message within the theoretically required transmission time. There are two situations at this time, one is that the message is delayed, and the other is that the message is lost. In order to further determine the specific situation of the message, a timeout detection can be performed, and then the message is judged whether it is lost based on the detection result of the timeout detection. Among them, if it is detected that the first electronic control unit has received the reception confirmation within the timeout period, it is determined that the message is only delayed but not lost, otherwise it is determined that the message is lost.

[0079] In the message transmission control method provided in the embodiment of the present application: after the first electronic control unit sends a message to the second electronic control unit, the message is monitored and the monitoring parameters are flexibly adjusted according to the real-time network status and the requirements of the real-time communication protocol; the current loss rate of the message is obtained according to the monitoring result of the message, and the message loss rate threshold is determined according to the monitoring result of the message and the real-time network status; by monitoring the message and adjusting the message transmission strategy when the current loss rate of the message is monitored to reach the message loss rate threshold, the message transmission is controlled, thereby preventing the message from being lost; and when the sender of the message has not received the reception confirmation of the message sent by the receiver of the message within a preset time period, a timeout detection is performed to determine whether the message is lost, and the dual measures of reception confirmation and timeout detection are used to avoid misjudging the message delay as message loss, thereby ensuring timely and accurate detection of message loss, and improving the timeliness and accuracy of message loss detection.

[0080] In some other embodiments, the above step S105 may also be performed after the above step S101 and before the above steps S102 to S104, which will not be repeated here.

[0081] See also Figure 1 , Figure 2 and Figure 3 , Figure 3 Shown is another flow chart of the message transmission control method according to an embodiment of the present application.

[0082] In some embodiments, the monitoring of the message in the above step S101 specifically includes the following steps S111-S141.

[0083] S111, monitoring the network interface between the first electronic control unit and the second electronic control unit, and capturing the message transmitted in the network.

[0084] The message transmitted in the network is captured by monitoring the network interface and intercepting at the communication protocol level. After capturing the message, the message can be checked, for example, the format, content, period and other information of the message are checked to ensure the integrity and correctness of the message.

[0085] S121, analyzing multiple attributes of the captured message to obtain data corresponding to the multiple attributes; wherein the multiple attributes at least include sending time, receiving time, transmission frequency and historical loss rate.

[0086] S131, collecting the data of the multiple attributes obtained after capturing the message each time, to form the historical data of the message.

[0087] The data corresponding to the various attributes obtained by analyzing the various attributes of the message after each capture of the message are collected to form the historical data of the message, wherein the historical data includes the sending time, receiving time, transmission frequency and historical loss rate of the message at each transmission.

[0088] S141, recording the number of times the message is sent and received during each transmission process.

[0089] In some embodiments, the monitoring parameters in the above step S102 include a monitoring frequency, which is the frequency of checking the message; the monitoring parameters for monitoring the message in the above step S102 are adjusted according to the real-time network status and the requirements of the real-time communication protocol, specifically including the following steps S112-S122.

[0090] S112, when the real-time network status meets the first transmission condition and the requirement of the real-time communication protocol meets the first preset requirement, reducing the monitoring frequency.

[0091] When the real-time network condition meets the first transmission condition, it means that the real-time network condition is good and the message is not likely to be lost during the transmission process; when the requirements of the real-time communication protocol meet the first preset requirements, it means that the requirements of the real-time communication protocol are low and the message is allowed to be lost more times during the transmission process. At this time, the monitoring frequency of the message can be reduced, thereby saving network resources.

[0092] S122, when the real-time network status meets the second transmission condition, or the requirement of the real-time communication protocol meets the second preset requirement, increase the monitoring frequency.

[0093] When the real-time network condition meets the second transmission condition, it means that the real-time network condition is poor and the message is more likely to be lost during the transmission process; when the requirements of the real-time communication protocol meet the second preset requirements, it means that the requirements of the real-time communication protocol are high and the number of times the message is allowed to be lost during the transmission process is small. At this time, the monitoring frequency of the message can be increased to ensure the timeliness and accuracy of the monitoring results.

[0094] The first transmission condition is better than the second transmission condition. It should be noted that the feature characterizing the network status may include at least one of network speed, network delay, stable duration, packet loss rate and jitter. The first network speed threshold and the second network speed threshold, the first network delay threshold and the second network delay threshold, the first stable time threshold and the second stable time threshold, the first packet loss rate threshold and the second packet loss rate threshold, the first jitter threshold and the second jitter threshold can be set according to actual conditions; when the real-time network condition satisfies at least one of the jitter not greater than the first jitter threshold, the network speed not less than the first network speed threshold, the network delay not greater than the first network delay threshold, the stable time not less than the first stable time threshold, and the packet loss rate not greater than the first packet loss rate threshold, it is considered that the real-time network condition meets the first transmission condition; when the real-time network condition satisfies at least one of the jitter not less than the second jitter threshold, the network speed not greater than the second network speed threshold, the network delay not less than the second network delay threshold, the stable time not greater than the second stable time threshold, and the packet loss rate not less than the second packet loss rate threshold, it is considered that the real-time network condition meets the second transmission condition; wherein the first network speed threshold is greater than the second network speed threshold, the first network delay threshold is less than the second network delay threshold, the first stable time threshold is greater than the second stable time threshold, the first packet loss rate threshold is less than the second packet loss rate threshold, and the first jitter threshold is less than the second jitter threshold.

[0095] The first preset requirement is lower than the second preset requirement. It should be noted that the characteristics characterizing the communication protocol requirements may include at least one of error rate, bandwidth requirement, resource consumption, delay tolerance, and data format complexity. The determination of whether the requirements of the real-time communication protocol meet the first preset requirement or the second preset requirement can refer to the above-mentioned determination method of whether the real-time network status meets the first transmission condition or the second transmission condition, which will not be repeated here.

[0096] It should also be noted that, generally speaking, real-time network conditions are constantly changing, but the requirements for real-time communication protocols change less frequently. Usually, when a new ECU joins the communication, the communication protocol changes, and the requirements for the real-time communication protocol also change accordingly.

[0097] In some embodiments, the above step S103 obtains the current loss rate of the message according to the monitoring result of the message, which specifically includes the following steps S113-S123.

[0098] S113, calculating the number of times the message is lost during each transmission process according to the number of times the message is sent and the number of times the message is received during each transmission process; wherein the number of times the message is lost is the difference between the number of times the message is sent and the number of times the message is received.

[0099] S123, calculate the current total number of times the message is sent and the total number of times it is lost during each transmission of the message, and calculate the current loss rate of the message based on the total number of times it is sent and the total number of times it is lost; wherein the current loss rate of the message is the ratio of the total number of times it is lost to the total number of times it is sent.

[0100] In some embodiments, determining the message loss rate threshold according to the monitoring result and the real-time network status in the above step S103 specifically includes the following step S133.

[0101] S133, inputting the real-time network status into the prediction model to obtain the message loss rate threshold output by the prediction model; wherein the prediction model is established based on the historical data and trained by the historical data.

[0102] Based on the historical data collected in step S131, the prediction model is established using statistical methods or machine learning algorithms, such as linear regression, decision trees, neural networks, etc., and the prediction model is continuously trained through the historical data that is continuously collected to improve the accuracy of the prediction model. The prediction model can identify the potential patterns and trends of the message loss, and the real-time network status is input into the prediction model, and the prediction model can output the message loss rate threshold.

[0103] In some embodiments, adjusting the transmission strategy of the message in the above step S104 to prevent the message from being lost specifically includes the following step S114.

[0104] S114, controlling the first electronic control unit to reduce the frequency of sending messages to the second electronic control unit, and controlling the first electronic control unit to send the messages to the second electronic control unit at the reduced frequency.

[0105] In some embodiments, after determining whether the message is lost according to the detection result of the timeout detection in the above step S105, the message transmission control method of the embodiment of the present application also includes the following steps S201-S203.

[0106] S201: If it is determined that the message is lost, determine whether to retransmit the message according to the importance level of the message.

[0107] Each message has a preset importance level. For example, the importance level of the message about the brake system is higher than that of the message about the navigation system, and the importance level of the message about the navigation system is higher than that of the message about the entertainment system... When it is determined that the message is lost, in order to save network resources, it can be determined whether to retransmit the message based on the importance level of the message. It should be noted that in some embodiments, for messages of all importance levels, after it is determined that the message is lost, the message can be retransmitted. The embodiments of the present application are not limited to this.

[0108] S202: If it is determined to retransmit the message, a retransmission strategy for retransmitting the message is determined according to the real-time network status and the importance level of the message.

[0109] In some embodiments, the retransmission strategy in the above step S202 includes a retransmission opportunity and a retransmission number; the retransmission strategy for retransmitting the message according to the real-time network status and the importance level of the message in the above step S202 specifically includes:

[0110] Determining a time period when the real-time network status meets the first transmission condition as a retransmission opportunity for retransmitting the message;

[0111] According to the importance level of the message and the corresponding relationship between the preset importance level and the retransmission number, the number of retransmissions for retransmitting the message is determined.

[0112] S203, controlling the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy.

[0113] In some embodiments, in the above step S203, controlling the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy specifically includes:

[0114] Before the number of retransmissions is reached, controlling the first electronic control unit to continue to retransmit the message to the second electronic control unit at the retransmission opportunity until the retransmission is successful;

[0115] When the number of retransmissions is reached, if the message has not been retransmitted successfully, the first electronic control unit is controlled to stop retransmitting the message to the second electronic control unit.

[0116] In some embodiments, after the above steps control the first electronic control unit to stop retransmitting the message to the second electronic control unit, the message transmission control method of the embodiment of the present application further includes the following steps.

[0117] The second electronic control unit is controlled to request the third electronic control unit to back up the data corresponding to the message; after determining that the second electronic control unit has received the data corresponding to the message, the state of the message is synchronized from the second electronic control unit.

[0118] In some embodiments, after the above step of synchronizing the status of the message from the second electronic control unit, the message transmission control method of the embodiment of the present application further includes the following steps.

[0119] Detecting whether the data corresponding to the message received by the second electronic control unit is complete;

[0120] If it is detected that the data corresponding to the message received by the second electronic control unit is incomplete, the second electronic control unit is controlled to request the third electronic control unit to back up the data corresponding to the message again.

[0121] In the message transmission control method provided in the embodiment of the present application: by monitoring the message, when it is detected that the current loss rate of the message reaches the message loss rate threshold, the message transmission strategy is adjusted to achieve control over the message transmission, thereby preventing the message from being lost; when the sender of the message has not received the reception confirmation of the message sent by the receiver of the message within a preset time period, a timeout detection is performed to determine whether the message is lost, and the dual measures of reception confirmation and timeout detection are used to avoid misjudging the message delay as message loss, thereby ensuring timely and accurate detection of message loss, and improving the timeliness and accuracy of message loss detection; after determining that the message is lost, based on the importance level of the message and the real-time network status, it is intelligently determined whether to retransmit the message and the retransmission strategy for retransmitting the message, and after the retransmission fails, the data corresponding to the message is restored through backup, thereby ensuring that the message is finally successfully received and improving the success rate of message transmission.

[0122] The present application also provides a message transmission control device, see Figure 4 , Figure 4The structure block diagram of the message transmission control device of the embodiment of the present application is shown. The message transmission control device 21 provided in the embodiment of the present application may include:

[0123] The monitoring module 211 is used to monitor the message after the first electronic control unit sends the message to the second electronic control unit, and detect whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time;

[0124] The adjustment module 212 is used to adjust the monitoring parameters of the message monitored by the monitoring module 211 according to the real-time network status and the requirements of the real-time communication protocol, so that the monitoring module 211 monitors the message with the adjusted monitoring parameters;

[0125] The acquisition module 213 is used to acquire the current loss rate of the message according to the monitoring result of the message monitored by the monitoring module 211, and determine the loss rate threshold of the message according to the monitoring result and the real-time network status;

[0126] A prevention module 214, configured to adjust a transmission strategy of the message to prevent the message from being lost when the current loss rate of the message reaches a loss rate threshold of the message;

[0127] The judging module 215 is used to perform a timeout detection when the monitoring module 211 detects that the first electronic control unit has not received a reception confirmation within the preset time, and to judge whether the message is lost according to the detection result of the timeout detection.

[0128] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and the same technical effect can be achieved, which will not be repeated here.

[0129] In some embodiments, the monitoring module 211 may include:

[0130] A capture submodule, used for monitoring the network interface between the first electronic control unit and the second electronic control unit, and capturing the message transmitted in the network;

[0131] An analysis submodule, used to analyze multiple attributes of the captured message to obtain data corresponding to the multiple attributes; wherein the multiple attributes at least include sending time, receiving time, transmission frequency and historical loss rate;

[0132] The collection submodule is used to collect data of various attributes obtained after capturing the message each time, and form the historical data of the message;

[0133] The recording submodule is used to record the number of times the message is sent and received during each transmission process.

[0134] In some embodiments, the monitoring parameters include a monitoring frequency, which is the frequency of checking the message; when the adjustment module 212 adjusts the monitoring parameters of the monitoring module 211 for monitoring the message according to the real-time network status and the requirements of the real-time communication protocol, it is specifically used to reduce the monitoring frequency when the real-time network status meets the first transmission condition and the requirements of the real-time communication protocol meet the first preset requirements, and to increase the monitoring frequency when the real-time network status meets the second transmission condition or the requirements of the real-time communication protocol meet the second preset requirements; wherein the first transmission condition is better than the second transmission condition, and the first preset requirement is lower than the second preset requirement.

[0135] In some embodiments, when the acquisition module 213 obtains the current loss rate of the message according to the monitoring result of the monitoring module 211 monitoring the message, it is specifically used to calculate the number of losses of the message in each transmission process according to the number of transmissions and receptions of the message in each transmission process (the number of losses is the difference between the number of transmissions and the number of receptions), and calculate the current total number of transmissions and the total number of losses of the message according to the number of transmissions and the number of losses in each transmission process of the message, and calculate the current loss rate of the message according to the total number of transmissions and the total number of losses (the current loss rate of the message is the ratio of the total number of losses to the total number of transmissions).

[0136] In some embodiments, when the acquisition module 213 determines the message loss rate threshold based on the monitoring results and the real-time network status, it is specifically used to input the real-time network status into the prediction model to obtain the message loss rate threshold output by the prediction model; wherein, the prediction model is established based on the historical data and trained by the historical data.

[0137] In some embodiments, when the prevention module 214 adjusts the transmission strategy of the message to prevent the loss of the message, it is specifically used to control the first electronic control unit to reduce the frequency of sending messages to the second electronic control unit, and control the first electronic control unit to send the message to the second electronic control unit at the reduced frequency.

[0138] In some embodiments, the message transmission control device 21 may further include:

[0139] The retransmission module is used to determine whether to retransmit the message according to the importance level of the message after the judgment module 215 determines that the message is lost according to the detection result of the timeout detection. If it is determined to retransmit the message, the retransmission strategy for retransmitting the message is determined according to the real-time network status and the importance level of the message, and the first electronic control unit is controlled to retransmit the message to the second electronic control unit according to the retransmission strategy.

[0140] In some embodiments, the retransmission strategy includes a retransmission opportunity and a retransmission number; when the retransmission module determines the retransmission strategy for retransmitting the message based on the real-time network status and the importance level of the message, it is specifically used to determine the time period when the real-time network status meets the first transmission condition as the retransmission opportunity for retransmitting the message, and determine the number of retransmissions for retransmitting the message based on the importance level of the message and the corresponding relationship between the preset importance level and the retransmission number.

[0141] In some embodiments, when the retransmission module controls the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy, it is specifically used to control the first electronic control unit to continue retransmitting the message to the second electronic control unit at the retransmission opportunity before the retransmission number is reached until the retransmission is successful. When the retransmission number is reached, if the message is still not retransmitted successfully, the first electronic control unit is controlled to stop retransmitting the message to the second electronic control unit.

[0142] In some embodiments, the message transmission control device 21 may further include:

[0143] The backup module is used to control the second electronic control unit to request the third electronic control unit to back up the data corresponding to the message after the retransmission module controls the first electronic control unit to stop retransmitting the message to the second electronic control unit, and synchronize the status of the message from the second electronic control unit after determining that the second electronic control unit has received the data corresponding to the message.

[0144] In some embodiments, after synchronizing the status of the message from the second electronic control unit, the backup module is also used to detect whether the data corresponding to the message received by the second electronic control unit is complete. If it is detected that the data corresponding to the message received by the second electronic control unit is incomplete, the second electronic control unit is controlled to request the third electronic control unit to back up the data corresponding to the message again.

[0145] The embodiment of the present application also provides an electronic device, including the above-mentioned message transmission control device 21. Figure 5 , Figure 5 The electronic device 20 may include one or more processors 22, and the processor 22 is used to implement the above request processing method.

[0146] In some embodiments, the electronic device 20 may include a computer-readable storage medium 23, which may store a program that can be called by the processor 22 and may include a non-volatile storage medium. In other embodiments, the electronic device 20 may also include a memory 24 and an interface 25. In other embodiments, the electronic device 20 may also include other hardware according to actual applications.

[0147] The computer-readable storage medium 23 provided in the embodiment of the present application stores a program thereon, and when the program is executed by the processor 22, it is used to implement the request processing method described above.

[0148] The present application may take the form of a computer program product implemented on one or more computer-readable storage media 23 (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. The computer-readable storage medium 23 includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. The computer-readable storage medium 23 includes but is not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette, tape disk storage or other magnetic storage device or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.

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

[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the phrase "includes a ..." defines an element, and does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

Claims

1. A message transmission control method, applied to an automotive electronic system, characterized in that: The automotive electronic system includes a first electronic control unit and a second electronic control unit, and the message transmission control method includes: After the first electronic control unit sends a message to the second electronic control unit, monitoring the message and detecting whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time; According to the real-time network status and the requirements of the real-time communication protocol, the monitoring parameters for monitoring the message are adjusted, and the message is monitored with the adjusted monitoring parameters; According to the monitoring result of monitoring the message, the current loss rate of the message is obtained, and according to the monitoring result and the real-time network status, the loss rate threshold of the message is determined; When the current loss rate of the message reaches the loss rate threshold of the message, adjusting the transmission strategy of the message to prevent the message from being lost; If it is detected that the first electronic control unit has not received the reception confirmation within the preset time, a timeout detection is performed, and it is determined whether the message is lost according to the detection result of the timeout detection.

2. The message transmission control method according to claim 1, characterized in that: The monitoring of the message includes: Monitoring a network interface between the first electronic control unit and the second electronic control unit to capture the message transmitted in the network; Analyze multiple attributes of the captured message to obtain data corresponding to the multiple attributes; wherein the multiple attributes at least include sending time, receiving time, transmission frequency and historical loss rate; Collecting data of the multiple attributes obtained after capturing the message each time to form historical data of the message; The number of times the message is sent and received during each transmission process is recorded.

3. The message transmission control method according to claim 2, characterized in that: The acquiring the current loss rate of the message according to the monitoring result of monitoring the message includes: Calculate the number of times the message is lost during each transmission process according to the number of times the message is sent and received during each transmission process; wherein the number of times the message is lost is the difference between the number of times the message is sent and the number of times the message is received; According to the number of times the message is sent and the number of times it is lost during each transmission process, the total number of times the message is currently sent and the total number of times it is lost are calculated, and according to the total number of times it is sent and the total number of times it is lost, the current loss rate of the message is calculated; wherein the current loss rate of the message is the ratio of the total number of times it is lost to the total number of times it is sent; Determining the message loss rate threshold according to the monitoring result and the real-time network status includes: The real-time network status is input into the prediction model to obtain the message loss rate threshold output by the prediction model; wherein the prediction model is established based on the historical data and obtained through training with the historical data.

4. The message transmission control method according to claim 1, characterized in that: The adjusting the transmission strategy of the message to prevent the message from being lost includes: The first electronic control unit is controlled to reduce the frequency of sending the message to the second electronic control unit, and the first electronic control unit is controlled to send the message to the second electronic control unit at the reduced frequency.

5. The message transmission control method according to claim 1, characterized in that: The monitoring parameters include a monitoring frequency, which is a frequency for checking the message; The step of adjusting the monitoring parameters for monitoring the message according to the real-time network status and the requirements of the real-time communication protocol includes: When the real-time network status meets the first transmission condition and the requirement of the real-time communication protocol meets the first preset requirement, reducing the monitoring frequency; When the real-time network status meets the second transmission condition or the requirement of the real-time communication protocol meets the second preset requirement, increasing the monitoring frequency; Among them, the first transmission condition is better than the second transmission condition, and the first preset requirement is lower than the second preset requirement.

6. The method for controlling message transmission according to any one of claims 1 to 5, characterized in that: After determining whether the message is lost according to the detection result of the timeout detection, the message transmission control method further includes: If it is determined that the message is lost, determining whether to retransmit the message according to the importance level of the message; If it is determined to retransmit the message, a retransmission strategy for retransmitting the message is determined according to the importance level of the message and the real-time network status; Control the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy.

7. The message transmission control method according to claim 6, characterized in that: The retransmission strategy includes the number of retransmissions and the timing of retransmissions; The step of determining a retransmission strategy for retransmitting the message according to the importance level of the message and the real-time network status includes: Determining the number of retransmissions for retransmitting the message according to the importance level of the message and the correspondence between the preset importance level and the number of retransmissions; Determining a time period when the real-time network status meets the first transmission condition as a retransmission opportunity for retransmitting the message; The controlling the first electronic control unit to retransmit the message to the second electronic control unit according to the retransmission strategy includes: Before the number of retransmissions is reached, controlling the first electronic control unit to continue to retransmit the message to the second electronic control unit at the retransmission opportunity until the retransmission is successful; When the number of retransmissions is reached, if the message is still not successfully retransmitted, the first electronic control unit is controlled to stop retransmitting the message to the second electronic control unit.

8. The message transmission control method according to claim 7, characterized in that: The automotive electronic system further includes a third electronic control unit; After controlling the first electronic control unit to stop retransmitting the message to the second electronic control unit, the message transmission control method further includes: Controlling the second electronic control unit to request the third electronic control unit to back up the data corresponding to the message; After determining that the second electronic control unit has received the data corresponding to the message, the status of the message is synchronized from the second electronic control unit.

9. The message transmission control method according to claim 8, characterized in that: After synchronizing the state of the message from the second electronic control unit, the message transmission control method further includes: Detecting whether the data corresponding to the message received by the second electronic control unit is complete; If it is detected that the data corresponding to the message received by the second electronic control unit is incomplete, the second electronic control unit is controlled to request the third electronic control unit to back up the data corresponding to the message again.

10. A message transmission control device, applied to an automotive electronic system, characterized in that: The automotive electronic system includes a first electronic control unit and a second electronic control unit, and the message transmission control device includes: a monitoring module, configured to monitor the message after the first electronic control unit sends the message to the second electronic control unit, and detect whether the first electronic control unit receives a reception confirmation sent by the second electronic control unit for the message within a preset time; An adjustment module, used for adjusting the monitoring parameters of the message monitored by the monitoring module according to the real-time network status and the requirements of the real-time communication protocol, so that the monitoring module monitors the message with the adjusted monitoring parameters; An acquisition module, used for acquiring a current loss rate of the message according to a monitoring result of the message monitored by the monitoring module, and determining a loss rate threshold of the message according to the monitoring result and a real-time network status; A prevention module, configured to adjust a transmission strategy of the message to prevent loss of the message when a current loss rate of the message reaches a loss rate threshold of the message; The judgment module is used to perform a timeout detection when the monitoring module detects that the first electronic control unit has not received the reception confirmation within the preset time, and judge whether the message is lost according to the detection result of the timeout detection.

11. An electronic device, characterized in that: It includes one or more processors, and the processor is used to implement the message transmission control method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for controlling message transmission as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Detection method, device and system of message loss

    CN102404170A

  • CAN message loss monitoring method

    CN106888123A

  • Traffic data transmission method and device, computer equipment and storage medium

    CN116405470A

  • Confirmation message sending method and device, equipment, storage medium and program product

    CN118300757A

  • Data sending device, data reception equipment and data transmission equipment

    JP1999177623A