QUIC stream multiplexing implementation method and device

By setting flow control constraints and rate control in QUIC flow multiplexing, the token bucket algorithm allocates the number of tokens for each stream, which solves the problem that low-priority streams in QUIC connections cannot be transmitted for a long time, and improves data processing efficiency.

CN120263737AActive Publication Date: 2025-07-04INST OF LOGISTICS SCI & TECH ACAD OF SYST ENG ACAD OF MILITARY SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510392614.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

In QUIC connections, streams with low priority or small waiting for transmission data may not be able to obtain transmission services for a long time, resulting in the problem of starvation.

Method used

The QUIC stream multiplexing method is adopted, by setting flow control constraints and rate control information, the token bucket algorithm is used to allocate the number of tokens to each stream, ensuring that low-priority streams can also obtain transmission services.

Benefits of technology

It effectively avoids the situation where streams with low priority or small amount of data waiting for transmission to be starved to death, and improves the efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263737A_ABST
    Figure CN120263737A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for realizing QUIC stream multiplexing. The method comprises the following steps: acquiring to-be-processed data; the data to be processed comprises N streams, and N is a positive integer; the data to be processed are processed, and data information of N streams is obtained; setting flow control constraint conditions; and according to the flow control constraint condition, processing the data information of the N streams to obtain a QUIC flow multiplexing result. According to the invention, through the multiplexing of the QUIC, the problem that a stream with a low priority or a small amount of data waiting for transmission cannot obtain the QUIC transmission service for a long time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data stream processing, and in particular to a method and device for implementing QUIC stream multiplexing. Background Art

[0002] In order to optimize the performance of the HTTP protocol, by means of technologies such as compression, multiplexing, and priority, to reduce the web page loading time and improve the security of data transmission, Google has developed the SPDY, an application layer protocol for open network transmission based on TCP. The SPDY protocol is not used to replace the HTTP protocol, but an enhancement of the HTTP protocol. Its core idea is to minimize the number of TCP connections established. However, the reliable transmission mechanism of the TCP protocol will introduce the HOL (Head-of-line blocking) problem.

[0003] The multiplexing function of QUIC is similar to that of HTTP2, and upper-layer applications can initiate multiple HTTP service requests on a single QUIC connection. However, the multiplexing of QUIC is superior to that of HTTP2 in implementation, and effectively avoids the HOL problem of waiting for packet loss recovery mainly through the following aspects:

[0004] QUIC is built on top of the UDP protocol. Since the UDP protocol does not need to ensure the packet timeliness, nor detect and retransmit the packet loss scenario.

[0005] In the same QUIC connection, multiple data streams can be established. Each data stream is identified by a unique stream ID, and the data between different stream IDs are independent of each other and do not interfere with each other. The data with the same data stream ID must maintain orderliness, and its orderliness is guaranteed by the carried offset field. The data receiver discards, de-duplicates, and sorts the data of the data stream through the received offset and length fields, and then delivers it to the upper-layer application after successful processing.

[0006] The most basic processing unit of QUIC is Packet, and QUIC also implements encryption and authentication operations based on a single Packet. The size of Packet is less than or equal to MTU. Therefore, this mechanism can also avoid the HOL problem similar to that existing in the TLS protocol.

[0007] The multiplexing function of QUIC is similar to that of HTTP2, and multiple HTTP requests can be initiated simultaneously on a single QUIC connection. Each HTTP request corresponds to a stream, but the data between each stream in QUIC are independent of each other and do not affect each other.

[0008] Three HTTP requests are initiated simultaneously on a QUIC connection, corresponding to stream1, stream2, and stream3 respectively. During the transmission, if a UDP packet of stream2 is lost, it will only affect the subsequent data processing of stream2. The subsequent data of stream1 can be directly delivered to the application layer without being affected by the data loss of stream2.

[0009] This implementation scheme can effectively avoid the HOL problem, but has the following disadvantages:

[0010] When there are a large number of streams in a QUIC connection, for high-priority streams or streams with a large amount of data waiting to be transmitted, they may always occupy the QUIC connection resources, and low-priority streams or streams with a small amount of data waiting to be transmitted can never obtain the QUIC transmission service.

