Diagnostic data packet transmission control method and device based on UDP protocol, equipment and storage medium

By dividing the time window and analyzing network indicators during vehicle diagnostics, and adjusting the timeout retransmission time, the problem of unoptimizable retransmission time in remote vehicle diagnostics was solved, improving data packet transmission success rate and user experience.

CN121967276APending Publication Date: 2026-05-01LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LAUNCH TECH CO LTD
Filing Date
2026-02-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In remote vehicle diagnostics, existing technologies cannot minimize retransmission timeouts when network bandwidth allows, leading to excessive or untimely retransmissions, which affects network latency and data transmission efficiency.

Method used

By dividing the current target time window in the vehicle diagnostic process into multiple sub-windows, analyzing network metrics of diagnostic data packets such as first-time delivery rate and round-trip time, and adjusting timeout retransmission time to adapt to network change trends, packet loss and delay can be avoided.

Benefits of technology

It enables real-time timeout retransmission time adjustment under network change trends, improving the success rate of diagnostic data packet transmission and user experience, and avoiding disconnection problems caused by blindly pursuing low latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967276A_ABST
    Figure CN121967276A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnostic data packet transmission control method, device and equipment based on a UDP protocol, and a storage medium, is applied to a receiving end of a diagnostic data packet, and relates to the technical field of vehicle diagnosis, and the method comprises the steps: obtaining a current target time window in a vehicle diagnosis process, dividing the current target time window into a first target number of front sub-windows and a second target number of rear sub-windows; the current target time window is a time window corresponding to the latest target time period in the vehicle diagnosis process; the diagnosis data packet is a data packet sent based on a UDP protocol and used for vehicle diagnosis; determining a network index corresponding to the diagnosis data packet in each sub-window; and determining a network change trend of the current target time window based on a network index, and adjusting the timeout retransmission time in the vehicle diagnosis process by using the network change trend to obtain the adjusted timeout retransmission time. And under the condition that the network bandwidth is allowed, the retransmission timeout time is as short as possible.
Need to check novelty before this filing date? Find Prior Art

Description

A diagnostic data packet transmission control method, apparatus, device, and storage medium based on the UDP protocol. Technical Field

[0001] This invention relates to the field of vehicle diagnostic technology, and in particular to a diagnostic data packet transmission control method, apparatus, device, and storage medium based on the UDP protocol. Background Technology

[0002] In the field of remote automotive diagnostics, latency is extremely sensitive. Therefore, to achieve lower latency, point-to-point communication using UDP (User Datagram Protocol) is typically preferred for communication between two data server devices. Because automotive diagnostics has very high latency requirements, to prevent timeouts caused by retransmissions, the retransmission timeout is usually set to a small, fixed value (typically 20 milliseconds), rather than dynamically adjusting based on network conditions. If this timeout is exceeded, a retransmission will occur. For example, if an ACK (positive acknowledgment) is received 90 milliseconds after sending a data frame, it will be retransmitted four times at 20, 40, 60, and 80 milliseconds. Therefore, in the automotive diagnostics field, to achieve the lowest possible network latency, a large number of retransmissions may occur even without packet loss. However, this leads to a significant increase in communication volume. If this exceeds network bandwidth, it can cause data congestion, increased latency, and even significant packet loss.

[0003] Currently, there are methods to determine RTO (Retransmission Timeout) using RTT (Round Trip Time). This avoids a large number of retransmissions, but it can worsen real-time performance. For example, if the RTT is 90 milliseconds, the RTO can be set slightly larger than 90 milliseconds. This will not cause a large number of retransmissions, but it will also cause delays in retransmission when packets are actually lost, requiring 90 milliseconds before retransmission, resulting in a timeout.

