Quic-based data transmission method and system

By setting up the PTO timer and multiple judgment mechanism in the quic data transmission method, evaluating and migrating the data transmission link, the problem of packet loss in traditional protocols in low latency and high concurrency environments is solved, and higher data transmission reliability and stability are achieved.

CN119697100APending Publication Date: 2025-03-25SHANDONG YUANQIAO INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510207627.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In low latency, high concurrency and mobile network environments, traditional TCP/IP protocols cannot meet the needs of modern applications, especially when packet loss reaches a certain threshold or shows a continuous loss trend, retransmitting packets through the current link alone cannot solve the packet loss problem, thereby reducing the reliability and stability of data transmission.

Method used

Using a quic-based data transmission method, the PTO timer is set to detect packet loss in real time, and multiple judgments are made to evaluate whether the transmission link needs to be migrated, and switch to the alternate path if necessary, and reasonably set the initial window size of the alternate path to adapt to the new transmission conditions.

Benefits of technology

Through real-time detection of packet loss, intelligent migration decisions and reasonable backup path settings, the reliability and stability of data transmission are improved, the interruption and delay of data transmission are reduced, and the environment with unstable network conditions is adapted to.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697100A_ABST
    Figure CN119697100A_ABST
Patent Text Reader

Abstract

The invention relates to a quic-based data transmission method and system, and relates to the technical field of communication, and the method comprises the steps that a PTO timer is set to monitor data packet loss, and a client sends a data packet on a main path and records the packet loss frequency according to the PTO timer. Migration judgment is carried out, wherein whether the packet loss frequency exceeds a threshold value or not, whether data packets are continuously lost or not and whether connection migration is needed or not are judged; if migration is needed, a connection migration strategy of the main path and the standby path is formulated according to the migration standard, the size of an initial window is set after the legality of the standby path is verified, and finally the client switches a data packet transmission link to the standby path and continues to send the data packet. According to the method, the data transmission problem caused by network jitter and equipment faults can be effectively solved, and the reliability and the stability of data transmission are improved.
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 QUIC-based data transmission method and system. Background Art

[0002] With the rapid development of network technology, the requirements for data transmission speed and stability are increasing. The traditional TCP / IP protocol can no longer meet the needs of modern applications in some scenarios, especially in low-latency, high-concurrency and mobile network environments. Therefore, the UDP-based quic (quick UDP Internet Connections) protocol came into being. It combines the reliability of TCP with the low-latency characteristics of UDP, providing better transmission performance for network applications.

[0003] During data transmission, packet loss is a common problem due to network jitter, equipment failure, and out-of-order transmission of quic. In order to ensure the reliability of data transmission, lost packets need to be retransmitted. However, when packet loss reaches a certain threshold or shows a trend of continuous loss, simply retransmitting packets through the current link still cannot solve the problem of packet loss, thereby reducing the reliability and stability of data transmission. Summary of the invention

[0004] In order to improve the reliability and stability of data transmission, the present application provides a data transmission method and system based on QUIC.

[0005] In the first aspect, the present application provides a quic-based data transmission method, which adopts the following technical solution: A data transmission method based on QUIC, comprising the following steps: Set Timer: Create a PTO timer; Get the number of packet losses: The client sends a data packet to the server in the main path, detects whether the data packet is lost based on the PTO timer, and records the number of packet losses; Migration judgment: including first judgment, second judgment and third judgment; First judgment: judging whether the number of packet loss exceeds the preset packet loss number threshold, if yes, executing the second judgment step; if no, executing the step of obtaining the number of packet loss; Second judgment: judging whether the lost data packets are continuous, if so, executing the third judgment step; if not, executing the step of obtaining the number of packet loss times; Third judgment: judging whether the current transmission link needs to be connected and migrated, if so, executing the path migration step; if not, executing the step of obtaining the number of packet loss; Path migration: including setting migration standards and migrating to alternative paths; Formulate migration standards: According to the migration standards of the links, formulate the connection migration standards for the primary and backup paths; Migrate to an alternate path: This includes setting up an alternate path and one migration; Set backup path: Set the backup path, verify the legitimacy of the backup path, and after the legitimacy verification is passed, set the initial window in the backup path The size of the initial window The calculation model is: ; in, is the size of the main path congestion window, is the maximum amount of data contained in a data packet before congestion occurs on the primary path; Primary migration: The client switches the data packet transmission link to the backup path and continues to send data packets to the server.

