Network transmission method, readable storage medium and intelligent equipment

By combining UDP multicast and TCP transmission channels in the autonomous driving system, the high overhead problem of network and CPU resources in the advanced driving assistance system is solved, and low-traffic, low-latency and high-reliability data transmission is achieved.

CN118740748APending Publication Date: 2024-10-01安徽蔚来智驾科技有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410714011.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In advanced driving assistance systems, existing communication middleware has problems with excessive traffic overhead and increased latency in autonomous driving scenarios with limited network and computing resources. In particular, repeated sending and receiving traffic between multiple SOCs causes network Traffic and CPU overhead increase, and the multicast communication reliability and ease of use of DDS are insufficient.

Method used

Adopting a combination scheme of UDP multicast transmission channel and TCP transmission channel, the UDP multicast channel is used for one-to-many one-way communication, and the TCP channel is used for two-way communication and retransmission of lost frame data, and responds through the cache unit and lost frame response mechanism to ensure the reliability and efficiency of data transmission.

Benefits of technology

It effectively reduces CPU overhead and latency, achieves lower traffic transmission, and ensures the reliability of data transmission. It combines the advantages of UDP multicast and TCP transmission, and is suitable for autonomous driving scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740748A_ABST
    Figure CN118740748A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a network transmission method, a readable storage medium and intelligent equipment, and aims to solve the technical problem of how to realize lower traffic, lower CPU overhead and lower delay on the premise of ensuring the reliability of a network transmission process. In order to achieve the purpose, a sending end and a receiving end are in communication connection through a UDP multicast transmission channel and a TCP transmission channel, and the UDP multicast transmission channel is a one-to-many one-way communication channel based on a UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on a TCP transmission protocol. The UDP multicast transmission channel is used for transmitting the transmitted transmission data to at least one receiving end, and the TCP transmission channel is used for feeding back a frame loss response to the transmitting end when the receiving end detects frame loss of the transmission data and retransmitting the transmission data corresponding to the frame loss response by the transmitting end. The advantages of TCP transmission and UDP multicast transmission are effectively combined, the reliability of the transmission process is ensured, and the flow and the CPU are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network transmission method, a readable storage medium and an intelligent device. Background Art

[0002] As the functions of advanced driver assistance systems are gaining more and more attention, the importance of communication middleware as its core basic component is becoming more and more prominent. In the current ADAS (Advanced Driving Assistance System) system, most communication middleware adopts TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) unicast communication scheme, and the sending and receiving of messages are one-to-one at the kernel layer. Although this scheme can meet the basic message sending and receiving needs, it has the problem of excessive overhead in the scenario of autonomous driving with limited network and computing resources and large business volume, especially in the scenario of multiple SOCs (system-on-chips) with one send and multiple receive, which leads to the increase of network traffic, CPU (Central Processing Unit) overhead and latency. Some DDS (Data Distribution Service) manufacturers have extended support for multicast communication, but its reliability, scalability and ease of use are still problematic.

[0003] Accordingly, the art needs a new network transmission solution to solve the above problems. Summary of the invention

[0004] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of how to achieve lower traffic, lower CPU overhead and lower latency while ensuring the reliability of the network transmission process.

[0005] In a first aspect, a network transmission method is provided, the method being applied to a sending end, the method comprising:

[0006] Transmitting transmission data to at least one receiving end based on a UDP multicast transmission channel; the transmitting end and the receiving end are connected in communication through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0007] In response to a frame loss acknowledgment response sent by the receiving end to the sending end through a TCP transmission channel, the transmission data corresponding to the frame loss acknowledgment response is retransmitted to the receiving end based on the TCP transmission channel; the frame loss acknowledgment response is feedback information sent by the receiving end to the sending end when the receiving end detects that frame loss exists in the transmission data.

[0008] In a technical solution of the above network transmission method, the sending end includes a cache unit, and the cache unit is used to cache the transmission data that has been sent based on the UDP multicast transmission channel;

[0009] The retransmitting the transmission data corresponding to the frame loss acknowledgement response to the receiving end based on the TCP transmission channel includes:

[0010] The transmission data corresponding to the frame loss acknowledgment response is obtained from the cache unit, and the transmission data is retransmitted to the receiving end based on the TCP transmission channel.

[0011] In a technical solution of the above network transmission method, the method further includes:

[0012] When the transmission data corresponding to the frame loss acknowledgment response is lost, a transmission data missing response is sent to the sending end based on the TCP transmission channel.

[0013] In a second aspect, another network transmission method is provided, the method being applied to a receiving end, the method comprising:

[0014] The transmission data sent by the sender is received through the UDP multicast transmission channel; the sender and the receiver are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0015] When frame loss is detected in the transmission data, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel; and transmission data corresponding to the frame loss acknowledgment response retransmitted by the sending end based on the TCP transmission channel is received.

