Implementation method and device of quic stream multiplexing

By setting flow control constraints and a token bucket algorithm in the QUIC connection, the data transmission rate of each stream is controlled, which solves the problem that low-priority streams cannot be transmitted due to high-priority streams occupying resources, and achieves more efficient data processing.

CN120263737BActive Publication Date: 2025-11-18INST OF LOGISTICS SCI & TECH ACAD OF SYST ENG ACAD OF MILITARY SCI
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In a QUIC connection, high-priority or large-volume streams may consume resources, causing low-priority or small-volume streams to be unable to obtain transmission services for a long time, resulting in a 'starvation' situation.

Method used

By employing flow control constraints and the token bucket algorithm, the data transmission rate of each flow is controlled to ensure that low-priority or small-volume flows can also obtain transmission services in a timely manner.

Benefits of technology

This effectively avoids the problem of low-priority or small-volume data streams not receiving service for extended periods, thus improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263737B_ABST
    Figure CN120263737B_ABST
Patent Text Reader

Abstract

The application discloses a kind of implementation method and device of QUIC flow multiplexing, the method includes obtaining data to be processed;The data to be processed includes N stream, N is positive integer;The data to be processed is handled, and the data information of N stream is obtained;Setting flow control constraint condition;According to the flow control constraint condition, the data information of the N stream is handled, and the QUIC flow multiplexing result is obtained.The application solves the problem that low priority or waiting transmission data quantity small stream cannot obtain QUIC transmission service for a long time by the multiplexing of QUIC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data stream processing technology, and in particular to a method and apparatus for implementing QUIC stream multiplexing. Background Technology

[0002] To optimize the performance of the HTTP protocol, Google developed SPDY, an open network transport application layer protocol based on TCP, using techniques such as compression, multiplexing, and prioritization to reduce webpage loading time and improve data transmission security. SPDY is not intended to replace HTTP, but rather to enhance it. Its core idea is to minimize the number of TCP connections established. However, TCP's reliable transmission mechanism introduces the HOL (Head-of-line blocking) problem.

[0003] QUIC's multiplexing functionality is similar to HTTP / 2, allowing upper-layer applications to initiate multiple HTTP service requests over a single QUIC connection. However, QUIC's multiplexing implementation is superior to HTTP / 2, primarily by effectively avoiding the HOL (Hope of Loss) problem while waiting for packet loss recovery through the following aspects:

[0004] QUIC is built on top of the UDP protocol. Since the UDP protocol does not need to guarantee the timing of packets, nor does it need to detect and retransmit packet loss scenarios.

[0005] Within a single QUIC connection, multiple data streams can be established. Each data stream is identified by a unique stream ID, and data from different stream IDs is independent and does not interfere with each other. Data within the same stream ID must maintain its order, which is guaranteed by the offset field. The data receiver uses the received offset and length fields to discard, deduplicate, and sort the data in the stream before delivering it to the upper-layer application.

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

[0007] QUIC's multiplexing functionality is similar to HTTP / 2, allowing multiple HTTP requests to be initiated simultaneously over a single QUIC connection. Each HTTP request corresponds to a stream, but the data in each stream within QUIC is independent and does not affect each other.

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

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

[0010] When there are a large number of streams in a QUIC connection, high-priority streams or streams with a large amount of data waiting to be transmitted may occupy the QUIC connection resources indefinitely, while low-priority streams or streams with a small amount of data waiting to be transmitted will never be able to obtain QUIC transmission services.

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

[0012] The technical problem to be solved by this invention is to provide a method and apparatus for implementing QUIC stream multiplexing, which solves the following problems: In the same QUIC connection, there may be multiple data streams, each data stream is identified by a unique stream ID, the priority assigned to each data stream may be the same or different, and the amount of data transmitted in each data stream may vary greatly, and the data between different stream IDs is also independent of each other; then, a high-priority data stream or a data stream with a large amount of data waiting to be transmitted may occupy the unique QUIC connection channel, which may cause a situation where a low-priority data stream or a data stream with a small amount of data waiting to be transmitted is "starved".

[0013] To address the aforementioned technical problems, a first aspect of the present invention discloses a method for implementing QUIC stream multiplexing, the method comprising:

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

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

[0016] S3, set flow control constraints;