[0011] Stream3 with low priority and a small amount of data waiting to be transmitted cannot obtain the QUIC transmission service for a long time. Summary of the Invention

[0012] The technical problem to be solved by the present invention is to provide a method and device for implementing QUIC stream multiplexing to solve the following problems: There may be multiple data streams in the same QUIC connection. Each data stream is identified by a unique stream ID. The priorities assigned to each data stream may be the same or different, and the amount of data transmitted in each data stream may vary greatly. The data between different stream IDs is also independent of each other. Then, high-priority data streams or data streams with a large amount of data waiting to be transmitted may always occupy the only QUIC connection channel, which may lead to the situation that low-priority data streams or data streams with a small amount of data waiting to be transmitted are "starved to death".

[0013] To solve the above technical problems, a first aspect of an embodiment of the present invention discloses a method for implementing QUIC stream multiplexing, the method comprising:

[0014] S1, obtaining data to be processed; the data to be processed includes N streams, where N is a positive integer;

[0015] S2, processing the data to be processed to obtain data information of N streams;

[0016] S3, setting flow control constraint conditions;

[0017] S4, processing the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result.

[0018] As an alternative implementation, in the first aspect of the embodiments of the present invention, the processing of the data to be processed to obtain data information of N streams includes:

[0019] S21, processing the data to be processed to obtain parameter information of each stream; the parameter information of each stream includes the priority of the stream, SPBR information, and BSD information;

[0020] S22, setting the rate control information of the streams in the QUIC connection; the expression of the rate control information of the stream is:

[0021] {total,connectedId,streamId,priority,streamPrioritizedBitRate,bucketSizeDuration,next2,next1}

[0022] where total represents the number of QUIC connections, connectedId represents the connection identification number of a certain QUIC connection, next1 represents the rate control information of the stream in the next QUIC connection, streamId represents the identification number of a certain stream in the QUIC connection, priority represents the priority of a certain stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a certain stream in the QUIC connection puts Tokens into the token bucket, bucketSizeDuration represents the duration during which a certain stream in the QUIC connection puts Tokens into the token bucket, and next2 represents the rate control information of the next stream in the same QUIC connection;

[0023] S23, integrating the parameter information of each stream and the rate control information of the stream to obtain data information of N streams.

[0024] As an alternative implementation, in the first aspect of the embodiments of the present invention, the setting of the flow control constraint conditions includes:

[0025] S31, setting the maximum capacity of the token bucket of the stream to be:

[0026] SPBR * BSD

[0027] where SPBR is the SPBR information, BSD is the BSD information, and * represents multiplication;

[0028] S32. The QUIC stream sender sets a variable Stokens for each stream;

[0029] The variable Stokens indicates the number of tokens currently available in the token bucket, and 1 token corresponds to 1 byte of data. When the stream is established, Stokens is initialized to 0, and at each processing interval T, the number of tokens is increased by SPBR * T; the value of Stokens cannot exceed the maximum capacity of the token bucket, which is SPBR * BSD.

[0030] As an optional implementation manner, in the first aspect of the embodiments of the present invention, the processing of the data information of the N streams according to the flow control constraint conditions to obtain the QUIC stream multiplexing result includes:

[0031] S41. Obtain the priority information in the data information of the N streams;

[0032] S42. Process the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result.

[0033] As an optional implementation manner, in the first aspect of the embodiments of the present invention, the processing of the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result includes:

[0034] S421. For streams with different priorities, process each stream in descending order of stream priority to obtain the QUIC stream multiplexing result;

[0035] S422. For streams with the same priority, process each stream in the order of stream creation to obtain the QUIC stream multiplexing result.

[0036] As an optional implementation manner, in the first aspect of the embodiments of the present invention, the processing of each stream in descending order of stream priority to obtain the QUIC stream multiplexing result includes:

[0037] S4211. When the Stokens of the current stream is equal to 0, or when the current stream has no data waiting to be transmitted, ignore the packet processing of the current stream and directly process the packet of the next stream;

[0038] S4212: When the Stokens of the current stream is greater than 0 and there is data waiting to be transmitted in the current stream, process the packets of the current stream according to the Stokens.

