Udp data transmission method and system, electronic device and medium

By combining fragmentation and reassembly with ID fault detection, along with structured packet header design and incremental update mechanism, the problem of UDP packet loss and out-of-order delivery in autonomous driving and V2X vehicle networking was solved, achieving reliable and efficient recovery of UDP data transmission.

CN122496570APending Publication Date: 2026-07-31DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGFENG MOTOR GRP
Filing Date
2026-04-20
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In high real-time application scenarios such as autonomous driving and V2X vehicle networking, UDP protocol data packets are prone to loss, out-of-order delivery, or corruption, and lack a reliability guarantee mechanism, resulting in incomplete data transmission.

Method used

By using fragmentation and reassembly and ID fragmentation detection, the number of lost message IDs is calculated to determine whether to initiate a targeted retransmission request. A structured packet header design and incremental update mechanism are adopted to ensure the integrity and stability of data packets.

Benefits of technology

It achieves class-reliability for UDP data transmission, avoids invalid full retransmissions caused by network jitter, improves retransmission efficiency, and ensures rapid data recovery and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496570A_ABST
    Figure CN122496570A_ABST
Patent Text Reader

Abstract

This invention provides a UDP data transmission method, system, electronic device, and medium, belonging to the field of vehicle technology. The method includes: responding to a received UDP data packet by fragmenting and reassembling the UDP data packet to obtain a fragmentation and reassembly matrix; performing ID fragmentation detection based on the message IDs of the UDP data packets according to the fragmentation and reassembly matrix; when a fragmentation ID fragmentation is detected, calculating the number of lost message IDs, and determining whether to initiate a directed retransmission request to the sender based on the number of lost message IDs; if a directed retransmission request is initiated, receiving the UDP data packet corresponding to the lost message ID sent by the sender based on the directed retransmission request. This invention introduces an ID fragmentation detection and directed retransmission mechanism, which can accurately retransmit lost fragments, ensuring the integrity of critical data while avoiding invalid full retransmissions caused by instantaneous network jitter, achieving near-reliable transmission on the UDP protocol, enabling rapid fragmentation recovery, and improving retransmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle technology, and in particular to a UDP data transmission method, system, electronic device, and medium. Background Technology

[0002] In high-real-time applications such as autonomous driving and V2X vehicle-to-everything (V2X) communication, although the UDP protocol has the advantage of low latency, its underlying mechanism does not provide packet acknowledgment, retransmission, or reordering functions. In complex wireless network environments, data packets are highly susceptible to loss, out-of-order delivery, or corruption, and UDP data transmission lacks a reliable guarantee mechanism. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a UDP data transmission method, system, electronic device and medium.

[0004] In a first aspect, embodiments of the present invention provide a UDP data transmission method, including:

[0005] In response to a received UDP packet, the UDP packet is fragmented and reassembled to obtain a fragmentation and reassembly matrix;

[0006] Based on the fragmentation and reassembly matrix, ID fragmentation detection is performed according to the message ID of the UDP data packet;

[0007] When a fragment ID break is detected, the number of lost message IDs is calculated, and a decision is made based on the number of lost message IDs to determine whether to initiate a directed retransmission request to the sender.

[0008] If a directed retransmission request is initiated, the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request is received.

[0009] In some embodiments, the header of the UDP packet is a structured encapsulation, and the header of the UDP packet includes a timestamp, message ID, fragment group parameters, and checksum.

[0010] In some embodiments, the step of fragmenting and reassembling the UDP data packets in response to a received UDP data packet to obtain a fragmentation and reassembly matrix includes:

[0011] In response to a received UDP packet, extract the fragmentation parameters of the UDP packet;

[0012] The total number of groups and the number of frames per group are obtained based on the fragmentation group parameters;

[0013] Construct an empty matrix with the total number of groups as rows and the number of group frames as columns;

[0014] The fragmentation and reassembly matrix is ​​obtained by filling the corresponding positions in the empty matrix with the group ID and signal frame number of the UDP data packet.