[0016] In a technical solution of the above network transmission method, the transmission data includes a data frame, and the data frame includes a data frame number;

[0017] When it is detected that frame loss exists in the transmission data, sending a frame loss acknowledgement response to the sending end through the TCP transmission channel includes:

[0018] When it is detected that the data frame numbers of the currently received transmission data and the transmission data received in the previous frame are discontinuous, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel.

[0019] In a technical solution of the above network transmission method, the method further includes:

[0020] If the data frame numbers of the currently received transmission data are not continuous with those of the transmission data received in the previous frame, the currently received transmission data is cached to wait for the receiving end to retransmit the transmission data corresponding to the frame loss acknowledgment response.

[0021] In a technical solution of the above network transmission method, after sending the frame loss acknowledgement response to the sending end through the TCP transmission channel, the method further includes:

[0022] When receiving a transmission data missing response sent by the sender to the sender based on the TCP transmission channel, it is determined that the transmission data corresponding to the frame loss acknowledgment response has been lost, and the transmission data corresponding to the frame loss acknowledgment response is no longer waited.

[0023] In a technical solution of the above network transmission method, the transmission data also includes data fragments, multiple data fragments are spliced ​​into a data frame, and the data fragment includes a frame number of the data frame and a fragment sequence number in the data frame;

[0024] The receiving transmission data sent by the transmitting end includes:

[0025] The data fragments are received, and according to the fragment sequence numbers, the received data fragments are spliced ​​to obtain the data frame.

[0026] In a technical solution of the above network transmission method, the receiving transmission data sent by the transmitting end includes:

[0027] If transmission data having a continuous data frame number with that of a previous frame is received, the received transmission data is sent to an upper layer user of the receiving end;

[0028] If the currently received transmission data has a data frame number that is repeated with the historically received transmission data or the data frame number of the received transmission data exceeds a preset range, the received transmission data is discarded.

[0029] In a third aspect, a third network transmission method is provided, the method comprising:

[0030] The transmission data sent by the sending end to at least one receiving end through the UDP multicast transmission channel; the sending end and the receiving end are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0031] The receiving end receives the transmission data;

[0032] When the receiving end detects that frame loss exists in the transmission data, the receiving end sends a frame loss acknowledgement response to the sending end through the TCP transmission channel;

[0033] The sending end, in response to the frame loss acknowledgment response, retransmits the transmission data corresponding to the frame loss acknowledgment response to the receiving end based on the TCP transmission channel;

[0034] The receiving end receives the retransmitted transmission data.

[0035] In a fourth aspect, a smart device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned network transmission method is implemented.

[0036] In a fifth aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned network transmission method.

[0037] Solution 1. A network transmission method, characterized in that the method is applied to a sending end, and the method comprises:

[0038] Transmitting transmission data to at least one receiving end based on a UDP multicast transmission channel; the transmitting end and the receiving end are connected in communication through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0039] In response to a frame loss acknowledgment response sent by the receiving end to the sending end through a TCP transmission channel, the transmission data corresponding to the frame loss acknowledgment response is retransmitted to the receiving end based on the TCP transmission channel; the frame loss acknowledgment response is feedback information sent by the receiving end to the sending end when the receiving end detects that frame loss exists in the transmission data.

[0040] Solution 2. The network transmission method according to Solution 1 is characterized in that the sending end includes a cache unit, and the cache unit is used to cache the transmission data that has been sent based on the UDP multicast transmission channel;

[0041] The retransmitting the transmission data corresponding to the frame loss acknowledgement response to the receiving end based on the TCP transmission channel includes:

[0042] The transmission data corresponding to the frame loss acknowledgment response is obtained from the cache unit, and the transmission data is retransmitted to the receiving end based on the TCP transmission channel.

[0043] Solution 3. The network transmission method according to Solution 1 or 2, characterized in that the method further comprises:

[0044] When the transmission data corresponding to the frame loss acknowledgment response is lost, a transmission data missing response is sent to the sending end based on the TCP transmission channel.

[0045] Solution 4. A network transmission method, characterized in that the method is applied to a receiving end, and the method comprises:

[0046] The transmission data sent by the sender is received through the UDP multicast transmission channel; the sender and the receiver are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0047] When frame loss is detected in the transmission data, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel; and transmission data corresponding to the frame loss acknowledgment response retransmitted by the sending end based on the TCP transmission channel is received.

[0048] Solution 5. The network transmission method according to Solution 4, characterized in that the transmission data includes a data frame, and the data frame includes a data frame number;

[0049] When it is detected that frame loss exists in the transmission data, sending a frame loss acknowledgement response to the sending end through the TCP transmission channel includes:

[0050] When it is detected that the data frame numbers of the currently received transmission data and the transmission data received in the previous frame are discontinuous, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel.