[0039] S4213: Update the value of Stokens to Stokens - Tstream, where Tstream is the number of bytes actually processed by the stream.

[0040] S4214: When the value of Stokens - Tstream is not 0, execute S3211 - S3213 to obtain the QUIC stream multiplexing result.

[0041] The second aspect of the embodiments of the present invention discloses an apparatus for implementing QUIC stream multiplexing. The apparatus includes:

[0042] A data acquisition module, configured to acquire data to be processed; the data to be processed includes N streams, where N is a positive integer.

[0043] A data processing module, configured to process the data to be processed to obtain data information of N streams.

[0044] A constraint condition setting module, configured to set flow control constraint conditions.

[0045] A QUIC stream multiplexing module, configured to process the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result.

[0046] As an optional implementation manner, in the second aspect of the embodiments of the present invention, the processing of the data to be processed to obtain data information of N streams includes:

[0047] S21: Process the data to be processed to obtain parameter information of each stream; the parameter information of each stream includes the priority of the stream, SPBR information, and BSD information.

[0048] S22: Set the rate control information of the streams in the QUIC connection; the expression of the rate control information of the stream is:

[0049] {total,connectedId,streamId,priority,streamPrioritizedBitRate,bucketSizeDuration,next2,next1}

[0050] Among them, total represents the number of QUIC connections, connectedId represents the connection identification number of a certain QUIC connection, next1 represents the rate control information of the stream in the next QUIC connection, streamId represents the identification number of a certain stream in the QUIC connection, priority represents the priority of a certain stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a certain stream in the QUIC connection puts Tokens into the token bucket, bucketSizeDuration represents the duration during which a certain stream in the QUIC connection puts Tokens into the token bucket, and next2 represents the rate control information of the next stream in the same QUIC connection;

[0051] S23. Integrate the parameter information of each stream and the rate control information of the stream to obtain the data information of N streams.

[0052] As an optional implementation manner, in the second aspect of the embodiments of the present invention, the setting of the flow control constraint conditions includes:

[0053] S31. Set the maximum capacity of the token bucket of the stream to:

[0054] SPBR * BSD

[0055] Among them, SPBR is the SPBR information, BSD is the BSD information, and * represents multiplication;

[0056] S32. The QUIC stream sender sets a variable Stokens for each stream.

[0057] The variable Stokens indicates the currently available number of tokens in the token bucket, and 1 token corresponds to 1 byte of data. When the stream is established, Stokens is initialized to 0, and SPBR * T tokens are added at each processing interval T; the value of Stokens cannot exceed the maximum capacity SPBR * BSD of the token bucket.

[0058] As an optional implementation manner, in the second aspect of the embodiments of the present invention, the processing of the data information of the N streams according to the flow control constraint conditions to obtain the QUIC stream multiplexing result includes:

[0059] S41. Obtain the priority information in the data information of N streams.

[0060] S42. Process the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result.

[0061] As an alternative implementation, in the second aspect of the embodiments of the present invention, the processing the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result includes:

[0062] S421. For streams with different priorities, process each stream in descending order of stream priority to obtain the QUIC stream multiplexing result;

[0063] S422. For streams with the same priority, process each stream in the order of their creation to obtain the QUIC stream multiplexing result.

[0064] As an alternative implementation, in the second aspect of the embodiments of the present invention, the processing each stream in descending order of stream priority to obtain the QUIC stream multiplexing result includes:

[0065] S4211. When the Stokens of the current stream is equal to 0, or when the current stream has no data waiting to be transmitted, ignore the packet processing of the current stream and directly process the packet of the next stream;

[0066] S4212. When the Stokens of the current stream is greater than 0 and the current stream has data waiting to be transmitted, process the packet of the current stream according to the Stokens;

[0067] S4213. Update the value of Stokens to Stokens - Tstream, where Tstream is the number of bytes actually processed by the stream;

[0068] S4214. When the value of Stokens - Tstream is not 0, execute S3211 - S3213 to obtain the QUIC stream multiplexing result.

[0069] The third aspect of the present invention discloses another implementation device for QUIC stream multiplexing, and the device includes:

[0070] A memory storing executable program code;

[0071] A processor coupled to the memory;