[0004] As can be seen from the above, minimizing retransmission timeouts within the limits of network bandwidth is a pressing issue that needs to be addressed. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a diagnostic data packet transmission control method, apparatus, device, and storage medium based on the UDP protocol, which can minimize the retransmission timeout time when network bandwidth allows. The specific solution is as follows: Firstly, this application provides a diagnostic data packet transmission control method based on the UDP protocol, applied to the receiving end of diagnostic data packets, comprising: obtaining the current target time window during vehicle diagnostics; dividing the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window being the time window corresponding to the most recent target time period during vehicle diagnostics; the diagnostic data packet being a data packet sent based on the UDP protocol for vehicle diagnostics; determining network indicators corresponding to the diagnostic data packets in each sub-window; the network indicators including the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets; determining the network change trend of the current target time window based on the network indicators, and adjusting the timeout retransmission time during vehicle diagnostics using the network change trend to obtain the adjusted timeout retransmission time.

[0006] Optionally, determining the network metrics corresponding to the diagnostic data packets in each sub-window includes: determining the target first-delivery rate corresponding to the diagnostic data packets in each sub-window; the target first-delivery rate is determined based on the retransmission count identifier field and the data packet identifier field in the diagnostic data packets; calculating the round-trip time corresponding to all diagnostic data packets in each sub-window, removing target invalid data from each round-trip time based on the statistical results to obtain the round-trip time after removal, and determining the round-trip time after removal as the target round-trip time; the target invalid data is the maximum and minimum values ​​of the target round-trip time corresponding to all diagnostic data packets in each sub-window of the current target time window.

[0007] Optionally, determining the network change trend of the current target time window based on the network indicators includes: determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window; if the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window.

[0008] Optionally, determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window includes: determining a first difference between the first target first delivery rate corresponding to the previous sub-window and the second target first delivery rate corresponding to the subsequent sub-window; if the first difference satisfies a first preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the first preset change condition is that the first target first delivery rate is greater than the second target first delivery rate, and the first difference is greater than a first target threshold; if the first difference satisfies a second preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability. The trend is that network stability is recovering; the second preset change condition is that the first target first delivery rate is less than the second target first delivery rate, and the first difference is greater than the second target threshold; if the first difference meets the third preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the third preset change condition is that the first delivery rate benchmark value is greater than the second target first delivery rate, and the difference between the first delivery rate benchmark value and the second target first delivery rate is less than the third target threshold; the first delivery rate benchmark value is a preset benchmark value or a benchmark value updated based on the second target first delivery rate.

[0009] Optionally, if the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each of the sub-windows includes: if the network change trend of the current target time window is not a decrease in network stability, then determining a second difference between the first target round-trip time corresponding to the previous sub-window and the second target round-trip time corresponding to the subsequent sub-window; if the second difference satisfies a fourth preset change condition, then the network change trend of the current target time window is characterized as a decrease in network stability; the fourth preset change condition is that the first target round-trip time is less than the second target round-trip time, and the second difference is greater than a fourth target threshold; if the second difference satisfies a fifth preset change condition... If the change condition is set, the network change trend of the current target time window is characterized by an increase in network stability; the fifth preset change condition is that the first target round-trip time is greater than the second target round-trip time, and the second difference is greater than the fifth target threshold; if the second difference satisfies the sixth preset change condition, the network change trend of the current target time window is characterized by a decrease in network stability; the sixth preset change condition is that the round-trip time reference value is less than the second target round-trip time, and the difference between the round-trip time reference value and the second target round-trip time is less than the sixth target threshold; the round-trip time reference value is a reference value measured based on the initial handshake phase of the sender and receiver of the diagnostic data packet, or a reference value updated based on the second target round-trip time.

[0010] Optionally, adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a decrease in network stability, then adjusting the timeout retransmission time during the vehicle diagnostic process based on the minimum of the first candidate timeout retransmission time and the second candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the first candidate timeout retransmission time is determined based on the product of the timeout retransmission time and the first preset factor; the second candidate timeout retransmission time is determined based on the second target round-trip time and the preset safety margin.

[0011] Optionally, adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a network stability recovery, then adjusting the timeout retransmission time during the vehicle diagnostic process based on the maximum value of the third candidate timeout retransmission time and the fourth candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the third candidate timeout retransmission time is the ratio of the timeout retransmission time to the second preset factor; the fourth candidate timeout retransmission time is the timeout retransmission time.