[0051] Solution 6. The network transmission method according to Solution 5, characterized in that the method further comprises:

[0052] If the data frame numbers of the currently received transmission data are not continuous with those of the transmission data received in the previous frame, the currently received transmission data is cached to wait for the receiving end to retransmit the transmission data corresponding to the frame loss acknowledgment response.

[0053] Solution 7. The network transmission method according to Solution 6 is characterized in that:

[0054] After sending a frame loss acknowledgement response to the sending end through the TCP transmission channel, the method further includes:

[0055] When receiving a transmission data missing response sent by the sending end to the sending end based on the TCP transmission channel, it is determined that the transmission data corresponding to the frame loss acknowledgment response has been lost, and the transmission data corresponding to the frame loss acknowledgment response is no longer waited.

[0056] Solution 8. The network transmission method according to any one of solutions 4 to 6, characterized in that the transmission data also includes data fragments, multiple data fragments are spliced ​​into a data frame, and the data fragment includes a frame number of the data frame and a fragment sequence number in the data frame;

[0057] The receiving transmission data sent by the transmitting end includes:

[0058] The data fragments are received, and according to the fragment sequence numbers, the received data fragments are spliced ​​to obtain the data frame.

[0059] Solution 9. The network transmission method according to any one of Solutions 4 to 6, characterized in that:

[0060] The receiving transmission data sent by the transmitting end includes:

[0061] If transmission data having a continuous data frame number with that of a previous frame is received, the received transmission data is sent to an upper layer user of the receiving end;

[0062] If the currently received transmission data has a data frame number that is repeated with the transmission data received in the past or the data frame number of the received transmission data exceeds a preset range, the received transmission data is discarded.

[0063] Solution 10. A network transmission method, characterized in that the method comprises:

[0064] The transmission data sent by the sending end to at least one receiving end through the UDP multicast transmission channel; the sending end and the receiving end are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol;

[0065] The receiving end receives the transmission data;

[0066] When the receiving end detects that frame loss exists in the transmission data, the receiving end sends a frame loss acknowledgement response to the sending end through the TCP transmission channel;

[0067] The sending end, in response to the frame loss acknowledgment response, retransmits the transmission data corresponding to the frame loss acknowledgment response to the receiving end based on the TCP transmission channel;

[0068] The receiving end receives the retransmitted transmission data.

[0069] Solution 11. A smart device, comprising:

[0070] at least one processor;

[0071] and, a memory communicatively coupled to the at least one processor;

[0072] The memory stores a computer program, and when the computer program is executed by the at least one processor, the network transmission method described in any one of Schemes 1 to 10 is implemented.

[0073] Solution 12. A computer-readable storage medium storing a plurality of program codes, characterized in that the program codes are suitable for being loaded and run by a processor to execute the network transmission method described in any one of Solutions 1 to 10.

[0074] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:

[0075] In the implementation of the network transmission technical solution provided by the present application, the sender and the receiver of the present application are connected through the UDP multicast transmission channel and the TCP transmission channel. The UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol. The UDP multicast transmission channel is used to transmit the transmitted transmission data to at least one receiving end, and the TCP transmission channel is used to feedback the frame loss response to the sender when the receiving end detects that the transmission data frame is lost, and the sender retransmits the transmission data corresponding to the frame loss response. Through the above configuration, the present application effectively utilizes the advantages of low CPU overhead, low latency and traffic saving in the one-to-many transmission process based on the UDP multicast transmission channel. At the same time, the connection relationship between the sender and the receiver is maintained based on the TCP transmission channel, and the retransmission of the lost frame data can be ensured, thereby realizing the bottom line of the unreliable transmission of the UDP multicast transmission channel based on the TCP transmission channel, thereby ensuring the reliability of the transmission process, and effectively combining the advantages of TCP transmission and UDP multicast transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:

[0077] Figure 1 It is a flowchart of the main steps of a network transmission method according to an embodiment of the present application;

[0078] Figure 2 It is a schematic diagram of a connection relationship between a sending end and a receiving end through a UDP multicast transmission channel and a TCP transmission channel communication connection according to an implementation method of an embodiment of the present application;

[0079] Figure 3 It is a schematic diagram of the main interaction process of the network transmission method according to an implementation method of an embodiment of the present application;

[0080] Figure 4 It is a schematic diagram of the main interaction process of the frame loss and retransmission process between the transmitting end and the receiving end according to an implementation method of an embodiment of the present application;

[0081] Figure 5 It is a schematic diagram of a main implementation strategy for maintaining the order of transmitted data at a receiving end according to an implementation method of an embodiment of the present application;

[0082] Figure 6 It is a flowchart of the main steps of maintaining the order of transmitted data at the receiving end according to an implementation method of an embodiment of the present application;

[0083] Figure 7 It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application.