[0072] The processor calls the executable program code stored in the memory and executes some or all of the steps in the implementation method of QUIC stream multiplexing disclosed in the first aspect of the embodiments of the present invention.

[0073] The fourth aspect of the present invention discloses a computer - storable medium. The computer - storable medium stores computer instructions, which are used to execute some or all of the steps in the implementation method of QUIC stream multiplexing disclosed in the first aspect of the embodiments of the present invention when the computer instructions are called.

[0074] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0075] The present invention proposes an implementation method of QUIC stream multiplexing, which avoids the situation that streams with low priority or small data volume waiting for transmission are "starved to death". When the QUIC at the sending end processes the data transmission of the stream, the QUIC stream multiplexing method is used to solve the problem that streams with low priority or small data volume waiting for transmission cannot obtain QUIC transmission services for a long time, effectively improving the efficiency of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0077] Figure 1 is a schematic flowchart of an implementation method of QUIC stream multiplexing disclosed in the embodiments of the present invention;

[0078] Figure 2 is a diagram showing that QUIC stream multiplexing causes a low - priority stream to be unable to obtain services for a long time disclosed in the embodiments of the present invention;

[0079] Figure 3 is a diagram showing the solution to the problem that a stream with low priority or small data volume waiting for transmission never gets services disclosed in the embodiments of the present invention;

[0080] Figure 4 is a data structure diagram of the rate control information of each stream in a QUIC connection disclosed in the embodiments of the present invention;

[0081] Figure 5 is a flowchart of the QUIC stream multiplexing algorithm disclosed in the embodiments of the present invention;

[0082] Figure 6It is a schematic structural diagram of an implementation device for QUIC stream multiplexing disclosed in an embodiment of the present invention;

[0083] Figure 7 It is a schematic structural diagram of another implementation device for QUIC stream multiplexing disclosed in an embodiment of the present invention. Detailed implementation manners

[0084] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0085] The terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or equipment.

[0086] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.

[0087] The present invention discloses an implementation method and device for QUIC stream multiplexing. The method includes obtaining data to be processed; the data to be processed includes N streams, where N is a positive integer; processing the data to be processed to obtain data information of N streams; setting flow control constraint conditions; and processing the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result. The present invention solves the problem that streams with low priority or small data volume waiting for transmission cannot obtain QUIC transmission services for a long time through the multiplexing of QUIC. The following will be described in detail respectively.

[0088] Embodiment 1

[0089] Please refer to Figure 1 ,Figure 1 It is a schematic flowchart of an implementation method for QUIC stream multiplexing disclosed in an embodiment of the present invention. Among them, Figure 1 Regarding the data stream processing technology field of the implementation method for QUIC stream multiplexing described, the embodiments of the present invention do not make any limitations. For example, Figure 1 As shown, the implementation method for QUIC stream multiplexing may include the following operations:

[0090] S1. Obtain the data to be processed; the data to be processed includes N streams (data streams), where N is a positive integer;

[0091] Optionally, in order to improve the processing speed, after obtaining the data to be processed, perform data preprocessing on the data to be processed to obtain compressed data to be processed; then execute step S2 to process the compressed data to be processed to obtain data information of N streams; then execute S3 and S4.

[0092] Among them, the method for performing data preprocessing on the data to be processed to obtain compressed data to be processed is as follows:

[0093] Process the data to be processed to obtain a data tree;

[0094] Specifically: Starting from the bottom - layer original data d i and whenever two data {d i , d i+1} are reached, construct the upper - layer node S i . When the sibling node S i of S i+1 is constructed, use S i and S i+1 to construct the upper - layer node, and so on to complete the construction of the data tree.

[0095] Extract key information from the data tree to obtain key data;

[0096] When constructing the node S i , process the left and right child nodes x i and x l of S r to obtain the key data x i ;

[0097]

[0098] Among them, δ l is the preset threshold of the right child node, and δ r is the preset threshold of the left child node.

[0099] Process the key data to obtain compressed data to be processed.

[0100] Specifically: sample points with a local outlier factor greater than the threshold for key data are removed, and the local outlier factor is defined as:

[0101] τ(x i ) = 1 / lrd k (x i )