[0015] In some embodiments, the step of performing ID fragmentation detection based on the message ID of the UDP packet using the fragmentation reassembly matrix includes:

[0016] Obtain the message ID of the UDP packet;

[0017] The ID of the previous valid message is determined based on the fragmentation and reassembly matrix;

[0018] Compare the message ID of the UDP packet with the previous valid message ID plus 1;

[0019] When the message ID of the UDP packet is greater than the previous valid message ID plus 1, an ID gap is determined to have occurred.

[0020] In some embodiments, when a fragment ID gap is detected, calculating the number of lost message IDs and determining whether to initiate a directed retransmission request to the sender based on the number of lost message IDs includes:

[0021] When a fragment ID break is detected, the number of lost message IDs is calculated based on the message ID of the UDP packet and the previous valid message ID.

[0022] Compare the number of lost message IDs with a preset tolerance window value;

[0023] When the number of lost message IDs is greater than or equal to 1 and less than or equal to the preset tolerance window value, a targeted retransmission request for the lost message IDs is initiated to the sending end.

[0024] In some embodiments, the method further includes:

[0025] Receive full packets or incremental packets transmitted by the sending end; wherein, the full packet includes road network topology, lane lines, and static signs, and the incremental packet includes change signals, the change signals including traffic light status and construction zone coordinates.

[0026] Secondly, embodiments of the present invention provide a UDP data transmission system, including a receiver and a sender; wherein the receiver includes:

[0027] The fragmentation and reassembly module is used to fragment and reassemble the received UDP data packets in response to obtain a fragmentation and reassembly matrix.

[0028] The ID fragmentation detection module is used to perform ID fragmentation detection based on the message ID of the UDP data packet according to the fragmentation reassembly matrix.

[0029] The directed retransmission request module is used to calculate the number of lost message IDs when a fragment ID gap is detected, and to determine whether to initiate a directed retransmission request to the sender based on the number of lost message IDs.

[0030] The directed retransmission execution module is used to receive the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request if a directed retransmission request is initiated.

[0031] In some embodiments, the sending end is used to perform structured encapsulation of the packet header to construct a UDP data packet including a timestamp, message ID, fragment group parameters, and checksum;

[0032] The sending end is also used to receive the directed retransmission request and retransmit the UDP data packet corresponding to the lost message ID to the receiving end;

[0033] The transmitting end is also used to construct a full packet based on the road network topology, lane lines and static signs or to construct an incremental packet based on the change signal, and to send the full packet or incremental packet to the receiving end.

[0034] Thirdly, embodiments of the present invention provide an electronic device, comprising:

[0035] One or more processors;

[0036] Memory, used to store one or more programs;

[0037] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above.

[0038] Fourthly, embodiments of the present invention provide a computer-readable medium on which a computer program is stored, the computer program being executed by a processor to implement the steps of any of the methods described above.

[0039] The UDP data transmission method provided by this invention includes: responding to a received UDP data packet by fragmenting and reassembling the UDP data packet to obtain a fragmentation and reassembly matrix; performing ID fragmentation detection based on the message ID of the UDP data packet according to the fragmentation and reassembly matrix; when a fragmentation ID fragmentation is detected, calculating the number of lost message IDs, and determining whether to initiate a directed retransmission request to the sending end based on the number of lost message IDs; if a directed retransmission request is initiated, receiving the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request. In this invention, after receiving data, the receiving end confirms the integrity of the received UDP data packet through ID fragmentation. By introducing an ID fragmentation detection and directed retransmission mechanism, it can accurately retransmit lost fragments, ensuring the integrity of critical data and avoiding invalid full retransmissions caused by instantaneous network jitter. This achieves near-reliable transmission on the UDP protocol, enables rapid fragmentation recovery, and improves retransmission efficiency by 4 times. Attached Figure Description

[0040] Figure 1 This is a flowchart illustrating a UDP data transmission method provided in an embodiment of the present invention.

[0041] Figure 2 This is a schematic diagram of the technical architecture of an optional specific implementation method in an embodiment of the present invention;