[0084] Reference numerals:

[0085] 11: memory; 12: processor; 21: transmitter; 22: receiver. DETAILED DESCRIPTION

[0086] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0087] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.

[0088] The relevant user personal information that may be involved in the embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0089] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.

[0090] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0091] Here we first explain some terms involved in this application.

[0092] Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte stream-based transport layer communication protocol.

[0093] User Datagram Protocol (UDP) provides a method for applications to send encapsulated IP data packets without establishing a connection. UDP transmission includes three transmission modes: unicast, broadcast and multicast.

[0094] Among them, multicast is a one-to-one communication mode, and only the receiving ends that join the same group can receive all the data in the group.

[0095] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of a network transmission method according to an embodiment of the present application. Figure 1 As shown, the network transmission method in the embodiment of the present application mainly includes the following steps S101 to S105.

[0096] Step S101: The transmission data sent by the sending end to at least one receiving end through the UDP multicast transmission channel; the sending end and the receiving end are connected through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol.

[0097] In this embodiment, the sending end and the receiving end are connected by a UDP multicast transmission channel and a TCP transmission channel. The UDP multicast transmission channel is a one-to-many, unidirectional, connectionless communication channel for sending transmission data (also called "multicast data") from the sending end to the receiving end. The TCP transmission channel is a one-to-one, bidirectional communication channel for maintaining the connection relationship between the sending end and the receiving end and retransmitting data. Among them, the UDP multicast transmission channel and the TCP transmission channel can be established based on the commonly used methods in the prior art, and this application does not limit this.

[0098] In one implementation, the transmission data may include a data frame (Data), a data fragment (Frag), etc., wherein the data frame may include a data frame number, and the data fragment may include the data frame number and a fragment sequence number of the data fragment in the data frame.

[0099] In one implementation, the sender and the receiver may be in the same local area network. In some cases, by extending the multicast routing of the UDP multicast transmission channel, data transmission across local area networks may be achieved between the sender and the receiver.

[0100] In one embodiment, the transmitting end and the receiving end may be different electronic devices capable of deploying an operating system. For example, in an intelligent driving application scenario, the transmitting end and the receiving end may be different intelligent driving computing platforms or system-level chips (such as SOCs), and the intelligent driving computing platforms or system-level chips may be deployed with an operating system.

[0101] Step S102: The receiving end receives the transmission data.

[0102] In this embodiment, the receiving end may receive the transmission data sent by the sending end based on the UDP multicast communication channel.

[0103] In one implementation, if the transmission data is data fragments, the data fragments at the receiving end may be spliced ​​into data frames according to the data fragments at the receiving end and the fragment sequence numbers of the data fragments.

[0104] Step S103: When the receiving end detects that frame loss exists in the transmission data, the receiving end sends a frame loss acknowledgement response to the sending end through the TCP transmission channel.

[0105] In this embodiment, the receiving end detects whether there is frame loss in the received transmission data. If there is frame loss, a frame loss acknowledgement response (Nack) can be sent to the sending end through the TCP transmission channel to remind the sending end to retransmit the transmission data with frame loss. That is, the receiving end does not need to send an acknowledgement response (Ack) for each frame of data, but only sends a frame loss acknowledgement response when there is frame loss, which effectively saves traffic and CPU overhead.

[0106] In one implementation, if the data frame number of the transmission data received by the receiving end is not continuous with the data frame number of the transmission data received in the previous frame, it can be determined that the transmission data is lost, and the receiving end can send a frame loss response to the sending end through the TCP transmission channel. The process of determining frame loss does not need to rely on a timer, nor does it need to dynamically measure the round-trip time of the transmission. The receiving end only needs to determine the frame loss based on the data frame number of the previous frame transmission data and the data frame number of the current frame transmission data. The frame loss determination process is very simple, lightweight, and efficient, which can further save CPU overhead.

[0107] In one implementation, if the data frame number of the currently received transmission data is not continuous with the data frame number of the transmission data received in the previous frame, the receiving end may cache the currently received transmission data to wait for the receiving end to retransmit the transmission data corresponding to the frame loss acknowledgment response. The receiving end may be provided with a cache unit for caching the transmission data. The cache unit may be a device such as a memory.

[0108] In one embodiment, when the transmission data is a data frame, the frame loss response may include the data frame number of the data frame where the frame is lost. When the transmission data is a data fragment, the frame loss response may include the data frame number of the data frame where the data fragment where lost is located and the fragment sequence number of the data fragment in the data frame.

[0109] Step S104: In response to the frame loss acknowledgment response, the sending end retransmits the transmission data corresponding to the frame loss acknowledgment response to the receiving end based on the TCP transmission channel.