[0006] By adopting the above technical solution, the present application sets a PTO timer, which can detect in real time whether a data packet is lost. When packet loss is detected, a series of judgment steps are used to evaluate whether the current transmission link (main path) needs to be migrated. The setting of multiple judgments reduces unnecessary path switching, thereby reducing the interruption and delay of data transmission; the second judgment step can identify the situation of continuous packet loss, which is an important indicator of the deterioration of network link quality. Continuous packet loss often means that there are serious problems in the current link and migration needs to be considered; the present application can perform path migration at an appropriate time by formulating connection migration standards for the main path and the backup path, thereby maximizing the efficiency and reliability of data transmission; when setting the backup path, the present application not only verifies the legitimacy of the backup path, but also calculates the initial window size of the backup path according to the congestion window size of the main path and the maximum amount of data in the previously sent data packet, which helps to quickly adapt to new transmission conditions after migration and reduce data packet loss and retransmission; the present application adopts real-time packet loss detection, intelligent migration decision-making and reasonable technical solutions for setting backup paths, so that the data transmission method can try to ensure the continuity and reliability of data transmission even when the network conditions are unstable, quic is out of order, and the transmission equipment fails.

[0007] Optionally, after executing a migration step, the following steps are also performed: Migrate to the main path: including the fourth judgment and the second migration; Fourth judgment: judging whether the primary path is restored to normal, if so, executing the secondary migration step; if not, re-executing the fourth judgment step; Secondary migration: Migrate the transmission path back to the primary path, and the client's data packets are transmitted through the primary path.

[0008] By adopting the above-mentioned technical scheme, in the fourth judgment step, the present application monitors the recovery of the main path in real time, and migrates back to the main path when the main path returns to normal. That is, the present application can dynamically adjust the data transmission path according to the network conditions, thereby improving the efficiency and reliability of data transmission; although enabling the backup path can try to ensure the normal transmission of data when problems occur in the main path, long-term reliance on the backup path may lead to unreasonable occupation of resources and degradation of system performance. Therefore, after the main path returns to normal, it is necessary to migrate back to the main path in time to reduce dependence on the backup path and release related resources. The main path is usually more stable and efficient in network conditions and performance. After the main path returns to normal, migrating back to the main path can reduce data transmission delays and improve user experience; the present application intelligently selects the data transmission path to achieve optimal utilization of network resources.

[0009] Optionally, a migration step also includes: Extract connection ID: Extract the connection ID in the Initial message in the data packet sent by the client; Establish a corresponding relationship: Use the server's IP address, port number, and device information as part of the connection ID to establish a corresponding relationship between the connection ID and the server.

[0010] By adopting the above technical solution, the connection ID in the Initial message in the data packet sent by the client is extracted, which can provide a unique identifier for each connection, which is helpful to accurately identify and manage different connections in a complex network environment. When path migration is required, the relevant connection information can be quickly located according to the connection ID, thereby simplifying the migration process; the connection ID contains key information such as the IP address and port number of the server, device information, etc., which can be used as a basis for verifying the legitimacy of the connection. By verifying the connection ID, the occurrence of illegal connections and malicious attacks can be effectively reduced, and the security of data transmission can be improved. The connection ID contains the IP address and port number of the server, which can reduce the impact of the four-layer architecture and multi-core, and reduce the problem of inability to migrate. By setting the device information in the connection ID, the problem of server verification failure caused by unstable client IP can be reduced, and the 0-RTT rate or the success rate of 0-RTT can be improved.

[0011] Optionally, in the step of establishing the corresponding relationship, the remaining part of the connection ID is filled with a random number.

[0012] By adopting the above technical solution, the random number is random and unpredictable. Therefore, using random numbers to fill the remaining part of the connection ID can further increase the uniqueness of the connection ID, help distinguish and identify different connections in a network environment, and reduce the possibility of connection conflicts; the present application utilizes the unpredictability of random numbers to increase the difficulty for attackers to guess the connection ID, improve the security of data transmission, and reduce the risk of malicious attacks; when it is necessary to expand services or add new servers, using random numbers to fill the remaining part of the connection ID makes the newly generated connection ID consistent with the existing connection ID in structure, which helps to maintain the compatibility and scalability of the system.

[0013] Optionally, after executing the second judgment step and before executing the third judgment step, the method further includes: Packet retransmission: split the lost packets into data frames, repack the data frames into new packets, input the new packets into the retransmission sequence, and retransmit the new packets; Fifth judgment: judging whether the new data packet is transmitted successfully, if yes, stopping retransmission; if no, executing the step of recording the number of retransmissions; Record the number of retransmissions: record the number of retransmissions of data frames; Sixth judgment: judge whether the number of retransmissions is greater than the preset retransmission number threshold, if so, execute the third judgment step, if not, execute the data packet retransmission step.