[0042] Figure 3 This is a flowchart illustrating the ID tomography detection algorithm in an embodiment of the present invention;

[0043] Figure 4 This is a structural block diagram of a UDP data transmission system provided in an embodiment of the present invention;

[0044] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0045] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0046] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.

[0047] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0048] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0049] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0050] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.

[0051] The key terms involved in this invention are defined as follows:

[0052] UDP: User Datagram Protocol;

[0053] V2X: Vehicle-to-Everything, the Internet of Vehicles;

[0054] CRC: Cyclic Redundancy Check.

[0055] In related technologies, a method based on packet loss rate to dynamically adjust the buffer size during UDP socket buffer transmission has been proposed. However, this method relies on a fixed packet header (source / destination port + length) and cannot solve the problem of out-of-order reassembly. In addition, the packet header design is rudimentary, only including basic fields (port, length), and cannot detect out-of-order packets, fragmentation, or other issues.

[0056] Another related technology achieves parallel processing of autonomous driving data by periodically acquiring and grouping autonomous driving data in a distributed file system and using a workflow engine for parallel processing. However, it lacks a header field verification mechanism, resulting in insufficient transmission integrity. Furthermore, the large amount of computation involved in periodically acquiring and grouping autonomous driving data in a distributed file system and using a workflow engine for parallel processing may lead to excessive consumption of memory and processor resources.

[0057] In another related technology, data transmission schemes typically employ a full-data transmission mode. For high-speed vehicles, changes in road environment information are often localized. Full-data transmission leads to a large amount of redundant data consuming network bandwidth, significantly increasing communication costs and potentially causing network congestion, thus crowding out bandwidth resources for other critical control signals. For example, while slicing and determining the type sequence of target lane line data collected from vehicles can improve efficiency through lane line segmentation and matching, bandwidth optimization is not achieved, resulting in excessive load due to full-data transmission. Furthermore, slicing and determining the type sequence of target lane line data collected from vehicles requires calculating, fusing, and determining the connection relationships of multiple lane lines before finally determining the lane lines. This scheme increases the computational burden and easily leads to network congestion.

[0058] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a UDP data transmission method. Figure 1 This is a flowchart illustrating a UDP data transmission method provided in an embodiment of the present invention.

[0059] As one embodiment of the present invention, such as Figure 1 As shown, the UDP data transmission method includes:

[0060] Step S1: In response to the received UDP data packet, the UDP data packet is fragmented and reassembled to obtain a fragmentation and reassembly matrix;

[0061] Step S2: Based on the fragmentation and reassembly matrix, perform ID fragmentation detection according to the message ID of the UDP data packet;

[0062] Step S3: When a fragment ID break is detected, calculate the number of lost message IDs, and determine whether to initiate a directed retransmission request to the sender based on the number of lost message IDs;

[0063] Step S4: If a directed retransmission request is initiated, then the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request is received.

[0064] It should be noted that the execution subject in this embodiment can be an electronic device, which can be a computer device with data processing function, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment, the computer device that is the receiving end is used as the execution subject for illustration.

[0065] In some embodiments, the header of the UDP packet is a structured encapsulation, and the header of the UDP packet includes a timestamp, message ID, fragment group parameters, and checksum.

[0066] Specifically, such as Figure 2 As shown, this embodiment adopts a structured header design scheme (sender end). The header field definitions (total 120 bits = 15 bytes) are shown in Table 1 below:

[0067] Table 1

[0068]