[0110] In this embodiment, when the sending end receives the frame loss acknowledgment response from the receiving end, the transmission data corresponding to the frame loss acknowledgment response can be retransmitted to the receiving end through the TCP transmission channel. In this way, the receiving end performs the frame loss determination, and the sending end completes the retransmission action of the transmission data, so that in the process of frame loss retransmission, the sending end and the receiving end are decoupled. Among them, retransmission refers to resending.

[0111] In one implementation, the transmission data may be retransmitted based on the data frame number of the data frame included in the frame loss acknowledgment response.

[0112] In one embodiment, the sending end may be provided with a cache unit (ReliableBuffer), which is used to cache the transmission data that has been sent based on the UDP multicast transmission channel to meet the need for frame loss retransmission. If the sending end receives a frame loss response sent by the receiving end, the corresponding transmission data can be obtained from the cache unit, and the transmission data can be retransmitted to the receiving end based on the TCP transmission channel. The cache unit can be a device such as a memory.

[0113] In one implementation, if the transmission data corresponding to the frame loss acknowledgment response of the sender is lost, the sender can send a transmission data gap response (Gap) to the sender based on the TCP transmission channel, and notify the receiving end through the transmission data gap response that it no longer needs to wait for the transmission data corresponding to the frame loss acknowledgment response.

[0114] Step S105: The receiving end receives the retransmitted transmission data.

[0115] In this embodiment, the receiving end may receive the retransmitted transmission data through the TCP transmission channel.

[0116] In one embodiment, please refer to the attached Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a main implementation strategy for maintaining the order of transmitted data at a receiving end according to an implementation method of an embodiment of the present application. Figure 5 As shown, if the receiving end receives data frames with continuous data frame numbers, it can be immediately output to the upper-layer user of the receiving end; for the received data fragments, if the data frame numbers are continuous with the data fragments of the previous frame, it can wait for the data fragments to be spliced ​​into data frames before outputting them to the upper-layer user; if the receiving end receives transmission data (including data frames and data fragments) with discontinuous frame numbers, it is considered that there is frame loss, and the sending end can be requested to retransmit through Nack; the currently received transmission data can be cached to wait for the transmission data of the retransmission of the lost frame. Among them, the upper-layer user is the upper application layer that consumes the transmission data.

[0117] In one implementation, when a transmission data missing response is received from the transmitting end, it can be determined that the transmission data corresponding to the frame loss acknowledgment response has been lost, and the transmission data corresponding to the frame loss acknowledgment response is no longer waited for.

[0118] In one implementation, if the receiving end currently receives transmission data that duplicates the data frame number of the transmission data received historically or the data frame number of the received transmission data exceeds a preset range, the received transmission data is discarded. The preset range may be a set queue length for the transmission data. That is, if the currently received transmission data has been sent to an upper-layer user; or the frame number is too old and exceeds the set queue length, the transmission data may be discarded. Setting the queue length can eliminate the need to wait for transmission data that has not been received for a long time, and can effectively improve the fault tolerance of the system. For example, in an autonomous driving application scenario, more emphasis is placed on the real-time nature of the transmission data, so setting the queue length, allowing occasional frame losses, and improving fault tolerance are crucial for autonomous driving functions.

[0119] Based on the method described in the above steps S101 to S105, the sender and the receiver of the embodiment of the present application are connected through the UDP multicast transmission channel and the TCP transmission channel. The UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol. The UDP multicast transmission channel is used to transmit the transmitted transmission data to at least one receiving end, and the TCP transmission channel is used to feedback the frame loss response to the sender when the receiving end detects the frame loss of the transmission data, and the sender retransmits the transmission data corresponding to the frame loss response. Through the above configuration, the embodiment of the present application effectively utilizes the advantages of low CPU overhead, low latency and traffic saving in the one-to-many transmission process based on the UDP multicast transmission channel. At the same time, the connection relationship between the sender and the receiver is maintained based on the TCP transmission channel, and the retransmission of the frame loss data can be ensured, thereby realizing the bottom line of the unreliable transmission of the UDP multicast transmission channel based on the TCP transmission channel, thereby ensuring the reliability of the transmission process, and effectively combining the advantages of TCP transmission and UDP multicast transmission.

[0120] In one embodiment, please refer to the attached Figure 6 , Figure 6 FIG. 1 is a flow chart of the main steps of maintaining the order of transmitted data at the receiving end according to an implementation method of an embodiment of the present application. Figure 6 As shown, the receiving end can maintain the order of the transmission data according to steps S201 to S226, so that the receiving end outputs the transmission data with ordered data frame numbers to the upper layer user.

[0121] Step S201: receiving an input message.

[0122] Step S202: Determine the type of the input message; if it is a data frame, execute step S203; if it is a transmission data missing response, execute step S212; if it is a data fragment, execute step S217.

[0123] Step S203: insert data frames and determine whether there is frame loss; if so, execute step S204; if not, execute step S205.