[0012] Secondly, this application provides a diagnostic data packet transmission control device based on the UDP protocol, applied to the receiving end of diagnostic data packets, comprising: a window division module, used to obtain the current target time window in the vehicle diagnostic process, and divide the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period in the vehicle diagnostic process; the diagnostic data packet is a data packet sent based on the UDP protocol for vehicle diagnostics; a network indicator determination module, used to determine the network indicators corresponding to the diagnostic data packets in each sub-window; the network indicators include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets; and a retransmission time adjustment module, used to determine the network change trend of the current target time window based on the network indicators, and use the network change trend to adjust the timeout retransmission time in the vehicle diagnostic process to obtain the adjusted timeout retransmission time.

[0013] Thirdly, this application provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the aforementioned diagnostic data packet transmission control method based on the UDP protocol.

[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned diagnostic data packet transmission control method based on the UDP protocol.

[0015] This application obtains the current target time window during the vehicle diagnostic process, and divides the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period during the vehicle diagnostic process; the diagnostic data packet is a data packet sent based on the UDP protocol for vehicle diagnostics; the network indicators corresponding to the diagnostic data packets in each sub-window are determined; the network indicators include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets; the network change trend of the current target time window is determined based on the network indicators, and the timeout retransmission time in the vehicle diagnostic process is adjusted using the network change trend to obtain the adjusted timeout retransmission time.

[0016] As can be seen from the above, this application divides the time window corresponding to the most recent target time period during the vehicle diagnostic process into a first target number of preceding sub-windows and a second target number of following sub-windows. Then, it captures network change trends by analyzing the changes in the target first delivery rate and target round-trip time corresponding to the diagnostic data packets in each sub-window, avoiding packet loss and transmission delays. Furthermore, it adjusts the timeout retransmission time during the vehicle diagnostic process based on the network change trend corresponding to the current target time window. In this way, it automatically identifies network change trends during the vehicle diagnostic process and uses the identification results to adjust the timeout retransmission time in real time, ensuring the success rate of diagnostic data packet transmission, avoiding blindly pursuing low latency and resulting in disconnections, and improving the success rate of remote vehicle diagnostics and user experience. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 is a flowchart of a diagnostic data packet transmission control method based on the UDP protocol disclosed in this application; Figure 2 is a structural diagram of a diagnostic data packet transmission control device based on the UDP protocol disclosed in this application; Figure 3 is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Currently, determining RTO through RTT does not lead to a large number of retransmissions, but it can degrade real-time performance. To address this, this application provides a diagnostic data packet transmission control method based on the UDP protocol. This method automatically identifies network change trends during vehicle diagnostics and uses the identification results to adjust the timeout retransmission time in real time during vehicle diagnostics. This ensures the success rate of diagnostic data packet transmission, avoids blindly pursuing low latency and resulting in disconnections, and improves the success rate of remote vehicle diagnostics and user experience.

[0021] Referring to Figure 1, this embodiment of the invention discloses a diagnostic data packet transmission control method based on the UDP protocol, applied to the receiving end of the diagnostic data packet, including: step S11, obtaining the current target time window in the vehicle diagnostic process, and dividing the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period in the vehicle diagnostic process; the diagnostic data packet is a data packet for vehicle diagnostics sent based on the UDP protocol.

[0022] In this embodiment, the data frame format of the diagnostic data packet during the vehicle remote diagnostic process is not specifically limited, but the diagnostic data packet must at least include a retransmission count identifier field and a data packet identifier field. Then, the sending and receiving ends of the diagnostic data packet exchange several test network probe packets. The round-trip time of each probe packet is recorded, and the maximum and minimum values ​​of the round-trip time are removed. The average value of the probe packets after removal is determined as the preset round-trip time. In one specific implementation, during the initial handshake phase, the network state is usually optimal. Therefore, a relatively high empirical value of 0.98 is set as the first delivery rate benchmark. The timeout retry time during the vehicle diagnostic process is set to 20ms. The minimum timeout retry time is consistent with the timeout retry time; this is a commonly used conservative value and can be adjusted according to specific circumstances.

[0023] Understandably, an evaluation cycle is set, and the current target time window is determined according to the evaluation cycle. In one specific implementation, a 10-second time window can be used, that is, the time window corresponding to the most recent 10 seconds in the vehicle diagnosis process can be determined as the current target time window, and then the current target time window is divided into two sub-windows. The first target quantity and the second target quantity are the same.

[0024] Step S12: Determine the network metrics corresponding to the diagnostic data packets in each sub-window; the network metrics include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets.

[0025] In this embodiment, the target first-delivery rate is the ratio between the number of diagnostic data packets successfully acknowledged by the receiving end for the first time in the sub-window and the total number of diagnostic data packets successfully acknowledged by all receiving ends. If the retransmission count flag field in the diagnostic data packet is 0 and it is acknowledged by the receiving end, then this diagnostic data packet is considered to be the first delivered data packet. Then, the round-trip time of all successfully transmitted diagnostic data packets in the sub-window is calculated, the maximum and minimum values ​​are removed, and the average of the round-trip times after removal is determined as the target round-trip time corresponding to the diagnostic data packet in the sub-window.

[0026] Specifically, determining the network metrics corresponding to the diagnostic data packets in each sub-window includes: determining the target first-delivery rate corresponding to the diagnostic data packets in each sub-window; the target first-delivery rate is determined based on the retransmission count identifier field and the data packet identifier field in the diagnostic data packets; calculating the round-trip time corresponding to all diagnostic data packets in each sub-window, removing target invalid data from each round-trip time based on the statistical results to obtain the round-trip time after removal, and determining the round-trip time after removal as the target round-trip time; the target invalid data is the maximum and minimum values ​​of the target round-trip time corresponding to all diagnostic data packets in each sub-window of the current target time window.

[0027] Step S13: Determine the network change trend of the current target time window based on the network indicators, and adjust the timeout retransmission time in the vehicle diagnosis process using the network change trend to obtain the adjusted timeout retransmission time.

[0028] In this embodiment, the determination of network change trends is divided into two levels. First, the target first delivery rate corresponding to each sub-window is used for judgment. If the target first delivery rate corresponding to each sub-window cannot determine that the network change trend is a decrease in network stability, then the target round-trip time corresponding to each sub-window is used for judgment. Specifically, determining the network change trend of the current target time window based on the network indicators includes: determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window; if the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window.

[0029] Understandably, determining the first difference between the first target initial delivery rate corresponding to the previous sub-window and the second target initial delivery rate corresponding to the subsequent sub-window, in one specific implementation, indicates that if the first target initial delivery rate is greater than the second target initial delivery rate and the first difference is greater than 5%, then the network change trend of the current target time window is characterized by a decrease in network stability; if the first target initial delivery rate is less than the second target initial delivery rate and the first difference is greater than 3%, then the network change trend is characterized by a recovery in network stability; if the initial delivery rate benchmark value is greater than the second target initial delivery rate and the difference between the initial delivery rate benchmark value and the second target initial delivery rate is less than 10%, then the network change trend is characterized by a decrease in network stability. The initial delivery rate benchmark value is determined based on the target initial delivery rate corresponding to the subsequent sub-window in the current target time window of the previous evaluation period.

[0030] Specifically, determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window includes: determining a first difference between the first target first delivery rate corresponding to the previous sub-window and the second target first delivery rate corresponding to the subsequent sub-window; if the first difference satisfies a first preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the first preset change condition is that the first target first delivery rate is greater than the second target first delivery rate, and the first difference is greater than a first target threshold; if the first difference satisfies a second preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability. The trend is characterized by an increase in network stability; the second preset change condition is that the first target first delivery rate is less than the second target first delivery rate, and the first difference is greater than the second target threshold; if the first difference meets the third preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the third preset change condition is that the first delivery rate benchmark value is greater than the second target first delivery rate, and the difference between the first delivery rate benchmark value and the second target first delivery rate is less than the third target threshold; the first delivery rate benchmark value is a preset benchmark value or a benchmark value updated based on the second target first delivery rate. It is worth noting that the first target threshold, the second target threshold, and the third target threshold can be adjusted and set according to service tolerance and typical network conditions.

[0031] In this embodiment, if no second situation occurs when judging using the target first delivery rate corresponding to each sub-window, i.e., no situation occurs where the first difference meets the second preset change condition, then the target round-trip time corresponding to each sub-window determines the network change trend of the current target time window. In one specific implementation, a second difference is determined between the first target round-trip time corresponding to the previous sub-window and the second target round-trip time corresponding to the subsequent sub-window. If the first target round-trip time is less than the second target round-trip time, and the second difference is greater than 20ms, then the network change trend indicates a decrease in network stability; if the first target round-trip time is greater than the second target round-trip time, and the second difference is greater than 10ms, then the network change trend indicates a recovery in network stability; if the round-trip time benchmark is less than the second target round-trip time, and the difference between the round-trip time benchmark and the second target round-trip time is less than 30ms, then the network change trend indicates a decrease in network stability. The round-trip time benchmark is determined based on the target round-trip time corresponding to the subsequent sub-window in the current target time window of the previous evaluation period.

[0032] Specifically, if the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window includes: if the network change trend of the current target time window is not a decrease in network stability, then determining a second difference between the first target round-trip time corresponding to the previous sub-window and the second target round-trip time corresponding to the subsequent sub-window; if the second difference satisfies a fourth preset change condition, then the network change trend of the current target time window is characterized as a decrease in network stability; the fourth preset change condition is that the first target round-trip time is less than the second target round-trip time, and the second difference is greater than a fourth target threshold; if the second difference satisfies a fifth preset change condition... If the change conditions are set, the network change trend in the current target time window is characterized by an increase in network stability; the fifth preset change condition is that the first target round-trip time is greater than the second target round-trip time, and the second difference is greater than the fifth target threshold; if the second difference satisfies the sixth preset change condition, the network change trend in the current target time window is characterized by a decrease in network stability; the sixth preset change condition is that the round-trip time reference value is less than the second target round-trip time, and the difference between the round-trip time reference value and the second target round-trip time is less than the sixth target threshold; the round-trip time reference value is a reference value measured based on the initial handshake phase of the sender and receiver of the diagnostic data packet, or a reference value updated based on the second target round-trip time. It is worth noting that the fourth, fifth, and sixth target thresholds can be adjusted and set according to service tolerance and typical network conditions.

[0033] It is understood that the adjusted timeout retransmission time is obtained by adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend. In one specific implementation, if the network change trend of the current target time window indicates a decrease in network stability, the product of the timeout retransmission time and a first preset factor is determined as the first candidate timeout retransmission time, and the sum of the second target round-trip time and a preset safety margin is used to determine the second candidate timeout retransmission time. The minimum value between the first and second candidate timeout retransmission times is selected as the adjusted timeout retransmission time. The preset safety margin can be a fixed value, such as between 10 and 20 milliseconds, or it can be set according to actual conditions to compensate for fluctuations in the timeout retransmission time. Specifically, adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a decrease in network stability, then adjusting the timeout retransmission time during the vehicle diagnostic process based on the minimum of the first candidate timeout retransmission time and the second candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the first candidate timeout retransmission time is determined based on the product of the timeout retransmission time and the first preset factor; the second candidate timeout retransmission time is determined based on the second target round-trip time and the preset safety margin.

[0034] In another specific implementation, if the network change trend of the current target time window is a network stability recovery, then the ratio of the timeout retransmission time to the second preset factor is determined as the third candidate timeout retransmission time, and the timeout retransmission time is determined as the fourth candidate timeout retransmission time. The maximum value between the third candidate timeout retransmission time and the fourth candidate timeout retransmission time is selected as the adjusted timeout retransmission time. It is worth mentioning that both the first preset factor and the second preset factor are greater than 1 and can be set according to actual conditions. Specifically, adjusting the timeout retransmission time in the vehicle diagnosis process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a network stability recovery, then adjusting the timeout retransmission time in the vehicle diagnosis process based on the maximum value of the third candidate timeout retransmission time and the fourth candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the third candidate timeout retransmission time is the ratio of the timeout retransmission time to the second preset factor; and the fourth candidate timeout retransmission time is the timeout retransmission time.

[0035] As can be seen from the above, this application divides the time window corresponding to the most recent target time period during the vehicle diagnostic process into a first target number of preceding sub-windows and a second target number of following sub-windows. Then, it captures network change trends by analyzing the changes in the target first delivery rate and target round-trip time corresponding to the diagnostic data packets in each sub-window, avoiding packet loss and transmission delays. Furthermore, it adjusts the timeout retransmission time during the vehicle diagnostic process based on the network change trend corresponding to the current target time window. In this way, it automatically identifies network change trends during the vehicle diagnostic process and uses the identification results to adjust the timeout retransmission time in real time, ensuring the success rate of diagnostic data packet transmission, avoiding blindly pursuing low latency and resulting in disconnections, and improving the success rate of remote vehicle diagnostics and user experience.

[0036] Accordingly, referring to Figure 2, this application also provides a diagnostic data packet transmission control device based on the UDP protocol, applied to the receiving end of the diagnostic data packet, including: a window division module 11, used to obtain the current target time window in the vehicle diagnostic process, and divide the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period in the vehicle diagnostic process; the diagnostic data packet is a data packet sent based on the UDP protocol for vehicle diagnostics; a network indicator determination module 12, used to determine the network indicators corresponding to the diagnostic data packets in each sub-window; the network indicators include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packet; and a retransmission time adjustment module 13, used to determine the network change trend of the current target time window based on the network indicators, and use the network change trend to adjust the timeout retransmission time in the vehicle diagnostic process to obtain the adjusted timeout retransmission time.

[0037] In some specific embodiments, the network metric determination module 12 may specifically include: a target delivery rate determination unit, used to determine the target first delivery rate corresponding to the diagnostic data packets in each sub-window; the target first delivery rate is determined based on the retransmission count identifier field and the data packet identifier field in the diagnostic data packets; and a round-trip time determination unit, used to count the round-trip times corresponding to all diagnostic data packets in each sub-window, remove target invalid data from each round-trip time based on the statistical results to obtain the round-trip time after removal, and determine the round-trip time after removal as the target round-trip time; the target invalid data is the maximum and minimum values ​​of the target round-trip times corresponding to all diagnostic data packets in each sub-window of the current target time window.

[0038] In some specific embodiments, the retransmission time adjustment module 13 may specifically include: a first trend determination unit, used to determine the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window; and a second trend determination unit, used to determine the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window if the network change trend of the current target time window is not a decrease in network stability.

[0039] In some specific embodiments, the retransmission time adjustment module 13 may specifically include: a first difference determination unit, used to determine a first difference between the first target first delivery rate corresponding to the previous sub-window and the second target first delivery rate corresponding to the subsequent sub-window; a first change condition satisfaction unit, used to characterize the network change trend of the current target time window as a decrease in network stability if the first difference satisfies a first preset change condition; the first preset change condition is that the first target first delivery rate is greater than the second target first delivery rate, and the first difference is greater than a first target threshold; and a second change condition satisfaction unit, used to characterize the current target time window as a decrease in network stability if the first difference satisfies a second preset change condition. The network change trend of the port is that the network stability is recovering; the second preset change condition is that the first target first delivery rate is less than the second target first delivery rate, and the first difference is greater than the second target threshold; the third change condition satisfaction unit is used to characterize the network change trend of the current target time window as a decrease in network stability if the first difference satisfies the third preset change condition; the third preset change condition is that the first delivery rate benchmark value is greater than the second target first delivery rate, and the difference between the first delivery rate benchmark value and the second target first delivery rate is less than the third target threshold; the first delivery rate benchmark value is a preset benchmark value or a benchmark value updated based on the second target first delivery rate.

[0040] In some specific embodiments, the retransmission time adjustment module 13 may specifically include: a second difference determination unit, used to determine a second difference between the first target round-trip time corresponding to the previous sub-window and the second target round-trip time corresponding to the subsequent sub-window if the network change trend of the current target time window is not a decrease in network stability; a fourth change condition satisfaction unit, used to characterize the network change trend of the current target time window as a decrease in network stability if the second difference satisfies a fourth preset change condition; the fourth preset change condition is that the first target round-trip time is less than the second target round-trip time, and the second difference is greater than a fourth target threshold; a fifth change condition satisfaction unit, used to characterize the network change trend of the current target time window as a decrease in network stability if the second difference satisfies a fifth preset change condition. The network change trend of the current target time window is described as an increase in network stability; the fifth preset change condition is that the first target round-trip time is greater than the second target round-trip time, and the second difference is greater than the fifth target threshold; the sixth change condition satisfaction unit is used to characterize the network change trend of the current target time window as a decrease in network stability if the second difference satisfies the sixth preset change condition; the sixth preset change condition is that the round-trip time reference value is less than the second target round-trip time, and the difference between the round-trip time reference value and the second target round-trip time is less than the sixth target threshold; the round-trip time reference value is a reference value measured based on the initial handshake phase of the sender and receiver of the diagnostic data packet, or a reference value updated based on the second target round-trip time.

[0041] In some specific embodiments, the retransmission time adjustment module 13 may specifically include: a first retransmission time adjustment unit, used to adjust the timeout retransmission time in the vehicle diagnosis process based on the minimum of the first candidate timeout retransmission time and the second candidate timeout retransmission time if the network change trend of the current target time window is a decrease in network stability, so as to obtain the adjusted timeout retransmission time; the first candidate timeout retransmission time is determined based on the product of the timeout retransmission time and the first preset factor; the second candidate timeout retransmission time is determined based on the second target round-trip time and the preset safety margin.

[0042] In some specific embodiments, the retransmission time adjustment module 13 may specifically include: a second retransmission time adjustment unit, used to adjust the timeout retransmission time in the vehicle diagnosis process based on the maximum value of the third candidate timeout retransmission time and the fourth candidate timeout retransmission time if the network change trend of the current target time window is a network stability recovery, so as to obtain the adjusted timeout retransmission time; the third candidate timeout retransmission time is the ratio of the timeout retransmission time to the second preset factor; the fourth candidate timeout retransmission time is the timeout retransmission time.

[0043] Furthermore, this application also discloses an electronic device. FIG3 is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the UDP-based diagnostic data packet transmission control method disclosed in any of the foregoing embodiments. Additionally, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0044] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0045] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0046] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the UDP-based diagnostic data packet transmission control method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0047] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned UDP-based diagnostic data packet transmission control method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0048] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0049] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0050] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0051] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0052] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A diagnostic data packet transmission control method based on the UDP protocol, characterized in that, The method applied to the receiving end of diagnostic data packets includes: acquiring the current target time window during the vehicle diagnostic process; dividing the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period during the vehicle diagnostic process; the diagnostic data packet is a data packet sent based on the UDP protocol for vehicle diagnostics; determining the network indicators corresponding to the diagnostic data packets in each sub-window; the network indicators include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets; determining the network change trend of the current target time window based on the network indicators; and adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time.