[0014] By adopting the above technical solution, the data packet retransmission mechanism enables the data packets lost in network transmission to be resent, thereby improving the integrity of data transmission. By splitting the lost data packets into data frames and repackaging them into new data packets, the lost data packets can be restored to complete data through retransmission. The entire retransmission and judgment process forms a closed-loop control system. Through continuous judgment and retransmission, the system can adaptively adjust the transmission strategy to adapt to changes in the network environment. The present application judges the retransmission of new data packets, records the number of retransmissions, and compares the number of retransmissions with the preset retransmission threshold. If the number of retransmissions is greater than the retransmission threshold, it determines whether connection migration is required. The present application reduces the problem of system instability caused by multiple migrations by setting a series of judgment and comparison steps.

[0015] Optionally, after executing the second determination step and before executing the data packet retransmission step, the method further includes: Determine the retransmission timeout RTO: calculate the RTT of the primary path, process the RTT value, calculate the round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT of the primary path, and determine the retransmission timeout RTO according to the round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT; Seventh judgment: within the retransmission timeout period RTO, if the expected ACK packet is not received, the data packet retransmission step is executed; if the expected ACK packet is received, the step of obtaining the number of packet losses is executed.

[0016] By adopting the above technical solution, by calculating the RTT (round-trip time) of the main path, the current network environment can be understood more accurately. The round-trip time change parameter RTTVAR and the smooth round-trip time parameter SRTT further calculated based on the RTT value can adjust the retransmission strategy more finely to improve the efficiency and reliability of data transmission; within the retransmission timeout RTO range, if the client can receive the expected ACK packet, it means that the data packet has been successfully transmitted to the destination, and the step of obtaining the number of packet losses needs to be executed. Within the retransmission timeout RTO, if the client does not receive the expected ACK packet, the data packet retransmission step is executed to ensure the reliable transmission of data as much as possible. By adopting a reasonable retransmission strategy, the present application can ensure the reliability of data transmission while improving the transmission efficiency as much as possible. By calculating RTO and executing the seventh judgment step, the present application can promptly detect and handle packet loss problems when the network conditions are poor. Timely retransmission can reduce the packet loss rate and improve the integrity and accuracy of data transmission.

[0017] Optionally, a migration step also includes: Add a flag: Before the client continues to send data packets to the server, add a flag to the server's quic-go structure to determine the authentication status of the client connection and set 0-RTT disabled; Authentication: If the unique connection ID flag is verified as true, the server will no longer verify the client's identity during the subsequent transmission of data packets.

[0018] This application adds a flag to the quic-go structure to determine the authentication status of the client connection, so that the server can more accurately control and manage the security of the connection. This mechanism allows only authenticated clients to establish a connection with the server, further enhancing security and reliability. When the connection ID flag is verified to be true, the server no longer verifies the identity of the client during the subsequent transmission of data packets, thereby reducing unnecessary authentication overhead and improving the efficiency of data transmission. This application sets up a disabled 0-RTT, and the server no longer verifies the identity of the client when the unique connection ID flag is verified to be true. The technical solution of this application has a lower transmission delay than the solution combining MQTT and quic, making this application more suitable for transmitting time-sensitive information.

[0019] Optionally, in the step of setting the backup path, set the initial window in the backup path When the size is , the correlation factor P is used to adjust the initial window Calculate the new initial window The calculation model is: ; in, is the size of the main path congestion window, is the maximum amount of data contained in a data packet before congestion occurs on the primary path; Among them, the calculation model of the correlation factor P is: ; Among them, B is the number of times the client receives ACK packets.

[0020] By adopting the above technical solution, the calculation of the correlation factor P takes into account the number of times the client receives the ACK packet, and by incorporating this information into the new initial window A computational model that more accurately assesses the network performance of the backup path and adjusts the new initial window accordingly The size of the backup path is calculated by using the correlation factor P to better utilize network resources. The size method can reduce the risk of congestion on the backup path again.

[0021] Optionally, calculate the new initial window After that, the new initial window Compared with the preset window size threshold, if the new initial window If the window size is greater than the preset window size threshold, the new initial window Perform the reduction process, specifically: ; in, is the size of the primary path congestion window, P is the correlation factor, and B is the number of times the client receives ACK packets.

[0022] By adopting the above technical solution, when the calculated initial window size exceeds the preset window size threshold, it means that if data is transmitted according to this window size, network congestion may occur. The present application can effectively reduce the risk of network congestion and improve the stability and reliability of data transmission by reducing the initial window size.

[0023] In the second aspect, the present application provides a quic-based data transmission system, which adopts the following technical solution: A quic-based data transmission system, comprising: Configuration module: used to create PTO timers, configure connection migration criteria and backup paths for primary and backup paths, and set the size of the initial window in the backup path; Data collection module: used to collect the number of packet losses; A judgment module, comprising a first judgment unit, a second judgment unit and a third judgment unit; A first judgment unit: connected in communication with the second judgment unit and the data acquisition module, and configured to judge whether the number of packet losses exceeds a preset packet loss number threshold; A second judgment unit: connected to the first judgment unit, the third judgment unit and the data acquisition module for judging whether the lost data packets are continuous; The third judgment unit is connected to the second judgment unit and the data acquisition module for judging whether the current transmission link needs to be migrated; Migration module: used to switch the transmission link of the data packet to the backup path.