[0017] S4. Based on the flow control constraints, process the data information of the N streams to obtain the QUIC stream multiplexing result.

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

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

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

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

[0022] Wherein, total represents the number of QUIC connections, connectedId represents the connection identifier of a QUIC connection, next1 represents the rate control information pointing to the stream in the next QUIC connection, streamId represents the identifier of a stream in the QUIC connection, priority represents the priority of a stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a stream in the QUIC connection puts tokens into the token bucket, bucketSizeDuration represents the duration for which a stream in the QUIC connection puts tokens into the token bucket, and next2 represents the rate control information pointing to the next stream in the same QUIC connection;

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

[0024] As an optional implementation, in the first aspect of the present invention, setting flow control constraints includes:

[0025] S31, Set the maximum capacity of the stream's token bucket to:

[0026] SPBR*BSD

[0027] Where SPBR is SPBR information, BSD is BSD information, and * indicates product;

[0028] S32, the QUIC stream sender sets a variable Stakens for each stream;

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

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

[0031] S41, retrieve priority information from the data information of N streams;

[0032] S42, based on the priority information, process the data information of the N streams to obtain the QUIC stream multiplexing result.

[0033] As an optional implementation, in the first aspect of the present invention, the step of processing 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 priority to obtain the QUIC stream multiplexing result;

[0035] S422: For streams with the same priority, process each stream in the order in which they were created to obtain the QUIC stream multiplexing result.

[0036] As an optional implementation, in the first aspect of the present invention, the step of processing each stream sequentially according to its decreasing priority to obtain the QUIC stream multiplexing result includes:

[0037] S4211: When the current stream's tokens are equal to 0, or when the current stream has no data waiting to be transmitted, ignore the processing of the current stream's packet and directly process the packet of the next stream.

[0038] S4212, when the current stream's tokens are greater than 0 and there is data waiting to be transmitted in the current stream, then the current stream's packet is processed according to the tokens;

[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 to S3213 to obtain the QUIC stream multiplexing result.

[0041] A second aspect of this invention discloses an implementation apparatus for QUIC stream multiplexing, the apparatus comprising:

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

[0043] The data processing module is used to process the data to be processed to obtain data information from N streams;

[0044] The constraint setting module is used to set flow control constraints.

[0045] The QUIC stream multiplexing module is used to process the data information of the N streams according to the flow control constraints to obtain the QUIC stream multiplexing result.

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

[0047] S21, process the data to be processed to obtain parameter information for each stream; the parameter information for each stream includes stream priority, SPBR information and BSD information;

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

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

[0050] Wherein, total represents the number of QUIC connections, connectedId represents the connection identifier of a QUIC connection, next1 represents the rate control information pointing to the stream in the next QUIC connection, streamId represents the identifier of a stream in the QUIC connection, priority represents the priority of a stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a stream in the QUIC connection puts tokens into the token bucket, bucketSizeDuration represents the duration for which a stream in the QUIC connection puts tokens into the token bucket, and next2 represents the rate control information pointing to the next stream in the same QUIC connection;

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

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

[0053] S31, Set the maximum capacity of the stream's token bucket to:

[0054] SPBR*BSD

[0055] Where SPBR is SPBR information, BSD is BSD information, and * indicates product;

[0056] S32, the QUIC stream sender sets a variable Stakens for each stream;

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

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

[0059] S41, retrieve priority information from the data information of N streams;

[0060] S42, based on the priority information, process the data information of the N streams to obtain the QUIC stream multiplexing result.

[0061] As an optional implementation, in the second aspect of the present invention, the step of 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 priority to obtain the QUIC stream multiplexing result;

[0063] S422: For streams with the same priority, process each stream in the order in which they were created to obtain the QUIC stream multiplexing result.

[0064] As an optional implementation, in the second aspect of the present invention, the step of processing each stream sequentially according to its decreasing priority to obtain the QUIC stream multiplexing result includes:

[0065] S4211: When the current stream's tokens are equal to 0, or when the current stream has no data waiting to be transmitted, ignore the processing of the current stream's packet and directly process the packet of the next stream.

[0066] S4212, when the current stream's tokens are greater than 0 and there is data waiting to be transmitted in the current stream, then the current stream's packet is processed according to the tokens;

[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 to S3213 to obtain the QUIC stream multiplexing result.

[0069] A third aspect of the present invention discloses another implementation apparatus for QUIC stream multiplexing, the apparatus comprising:

[0070] Memory containing executable program code;

[0071] A processor coupled to the memory;

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

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

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

[0075] This invention proposes a method for implementing QUIC stream multiplexing to avoid the "starvation" of low-priority streams or streams with small amounts of data waiting to be transmitted. When the QUIC process stream data is sent at the sending end, the QUIC stream multiplexing method is used to solve the problem that low-priority streams or streams with small amounts of data waiting to be transmitted cannot receive QUIC transmission services for a long time, effectively improving the efficiency of data processing. Attached Figure Description

[0076] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0077] Figure 1 This is a flowchart illustrating an implementation method for QUIC stream multiplexing disclosed in an embodiment of the present invention;

[0078] Figure 2 The QUIC stream multiplexing disclosed in this embodiment of the invention causes low-priority streams to be unable to obtain the service graph for a long time;

[0079] Figure 3 This is a diagram illustrating how the present invention addresses the problem of low-priority streams or streams with small amounts of data waiting to be transmitted consistently failing to receive service.

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

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

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

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

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

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

[0086] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0087] This invention discloses a method and apparatus for implementing QUIC stream multiplexing. The method includes acquiring 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 for the N streams; setting flow control constraints; and processing the data information of the N streams according to the flow control constraints to obtain a QUIC stream multiplexing result. This invention solves the problem of low-priority streams or streams with small amounts of data waiting to be transmitted not receiving QUIC transmission services for extended periods through QUIC multiplexing. Detailed explanations follow.