[0124] Step S204: After sending the frame loss acknowledgement response, execute step S205.

[0125] Step S205: Determine whether the main frame number has appeared before; if so, execute step S206; if not, execute step S207.

[0126] Step S206: After allocating the required space, execute step S207.

[0127] Step S207: data filling.

[0128] Step S208: Determine whether there are old frames that need to be discarded; if so, execute step S209; if not, execute step S210.

[0129] Step S209: After discarding, execute step S210.

[0130] Step S210: Determine whether there are continuous and complete data frames; if so, execute step S211; if not, end.

[0131] Step S211: Transmit to upper-layer users.

[0132] Step S212: After inserting the data frame, take up space.

[0133] Step S213: Determine whether there are old frames that need to be discarded; if so, execute step S214; if not, execute step S215.

[0134] Step S214: After discarding, execute step S215.

[0135] Step S215: Determine whether there are continuous and complete data frames; if so, execute step S216; if not, end.

[0136] Step S216: Transmit to upper-layer users.

[0137] Step S217: insert data frames and determine whether there is frame loss; if so, execute step S218; if not, execute step S219.

[0138] Step S218: After sending the frame loss acknowledgment response, execute step S219.

[0139] Step S219: Determine whether the main frame number has appeared before; if so, execute step S220; if not, execute step S221.

[0140] Step S220: After allocating the required space, execute step S221.

[0141] Step S221: Find the address corresponding to the main frame number.

[0142] Step S222: Filling.

[0143] Step S223: Determine whether there are old frames that need to be discarded; if so, execute step S224; if not, execute step S225.

[0144] Step S224: After discarding, execute step S225.

[0145] Step S225: Determine whether there are continuous and complete data frames; if so, execute step S226; if not, end.

[0146] Step S226: Transmit to upper-layer users.

[0147] In this embodiment, the order preservation is performed based on the UDP datagram, that is, each frame of transmitted data (including data frames and data fragments) can achieve independent order preservation. Compared with the normal network environment, the process of preserving the order based on a TCP segment (message segment, 1460 bytes) has a finer granularity and is therefore more accurate and efficient. Compared with the order preservation process in fixed length units during TCP transmission, this application is more suitable for the process of periodically sending and receiving data in autonomous driving scenarios.

[0148] See the attached Figure 2 To Attachment Figure 4 , the network transmission method of the present application is described by taking the application of the network transmission method of the present application in the message subscription-publishing model as an example. Among them, the reference numbers 211 and 212 represent different Writers at the sending end, and 221, 222, and 223 represent different Readers at the receiving end. Figure 2 It is a schematic diagram of a connection relationship between a sending end and a receiving end through a UDP multicast transmission channel and a TCP transmission channel communication connection according to an implementation method of an embodiment of the present application; Figure 3 It is a schematic diagram of the main interaction process of the network transmission method according to an implementation method of an embodiment of the present application; Figure 4 It is a schematic diagram of the main interaction process of frame loss and retransmission between a transmitting end and a receiving end according to an implementation method of an embodiment of the present application.

[0149] like Figure 2As shown, the message subscription-publishing model includes three levels in terms of algorithm: Pub-Sub (subscription-publishing) layer, Writer-Reader (author-reader) layer, and Channel layer.

[0150] The Pub-Sub layer is responsible for providing publish-subscribe APIs (Application Programming Interface) and QoS (Quality of Service) semantics to upper-layer users.

[0151] The Writer-Reader layer is responsible for the logic of message retransmission and order preservation.

[0152] The Channel layer is responsible for the transmission of specific messages, including TcpChannel (TCP transmission channel) and MulticastChannel (UDP multicast transmission channel).

[0153] Each MulticastPublisher can have multiple Writers. Writers are distinguished by different network interfaces. One Writer corresponds to one LAN segment.

[0154] Each Writer has a MulticastChannel and multiple TcpChannels. The number of TcpChannels depends on the number of MulticastSubscribers with the same topic in the same LAN.

[0155] Each MulticastSubscriber can have multiple Readers. The number of Readers depends on the number of MulticastPublishers with the same Topic in the same LAN. Each Reader has a TcpChannel and a MulticastChannel.

[0156] A Writer can correspond to multiple Readers, but each Reader can only have one Writer.

[0157] MulticastChannel is used for one-to-many data transmission within a LAN, while TcpChannel is used for the following two points:

[0158] Maintain the connection between sender and receiver

[0159] Retransmit lost transmission data to provide a backup for unreliable transmission of MulticastChannel.

[0160] Among them, eth0 and eth1 are different network interfaces.