[0102] where τ(x i ) is the local outlier factor of sample x i ,

[0103]

[0104] N k (x i ) is the set excluding sample x i , and x j is a sample in N k (x i ).

[0105] S2. Process the data to be processed to obtain data information of N streams;

[0106] S3. Set flow control constraint conditions;

[0107] S4. Process the data information of the N streams according to the flow control constraint conditions to obtain a QUIC flow multiplexing result.

[0108] Optionally, the processing of the data to be processed to obtain data information of N streams includes:

[0109] S21. Process the data to be processed to obtain parameter information of each stream; the parameter information of each stream includes the priority of the stream, SPBR information, and BSD information;

[0110] S22. Set rate control information of the streams in the QUIC connection; the expression of the rate control information of the stream is:

[0111] {total,connectedId,streamId,priority,streamPrioritizedBitRate,bucketSizeDuration,next2,next1}

[0112] Among them, total represents the number of QUIC connections, connectedId represents the connection identification number of a certain QUIC connection, next1 represents the rate control information of the stream in the next QUIC connection, streamId represents the identification number of a certain stream in the QUIC connection, priority represents the priority of a certain stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a certain stream in the QUIC connection puts Tokens into the token bucket, bucketSizeDuration represents the duration for a certain stream in the QUIC connection to put Tokens into the token bucket, and next2 represents the rate control information of the next stream in the same QUIC connection;

[0113] S23. Integrate the parameter information of each stream and the rate control information of the stream to obtain the data information of N streams.

[0114] Optionally, the setting of the flow control constraint conditions includes:

[0115] S31. Set the maximum capacity of the token bucket of the stream to:

[0116] SPBR * BSD

[0117] Among them, SPBR is the SPBR information, BSD is the BSD information, and * represents multiplication;

[0118] S32. The QUIC stream sender sets a variable Stokens for each stream.

[0119] The variable Stokens indicates the currently available number of tokens in the token bucket, and 1 token corresponds to 1 byte of data. Stokens is initialized to 0 when the stream is established, and increases by SPBR * T tokens at each processing interval T; the value of Stokens cannot exceed the maximum capacity of the token bucket, SPBR * BSD.

[0120] Optionally, the processing of the data information of the N streams according to the flow control constraint conditions to obtain the QUIC stream multiplexing result includes:

[0121] S41. Obtain the priority information in the data information of the N streams;

[0122] S42. Process the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result.

[0123] Optionally, processing the data information of the N streams according to the priority information to obtain a QUIC stream multiplexing result includes:

[0124] S421. For streams with different priorities, process each stream in descending order of stream priority to obtain a QUIC stream multiplexing result;

[0125] S422. For streams with the same priority, process each stream in the order of their creation to obtain a QUIC stream multiplexing result.

[0126] Optionally, processing each stream in descending order of stream priority to obtain a QUIC stream multiplexing result includes:

[0127] S4211. When the Stokens of the current stream is equal to 0, or when the current stream has no data waiting to be transmitted, ignore the packet processing of the current stream and directly process the packet of the next stream;

[0128] S4212. When the Stokens of the current stream is greater than 0 and the current stream has data waiting to be transmitted, process the packet of the current stream according to the Stokens;

[0129] S4213. Update the value of Stokens to Stokens - Tstream, where Tstream is the number of bytes actually processed by the stream;

[0130] S4214. When the value of Stokens - Tstream is not 0, execute S3211 to S3213 to obtain a QUIC stream multiplexing result.

[0131] The meanings of some abbreviations are shown in Table 1.

[0132] Table 1 Meanings of Abbreviations

[0133] QUIC Quick UDP Internet Connections Quick UDP Internet Connections HTTP Hypertext Transfer Protocol Hypertext Transfer Protocol TCP Transmission Control Protocol Transmission Control Protocol UDP User Datagram Protocol User Datagram Protocol HOL Head-of-line blocking Head-of-line blocking MTU Maximum Transmission Unit Maximum Transmission Unit TLS Transport Layer Security Transport Layer Security SPBR Stream Prioritized Bit Rate Stream Prioritized Bit Rate SPDY Speedy

[0134] Example 2