[0024] By adopting the above technical solution, the configuration module can create a PTO timer, configure the connection migration standards of the main path and the backup path, and set the size of the initial window in the backup path, which helps the system to flexibly adjust according to the network environment and application requirements and optimize data transmission performance. The data acquisition module can collect the number of packet losses in real time and transmit the number of packet losses to the judgment module to provide the system with accurate network status information. The judgment module can enable the system to respond promptly when there is a problem in the network through the third judgment mechanism, and try to avoid data transmission interruption or efficiency reduction. When the third judgment unit determines that connection migration is required, the migration module can quickly switch the transmission link to the backup path. This connection migration capability enables the system to quickly resume data transmission when the network is unstable or fails, thereby improving the reliability and availability of the system.

[0025] In summary, the present application includes at least one of the following beneficial technical effects: 1. The present application sets a PTO timer, which can detect in real time whether a data packet is lost. When packet loss is detected, a series of judgment steps are used to evaluate whether the current transmission link (main path) needs to be migrated. The setting of multiple judgments reduces unnecessary path switching, thereby reducing the interruption and delay of data transmission; the second judgment step can identify the situation of continuous packet loss, which is an important indicator of the deterioration of network link quality. Continuous packet loss often means that there are serious problems in the current link and migration needs to be considered; the present application can perform path migration at an appropriate time by formulating connection migration standards for the main path and the backup path, thereby maximizing the efficiency and reliability of data transmission; when setting the backup path, the present application not only verifies the legitimacy of the backup path, but also calculates the initial window size of the backup path according to the congestion window size of the main path and the maximum amount of data in the previously sent data packet, which helps to quickly adapt to new transmission conditions after migration and reduce data packet loss and retransmission; the present application adopts the technical solutions of real-time packet loss detection, intelligent migration decision-making and reasonable backup path setting, so that the data transmission method can try to ensure the continuity and reliability of data transmission even when the network conditions are unstable, quic is out of order, and the transmission equipment fails.

[0026] 2. This application can provide a unique identifier for each connection by extracting the connection ID in the Initial message in the data packet sent by the client, which helps to accurately identify and manage different connections in a complex network environment. When path migration is required, the relevant connection information can be quickly located according to the connection ID, thereby simplifying the migration process; the connection ID contains key information such as the server's IP address and port number, device information, etc., which can be used as a basis for verifying the legitimacy of the connection. By verifying the connection ID, the occurrence of illegal connections and malicious attacks can be effectively reduced, and the security of data transmission can be improved. The connection ID contains the server's IP address and port number, which can reduce the impact of the four-layer architecture and multi-core, and reduce the problem of inability to migrate. By setting the device information in the connection ID, the problem of server verification failure caused by unstable client IP can be reduced, and the 0-RTT rate or the success rate of 0-RTT can be improved.

[0027] 3. This application adds a flag to the quic-go structure to determine the authentication status of the client connection, so that the server can more accurately control and manage the security of the connection. This mechanism allows only authenticated clients to establish a connection with the server, further enhancing security and reliability. When the connection ID flag is verified to be true, the server no longer verifies the identity of the client during the subsequent transmission of data packets, thereby reducing unnecessary authentication overhead and improving the efficiency of data transmission. This application sets up a disabled 0-RTT, and the server no longer verifies the identity of the client when the unique connection ID flag is verified to be true. Compared with the combination of MQTT and quic, the technical solution of this application has a lower transmission delay, making this application more suitable for transmitting time-sensitive information. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of a quic-based data transmission method of the present application; Figure 2 is a method flow chart of the migration judgment step S3 of the present application; Figure 3 is a flow chart of the method for retransmitting the data packet step S33 of the present application; Figure 4 is a method flow chart of the path migration step S4 of the present application; Figure 5 is a flow chart of the method of migrating to the main path step S5 of the present application; Figure 6 It is a structural schematic diagram of a quic-based data transmission system of the present application. DETAILED DESCRIPTION

[0029] The following combination Figures 1 to 6 This application is described in further detail.

[0030] Embodiment 1: This embodiment discloses a data transmission method based on quic, referring to Figure 1 The data transmission method includes: setting a PTO timer step S1, obtaining the number of packet losses step S2, migration judgment step S3, path migration step S4, and migration to the main path step S5. In this embodiment, the PTO timer is set to time the data packet transmission time, and then the number of packet losses is obtained according to the time recorded by the PTO timer. After that, it is determined through multiple judgments whether migration is required. If so, the transmission path is transmitted to the backup path, and then after the main path is restored, the transmission path is restored to the main path. The details are as follows: S1 sets the PTO timer: sets the PTO timer to record the transmission time of the data packet sent from the client to the server.