[0069] For example, the sending end constructs a fixed-length packet header to encapsulate the data to be transmitted. The total length of the packet header can be designed to be 120 bits (15 bytes). Specific field definitions and generation rules include: Timestamp, a field with a length of 32 bits, used to record the precise time of data generation. For example, the sending end obtains the number of microseconds since system startup as the timestamp value T to ensure that the receiving end can accurately calculate data latency. Message ID, a field with a length of 16 bits, serves as a globally unique identifier for the packet. For example, the sending end maintains a counter, incrementing the ID value by 1 for each new message generated, i.e., ID_n = ID_n - 1 + 1. Total number of groups G, a field with a length of 8 bits, represents the total number of message fragment groups. For example, the sending end calculates the total number of fragment groups G based on the preset maximum number of frames per group N, using the formula G = ceil(total number of frames / N). Number of frames per group N, a field with a length of 8 bits, represents the maximum number of frames contained in each group. This field is a fixed configuration value, for example, set to 5, used to define the capacity of the fragment group.

[0070] For example, the signal frame number F, with a field length of 8 bits, represents the sequence number of the current frame within the group. For instance, the sender calculates the F value based on the index of the current frame using the formula F = current frame index % N, with a value range of 0 to N−1. The checksum, with a field length of 16 bits, is used to verify the integrity of critical fields. For example, the sender selects the timestamp (T), message ID (ID), and total group count (G) to perform a CRC16 operation (using the CRC_CCITT standard) to generate the checksum CRC = crc_ccitt(T|ID|G). The data length, with a field length of 16 bits, identifies the byte length of the payload.

[0071] In some embodiments, in response to a received UDP packet, the UDP packet is fragmented and reassembled to obtain a fragmentation and reassembly matrix, including: in response to a received UDP packet, extracting the fragmentation group parameters of the UDP packet; obtaining the total number of groups and the number of group frames based on the fragmentation group parameters; constructing an empty matrix with the total number of groups as rows and the number of group frames as columns; and filling the corresponding positions in the empty matrix according to the group ID and signal frame number of the UDP packet to obtain the fragmentation and reassembly matrix.

[0072] Specifically, such as Figure 2 As shown, fragment ID tomography detection (receiver end). Fragment reassembly matrix construction: Construct an empty matrix with the total number of groups G as rows and the number of group frames N as columns. The received frames are filled into the corresponding positions according to (G_id, F_id).

[0073] For example, the receiving end can construct an empty matrix in memory, where the number of rows is determined by the total number of groups G in the packet header, and the number of columns is determined by the number of group frames N. Upon receiving a data frame, the receiving end fills the corresponding (G_id, F_id) positions in the matrix with the G_id (group ID) and F_id (frame number within the group) from its packet header.

[0074] In this embodiment, data fragmentation and packet header design are performed. The sending end packages the packet header according to timestamp, message ID, message count, data length, total number of groups, number of group frames, number of signal frames, checksum, etc. This allows the receiving end to verify the reliability and stability of data transmission.

[0075] In some embodiments, ID break detection is performed based on the message ID of the UDP packet according to the fragmentation and reassembly matrix, including: obtaining the message ID of the UDP packet; determining the previous valid message ID based on the fragmentation and reassembly matrix; comparing the message ID of the UDP packet with the previous valid message ID plus 1; and determining that an ID break has occurred when the message ID of the UDP packet is greater than the previous valid message ID plus 1.

[0076] In some embodiments, when a fragment ID break is detected, the number of lost message IDs is calculated, and a decision is made on whether to initiate a directed retransmission request to the sender based on the number of lost message IDs. This includes: when a fragment ID break is detected, calculating the number of lost message IDs based on the message ID of the UDP packet and the previous valid message ID; comparing the number of lost message IDs with a preset tolerance window value; and when the number of lost message IDs is greater than or equal to 1 and less than or equal to the preset tolerance window value, initiating a directed retransmission request for the lost message IDs to the sender.

[0077] Specifically, the ID fragmentation detection algorithm is as follows: when the receiver detects that the difference between the current message ID and the previous message ID is greater than 1, it calculates the number of lost message IDs; if the number of lost message IDs does not exceed the preset tolerance window value, it requests the sender to retransmit the data fragments corresponding to the lost message IDs.