2. The diagnostic data packet transmission control method based on the UDP protocol according to claim 1, characterized in that, The determination of the network metrics corresponding to the diagnostic data packets in each sub-window includes: determining the target first-delivery rate corresponding to the diagnostic data packets in each sub-window; the target first-delivery rate is determined based on the retransmission count identifier field and the data packet identifier field in the diagnostic data packets; calculating the round-trip time corresponding to all diagnostic data packets in each sub-window, removing target invalid data from each round-trip time based on the statistical results to obtain the round-trip time after removal, and determining the round-trip time after removal as the target round-trip time; the target invalid data is the maximum and minimum values ​​of the target round-trip time corresponding to all diagnostic data packets in each sub-window of the current target time window.

3. The diagnostic data packet transmission control method based on the UDP protocol according to claim 1, characterized in that, Determining the network change trend of the current target time window based on the network indicators includes: determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window; if the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window.

4. The diagnostic data packet transmission control method based on the UDP protocol according to claim 3, characterized in that, The method of determining the network change trend of the current target time window based on the target first delivery rate corresponding to each sub-window includes: determining a first difference between the first target first delivery rate corresponding to the previous sub-window and the second target first delivery rate corresponding to the subsequent sub-window; if the first difference satisfies a first preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the first preset change condition is that the first target first delivery rate is greater than the second target first delivery rate, and the first difference is greater than a first target threshold; if the first difference satisfies a second preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability. The trend is that network stability is recovering; the second preset change condition is that the first target first delivery rate is less than the second target first delivery rate, and the first difference is greater than the second target threshold; if the first difference meets the third preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability; the third preset change condition is that the first delivery rate benchmark value is greater than the second target first delivery rate, and the difference between the first delivery rate benchmark value and the second target first delivery rate is less than the third target threshold; the first delivery rate benchmark value is a preset benchmark value or a benchmark value updated based on the second target first delivery rate.