[0031] S2 obtains the number of packet losses: the client sends a data packet to the server in the main path. After the PTO timer times out or the client receives an ACK packet, the packet loss is detected and the number of packet losses is recorded. The packet loss refers to: traversing the data packets in the client's sending queue. When the sending time of all data packets exceeds the preset sending time threshold, or the execution time of the quic out-of-order program exceeds the set out-of-order time threshold, the data packet is considered to be lost.

[0032] Reference Figure 2 The migration judgment step S3 includes a first judgment step S31, a second judgment step S32, a data packet retransmission step S33 and a third judgment step S34.

[0033] S31 first judgment: judge whether the number of packet loss exceeds the preset packet loss number threshold, if so, execute the second judgment step; if not, execute the step S2 of obtaining the number of packet loss.

[0034] S32 Second judgment: judge whether the lost data packets are continuous, if so, execute the retransmission timeout RTO step S331; if not, execute the packet loss count step S2.

[0035] Reference Figure 3 The step S33 of retransmitting the data packet includes a step S331 of determining a retransmission timeout RTO, a seventh judgment step S332, a step S333 of retransmitting the data packet, a fifth judgment step S334, a step S335 of recording the number of retransmissions, and a sixth judgment step S336.

[0036] S331 determines the retransmission timeout RTO: the retransmission timeout RTO here is not a concept in TCP. The retransmission timeout set in this embodiment can be understood as the PTO in the quic protocol.

[0037] The time required for a data packet to travel from the client to the server and back to the client is called the round-trip time (RTT). The entire process is completed by the client sending a data packet with a timestamp, and the server responds with an ACK packet with a timestamp after receiving it. The client then calculates the RTT based on the timestamps of sending and receiving.

[0038] The multiple RTT values ​​are smoothed by the Exponentially Weighted Moving Average (EWMA) method to obtain a more stable RTT estimate: .

[0039] The round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT of the main path are calculated using the EWMA algorithm.

[0040] ; ; in, Equal to 1 / 4.

[0041] When the RTT changes, the parameter SRTT is updated by the changed RTT value (ie, RTT1) and the previous parameter SRTT'. The calculation model during the update is: ; in, is the smoothing factor, and its value range is 0~1.

[0042] The retransmission timeout RTO is determined according to the round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT. The calculation model of the RTO is as follows: ; Among them, G and K are preset constant values, which are used to adjust the sensitivity of the parameter RTO to the change of RTT. In this embodiment, the value range of G is 1 to 5, and the value range of K is 1 to 10. In other embodiments, the values ​​of G and K can be set according to requirements.

[0043] In other embodiments, the calculation model of the retransmission timeout RTO may also be: ; in, Represents 1 millisecond.

[0044] S332 Seventh judgment: After sending a data packet, the system will start timing and wait for the ACK packet sent by the server. This waiting time is the retransmission timeout RTO calculated previously.

[0045] If the expected ACK packet is not received within the retransmission timeout period RTO, it is considered that the data packet may have been lost or encountered a delay in the network. In this case, the data packet retransmission step S333 will be executed to resend the data packet, and the value of the retransmission timeout period RTO may be adjusted according to the packet loss situation. This process will be repeated until the client receives the ACK packet or the retransmission count threshold is reached.

[0046] Within the retransmission timeout period RTO, it will continuously check whether the expected ACK packet has been received. If it has been received, it means that the data packet has been successfully transmitted, and then the step S2 of obtaining the number of packet loss is executed to update the packet loss statistics information.

[0047] S333 Data packet retransmission: When a data packet is detected to be lost during transmission, the retransmission mechanism is activated to split the lost data packet into data frames, repackage the data frames into new data packets, enter the new data packets into the retransmission sequence, and transmit the new data packets.

[0048] S334 Fifth judgment: Determine whether the new data packet is transmitted successfully by whether the client receives the ACK packet sent by the server. If the client receives the ACK packet, it is determined that the transmission is successful and retransmission is stopped; otherwise, the step S335 of recording the number of retransmissions is executed.

[0049] S335 records the number of retransmissions: If the client does not receive an ACK packet within the retransmission timeout period RTO, it is considered that the data packet transmission has failed and needs to be retransmitted. Before each retransmission, the number of retransmissions of the current data frame (or new data packet) will be automatically recorded.

[0050] S336 Sixth judgment: If the number of retransmissions has exceeded the preset retransmission threshold, it means that the data packet still cannot be successfully transmitted after multiple attempts. At this time, it is necessary to continue to execute the third judgment step S34. Otherwise, execute the data packet retransmission step S333. This process will be repeated until the data packet is successfully transmitted to the receiving end or the preset retransmission threshold is reached.