[0161] like Figure 3 As shown in the figure, MulticastChannel is the backbone of data transmission. It is a one-to-many, unidirectional, connectionless communication channel. It undertakes the most important transmission function. Data and Frag are sent through MulticastChannel. TcpChannel is used to maintain connection relationships and retransmit transmission data (to cover Multicast frame loss). It is a one-to-one, bidirectional, connection-oriented communication channel, mainly used to transmit Nack, Gap, and retransmitted Data and Frag. Among them, MulticastPublisher also includes ReliableBuffer (cache unit) to cache Data and Frag that have been sent through MulticastChannel.

[0162] like Figure 4 As shown, the process of frame loss and retransmission includes: frame loss of transmission data sent based on the UDP multicast transmission channel occurs at the network layer, the receiving end finds the frame loss → the receiving end sends Nack to the sending end → the sending end retransmits Data, Frag or Gap.

[0163] In an application scenario according to an embodiment of the present application, the network transmission method of the embodiment of the present application can be applied to a real vehicle network environment of an intelligent vehicle to test multicast communication, wherein the real vehicle network environment is a local area network. Since the probability of frame loss in a local area network environment is extremely low, only when the CPU and network bandwidth are fully utilized (i.e., the CPU is fully loaded or the bandwidth is fully occupied) is there a probability of occurrence of one in a hundred thousand. In this case, it is not worth the cost to confirm and check each frame of data to cover the extremely small probability. At the same time, in a local area network environment, Data and Frag are almost never out of order or repeated, only frame loss occurs. For example, when Sub receives the Nth frame and the N+2th frame, it is almost certainly the N+1th frame that is lost, not out of order. Therefore, the network transmission method using the embodiment of the present application does not need to introduce a timer like a network transmission scheme based on TCP or DDS (Data Distribution Service). Neither the sender nor the receiver needs to perform a timeout judgment on each frame message, nor does it need to dynamically measure the round-trip time, which greatly saves CPU resources. The judgment of frame loss is entirely at the receiving end, and the retransmission action is entirely at the sending end. Therefore, the retransmission logic is decoupled from the sender and the receiver. The frame loss judgment is very simple, lightweight and efficient, and only relies on the continuity of the next frame to judge whether there was a frame loss before, which is suitable for messages with a fixed frequency.

[0164] When the network transmission method of the embodiment of the present application is applied in a simulation environment, compared with the network transmission scheme that only uses TCP for both sending and receiving, the embodiment of the present application has the following advantages:

[0165] 1. In terms of traffic

[0166] The embodiment of the present application significantly reduces cross-board traffic, with the average sending traffic of the four SOCs reduced by 2.6MB / s and the average receiving traffic reduced by 1.4MB / s. In the nop (Navigate on Pilot) mode, the sending traffic of S1 is optimized most significantly, with a direct reduction of 9.6MB / S.

[0167] 2. On CPU usage

[0168] The embodiment of the present application has a lower CPU usage rate than the network transmission scheme that only uses TCP for both sending and receiving. In stress_normal mode, the average total CPU usage of the four SOCs decreases by 1.075%, which is equivalent to an average decrease of 0.1 cores per SOC. In nop mode, the CPU also decreases by 0.1 cores in S1 of the functional domain, and decreases by 0.08 cores in S3. Among them, S1 and S3 are the POS (Power on Suspend) state and Suspend to RAM (suspend to memory) state of the CPU respectively.

[0169] 3. In terms of communication delay

[0170] The embodiment of the present application has a greater latency advantage than a solution that only uses TCP for network transmission between senders and receivers. The end-to-end latency in the measured nop mode is reduced by 3.5ms, and the jitter variance is reduced by 3.5%.

[0171] 4. In terms of reliability and frame loss

[0172] The reliability of data transmission in the autonomous driving (AD) multi-SOC scenario is even better than the solution that only uses TCP for data transmission between the sender and the receiver. Since the bandwidth occupancy of the embodiment of the present application is lower, the probability of triggering congestion and flow control is also greatly reduced, the overall network stability is improved by an order of magnitude, and the frame loss rate measured by HIL simulation has dropped by 93.6%.

[0173] 5. In terms of memory usage

[0174] While other major performance indicators are optimized, the memory overhead of the embodiment of the present application and the solution of using only TCP for network transmission between the sender and the receiver remains basically unchanged.

[0175] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.

[0176] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0177] Another aspect of the present application also provides a computer-readable storage medium.

[0178] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the network transmission method of the above method embodiment, and the program may be loaded and run by a processor to implement the above network transmission method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0179] Another aspect of the present application also provides a smart device.

[0180] In an embodiment of an intelligent device according to the present application, the intelligent device may include at least one processor; and a memory connected to the at least one processor in communication; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. The intelligent device described in the present application may include a driving device, a smart car, a robot, and the like. Figure 7 , Figure 7 FIG. 4 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.