5. The diagnostic data packet transmission control method based on the UDP protocol according to claim 4, characterized in that, If the network change trend of the current target time window is not a decrease in network stability, then determining the network change trend of the current target time window based on the target round-trip time corresponding to each sub-window includes: if the network change trend of the current target time window is not a decrease in network stability, then determining a second difference between the first target round-trip time corresponding to the previous sub-window and the second target round-trip time corresponding to the subsequent sub-window; if the second difference satisfies a fourth preset change condition, then the network change trend of the current target time window is characterized as a decrease in network stability; the fourth preset change condition is that the first target round-trip time is less than the second target round-trip time, and the second difference is greater than a fourth target threshold; if the second difference satisfies a fifth preset change condition... If the network change trend of the current target time window is characterized by an increase in network stability, then the network change trend of the current target time window is characterized by an increase in network stability. The fifth preset change condition is that the first target round-trip time is greater than the second target round-trip time, and the second difference is greater than the fifth target threshold. If the second difference satisfies the sixth preset change condition, then the network change trend of the current target time window is characterized by a decrease in network stability. The sixth preset change condition is that the round-trip time reference value is less than the second target round-trip time, and the difference between the round-trip time reference value and the second target round-trip time is less than the sixth target threshold. The round-trip time reference value is a reference value measured based on the initial handshake phase of the sender and receiver of the diagnostic data packet, or a reference value updated based on the second target round-trip time.