[0051] S34 third judgment: judge whether the current transmission link needs to be connected and migrated. If so, execute the path migration step S4; if not, execute the step S2 of obtaining the number of packet losses.

[0052] In this embodiment, the criterion for determining that the current transmission link needs to be connected and migrated is: continuous packet loss occurs or the number of data packet retransmissions exceeds a preset retransmission number threshold.

[0053] After determining that a persistent failure occurs on the primary path, the transmission link of the data packet needs to be migrated to the backup path.

[0054] Reference Figure 4 The path migration step S4 includes a migration standard formulation step S41 and a migration to a backup path step S42.

[0055] S41: Formulate a migration standard: According to the migration standard of the link, formulate a connection migration standard for the primary path and the backup path, wherein the migration standard includes bandwidth, delay, packet loss rate, etc.

[0056] S42 Migrate to the backup path: including the backup path setting step S421 and a migration step S422.

[0057] S421 Set up backup path: Set up backup path, verify the legitimacy of backup path, and make sure the backup path is available and meets the transmission requirements. After the legitimacy verification is passed, set the initial window in the backup path The size of the initial window The calculation model is: ; in, is the size of the main path congestion window, is the maximum amount of data contained in a single data packet sent before the primary path is congested, To find the maximum value.

[0058] By properly setting the initial window size, the risk of network congestion and data loss can be reduced during the migration process, and the stability and efficiency of data transmission can be improved.

[0059] S422 one-time migration: the client switches the transmission link of the data packet to the backup path and continues to send the data packet to the server.

[0060] In a migration step S422, before continuing to send data packets to the server, a transmission reliability improvement step S4221 is also included.

[0061] The step S4221 of improving transmission reliability includes a step S42211 of extracting a connection ID and a step S42212 of establishing a corresponding relationship.

[0062] S42211 Extract connection ID: During the migration process, it is necessary to be able to accurately identify and track the connection of each client. Before the migration starts, it is necessary to extract the connection ID in the Initial message from the data packet sent by the client. The connection ID is a unique identifier for communication between the client and the server. It can help identify and manage the status of each connection.

[0063] S42212 Establishing a correspondence: After extracting the connection ID, it is necessary to establish a correspondence between the connection ID (client) and the server, and the establishment of the correspondence includes taking the IP address, port number, and device information of the server as part of the connection ID. In this way, the server corresponding to each connection ID (client) can be accurately found during the migration process, and data can be correctly sent to the target address. To enhance security, the remaining part of the connection ID can be filled with random numbers to increase the complexity and unpredictability of the connection.

[0064] In the multi-core server on the server side, the step S4221 of improving transmission reliability sets the IP address and port number of the server side in the connection ID, thereby reducing the impact of the change of the sending source address during the connection migration process, that is, it will not cause the subsequent transmission data packets to go to other processes and affect the reception of socket data. The step S4221 of improving transmission reliability also sets the device information of the client in the connection ID (encodes the device information of the client into the connection ID), thereby improving the 0-RTT rate or 0-RTT success rate.

[0065] In other embodiments, if there are data packets that are very time-sensitive and require lower transmission delay, a migration step S422 also includes a transmission rate increasing step S4221'. In the transmission rate increasing step S4221', it is considered that: if a quic flow requires the server to authenticate the client, then subsequent quic flows also need to authenticate the client. The client determines whether the existing connection has been authenticated by reading the HTTP response of the server.

[0066] The step of increasing the transmission rate S4221' includes a step of adding a flag S42211' and a step of identity verification S42212'.

[0067] S42211'Add flag: Before the client sends a packet to the server, a flag is added to the quic-go structure on the server to determine the authentication status of the client connection, which is used to determine the authentication status of the client's existing connection and set 0-RTT to disable quic. In this step, the client's credentials are first encoded into the HTTP request header through the SetBasicAuth() function to implement basic authentication of the client. Secondly, the client's credentials are verified by calling the BasicAuth() function on the server.

[0068] S42212' Authentication: If the unique connection ID flag is verified as true, the server will no longer verify the client's identity during the subsequent transmission of data packets to shorten the data transmission time.

[0069] By adopting the above settings, this embodiment has a lower transmission delay than the combination of MQTT and quic, making this embodiment more suitable for transmitting time-sensitive information.

[0070] In order to further improve reliability, in the step S421 of setting the backup path, the initial window in the backup path is set. When the size is , the correlation factor P is used to adjust the initial window Calculate the new initial window The calculation model is: ; in, is the size of the main path congestion window, is the maximum amount of data contained in a packet before congestion occurs on the primary path, To find the maximum value.