[0078] For example, such as Figure 3 As shown, the detection condition is: when the receiving end obtains the message ID (current_id) of the current data packet (UDP data packet), if its value is greater than the previous valid message ID (last_id) plus 1 (i.e., current_id > last_id + 1), then an ID gap is determined to have occurred. Figure 3 As shown, the fault gap is calculated by: calculating the number of lost message IDs, gap_size: gap_size = current_id - last_id - 1. This data (number of lost message IDs) represents the number of consecutive IDs missing between last_id and current_id. Figure 3 As shown, the tolerance window verification is as follows: If gap_size satisfies the following condition: 1 ≤ gap_size ≤ TOLERANCE_WINDOW (for example, the preset tolerance window value TOLERANCE_WINDOW = 3), then a directed retransmission is performed. This ensures that retransmission is triggered only when the number of lost IDs is ≤ 3, avoiding invalid requests caused by instantaneous network jitter. Figure 3 As shown, the targeted retransmission process works as follows: For each lost message ID located between the previous received message ID and the current message ID, a targeted retransmission request is initiated to the sender in ascending order of message ID. This targeted retransmission mechanism in this embodiment achieves three key benefits: first, it accurately locates all missing consecutive IDs between `last_id` and `current_id`; second, it strictly retransmits the lost IDs in sequence to ensure the correct timing of data reassembly at the receiving end; and third, it only retransmits lost fragments (not the entire dataset), reducing network bandwidth waste.

[0079] Specifically, the execution process of the targeted retransmission mechanism includes: Traversing the range of lost message IDs: Starting from last_id+1 and ending at current_id-1, each lost_id is generated sequentially. For example, if last_id=1 and current_id=4, then lost_id=2, 3 are traversed. Initiating a targeted retransmission request: For each lost_id, a retransmission request for that specific message ID is initiated to the sender, requesting the retransmission of the data fragment corresponding to that ID. For example, if a single ID is lost (e.g., ID=2), a retransmission request for ID=2 is immediately initiated; if three IDs are lost consecutively (e.g., ID=2~4), targeted retransmissions for IDs=2, 3, and 4 are initiated; if more than three IDs are lost (e.g., ID=2~5), it is determined to be a network failure, and no retransmission is triggered. Intra-group continuity verification: When a group receives N frames, the frame number F is verified to be continuous (0→1→2→...→N-1); if the frame number is broken, the group verification is marked as failed and a retransmission is requested.

[0080] In this embodiment, a fragmentation ID and a counter are set. After receiving data, the receiving end uses the ID to segment the data and confirms whether the received UDP data is complete. If an ID fragmentation occurs, a counter and checksum can be used for verification to check whether the data transmission is normal.

[0081] In this embodiment, a structured header including timestamp, message ID, packet information, and checksum is designed at the sending end, and a fragmentation reassembly matrix and ID fragmentation detection algorithm are constructed at the receiving end. Through the CRC16 checksum in the packet header, the receiving end can quickly verify key fields, promptly identify and discard corrupted data packets, ensuring the accuracy of data processing. Utilizing the definitions of message ID, total number of groups, and number of group frames, the receiving end can reassemble scattered UDP data packets in an orderly manner, effectively solving the out-of-order problem in UDP transmission. The introduction of ID fragmentation detection and targeted retransmission mechanisms allows for precise retransmission of lost fragments within a tolerance window, ensuring the integrity of critical data while avoiding invalid full retransmissions caused by instantaneous network jitter, achieving near-reliable transmission over the UDP protocol.

[0082] In some embodiments, if a directed retransmission request is initiated, the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request is received.

[0083] Specifically, when the number of lost message IDs meets a preset tolerance window value, the receiving end initiates a directed retransmission request for the lost message IDs to the sending end (directed retransmission execution). For example, the receiving end initiates a directed retransmission request to the sending end for each lost message ID located between the previous valid message ID and the message ID of the current data packet, in ascending order of message ID. The sending end receives the directed retransmission request and retransmits the UDP data packet corresponding to the lost message ID to the receiving end.

[0084] In some embodiments, the method further includes: receiving a full packet or an incremental packet transmitted by the sending end; wherein the full packet includes road network topology, lane lines, and static markings, and the incremental packet includes change signals, the change signals including traffic light status and construction zone coordinates.