6. The diagnostic data packet transmission control method based on the UDP protocol according to claim 5, characterized in that, The step of adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a decrease in network stability, then the timeout retransmission time during the vehicle diagnostic process is adjusted based on the minimum of the first candidate timeout retransmission time and the second candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the first candidate timeout retransmission time is determined based on the product of the timeout retransmission time and the first preset factor; the second candidate timeout retransmission time is determined based on the second target round-trip time and the preset safety margin.

7. The diagnostic data packet transmission control method based on the UDP protocol according to claim 5, characterized in that, The step of adjusting the timeout retransmission time during the vehicle diagnostic process using the network change trend to obtain the adjusted timeout retransmission time includes: if the network change trend of the current target time window is a network stability recovery, then the timeout retransmission time during the vehicle diagnostic process is adjusted based on the maximum value of the third candidate timeout retransmission time and the fourth candidate timeout retransmission time to obtain the adjusted timeout retransmission time; the third candidate timeout retransmission time is the ratio of the timeout retransmission time to the second preset factor; the fourth candidate timeout retransmission time is the timeout retransmission time.

8. A diagnostic data packet transmission control device based on the UDP protocol, characterized in that, The diagnostic data packet receiving end includes: a window partitioning module, used to obtain the current target time window during the vehicle diagnostic process, and divide the current target time window into a first target number of preceding sub-windows and a second target number of following sub-windows; the current target time window is the time window corresponding to the most recent target time period during the vehicle diagnostic process; the diagnostic data packet is a data packet sent based on the UDP protocol for vehicle diagnostics; a network indicator determination module, used to determine the network indicators corresponding to the diagnostic data packets in each sub-window; the network indicators include the target first delivery rate and / or target round-trip time corresponding to the diagnostic data packets; and a retransmission time adjustment module, used to determine the network change trend of the current target time window based on the network indicators, and use the network change trend to adjust the timeout retransmission time during the vehicle diagnostic process to obtain the adjusted timeout retransmission time.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the diagnostic packet transmission control method based on the UDP protocol as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the diagnostic data packet transmission control method based on the UDP protocol as described in any one of claims 1 to 7.