[0135] The multiplexing function of QUIC is similar to HTTP2. Multiple HTTP requests can be initiated simultaneously on a single QUIC connection. Each HTTP request corresponds to a stream. However, the data between each stream in QUIC is independent and does not affect each other.

[0136] Such as Figure 2As shown, three HTTP requests are initiated simultaneously on a QUIC connection, corresponding to stream1, stream2, and stream3 respectively. During the transmission process, if a UDP packet of stream2 is lost, it will only affect the data processing of the subsequent arriving stream2. The data of the subsequent arriving stream1 can be directly delivered to the application layer without being affected by the data loss of stream2. This implementation scheme can effectively avoid the HOL problem, but has the following disadvantages:

[0137] When there are a large number of streams in a QUIC connection, for high-priority or streams with a large amount of data waiting to be transmitted, they may always occupy the QUIC connection resources, and low-priority or streams with a small amount of data waiting to be transmitted can never obtain the QUIC transmission service.

[0138] The low-priority stream3 with a small amount of data waiting to be transmitted cannot obtain the QUIC transmission service for a long time.

[0139] Such as Figure 3 As shown, in order to avoid the situation where low-priority or streams with a small amount of data waiting to be transmitted are "starved to death", when the QUIC at the sending end processes the data sending of the stream, a new QUIC stream multiplexing algorithm module is added to solve the problem that low-priority or streams with a small amount of data waiting to be transmitted cannot obtain the QUIC transmission service for a long time.

[0140] In order to avoid the situation where low-priority or streams with a small amount of data waiting to be transmitted are "starved to death", this scheme proposes the concept of stream prioritized bit rate (SPBR), with the unit of KB per second. That is, before processing the data waiting to be transmitted for each stream, the data transmission rate of each stream is configured first, so as to provide a minimum transmission rate guarantee for each stream. That is to say, when the QUIC stream sender processes the data of a certain high-priority stream, if its transmission rate exceeds the SPBR, even if there is still data waiting to be processed for this stream, the QUIC stream sender will terminate the service for this stream and turn to serve other streams with the same priority or lower priority and whose rates have not reached the SPBR.

[0141] The strategy of this embodiment is to implement the multiplexing of QUIC using the Token Bucket algorithm to achieve the SPBR guarantee for the stream. The token is the pass for transmitting data, and one token represents that one byte unit of data can pass through. The number of tokens must be put into the bucket according to the pre-agreed SPRB. Each stream first retrieves tokens from the bucket. The amount of data that can be sent is equal to the number of tokens retrieved. After processing the data, the corresponding number of tokens in the bucket also decreases accordingly. In this way, the speed of retrieving tokens (i.e., the data transmission rate) will not exceed the speed of putting tokens (i.e., the SPBR), thus achieving the purpose of limiting the data transmission rate.

[0142] To effectively control the data transmission rate of each stream, it is necessary to pre-configure the priority (priority parameter), SPBR (streamPrioritizedBitRate parameter), and BSD (bucketSizeDuration parameter) information for each stream. The QUIC stream sender maintains the rate control information for all streams in each QUIC connection. The data structure of the rate control information for each stream in the QUIC connection is as Figure 4 shown.

[0143] As Figure 4 shown above, where total represents the number of QUIC connections, connectedId represents the connection identification number of a certain QUIC connection, next1 represents the pointer to the rate control information of the next stream in the next QUIC connection, streamId represents the identification number of a certain stream in the QUIC connection, priority represents the priority of a certain stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a certain stream in the QUIC connection puts tokens into the token bucket, bucketSizeDuration represents the duration for which a certain stream in the QUIC connection puts tokens into the token bucket, and next2 represents the pointer to the rate control information of the next stream in the same QUIC connection.