[0088] Example 1

[0089] Please see Figure 1 , Figure 1 This is a flowchart illustrating an implementation method for QUIC stream multiplexing disclosed in an embodiment of the present invention. Figure 1 The implementation method of QUIC stream multiplexing described herein is not limited to the field of data stream processing technology. For example... Figure 1 As shown, the implementation method of this QUIC stream multiplexing can 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, to improve processing speed, after acquiring the data to be processed, data preprocessing is performed on the data to be processed to obtain compressed data to be processed; then step S2 is executed to process the compressed data to be processed to obtain data information of N streams; then steps S3 and S4 are executed.

[0092] The method for preprocessing the data to be processed to obtain compressed data is as follows:

[0093] The data to be processed is then processed to obtain a data tree;

[0094] Specifically, it means starting from the lowest level of raw data d i Initially, whenever two data points {d} are reached... i ,d i+1}, then construct the upper-level node S i When S i sibling node S i+1 After the build is complete, use S i and S i+1 Build the next level node, and so on, to complete the construction of the data tree.

[0095] Key information is extracted from the data tree to obtain key data;

[0096] When constructing node S i At that time, for S i The left and right child nodes x l and x r Processing is performed to obtain key data x i ;

[0097]

[0098] Where, δ l δ is the preset threshold for the right child node. r The preset threshold for the left child node.

[0099] The key data is processed to obtain compressed data to be processed.

[0100] Specifically, this involves removing sample points from key data where the local outlier factor exceeds a threshold. The local outlier factor is defined as:

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

[0102] Where τ(x) i ) is the sample x i Local outlier

[0103]