[0181] In some embodiments of the present application, the smart device may further include at least one sensor for sensing information. The sensor is communicatively connected to any type of processor mentioned in the present application. Optionally, the smart device may further include an autonomous driving system for guiding the smart device to drive itself or assist in driving. The processor communicates with the sensor and / or the autonomous driving system to complete the method described in any of the above embodiments.

[0182] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A network transmission method, characterized in that: The method is applied to a transmitting end, and the method comprises: Transmitting transmission data to at least one receiving end based on a UDP multicast transmission channel; the transmitting end and the receiving end are connected in communication through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol; In response to a frame loss acknowledgment response sent by the receiving end to the sending end through a TCP transmission channel, the transmission data corresponding to the frame loss acknowledgment response is retransmitted to the receiving end based on the TCP transmission channel; the frame loss acknowledgment response is feedback information sent by the receiving end to the sending end when the receiving end detects that frame loss exists in the transmission data.

2. The network transmission method according to claim 1, characterized in that: The sending end includes a cache unit, and the cache unit is used to cache the transmission data that has been sent based on the UDP multicast transmission channel; The retransmitting the transmission data corresponding to the frame loss acknowledgement response to the receiving end based on the TCP transmission channel includes: The transmission data corresponding to the frame loss acknowledgment response is obtained from the cache unit, and the transmission data is retransmitted to the receiving end based on the TCP transmission channel.

3. The network transmission method according to claim 1 or 2, characterized in that: The method further comprises: When the transmission data corresponding to the frame loss acknowledgment response is lost, a transmission data missing response is sent to the sending end based on the TCP transmission channel.

4. A network transmission method, characterized in that: The method is applied to a receiving end, and the method comprises: The transmission data sent by the sender is received through the UDP multicast transmission channel; the sender and the receiver are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol; When frame loss is detected in the transmission data, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel; and transmission data corresponding to the frame loss acknowledgment response retransmitted by the sending end based on the TCP transmission channel is received.

5. The network transmission method according to claim 4, characterized in that: The transmission data includes a data frame, and the data frame includes a data frame number; When it is detected that frame loss exists in the transmission data, sending a frame loss acknowledgement response to the sending end through the TCP transmission channel includes: When it is detected that the data frame numbers of the currently received transmission data and the transmission data received in the previous frame are discontinuous, a frame loss acknowledgment response is sent to the sending end through the TCP transmission channel.

6. The network transmission method according to claim 5, characterized in that: The method further comprises: If the data frame numbers of the currently received transmission data are not continuous with those of the transmission data received in the previous frame, the currently received transmission data is cached to wait for the receiving end to retransmit the transmission data corresponding to the frame loss acknowledgment response.

7. The network transmission method according to claim 6, characterized in that: After sending a frame loss acknowledgement response to the sending end through the TCP transmission channel, the method further includes: When receiving a transmission data missing response sent by the sending end to the sending end based on the TCP transmission channel, it is determined that the transmission data corresponding to the frame loss acknowledgment response has been lost, and the transmission data corresponding to the frame loss acknowledgment response is no longer waited.

8. The network transmission method according to any one of claims 4 to 6, characterized in that: The transmission data also includes data fragments, multiple data fragments are spliced ​​into a data frame, and the data fragment includes a frame number of the data frame and a fragment sequence number in the data frame; The receiving transmission data sent by the transmitting end includes: The data fragments are received, and according to the fragment sequence numbers, the received data fragments are spliced ​​to obtain the data frame.

9. The network transmission method according to any one of claims 4 to 6, characterized in that: The receiving transmission data sent by the transmitting end includes: If transmission data having a continuous data frame number with that of a previous frame is received, the received transmission data is sent to an upper layer user of the receiving end; If the currently received transmission data has a data frame number that is repeated with the historically received transmission data or the data frame number of the received transmission data exceeds a preset range, the received transmission data is discarded.

10. A network transmission method, characterized in that: The method comprises: The transmission data sent by the sending end to at least one receiving end through the UDP multicast transmission channel; the sending end and the receiving end are connected to each other through the UDP multicast transmission channel and the TCP transmission channel; the UDP multicast transmission channel is a one-to-many unidirectional communication channel based on the UDP transmission protocol; the TCP transmission channel is a one-to-one bidirectional communication channel based on the TCP transmission protocol; The receiving end receives the transmission data; When the receiving end detects that frame loss exists in the transmission data, the receiving end sends a frame loss acknowledgement response to the sending end through the TCP transmission channel; The sending end, in response to the frame loss acknowledgment response, retransmits the transmission data corresponding to the frame loss acknowledgment response to the receiving end based on the TCP transmission channel; The receiving end receives the retransmitted transmission data.

Citation Information

Cited By

  • Control method and system of three-degree-of-freedom parallel robot

    CN119427379A

  • A control method and system for a three-degree-of-freedom parallel robot

    CN119427379B

  • Network transmission method, readable storage medium and intelligent device

    WO2025252083A1