[0144] As Figure 5As shown, BSD (Bucket Size Duration) determines the "depth" of the token bucket. It and SPBR jointly determine the maximum capacity of the token bucket for a stream, which is SPBR * BSD. The maximum capacity of the token bucket limits the total amount of data that each stream can cache. The QUIC stream sender maintains a variable Stokens for each stream, which indicates the number of available tokens in the token bucket, and 1 token corresponds to 1 byte of data. When a stream is established, Stokens is initialized to 0, and at each processing interval T, SPBR * T tokens are added (for example, if the SPBR specified by streamPrioritizedBitRate is 10 kBps and T is calculated as 10 ms during processing, then 10 kBps * 10 ms = 100 Byte, that is, 100 tokens are injected into the token bucket). The value of Stokens cannot exceed the maximum capacity of the token bucket, which is SPBR * BSD (for example, if BSD = 100 ms, the maximum capacity of the token bucket is 10 kBps * 100 ms = 1 kBytes, that is, the maximum number of tokens that can be accommodated in the token bucket is 1000).

[0145] When there is new data to be sent and flow control is satisfied, the QUIC stream sender processes the stream according to the following principles:

[0146] Process each stream in descending order of stream priority.

[0147] For streams with the same priority, they are processed in the order of their creation.

[0148] When the priority of a certain stream is configured to be the highest and its SPBR is infinite, only after the packet transmission processing of this stream is satisfied will the packet processing of other streams with the same or lower priority than it be considered.

[0149] Each stream can only send packets that meet the requirements of SPRB.

[0150] When processing each stream, the following steps should be executed:

[0151] If the Stokens of the current stream is equal to 0, or there is no data waiting to be transmitted for the current stream, then the packet processing of the current stream is ignored and the packet of the next stream is directly processed.

[0152] If the number of Stokens in the current stream is greater than 0 and there is data waiting to be transmitted in the current stream, then process the packets of the current stream according to the Stokens.

[0153] Update the value of Stokens to (Stokens - Tstream), and the minimum value of this parameter is 0, where Tstream is the number of bytes actually processed by the stream.

[0154] Jump to step 1) and continue to execute according to the steps.

[0155] After all streams have been traversed once, start repeating the above processing process from the stream with the highest priority until there is no data waiting to be processed or all streams are closed.

[0156] Embodiment III

[0157] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of an implementation device for QUIC stream multiplexing disclosed in an embodiment of the present invention. Among them, Figure 6 the described implementation device for QUIC stream multiplexing is applied to the technical field of data stream processing, and the embodiments of the present invention are not limited thereto. As Figure 6 shown, the implementation device for QUIC stream multiplexing may include the following operations:

[0158] S301, a data acquisition module, for acquiring data to be processed; the data to be processed includes N streams, where N is a positive integer;

[0159] S302, a data processing module, for processing the data to be processed to obtain data information of N streams;

[0160] S303, a constraint condition setting module, for setting flow control constraint conditions;

[0161] S304, a QUIC stream multiplexing module, for processing the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result.

[0162] Embodiment III

[0163] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of another implementation device for QUIC stream multiplexing disclosed in an embodiment of the present invention. Among them, Figure 7 the described implementation device for QUIC stream multiplexing is applied to the technical field of data stream processing, and the embodiments of the present invention are not limited thereto. As Figure 7As shown, the implementation device for QUIC stream multiplexing may include the following operations:

[0164] A memory 401 storing executable program code;

[0165] A processor 402 coupled to the memory 401;

[0166] The processor 402 invokes the executable program code stored in the memory 401 to execute the steps in the implementation method of QUIC stream multiplexing described in Embodiment 1 and Embodiment 2.

[0167] Embodiment 4

[0168] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps in the implementation method of QUIC stream multiplexing described in Embodiment 1 and Embodiment 2.

[0169] The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

[0170] Through the specific descriptions of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solutions, in essence, or the parts that contribute to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, which includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is readable by a computer.

[0171] Finally, it should be noted that: what is disclosed in an implementation method and device for QUIC stream multiplexing disclosed in the embodiments of the present invention is only the preferred embodiments of the present invention, which are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An implementation method for QUIC stream multiplexing, characterized in that, The method includes: S1. Obtain the data to be processed; the data to be processed includes N streams, where N is a positive integer; S2. Process the data to be processed to obtain data information of N streams; S3. Set the flow control constraint conditions; S4. According to the flow control constraint conditions, process the data information of the N streams to obtain the QUIC stream multiplexing result.