[0104] N k (x i (excluding sample x) i The set of x j For N k (x i The samples in ).

[0105] S2, process the data to be processed to obtain N streams of data information;

[0106] S3, set flow control constraints;

[0107] S4. Based on the flow control constraints, process the data information of the N streams to obtain the QUIC stream multiplexing result.

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

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

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

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

[0112] Wherein, total represents the number of QUIC connections, connectedId represents the connection identifier of a QUIC connection, next1 represents the rate control information pointing to the stream in the next QUIC connection, streamId represents the identifier of a stream in the QUIC connection, priority represents the priority of a stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a stream in the QUIC connection puts tokens into the token bucket, bucketSizeDuration represents the duration for which a stream in the QUIC connection puts tokens into the token bucket, and next2 represents the rate control information pointing to the next stream in the same QUIC connection;

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

[0114] Optionally, setting flow control constraints includes:

[0115] S31, Set the maximum capacity of the stream's token bucket to:

[0116] SPBR*BSD

[0117] Where SPBR is SPBR information, BSD is BSD information, and * indicates product;

[0118] S32, the QUIC stream sender sets a variable Stakens for each stream;

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

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

[0121] S41, retrieve priority information from the data information of N streams;

[0122] S42, based on the priority information, process the data information of the N streams to obtain the QUIC stream multiplexing result.

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

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

[0125] S422: For streams with the same priority, process each stream in the order in which they were created to obtain the QUIC stream multiplexing result.

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

[0127] S4211: When the current stream's tokens are equal to 0, or when the current stream has no data waiting to be transmitted, ignore the processing of the current stream's packet and directly process the packet of the next stream.

[0128] S4212, when the current stream's tokens are greater than 0 and there is data waiting to be transmitted in the current stream, then the current stream's packet is processed according to the tokens;

[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 the QUIC stream multiplexing result.

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

[0132] Table 1. Meaning of Abbreviations

[0133] QUIC Quick UDP Internet Connections Fast UDP network connection 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-to-head blocking MTU Maximum Transmission Unit Maximum Transmission Unit TLS Transport Layer Security Secure transport layer SPBR Stream Prioritized Bit Rate Stream priority bit rate SPDY Speedy

[0134] Example 2

[0135] QUIC's multiplexing functionality is similar to HTTP / 2, allowing multiple HTTP requests to be initiated simultaneously over a single QUIC connection. Each HTTP request corresponds to a stream, but the data in each stream within QUIC is independent and does not affect each other.

[0136] like Figure 2As shown, three HTTP requests are initiated simultaneously over a single QUIC connection, corresponding to stream1, stream2, and stream3 respectively. During transmission, if a UDP packet in stream2 is lost, it only affects the processing of subsequent stream2 data; subsequent stream1 data can be directly delivered to the application layer, unaffected by the loss of stream2 data. This implementation effectively avoids the HOL (House of Least Important) problem, but it has the following drawbacks:

[0137] When there are a large number of streams in a QUIC connection, high-priority streams or streams with a large amount of data waiting to be transmitted may occupy the QUIC connection resources indefinitely, while low-priority streams or streams with a small amount of data waiting to be transmitted will never be able to obtain QUIC transmission services.

[0138] Stream3, which has low priority and a small amount of data waiting to be transmitted, cannot receive QUIC transmission service for a long time.

[0139] like Figure 3 As shown, in order to prevent low-priority streams or streams with small amounts of data waiting to be transmitted from being "starved", a new QUIC stream multiplexing algorithm module is added when the QUIC process stream data transmission at the sending end to solve the problem that low-priority streams or streams with small amounts of data waiting to be transmitted cannot receive QUIC transmission services for a long time.

[0140] To prevent low-priority streams or streams with small amounts of pending data from being "starved," this scheme proposes the concept of Stream Prioritized Bit Rate (SPBR), measured in KB per second. This means that before processing the data waiting to be transmitted from each stream, the data transmission rate of each stream is configured, thus providing a minimum guaranteed transmission rate for each stream. In other words, when a QUIC stream sender is processing data from a high-priority stream, if its transmission rate exceeds the SPBR, even if there is still data waiting to be processed, the QUIC stream sender will terminate service to that stream and instead serve other streams of equal or lower priority that have not reached the SPBR.

[0141] This embodiment employs a token bucket algorithm to implement QUIC multiplexing and ensure stream SPBR (Split-Break Rate). A token acts as a pass for data transmission; one token represents the number of bytes of data that can be transmitted. The number of tokens must be placed into the bucket according to a pre-agreed SPBR. Each stream first retrieves tokens from the bucket; the number of tokens retrieved determines the number of bytes of data that can be sent. After processing the data, the number of tokens in the bucket decreases accordingly. In this way, the rate at which tokens are retrieved (i.e., the data transmission rate) will not exceed the rate at which tokens are added (i.e., SPBR), thus achieving the goal of limiting the data transmission rate.

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

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

[0144] like Figure 5As shown, BSD (Bucket Size Duration) determines the "depth" of the token bucket. Together with SPBR, it determines the maximum capacity of the stream's token bucket, SPBR*BSD. The maximum capacity of the token bucket limits the total amount of data that each stream can buffer. The QUIC stream sender maintains a variable `Stokens` for each stream, indicating the number of tokens currently available in the token bucket, with one token corresponding to one byte of data. `Stokens` is initialized to 0 when the stream is established, and increments by SPBR*T tokens at each processing interval T (for example, if `streamPrioritizedBitRate` specifies an SPBR of 10kBps, and T is calculated as 10ms, then 10kBps*10ms = 100 bytes are injected into the token bucket, i.e., 100 tokens are injected). The value of `Stokens` cannot exceed the maximum capacity of the token bucket, SPBR*BSD (for example, if BSD = 100ms, the maximum capacity of the token bucket is 10kBps*100ms = 1kBytes, meaning the maximum number of tokens the token bucket can hold is 1000).

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

[0146] Each stream is processed in descending order of stream priority.

[0147] For streams with the same priority, they are processed in the order they were created.

[0148] When a stream is configured with the highest priority and its SPBR is infinite, the processing of packets from other streams with the same or lower priority will only be considered after the packet transmission processing of that stream has been satisfied.

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

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

[0151] If the current stream's tokens are equal to 0, or if the current stream has no data waiting to be transmitted, then the processing of the current stream's packet is ignored, and the packet of the next stream is processed directly.

[0152] If the current stream's tokens are greater than 0, and there is data waiting to be transmitted in the current stream, then the current stream's packet is processed according to the tokens.

[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 following the steps.

[0155] After all streams have been traversed once, the above processing procedure is repeated starting from the highest priority stream until there is no more data waiting to be processed or all streams are closed.

[0156] Example 3

[0157] Please see Figure 6 , Figure 6 This is a schematic diagram of a QUIC stream multiplexing implementation device disclosed in an embodiment of the present invention. Figure 6 The described QUIC stream multiplexing implementation apparatus is applied in the field of data stream processing technology, and the embodiments of the present invention are not limited thereto. Figure 6 As shown, the implementation apparatus for QUIC stream multiplexing may include the following operations:

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

[0159] S302, data processing module, used to process the data to be processed to obtain N stream data information;

[0160] S303, Constraint Setting Module, is used to set flow control constraints;

[0161] S304, QUIC stream multiplexing module, is used to process the data information of the N streams according to the flow control constraints to obtain the QUIC stream multiplexing result.

[0162] Example 3

[0163] Please see Figure 7 , Figure 7 This is a schematic diagram of another QUIC stream multiplexing implementation device disclosed in an embodiment of the present invention. Figure 7 The described QUIC stream multiplexing implementation apparatus is applied in the field of data stream processing technology, and the embodiments of the present invention are not limited thereto. Figure 7As shown, the implementation apparatus for QUIC stream multiplexing may include the following operations:

[0164] Memory 401 storing executable program code;

[0165] Processor 402 coupled to memory 401;

[0166] The processor 402 calls 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] Example 4

[0168] This invention discloses a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program enables a computer to perform the steps in the implementation method of QUIC stream multiplexing described in Embodiments 1 and 2.

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

[0170] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes 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, including 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 storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0171] Finally, it should be noted that the QUIC stream multiplexing implementation method and apparatus disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An implementation method of QUIC stream multiplexing, characterized in that, The method comprises: S1, obtaining to-be-processed data; the to-be-processed data comprises N streams, and N is a positive integer; S2, processing the to-be-processed data to obtain data information of the N streams, comprising: S21, processing the to-be-processed data to obtain parameter information of each stream; the parameter information of each stream comprises a priority of the stream, SPBR information and BSD information; S22, setting rate control information of a stream in a QUIC connection; an expression of the rate control information of the stream is: {total, connectedId, streamId, priority, streamPrioritizedBitRate, bucketSizeDuration, next2, next1} Wherein, total represents a connection number of the QUIC, connectedId represents a connection identification number of a certain stream in the QUIC, next1 represents rate control information of a next stream in a next QUIC connection, streamId represents an identification number of a certain stream in the QUIC, priority represents a priority of a certain stream in the QUIC, streamPrioritizedBitRate represents a rate of a number of tokens put into a token bucket by a certain stream in the QUIC, bucketSizeDuration represents a duration of a number of tokens put into the token bucket by a certain stream in the QUIC, and next2 represents rate control information of a next stream in the same QUIC connection; S23, integrating the parameter information of each stream and the rate control information of the stream to obtain data information of the N streams; S3, setting a flow control constraint condition, comprising: S31, setting a maximum capacity of a token bucket of the stream as: SPBR*BSD Wherein, SPBR is the SPBR information, BSD is the BSD information, and * represents multiplication; S32, setting a variable Stokens for each stream by a QUIC flow sending end; The variable Stokens indicates a number of currently available tokens in the token bucket, and 1 token corresponds to 1 byte of data; Stokens is initialized as 0 when the stream is established, and is increased by SPBR*T tokens at each processing interval T; and a value of Stokens cannot exceed the maximum capacity SPBR*BSD of the token bucket; S4, processing the data information of the N streams according to the flow control constraint condition to obtain a QUIC flow multiplexing result.

2. The method of claim 1, wherein, The processing of the data information of the N streams according to the flow control constraint condition to obtain the QUIC flow multiplexing result comprises: S41, retrieve priority information from the data information of N streams; S42, based on the priority information, process the data information of the N streams to obtain the QUIC stream multiplexing result.

3. The method of claim 2, wherein, The step of processing the data information of the N streams according to the priority information to obtain the QUIC stream multiplexing result includes: S421, For streams with different priorities, process each stream in descending order of priority to obtain the QUIC stream multiplexing result; S422: For streams with the same priority, process each stream in the order in which they were created to obtain the QUIC stream multiplexing result.

4. The method of implementing QUIC stream multiplexing according to claim 3, wherein, The process of processing each stream in descending order of priority to obtain the QUIC stream multiplexing result includes: S4211: When the current stream's tokens are equal to 0, or when the current stream has no data waiting to be transmitted, ignore the processing of the current stream's packet and directly process the packet of the next stream. S4212, when the current stream's tokens are greater than 0 and there is data waiting to be transmitted in the current stream, then the current stream's packet is processed according to the tokens; S4213, update 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, execute S3211 to S3213 to obtain the QUIC stream multiplexing result.

5. An apparatus for implementing QUIC stream multiplexing, the apparatus comprising: The device includes: The data acquisition module is used to acquire data to be processed; the data to be processed includes N streams, where N is a positive integer; The data processing module is used to process the data to be processed to obtain N streams of data information, including: S21, process the data to be processed to obtain parameter information for each stream; the parameter information for each stream includes stream priority, SPBR information and BSD information; S22, Set the rate control information for the stream in the QUIC connection; the expression for the rate control information of the stream is: {total,connectedId,streamId,priority,streamPrioritizedBitRate,bucketSizeDuration,next2,next1} Wherein, total represents the number of QUIC connections, connectedId represents the connection identifier of a QUIC connection, next1 represents the rate control information pointing to the stream in the next QUIC connection, streamId represents the identifier of a stream in the QUIC connection, priority represents the priority of a stream in the QUIC connection, streamPrioritizedBitRate represents the rate at which a stream in the QUIC connection puts tokens into the token bucket, bucketSizeDuration represents the duration for which a stream in the QUIC connection puts tokens into the token bucket, and next2 represents the rate control information pointing to the next stream in the same QUIC connection; S23, integrate the parameter information and rate control information of each stream to obtain data information of N streams; The constraint setting module is used to set flow control constraints, including: S31, Set the maximum capacity of the stream's token bucket to: SPBR*BSD Where SPBR is SPBR information, BSD is BSD information, and * indicates product; S32, the QUIC stream sender sets a variable Stakens for each stream; The variable Stokens indicates the number of tokens currently available in the token bucket, and one token corresponds to one byte of data. Stokens is initialized to 0 when the stream is established, and the number of tokens is increased by SPBR*T at each processing interval T. The value of Stokens cannot exceed the maximum capacity of the token bucket, SPBR*BSD. The QUIC stream multiplexing module is used to process the data information of the N streams according to the flow control constraints to obtain the QUIC stream multiplexing result.

6. An apparatus for implementing QUIC stream multiplexing, the apparatus comprising: The device includes: Memory containing 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 as described in any one of claims 1-4.

7. A computer storable medium, characterized by The computer storage medium stores computer instructions, which, when invoked, are used to execute the QUIC stream multiplexing implementation method as described in any one of claims 1-4.

Citation Information

Patent Citations

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

    CN112953848A

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

    CN117834544A