[0071] Among them, the calculation model of the correlation factor P is: ; Among them, B is the number of times the client receives ACK packets.

[0072] And calculate the new initial window After that, the initial window Compared with the preset window size threshold, if the initial window If the size of the initial window is greater than the preset window size threshold, Perform the reduction process, specifically: ; in, is the size of the primary path congestion window, P is the correlation factor, and B is the number of times the client receives ACK packets.

[0073] By adding the correlation factor P and reducing the initial window size, the risk of network congestion can be effectively reduced and the stability and reliability of data transmission can be improved.

[0074] Reference Figure 5 The step S5 of migrating to the main path includes a fourth determination step S51 and a secondary migration step S52.

[0075] S51 Fourth judgment: judge whether the main path is restored to normal, if so, execute the secondary migration step S52, and migrate the transmission task that was previously migrated to the backup path due to the problem of the main path back to the main path; if not, re-execute the fourth judgment step S51. In this process, the status of the main path will be checked, including key indicators such as network connection, bandwidth usage, delay and packet loss rate.

[0076] S52 secondary migration: Migrate the transmission path back to the primary path, and the client's data packets are transmitted through the primary path.

[0077] Embodiment 2: This embodiment discloses a data transmission system based on quic, referring to Figure 6 , the data transmission system includes: Configuration module: The configuration module is the core component of the data transmission system. It is responsible for creating and managing various parameters and settings. In the configuration module, users can create a PTO (Probing Timeout) timer to monitor the health of the network connection. In addition, the configuration module also allows users to set the connection migration standards for the primary path and the backup path. These standards are defined based on network performance parameters (such as packet loss rate, latency, etc.). At the same time, the configuration module is also responsible for setting the size of the initial window in the backup path. This window size will affect the transmission efficiency and stability of data packets on the backup path.

[0078] Data collection module: used to collect the number of packet losses.

[0079] The judgment module includes a first judgment unit, a second judgment unit and a third judgment unit.

[0080] The first judgment unit is connected to the second judgment unit and the data acquisition module, and is used to judge whether the number of packet losses exceeds the preset packet loss threshold. If the number of packet losses exceeds the threshold, the system will consider that there may be problems with the current transmission link and trigger the second judgment unit for further judgment.

[0081] The second judgment unit is connected to the first judgment unit, the third judgment unit and the data acquisition module, and is used to judge whether the lost data packets are continuous. Continuous data packet loss may mean more serious network problems, such as network congestion or link failure. If the second judgment unit confirms that there is continuous data packet loss, the system will trigger the third judgment unit to make a final decision.

[0082] The third judgment unit: communicates with the second judgment unit and the data acquisition module, and is used to judge whether the current transmission link needs to be migrated. If the third judgment unit believes that there are serious problems with the current transmission link and a backup path is available, the third judgment unit will send relevant instructions to the migration module to enable the migration module to perform the connection migration operation.

[0083] Migration module: The client switches the transmission link of the data packet to the backup path.

[0084] The present application relates to a data transmission method and system based on quic, wherein the data transmission method includes the steps of setting a timer, obtaining the number of packet losses, migration judgment, path migration, etc.; the data transmission system includes a configuration module, a data acquisition module, a judgment module, and a migration module. The method can effectively deal with data transmission problems caused by network jitter and equipment failure, and improve the reliability and stability of data transmission.

[0085] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A data transmission method based on quic, characterized in that: The following steps are involved: Set Timer: Create a PTO timer; Get the number of packet losses: The client sends a data packet to the server in the main path, detects whether the data packet is lost based on the PTO timer, and records the number of packet losses; Migration judgment: including first judgment, second judgment and third judgment; First judgment: judging whether the number of packet loss exceeds the preset packet loss number threshold, if yes, executing the second judgment step; if no, executing the step of obtaining the number of packet loss; Second judgment: judging whether the lost data packets are continuous, if so, executing the third judgment step; if not, executing the step of obtaining the number of packet loss times; Third judgment: judging whether the current transmission link needs to be connected and migrated, if so, executing the path migration step; if not, executing the step of obtaining the number of packet loss; Path migration: including setting migration standards and migrating to alternative paths; Formulate migration standards: According to the migration standards of the links, formulate the connection migration standards for the primary and backup paths; Migrate to an alternate path: This includes setting up an alternate path and one migration; Set backup path: Set the backup path, verify the legitimacy of the backup path, and after the legitimacy verification is passed, set the initial window in the backup path The size of the initial window The calculation model is: ; in, is the size of the primary path congestion window, is the maximum amount of data contained in a data packet before congestion occurs on the primary path; Primary migration: The client switches the data packet transmission link to the backup path and continues to send data packets to the server.