[0085] For example, the sending end generates a full packet or an incremental packet based on changes in the map data, and transmits the full packet or the incremental packet (incremental-full parallel transmission). For instance, the sending end constructs a full packet including road network topology, lane lines, and static signs; the sending end constructs an incremental packet including changed signals, such as traffic light status and construction zone coordinates; the sending end calculates the size S of the incremental packet. 增 The calculation formula is S 增 =Metadata + Σ(Δ_i × W_i).

[0086] Specifically, such as Figure 2 As shown, incremental-full parallel transmission (bandwidth compression) is employed. The packet types and structures are shown in Table 2 below:

[0087] Table 2

[0088]

[0089] Incremental packet size: S 增 =Metadata + Σ(Δ_i × W_i); where metadata includes timestamp + version number + change range, with a fixed length of 200 bytes; Δ_i represents the encoding length of the changed field (bytes); W_i represents the field weight (e.g., traffic light = 1.0, lane line = 0.3, construction zone = 0.8). In one example, for a construction zone update: Δ_i = 50, W_i = 0.8 → incremental packet size = 200 + 50 × 0.8 = 240 bytes.

[0090] Understandably, the sending end dynamically selects between full and incremental packets for map data transmission based on changes in the data content. The sending end can define three packet types, assembled according to the actual scenario. The full packet includes complete road network topology, lane lines, and static signage information; this type of packet can be used for initial transmission or data synchronization, and its size is approximately 2500 bytes. The incremental packet includes changed signal information, such as traffic light status changes and construction zone coordinates; this type of packet can be used for periodic updates, and its size is approximately 50 bytes. Metadata includes timestamps, version numbers, and descriptions of the change range, serving as the header information of the incremental packet, with a fixed length of 200 bytes. The sending end calculates the size of the incremental packet based on the characteristics of the changed fields and encapsulates it. For example, when sending construction zone update information, if the changed field encoding length Δ_i = 50 and the weight W_i = 0.8, then the incremental packet size = 200 + 50 × 0.8 = 240 bytes. The sending end sends this 240-byte incremental packet to the receiving end, achieving low-cost map data updates.

[0091] In this embodiment, a mechanism of parallel incremental and full updates is adopted. The first packet contains full data, and subsequent packets are transmitted incrementally. Full packets are transmitted at specific times, such as at the beginning of transmission or when synchronization is required, while incremental packets are transmitted at other times, such as during periodic updates. Differential bandwidth compression is achieved by dynamically compressing incremental data using the formula Size_delta=200+Σ(Δ_i×W_i).

[0092] It should be noted that the sending end calculates the incremental packet size S. 增 Then, this value is filled into the "Data Length" field in the packet header. When the receiving end parses the packet header, it reads this field to know from which position in the UDP packet to start reading the map data, and whether the data is full or incremental. In this embodiment, by compressing the 2500-byte full packet into a 300-byte incremental packet, the data volume of a single transmission is significantly reduced. If a large packet of 2500 bytes is transmitted, once an ID gap (packet loss) occurs, 2500 bytes of data need to be retransmitted, which would instantly consume bandwidth. Due to the parallel mechanism of incremental and full updates, packet loss usually only results in the loss of 300 bytes of incremental data. When performing targeted retransmission, retransmitting 300 bytes is very fast and has almost no impact on the arrival of subsequent data. The small packet characteristic generated by the parallel mechanism of incremental and full updates in this embodiment makes the retransmission mechanism lightweight and efficient, thereby ensuring the feasibility of ID gap detection and recovery in bandwidth-constrained environments.

[0093] In this embodiment, a transmission strategy of transmitting the entire first packet of data followed by incremental updates for subsequent packets is adopted. The sending end packages changed signals, such as traffic light status, construction zone coordinates, and necessary metadata, for transmission, significantly reducing the size of a single UDP packet. For example, the size of a UDP packet within a 2-kilometer range on a highway can be reduced from approximately 2500 bytes to around 300 bytes, significantly saving network bandwidth, reducing data transmission costs, reducing the risk of network congestion, improving overall communication efficiency, and allowing limited bandwidth resources to serve more control signals with higher real-time requirements.