2. The implementation method of QUIC stream multiplexing according to claim 1, characterized in that The processing the data to be processed to obtain data information of N streams includes: S21. Process the data to be processed to obtain parameter information of each stream; the parameter information of each stream includes the priority of the stream, SPBR information, and BSD information; S22. Set the rate control information of the streams in the QUIC connection; the expression of the rate control information of the stream is: {total,connectedId,streamId,priority,streamPrioritizedBitRate,bucketSizeDuration,next2,next1} where total represents the number of QUIC connections, connectedId represents the connection identification number of a certain QUIC connection, next1 represents the rate control information of the stream in the next QUIC connection, streamId represents the identification number of a certain stream in the QUIC connection, priority represents the priority of a certain stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a certain stream in the QUIC connection puts Tokens into the token bucket, bucketSizeDuration represents the duration for which a certain stream in the QUIC connection puts Tokens into the token bucket, and next2 represents the rate control information of the next stream in the same QUIC connection; S23. Integrate the parameter information of each stream and the rate control information of the stream to obtain data information of N streams.

3. The implementation method of QUIC stream multiplexing according to claim 1, characterized in that, The setting the flow control constraint conditions includes: S31. Set the maximum capacity of the token bucket of the stream to be: SPBR * BSD where SPBR is the SPBR information, BSD is the BSD information, and * represents multiplication; S32. The QUIC stream sender sets a variable Stokens for each stream; The variable Stokens indicates the current available number of tokens in the token bucket, and 1 token corresponds to 1 byte of data. When the stream is established, Stokens is initialized to 0, and at each processing interval T, SPBR * T tokens are added; the value of Stokens cannot exceed the maximum capacity of the token bucket, which is SPBR * BSD.

4. The implementation method of QUIC stream multiplexing according to claim 1, wherein Processing the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result, including: S41, obtaining the priority information in the data information of the N streams; S42, processing the data information of the N streams according to the priority information to obtain a QUIC stream multiplexing result.

5. The implementation method of QUIC stream multiplexing according to claim 4, wherein The processing the data information of the N streams according to the priority information to obtain a QUIC stream multiplexing result includes: S421, processing each stream in descending order of stream priority for streams with different priorities to obtain a QUIC stream multiplexing result; S422, processing each stream in the order of stream creation for streams with the same priority to obtain a QUIC stream multiplexing result.

6. The implementation method of QUIC stream multiplexing according to claim 5, characterized in that, The processing each stream in descending order of stream priority to obtain a QUIC stream multiplexing result includes: S4211, when the Stokens of the current stream is equal to 0, or when the current stream has no data waiting to be transmitted, ignoring the packet processing of the current stream and directly processing the packet of the next stream; S4212, when the Stokens of the current stream is greater than 0 and the current stream has data waiting to be transmitted, processing the packet of the current stream according to the Stokens; S4213, updating the value of Stokens to Stokens - Tstream, where Tstream is the number of bytes actually processed by the stream; S4214, when the value of Stokens - Tstream is not 0, executing S3211 to S3213 to obtain a QUIC stream multiplexing result.

7. An implementation device for QUIC stream multiplexing, characterized in that, The apparatus includes: A data acquisition module for acquiring data to be processed; the data to be processed includes N streams, where N is a positive integer; A data processing module for processing the data to be processed to obtain the data information of the N streams; A constraint condition setting module for setting flow control constraint conditions; A QUIC stream multiplexing module for processing the data information of the N streams according to the flow control constraint conditions to obtain a QUIC stream multiplexing result.

8. An implementation device for QUIC stream multiplexing, characterized in that, The apparatus includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the QUIC stream multiplexing implementation method according to any one of claims 1 - 6.

9. A computer-readable storage medium, characterized in that, The computer - storable medium stores computer instructions which, when called, are used to execute the QUIC stream multiplexing implementation method according to any one of claims 1 - 6.

Citation Information

Patent Citations

  • Method and system for handling data path creation in wireless network system

    CN111937364A

  • Flow monitoring method, system and equipment based on strict priority

    CN112953848A

  • Data transmission state determination method and device, storage medium and electronic equipment

    CN117834544A

  • User resource access speed control method and system based on time token

    CN117978741A

  • Transport stream bandwidth scheduling method, system, device and medium

    CN119211161A