2. The quic-based data transmission method according to claim 1, characterized in that: After performing a migration step, it also includes: Migrate to the main path: including the fourth judgment and the second migration; Fourth judgment: judging whether the primary path is restored to normal, if so, executing the secondary migration step; if not, re-executing the fourth judgment step; Secondary migration: Migrate the transmission path back to the primary path, and the client's data packets are transmitted through the primary path.

3. The quic-based data transmission method according to claim 2, characterized in that: In one migration step, it also includes: Extract connection ID: Extract the connection ID in the Initial message in the data packet sent by the client; Establish a corresponding relationship: Use the server's IP address, port number, and device information as part of the connection ID to establish a corresponding relationship between the connection ID and the server.

4. The quic-based data transmission method according to claim 3, characterized in that: In the step of establishing the corresponding relationship, the remaining part of the connection ID is filled with a random number.

5. The quic-based data transmission method according to any one of claims 1 to 4, characterized in that: After executing the second judgment step and before executing the third judgment step, the method further includes: Packet retransmission: split the lost packets into data frames, repack the data frames into new packets, input the new packets into the retransmission sequence, and retransmit the new packets; Fifth judgment: judging whether the new data packet is transmitted successfully, if yes, stopping retransmission; if no, executing the step of recording the number of retransmissions; Record the number of retransmissions: record the number of retransmissions of data frames; Sixth judgment: judge whether the number of retransmissions is greater than the preset retransmission number threshold, if so, execute the third judgment step, if not, execute the data packet retransmission step.

6. The quic-based data transmission method according to claim 5, characterized in that: After executing the second determination step and before executing the data packet retransmission step, the method further includes: Determine the retransmission timeout RTO: calculate the RTT of the primary path, process the RTT value, calculate the round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT of the primary path, and determine the retransmission timeout RTO according to the round-trip time variation parameter RTTVAR and the smoothed round-trip time parameter SRTT; Seventh judgment: within the retransmission timeout period RTO, if the expected ACK packet is not received, the data packet retransmission step is executed; if the expected ACK packet is received, the step of obtaining the number of packet losses is executed.

7. The quic-based data transmission method according to claim 1 or 2, characterized in that: In one migration step, it also includes: Add a flag: Before the client continues to send data packets to the server, add a flag to the server's quic-go structure to determine the authentication status of the client connection and set 0-RTT disabled; Authentication: If the unique connection ID flag is verified as true, the server will no longer verify the client's identity during the subsequent transmission of data packets.

8. The quic-based data transmission method according to claim 7, characterized in that: In the step of setting the alternate path, set the initial window in the alternate path When the size is , the correlation factor P is used to adjust the initial window Calculate the new initial window The calculation model is: ; in, is the size of the primary path congestion window, is the maximum amount of data contained in a data packet before congestion occurs on the primary path; Among them, the calculation model of the correlation factor P is: ; Among them, B is the number of times the client receives ACK packets.

9. The quic-based data transmission method according to claim 8, characterized in that: When calculating the new initial window After that, the new initial window Compared with the preset window size threshold, if the new initial window If the window size is greater than the preset window size threshold, the new initial window Perform the reduction process, specifically: ; in, is the size of the primary path congestion window, P is the correlation factor, and B is the number of times the client receives ACK packets.

10. A quic-based data transmission system, wherein the transmission system adopts the transmission method according to any one of claims 1 to 9 when performing data transmission, characterized in that: include: Configuration module: used to create PTO timers, configure connection migration criteria and backup paths for primary and backup paths, and set the size of the initial window in the backup path; Data collection module: used to collect the number of packet losses; A judgment module, comprising a first judgment unit, a second judgment unit and a third judgment unit; A first judgment unit: connected in communication with the second judgment unit and the data acquisition module, and configured to judge whether the number of packet losses exceeds a preset packet loss number threshold; A second judgment unit: connected to the first judgment unit, the third judgment unit and the data acquisition module for judging whether the lost data packets are continuous; The third judgment unit is connected to the second judgment unit and the data acquisition module for judging whether the current transmission link needs to be migrated; Migration module: used to switch the transmission link of the data packet to the backup path.

Citation Information

Patent Citations

  • De-jittering and packet loss resistant processing method and device

    CN103916208A

  • Active connection migration method and system based on QUIC transport protocol

    CN116112436A

  • Network congestion control method and device and storage medium

    CN116684359A

  • Method for constructing automatic switching based on 5G private network and traditional MPLS side network

    CN118449899A

  • Transmission method for application layer protocol in internet of things

    WO2024174319A1

Cited By

  • Reliable communication system based on publishing and subscribing mode in satellite-ground weak network environment

    CN121077546A

  • A reliable communication system based on publish / subscribe mode in a star-ground weak network environment

    CN121077546B

  • Weak network adaptive multipath transmission method and system, and storage medium

    CN121334039A