[0094] In the above technical solution of this embodiment, a multi-dimensional packet header structure is designed, which integrates timestamp + message ID + frame coordinates for the first time to achieve accurate fragmentation positioning and out-of-order reassembly; an ID fault detection algorithm based on tolerance window is adopted to achieve fast fault recovery, thereby improving retransmission efficiency by 4 times; incremental data is dynamically compressed through the formula Size_delta=200+Σ(Δ_i×W_i) to achieve differential bandwidth compression.

[0095] The UDP data transmission method provided in this embodiment includes: responding to a received UDP data packet, fragmenting and reassembling the UDP data packet to obtain a fragmentation and reassembly matrix; performing ID fragmentation detection based on the fragmentation and reassembly matrix and the message ID of the UDP data packet; when a fragmentation ID fragmentation is detected, calculating the number of lost message IDs, and determining whether to initiate a directed retransmission request to the sending end based on the number of lost message IDs; if a directed retransmission request is initiated, receiving the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request. In this invention, after receiving data, the receiving end confirms the integrity of the received UDP data packet through ID fragmentation. By introducing an ID fragmentation detection and directed retransmission mechanism, accurate retransmission of lost fragments can be performed, ensuring the integrity of critical data and avoiding invalid full retransmissions caused by instantaneous network jitter. This achieves near-reliable transmission on the UDP protocol, enables rapid fragmentation recovery, and improves retransmission efficiency by 4 times.

[0096] Reference Figure 4 , Figure 4 This is a structural block diagram of an embodiment of the UDP data transmission system of the present invention. Figure 4 As shown, the UDP data transmission system includes a receiver and a sender; wherein, the receiver includes:

[0097] The fragmentation and reassembly module 10 is used to fragment and reassemble the received UDP data packets in response to obtain a fragmentation and reassembly matrix.

[0098] ID Fragmentation Detection Module 20 is used to perform ID fragmentation detection based on the message ID of the UDP data packet according to the fragmentation reassembly matrix.

[0099] The directed retransmission request module 30 is used to calculate the number of lost message IDs when a fragment ID gap is detected, and determine whether to initiate a directed retransmission request to the sending end based on the number of lost message IDs.

[0100] The directed retransmission execution module 40 is used to receive the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request if a directed retransmission request is initiated.

[0101] In some embodiments, the sending end is used to perform structured encapsulation of the packet header to construct a UDP data packet including a timestamp, message ID, fragment group parameters, and checksum;

[0102] The sending end is also used to receive the directed retransmission request and retransmit the UDP data packet corresponding to the lost message ID to the receiving end;

[0103] The transmitting end is also used to construct a full packet based on the road network topology, lane lines and static signs or to construct an incremental packet based on the change signal, and to send the full packet or incremental packet to the receiving end.

[0104] The UDP data transmission system provided in this embodiment employs data fragmentation and packet header design. The sending end packages the packet header with timestamps, message IDs, message counts, data lengths, total number of groups, number of group frames, number of signal frames, and checksums. This allows the receiving end to verify the reliability and stability of data transmission. Fragment IDs and counters are set. After receiving data, the receiving end uses ID fragmentation to confirm the integrity of the received UDP data. If ID gaps occur, the counter and checksum can be used for verification to check if the data transmission is normal. Parallel incremental and full update map data transmission is used. By employing a method of transmitting full data in the first packet and incremental data in subsequent packets, the size of each UDP packet within 2 kilometers on highways can be reduced from 2500 bytes to approximately 300 bytes, effectively reducing map bandwidth and costs.

[0105] In addition, for technical details not described in detail in this embodiment of the UDP data transmission system, please refer to the UDP data transmission method provided in any embodiment of the present invention, which will not be repeated here.

[0106] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 5As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the UDP data transmission methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.

[0107] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).

[0108] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.

[0109] In some embodiments, the one or more processors 101 include a field-programmable gate array.

[0110] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the UDP data transmission methods described in the above embodiments. The computer-readable storage medium may be volatile or non-volatile.

[0111] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described UDP data transmission method.

[0112] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0113] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0114] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0115] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0116] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0117] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0118] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0119] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0121] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A UDP data transmission method, characterized in that, include: In response to a received UDP packet, the UDP packet is fragmented and reassembled to obtain a fragmentation and reassembly matrix; Based on the fragmentation and reassembly matrix, ID fragmentation detection is performed according to the message ID of the UDP data packet; When a fragment ID break is detected, the number of lost message IDs is calculated, and a decision is made based on the number of lost message IDs to determine whether to initiate a directed retransmission request to the sender. If a directed retransmission request is initiated, the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request is received.

2. The method according to claim 1, characterized in that, The header of the UDP packet is a structured encapsulation, which includes a timestamp, message ID, fragment group parameters, and checksum.

3. The method according to claim 1, characterized in that, In response to a received UDP packet, the UDP packet is fragmented and reassembled to obtain a fragmentation and reassembly matrix, including: In response to a received UDP packet, extract the fragmentation parameters of the UDP packet; The total number of groups and the number of frames per group are obtained based on the fragmentation group parameters; Construct an empty matrix with the total number of groups as rows and the number of group frames as columns; The fragmentation and reassembly matrix is ​​obtained by filling the corresponding positions in the empty matrix with the group ID and signal frame number of the UDP data packet.

4. The method according to claim 1, characterized in that, The step of performing ID fragmentation detection based on the message ID of the UDP packet using the fragmentation reassembly matrix includes: Obtain the message ID of the UDP packet; The ID of the previous valid message is determined based on the fragmentation and reassembly matrix; Compare the message ID of the UDP packet with the previous valid message ID plus 1; When the message ID of the UDP packet is greater than the previous valid message ID plus 1, an ID gap is determined to have occurred.

5. The method according to claim 1, characterized in that, When a fragment ID gap is detected, the number of lost message IDs is calculated, and a decision is made based on the number of lost message IDs to determine whether to initiate a directed retransmission request to the sender, including: When a fragment ID break is detected, the number of lost message IDs is calculated based on the message ID of the UDP packet and the previous valid message ID. Compare the number of lost message IDs with a preset tolerance window value; When the number of lost message IDs is greater than or equal to 1 and less than or equal to the preset tolerance window value, a targeted retransmission request for the lost message IDs is initiated to the sending end.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Receive full packets or incremental packets transmitted by the sending end; wherein, the full packet includes road network topology, lane lines, and static signs, and the incremental packet includes change signals, the change signals including traffic light status and construction zone coordinates.

7. A UDP data transmission system, characterized in that, It includes a receiving end and a sending end; wherein, the receiving end includes: The fragmentation and reassembly module is used to fragment and reassemble the received UDP data packets in response to obtain a fragmentation and reassembly matrix. The ID fragmentation detection module is used to perform ID fragmentation detection based on the message ID of the UDP data packet according to the fragmentation reassembly matrix. The directed retransmission request module is used to calculate the number of lost message IDs when a fragment ID gap is detected, and to determine whether to initiate a directed retransmission request to the sender based on the number of lost message IDs. The directed retransmission execution module is used to receive the UDP data packet corresponding to the lost message ID sent by the sending end based on the directed retransmission request if a directed retransmission request is initiated.

8. The system according to claim 7, characterized in that, The sending end is used to perform structured encapsulation of the packet header to construct a UDP data packet including timestamp, message ID, fragment group parameters and checksum; The sending end is also used to receive the directed retransmission request and retransmit the UDP data packet corresponding to the lost message ID to the receiving end; The transmitting end is also used to construct a full packet based on the road network topology, lane lines and static signs or to construct an incremental packet based on the change signal, and to send the full packet or incremental packet to the receiving end.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.