Method, device and equipment for establishing fast user datagram protocol network connection
By including multiple QUIC protocol version numbers in the QUIC connection request and handshake negotiation after verification on the server, the connection establishment delay problem caused by incompatibility of the QUIC protocol version is solved, and the establishment speed and performance of the QUIC connection are improved.
Patent Information
- Application Number
- CN202311825168.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
The incompatibility of the QUIC protocol version causes connection establishment delays, especially when network conditions are poor, the renegotiation process increases the connection establishment time and affects performance.
The QUIC connection request contains multiple QUIC protocol version numbers, and send handshake negotiation information after verification on the server to ensure that the agreement versions of both parties are consistent and reduce the number of renegotiations.
By reducing unnecessary renegotiation times, the establishment speed and performance of QUIC connections are improved, and the number of round trips of network communications is reduced, suitable for applications requiring low latency and high throughput.
Smart Images

Figure CN120223779A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technologies, and particularly to a method, apparatus, and device for establishing a Quick User Datagram Protocol (QUIC) network connection. Background Art
[0002] QUIC is an abbreviation for Quick UDP Internet Connections, and UDP is an abbreviation for User Datagram Protocol. As a UDP-based transport protocol, QUIC aims to provide fast, secure, and reliable network connections, mainly to solve problems existing in the TCP protocol such as head-of-line blocking, protocol ossification, and handshake latency. QUIC is widely used to provide fast, secure, and reliable network connections, especially suitable for applications and services such as online games, streaming media, and cloud services, which have high requirements for low latency and high performance.
[0003] A key feature in the design of the QUIC protocol is the version negotiation mechanism, which allows the client and the server to select the optimal protocol version to ensure protocol version compatibility. With the continuous evolution of QUIC, there have been many QUIC protocol versions, resulting in a relatively easy occurrence of QUIC protocol version incompatibility when establishing a QUIC connection. When the protocol versions are incompatible, re-negotiation must be carried out to determine which protocol version to use. This re-negotiation process may increase the latency of connection establishment, especially in poor network conditions. Since re-negotiation may require multiple communication round-trips, this will reduce the connection establishment speed and have an adverse impact on performance, especially for applications that require low latency and high throughput.
[0004] To address these problems, we need a method for quickly establishing a QUIC network connection to solve the protocol version compatibility and re-negotiation problems, so as to improve the QUIC connection establishment speed and performance.
[0005] The above statements are only used to provide background technical information related to this application, and do not necessarily constitute prior art. Summary of the Invention
[0006] The objective of this application is to provide a method, apparatus, and device for establishing a Quick User Datagram Protocol network connection to solve the protocol version compatibility and re-negotiation problems, and improve the QUIC connection establishment speed and performance. To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary part is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the subsequent detailed description.
[0007] According to the first aspect of the embodiments of the present application, a method for establishing a Quick User Datagram Protocol (QUIC) network connection is provided, which is applied to a client. The method includes:
[0008] Construct a QUIC connection request for the QUIC network connection, where the connection request includes multiple QUIC protocol version numbers;
[0009] Send the QUIC connection request;
[0010] Receive handshake negotiation information from the server, where the handshake negotiation information includes the QUIC protocol version numbers supported by the server, and the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers.
[0011] In some embodiments of the present application, the constructing of the QUIC connection request for the QUIC network connection includes:
[0012] Create an initial connection request for the QUIC;
[0013] Add the default QUIC protocol version number pre-specified by the client to the long header of the initialization packet in the initial connection request.
[0014] In some embodiments of the present application, the constructing of the QUIC connection request for the QUIC network connection further includes:
[0015] Add other QUIC protocol version numbers supported by the client to the transmission parameters of the initialization packet in the initial connection request.
[0016] In some embodiments of the present application, the constructing of the QUIC connection request for the QUIC network connection further includes:
[0017] Set a priority order for the multiple QUIC protocol version numbers;
[0018] Wherein, the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers according to the priority order.
[0019] In some embodiments of the present application, the constructing of the QUIC connection request for the QUIC network connection further includes:
[0020] Add a parameter field for indicating whether to communicate with QUIC in an encrypted manner to the transmission parameters of the initialization packet in the initial connection request, so that the server determines whether to perform encrypted transmission according to the value of the parameter field.
[0021] In some embodiments of the present application, when the value of the parameter field indicates that communication using QUIC is encrypted, the handshake negotiation information further includes encryption information selected by the server according to the QUIC protocol version number supported by the server.
[0022] According to a second aspect of the embodiments of the present application, a method for establishing a Quick User Datagram Protocol (QUIC) network connection, which is applied to a server, is provided. The establishment method includes:
[0023] Receiving a QUIC connection request from a client, where the connection request includes multiple QUIC protocol version numbers;
[0024] Verifying the multiple QUIC protocol version numbers to obtain the QUIC protocol version number supported by the server;
[0025] Sending handshake negotiation information, where the handshake negotiation information includes the QUIC protocol version number supported by the server.
[0026] In some embodiments of the present application, the multiple QUIC protocol version numbers have a preset priority order;
[0027] The verifying the multiple QUIC protocol version numbers to obtain the QUIC protocol version number supported by the server includes:
[0028] Verifying the multiple QUIC protocol version numbers according to the preset priority order to obtain the QUIC protocol version number supported by the server.
[0029] In some embodiments of the present application, the connection request carries a parameter field for indicating whether communication using QUIC is encrypted;
[0030] The establishment method further includes: determining whether to perform encrypted transmission according to the value of the parameter field.
[0031] In some embodiments of the present application, when the value of the parameter field indicates that communication using QUIC is encrypted, before sending the handshake negotiation information, the establishment method further includes:
[0032] Selecting encryption information according to the QUIC protocol version number supported by the server;
[0033] Adding the encryption information to the handshake negotiation information.
[0034] According to a third aspect of the embodiments of the present application, a device for establishing a QUIC network connection, which is applied to a client, is provided. The establishment device includes:
[0035] A building module for building a Quick UDP Internet Connections (QUIC) connection request, where the connection request contains multiple QUIC protocol version numbers.
[0036] A sending module for sending the QUIC connection request.
[0037] A receiving module for receiving handshake negotiation information from a server, where the handshake negotiation information contains the QUIC protocol version numbers supported by the server, and the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers.
[0038] According to the fourth aspect of the embodiments of the present application, there is provided a Quick UDP Internet Connections (QUIC) connection establishment device applied to a server, where the establishment device includes:
[0039] A receiving module for receiving a Quick UDP Internet Connections (QUIC) connection request from a client, where the connection request contains multiple QUIC protocol version numbers.
[0040] A verification module for verifying the multiple QUIC protocol version numbers to obtain the QUIC protocol version numbers supported by the server.
[0041] A sending module for sending handshake negotiation information, where the handshake negotiation information contains the QUIC protocol version numbers supported by the server.
[0042] According to the fifth aspect of the embodiments of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the Quick UDP Internet Connections (QUIC) connection establishment method according to any one of the embodiments of the present application.
[0043] According to the sixth aspect of the embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the Quick UDP Internet Connections (QUIC) connection establishment method according to any one of the embodiments of the present application.
[0044] According to the seventh aspect of the embodiments of the present application, there is provided a Quick UDP Internet Connections (QUIC) connection system including a client and a server in communication connection, where the client is used to implement the Quick UDP Internet Connections (QUIC) connection establishment method according to the first aspect of the embodiments of the present application, and the server is used to implement the Quick UDP Internet Connections (QUIC) connection establishment method according to the second aspect of the embodiments of the present application.
[0045] One aspect of the technical solution provided by the embodiments of the present application may include the following beneficial effects:
[0046] By including multiple QUIC protocol version numbers in the connection request, the client can quickly provide multiple alternative protocol versions, thus minimizing the number of unnecessary renegotiations to the greatest extent. This improves the efficiency of connection establishment and accelerates the process of establishing a network connection. By receiving the handshake negotiation information from the server, the client can learn the QUIC protocol version numbers supported by the server; after verifying multiple protocol version numbers, the server provides a protocol version that ensures compatibility, thus ensuring the consistency of the protocol versions between both parties and reducing potential compatibility issues.
[0047] At the same time, this method not only shortens the time required for connection establishment but also reduces the number of round trips in network communication, thus significantly improving the connection establishment speed and performance, which is particularly important for applications that require low latency and high throughput, enabling them to better meet user needs.
[0048] The above description is only an overview of the technical solution of the embodiments of the present application. In order to be able to more clearly understand the technical means of the embodiments of the present application, it can be implemented in accordance with the content of the description. And in order to make the above and other purposes, features, and advantages of the embodiments of the present application more obvious and understandable, the following specifically illustrates the specific implementation manners of the present application. Brief Description of the Drawings
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0050] Figure 1 Shows the flowchart of the method for establishing a QUIC network connection according to an embodiment of the present application.
[0051] Figure 2 Shows the flowchart of constructing a QUIC connection request in an embodiment of the present application.
[0052] Figure 3 Shows the flowchart of the method for establishing a QUIC network connection according to an embodiment of the present application.
[0053] Figure 4 Shows the structural block diagram of the device for establishing a QUIC network connection according to an embodiment of the present application.
[0054] Figure 5The block diagram of the apparatus for establishing a QUIC network connection according to an embodiment of the present application is shown.
[0055] Figure 6 The block diagram of an electronic device according to an embodiment of the present application is shown.
[0056] Figure 7 The schematic diagram of a computer-readable storage medium according to an embodiment of the present application is shown.
[0057] Figure 8 The block diagram of the system for establishing a QUIC network connection according to an embodiment of the present application is shown.
[0058] Figure 9 The signaling diagram of the process for establishing a QUIC network connection according to an embodiment of the present application is shown. Detailed implementation manners
[0059] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0060] Those skilled in the art can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as here.
[0061] In the related art, when a client initiates a QUIC request to a server, it will carry the specified version number supported by the client in the first data packet. If the server can accept the version provided by the client, the server will use this protocol version for the entire life cycle of the connection. However, there are various QUIC protocol versions, but the client can only carry one version number, which reduces the version selectivity of the server. It is easy to occur that the version number carried by the client is not supported by the server, resulting in the need to re-negotiate the version, thereby introducing an extra 1RTT delay and affecting the connection establishment efficiency of QUIC.
[0062] In the related art, when establishing QUIC, the QUIC protocol version incompatibility is likely to occur, which leads to the need for re - negotiation when establishing QUIC, consuming the negotiation time and thus affecting the connection establishment speed of QUIC. The embodiment of the present application provides a method for establishing a Quick User Datagram Protocol (QUIC) network connection, including: constructing a QUIC connection request for the QUIC network connection, where the connection request contains multiple QUIC protocol version numbers; sending the QUIC connection request; receiving handshake negotiation information from the server, where the handshake negotiation information contains the QUIC protocol version numbers supported by the server, and the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers. The method for establishing a QUIC network connection provided by the embodiment of the present application can reduce the situation of QUIC protocol version incompatibility, solve the protocol version compatibility and re - negotiation problems, and improve the QUIC connection establishment speed.
[0063] An embodiment of the present application provides a method for establishing a QUIC network connection, which is applied to a client. The client can be, for example, a client connected to an edge node of a CDN, or the client can be a client connected to an edge node in an edge cloud network.
[0064] In the application scenario of CDN, the client can be connected to an edge node of the CDN, and the client can be used to implement the method for establishing a QUIC network connection in the embodiment of the present application. CDN, that is, Content Delivery Network, is an intelligent virtual network built on the existing network. Relying on edge servers deployed in different geographical locations, through function modules such as load balancing, content distribution, and scheduling of the central platform, users can obtain the required content nearby.
[0065] In the application scenario of the edge cloud network, the client can be connected to an edge node in the edge cloud network, and the client can be used to implement the method for establishing a QUIC network connection in the embodiment of the present application. The edge cloud network can include multiple edge nodes. An edge node can include one or more servers (for example, one or more node servers, one or more control servers, one or more DNS servers (such as one or more authoritative name servers, one or more proxy DNS servers, etc.)), and one or more other network devices, such as routers, switches, and / or hubs, etc.).
[0066] Refer to Figure 1 As shown, the establishment method can include steps S11 to S13:
[0067] S11. Construct a Quick UDP Internet Connections (QUIC) connection request, where the connection request includes multiple QUIC protocol version numbers.
[0068] The multiple QUIC protocol version numbers include two or more QUIC protocol version numbers.
[0069] Reference Figure 2 As shown, in some embodiments of the present application, constructing a Quick UDP Internet Connections (QUIC) connection request may include step S111 and step S112:
[0070] S111. Create an initial connection request for QUIC.
[0071] S112. Add the default QUIC protocol version number pre-specified by the client to the long header of the initialization packet in the initial connection request.
[0072] In this way, the default QUIC protocol version number pre-specified by the client is carried in the first long header (Long Header) of the initialization packet in the initial connection request, enabling the server to identify the default QUIC protocol version number.
[0073] In some embodiments of the present application, constructing a Quick UDP Internet Connections (QUIC) connection request may further include step S113:
[0074] S113. Add other QUIC protocol version numbers supported by the client to the transmission parameters of the initialization packet in the initial connection request.
[0075] For example, add a custom parameter field support_versions (the name can be variable) to the transmission parameters of the initialization packet in the initial connection request, and the value corresponding to the parameter field support_versions is other protocol versions supported by the client.
[0076] By supporting the client to carry additional other QUIC version protocol numbers in the transmission parameters, the server can have more choices of QUIC protocol version numbers, greatly increasing the freedom of choice of the server, reducing the probability of needing to re-negotiate the version, and effectively reducing the 1RTT delay caused by version negotiation. At the same time, the client can also flexibly define the name of the parameter field in a custom manner to better adapt to specific application scenarios and requirements.
[0077] In some embodiments of the present application, constructing a Quick UDP Internet Connections (QUIC) connection request may further include step S114:
[0078] S114. Set a priority order for the multiple QUIC protocol version numbers; among them, the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers according to the priority order.
[0079] Exemplarily, the client can provide each QUIC protocol version number according to the set priority order. For example, support_versions: Q036, Q035, Q034, then the priorities are Q036, Q035, Q034 from high to low in turn.
[0080] In some embodiments of the present application, constructing a Quick UDP Internet Connection (QUIC) connection request may further include:
[0081] S115. Add a parameter field for indicating whether to communicate with QUIC in an encrypted manner to the transmission parameters of the initialization packet in the initial connection request, so that the server determines whether to perform encrypted transmission according to the value of the parameter field.
[0082] Specifically, the client can add a custom parameter field transport_without_security (the name can be set according to actual needs) to the transmission parameters of the initialization packet to be used to notify the server whether to communicate with the QUIC in an encrypted manner.
[0083] By supporting the client to add a parameter field for indicating whether to communicate with QUIC in an encrypted manner to the transmission parameters, it is possible to flexibly control whether the current connection uses the encrypted method of QUIC for communication, and it is possible to effectively reduce the performance consumption caused by encrypted communication in non-transmission-sensitive scenarios. Therefore, this mechanism not only improves the security of communication, but also can perform flexible encrypted communication when needed, meets the application scenarios with different security requirements, and greatly improves the overall transmission efficiency of QUIC.
[0084] In some embodiments of the present application, when the value of the parameter field indicates to perform QUIC communication in an encrypted manner, the handshake negotiation information further includes encryption parameter information selected by the server according to the QUIC protocol version numbers supported by the server.
[0085] The Long Header in a specific example is as follows:
[0086] Long Header{
[0087] Version: 1, / / The version number field carried by default
[0088] Client Hello:{
[0089] Extension: quic_transport_parameters{
[0090] support_versions: Q036, Q035, Q034; / / Newly added custom field for specifying additional versions supported by the client
[0091] transport_without_security: 1, / / Newly added custom field for notifying the server whether the QUIC protocol uses encryption for transmission
[0092] }
[0093] }
[0094] By adding an extended transport parameter field, the version negotiation and the long time consumption of encrypted transmission can be improved.
[0095] S12. Send a QUIC connection request.
[0096] For example, the connection request may include three QUIC protocol version numbers: Q036, Q035, and Q034.
[0097] S13. Receive the handshake negotiation information from the server. The handshake negotiation information contains the QUIC protocol version numbers supported by the server, which are obtained by the server verifying the multiple QUIC protocol version numbers.
[0098] The server verifies the multiple QUIC protocol version numbers, determines the QUIC protocol version numbers supported by the server according to the verification result, and then sends the handshake negotiation information containing the QUIC protocol version numbers supported by the server. For example, the server verifies Q036, Q035, and Q034, and after determining that Q034 is the protocol version number supported by the server, sends the handshake negotiation information containing Q034. The client receives the handshake negotiation information, thereby establishing a QUIC.
[0099] The method for establishing a QUIC network connection according to the embodiments of the present application avoids the situation of QUIC protocol version incompatibility when establishing a QUIC connection, and does not require re - negotiation when establishing a QUIC connection, thereby saving additional negotiation time overhead and improving the establishment speed of the QUIC connection.
[0100] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities can be referred to each other. For the sake of brevity, they are not elaborated herein.
[0101] Another embodiment of the present application provides a method for establishing a Quick User Datagram Protocol (QUIC) network connection, which is applied to a server. The server can be, for example, a server deployed at the edge node of a Content Delivery Network (CDN). Refer to Figure 3 As shown, the establishment method may include step S21 and step S22:
[0102] S21. Receive a QUIC connection request from a client. The connection request contains multiple QUIC protocol version numbers.
[0103] S22. Verify the multiple QUIC protocol version numbers to obtain the QUIC protocol version number supported by the server.
[0104] In some embodiments of the present application, the multiple QUIC protocol version numbers have a preset priority order; verifying the multiple QUIC protocol version numbers to obtain the QUIC protocol version number supported by the server may include: verifying the multiple QUIC protocol version numbers according to the preset priority order to obtain the QUIC protocol version number supported by the server.
[0105] For example, in a specific example, the connection request includes three QUIC protocol version numbers, Q036, Q035, and Q034. The server verifies Q036, Q035, and Q034 according to the preset priority order (the preset priority order is Q036, Q035, and Q034 in descending order of priority), and determines that Q034 is the protocol version number supported by the server.
[0106] The server preferentially identifies the default version number provided by the client. When it is found that the default version number provided by the client is not supported, it will check the version numbers in support_versions. If it is found that the server can support the additional version numbers carried by the client, the protocol version number will be directly used to establish the connection, preventing the need for re - version negotiation, reducing the probability of introducing additional 1RTT latency due to re - version negotiation, and improving the efficiency of connection establishment. Moreover, the highest - priority protocol version supported by both parties can be selected according to the priority order to establish the connection. In this way, effective screening of the protocol version is achieved, thereby improving the compatibility and efficiency of the connection. This helps to accelerate the establishment of the QUIC connection, reduce unnecessary communication round - trips, and thus significantly improve the performance of the network connection.
[0107] S23. Send handshake negotiation information, which contains the QUIC protocol version number supported by the server.
[0108] After determining that Q034 is the protocol version number supported by the server, send handshake negotiation information containing Q034.
[0109] In some embodiments of the present application, a parameter field for indicating whether to use an encryption method for communication with QUIC is carried in the connection request; the establishment method may further include: S24. Determine whether to perform encrypted transmission according to the value of the parameter field.
[0110] For example, if the server determines that the parameter field is carried in the transmission parameters of the client but the value of the parameter field is 0, or the server determines that the parameter field is not carried in the transmission parameters of the client, the server maintains the original transmission encryption level; if the server determines that the parameter field is carried in the transmission parameters of the client and the value of the parameter field is 1, the server will automatically downgrade the transmission to non-encrypted transmission, and the entire connection process adopts the plaintext transmission method, reducing the additional performance loss introduced by encrypted communication and improving the data transmission efficiency.
[0111] In the related art, the QUIC protocol by default uses an encryption method for communication. However, there are scenarios where the security of data transmission is not sensitive, and encrypted communication may affect the transmission performance due to performance loss. In non-transmission-sensitive scenarios, the security and confidentiality of data may not be the primary considerations. Therefore, using an encryption protocol may cause unnecessary overhead and performance degradation. In this embodiment, when it is determined according to the value of the parameter field that in a non-transmission-sensitive scenario, encrypted transmission is not required, the server automatically downgrades the transmission to non-encrypted transmission, and the entire QUIC establishment process adopts the plaintext transmission method, reducing the additional performance loss introduced by encrypted communication and improving the data transmission efficiency.
[0112] In some embodiments, in addition to encryption / non-encryption, different transmission types or configuration options can be further selected, such as whether to compress / use a channel during transmission / whether to limit the speed, etc. The configuration items can be freely defined, but corresponding custom implementations are required.
[0113] The server can have corresponding response messages to ensure that both parties adopt consistent configurations during the transmission process. By capturing packets, the content inside the packets can be directly determined. Normal http3 packet captures are encrypted content.
[0114] If a protocol version upgrade or a transmission option upgrade is detected, a higher version can be specified when re-establishing the connection next time. QUIC can implement real-time flow control.
[0115] In some embodiments of the present application, in the case where the value of the parameter field indicates that an encryption method is used for communication with QUIC, before sending the handshake negotiation information, the establishment method may further include: selecting encryption information according to the QUIC protocol version number supported by the server; adding the encryption information to the handshake negotiation information.
[0116] The method for establishing a Quick User Datagram Protocol network connection according to the embodiments of the present application avoids the situation of QUIC protocol version incompatibility when establishing QUIC. When establishing QUIC, there is no need to re - negotiate, so there is no need to consume additional negotiation time, thus improving the establishment speed of QUIC.
[0117] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities can be referred to each other. For the sake of brevity, they will not be repeated herein.
[0118] In a specific example, the process of establishing a handshake negotiation may include: The client sends an initial initialization packet. The ClientHello in it contains information such as the version numbers supported by the client, cipher suites, etc., and the transmission parameters contained in the quic_transport_parameters, including the additional version numbers supported by support_versions and the information on whether to use an encrypted transmission method in transport_without_security. After receiving the initial initialization packet, the server verifies the QUIC protocol version number. If the server supports the QUIC protocol version number, it can select the corresponding cipher suite, encryption algorithm, etc. to negotiate a handshake with the client according to the QUIC protocol version number, and send handshake negotiation information (i.e., ServerHello information) including certificates, selected cipher suites, encryption algorithms, etc. The client completes the handshake negotiation process after receiving the ServerHello information, and then can encrypt and transmit the application - layer data according to the encryption information in the handshake negotiation information.
[0119] At the same time, the client can also carry a custom parameter field transport_without_security (the name can be variable) in the transmission parameters of the initialization packet to notify the server whether to use encryption for this QUIC communication. If the server finds that this field is carried in the client's transmission parameters and its value is 1, it will automatically degrade to non - encrypted transmission, and the entire connection process uses plain - text transmission, reducing the additional performance loss introduced by encrypted communication and improving the transmission efficiency.
[0120] The client supports carrying additional version numbers in the transmission parameter field of the QUIC initialization packet, and the server supports additional matching and identification of these version numbers to determine whether the server supports the corresponding protocol version; the client supports carrying parameters indicating whether to use encryption in the transmission parameter field of the QUIC initialization packet to identify whether this connection uses encryption for communication, and the server supports degrading to plain - text transmission according to this parameter, reducing the energy consumption introduced by encryption.
[0121] The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments. For their similarities, reference can be made to each other. For the sake of brevity, they will not be elaborated herein.
[0122] As shown in the Figure 4 Another embodiment of the present application provides a device for establishing a Quick User Datagram Protocol (QUIC) network connection, which is applied to a client. The establishing device includes:
[0123] A construction module, configured to construct a QUIC connection request for the QUIC network connection, where the connection request includes multiple QUIC protocol version numbers;
[0124] A sending module, configured to send the QUIC connection request;
[0125] A receiving module, configured to receive handshake negotiation information from a server, where the handshake negotiation information includes the QUIC protocol version numbers supported by the server, and the QUIC protocol version numbers supported by the server are obtained by the server verifying multiple QUIC protocol version numbers.
[0126] In some embodiments, the construction module is further specifically configured to: create an initial connection request for QUIC; add a default QUIC protocol version number pre-specified by the client to the long header of the initialization packet in the initial connection request.
[0127] In some embodiments, the construction module is further configured to: add other QUIC protocol version numbers supported by the client to the transmission parameters of the initialization packet in the initial connection request.
[0128] In some embodiments, the construction module is further configured to: set a priority order for the multiple QUIC protocol version numbers; wherein, the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers according to the priority order.
[0129] In some embodiments, the construction module is further configured to: add a parameter field for indicating whether to communicate with QUIC in an encrypted manner to the transmission parameters of the initialization packet in the initial connection request, so that the server determines whether to perform encrypted transmission according to the value of the parameter field.
[0130] In some embodiments, when the value of the parameter field indicates that communication with QUIC is in an encrypted manner, the handshake negotiation information further includes encryption information selected by the server according to the QUIC protocol version numbers supported by the server.
[0131] The establishment device for the Quick User Datagram Protocol network connection in the embodiments of the present application avoids the situation of incompatibility of the QUIC protocol versions when establishing QUIC, and does not require re-negotiation when establishing QUIC, thus eliminating the need to consume additional negotiation time and improving the establishment speed of QUIC.
[0132] The descriptions of the above embodiments tend to emphasize the differences between the embodiments. Their similarities can be referred to each other. For the sake of brevity, they will not be elaborated herein.
[0133] Refer to Figure 5 As shown, another embodiment of the present application provides an establishment device for the Quick User Datagram Protocol network connection, which is applied to the server side. The establishment device includes:
[0134] A receiving module, configured to receive a Quick User Datagram Protocol network connection (QUIC) connection request from a client, where the connection request includes multiple QUIC protocol version numbers;
[0135] A verification module, configured to verify the multiple QUIC protocol version numbers to obtain the QUIC protocol version numbers supported by the server side;
[0136] A sending module, configured to send handshake negotiation information, where the handshake negotiation information includes the QUIC protocol version numbers supported by the server side.
[0137] In some embodiments, the multiple QUIC protocol version numbers have a preset priority order; the verification module is further specifically configured to: verify the multiple QUIC protocol version numbers according to the preset priority order to obtain the QUIC protocol version numbers supported by the server side.
[0138] In some embodiments, the connection request carries a parameter field for indicating whether to use an encryption method for communication with QUIC; the establishment device further includes an encryption transmission determination module, and the encryption transmission determination module is configured to determine whether to perform encrypted transmission according to the value of the parameter field.
[0139] In some embodiments, the establishment device further includes an encryption module, and the encryption module is configured to: select encryption information according to the QUIC protocol version numbers supported by the server side before sending the handshake negotiation information when the value of the parameter field indicates that an encryption method is used for communication with QUIC; and add the encryption information to the handshake negotiation information.
[0140] The establishment device for the Quick User Datagram Protocol network connection in the embodiments of the present application avoids the situation of incompatibility of the QUIC protocol versions when establishing QUIC, and does not require re-negotiation when establishing QUIC, thus eliminating the need to consume additional negotiation time and improving the establishment speed of QUIC.
[0141] The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments. Their similarities or resemblances can be referred to each other. For the sake of brevity, they will not be elaborated herein.
[0142] Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement the method for establishing a fast user datagram protocol network connection according to any of the above embodiments.
[0143] Referring Figure 6 As shown, the electronic device 10 may include: a processor 100, a memory 101, a bus 102, and a communication interface 103. The processor 100, the communication interface 103, and the memory 101 are connected through the bus 102; a computer program executable on the processor 100 is stored in the memory 101, and when the processor 100 runs the computer program, it executes the method provided by any of the foregoing embodiments of the present application.
[0144] Among them, the memory 101 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0145] The bus 102 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 101 is used to store programs. After receiving the execution instruction, the processor 100 executes the program. The method disclosed in any of the foregoing embodiments of the present application can be applied to the processor 100 or implemented by the processor 100.
[0146] The processor 100 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method may be completed by the integrated logic circuit of the hardware in the processor 100 or the instructions in the form of software. The above-mentioned processor 100 may be a general-purpose processor, which may include a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. This storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and combines its hardware to complete the steps of the above method.
[0147] The electronic device provided by the embodiment of the present application and the method provided by the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by it.
[0148] Another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in any of the above embodiments. Refer to Figure 7 As shown, the computer-readable storage medium shown is an optical disc 20, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the method for establishing a fast user datagram protocol network connection provided in any of the foregoing embodiments.
[0149] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here one by one.
[0150] The computer-readable storage medium provided by the above embodiments of the present application and the method provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.
[0151] Referring Figure 8 As shown, another embodiment of the present application provides a system for a Quick User Datagram Protocol (QUIC) network connection, including a client and a server in communication connection. The client is used to implement the method for establishing a QUIC network connection applied to the client in any embodiment of the present application, and the server is used to implement the method for establishing a QUIC network connection applied to the server in any embodiment of the present application. Figure 9 FIG. shows a signaling diagram of the process for establishing a QUIC network connection implemented by the system for a QUIC network connection. Specifically, the client constructs a QUIC connection request for the QUIC network connection, and this connection request includes multiple QUIC protocol version numbers. Then the client sends this connection request, the server receives this connection request, verifies the multiple QUIC protocol version numbers in the connection request, obtains the QUIC protocol version numbers supported by the server, and sends handshake negotiation information, and the client receives this handshake negotiation information. This system effectively realizes the establishment of a QUIC network connection, allows for rapid protocol version negotiation between the client and the server, while maintaining protocol version compatibility. This improves the speed and performance of connection establishment and helps meet the requirements of application scenarios that require low latency and high throughput.
[0152] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. Their similarities or likenesses can be referred to each other. For the sake of brevity, they will not be elaborated herein.
[0153] It should be noted that:
[0154] The term "module" is not intended to be limited to a specific physical form. Depending on the specific application, a module can be implemented as hardware, firmware, software, and / or a combination thereof. In addition, different modules can share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules.
[0155] The algorithms and displays provided herein are not inherently related to any specific computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the examples based herein. Based on the above description, the structures required to construct such devices are obvious. In addition, the present application is not directed to any specific programming language. It should be understood that the content of the present application described herein can be implemented using various programming languages, and the descriptions of specific languages above are for disclosing the best implementation manners of the present application.
[0156] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially according to the indication of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this text, there is no strict order restriction for the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0157] The above embodiments only express the implementation manners of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for establishing a connection of a User Datagram Protocol network, characterized in that Applied to the client, the method includes: Construct a Quick UDP Internet Connections (QUIC) connection request, where the connection request contains multiple QUIC protocol version numbers; Send the QUIC connection request; Receive handshake negotiation information from the server, where the handshake negotiation information contains the QUIC protocol version numbers supported by the server, and the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers.
2. The method according to claim 1, wherein The constructing of the Quick UDP Internet Connections (QUIC) connection request includes: Create the QUIC initial connection request; Add the default QUIC protocol version number pre-specified by the client to the long header of the initialization packet in the initial connection request.
3. The method according to claim 2, wherein The constructing of the Quick UDP Internet Connections (QUIC) connection request further includes: Add the other QUIC protocol version numbers supported by the client to the transport parameters of the initialization packet in the initial connection request.
4. The method according to claim 3, characterized in that The constructing of the Quick UDP Internet Connections (QUIC) connection request further includes: Set a priority order for the multiple QUIC protocol version numbers; Wherein, the QUIC protocol version numbers supported by the server are obtained by the server verifying the multiple QUIC protocol version numbers according to the priority order.
5. The method according to any one of claims 2 to 4, characterized in that, The constructing of the Quick UDP Internet Connections (QUIC) connection request further includes: Add a parameter field for indicating whether to communicate with QUIC in an encrypted manner to the transport parameters of the initialization packet in the initial connection request, so that the server determines whether to perform encrypted transmission according to the value of the parameter field.
6. The method according to claim 5, wherein In the case where the value of the parameter field indicates that communication with QUIC is in an encrypted manner, the handshake negotiation information further contains encryption information selected by the server according to the QUIC protocol version numbers supported by the server.
7. A method for establishing a connection of a User Datagram Protocol network, characterized in that, Applied to the server, the establishing method includes: Receive a Quick UDP Internet Connections (QUIC) connection request from the client, where the connection request contains multiple QUIC protocol version numbers; Verify the multiple QUIC protocol version numbers to obtain the QUIC protocol version numbers supported by the server; Send handshake negotiation information, where the handshake negotiation information contains the QUIC protocol version numbers supported by the server.
8. The method according to claim 7, wherein The multiple QUIC protocol version numbers have a preset priority order; The verifying of the multiple QUIC protocol version numbers to obtain the QUIC protocol version numbers supported by the server includes: Verify the multiple QUIC protocol version numbers according to the preset priority order to obtain the QUIC protocol version numbers supported by the server.
9. The method according to any one of claims 7 to 8, characterized in that The connection request carries a parameter field for indicating whether to communicate with QUIC in an encrypted manner; The establishing method further includes: determining whether to perform encrypted transmission according to the value of the parameter field.
10. The method according to claim 9, characterized in that, In the case where the value of the parameter field indicates that communication with QUIC is in an encrypted manner, before sending the handshake negotiation information, the establishing method further includes: Select encryption information according to the QUIC protocol version number supported by the server; Add the encryption information to the handshake negotiation information.
11. An apparatus for establishing a Fast User Datagram Protocol network connection, characterized in that, Applied to a client, the establishment device includes: A construction module, configured to construct a Quick User Datagram Protocol network connection QUIC connection request, where the connection request contains multiple QUIC protocol version numbers; A sending module, configured to send the QUIC connection request; A receiving module, configured to receive handshake negotiation information from the server, where the handshake negotiation information contains the QUIC protocol version number supported by the server, and the QUIC protocol version number supported by the server is obtained by the server verifying the multiple QUIC protocol version numbers.
12. An apparatus for establishing a Fast User Datagram Protocol network connection, characterized in that, Applied to a server, the establishment device includes: A receiving module, configured to receive a Quick User Datagram Protocol network connection QUIC connection request from the client, where the connection request contains multiple QUIC protocol version numbers; A verification module, configured to verify the multiple QUIC protocol version numbers to obtain the QUIC protocol version number supported by the server; A sending module, configured to send handshake negotiation information, where the handshake negotiation information contains the QUIC protocol version number supported by the server.
13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement the method for establishing a Quick User Datagram Protocol network connection according to any one of claims 1-10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by the processor to implement the method for establishing a Quick User Datagram Protocol network connection according to any one of claims 1-10.
15. A system for a fast User Datagram Protocol network connection, characterized in that, It includes a client and a server with a communication connection. The client is used to implement the establishment method according to any one of claims 1-6, and the server is used to implement the establishment method according to any one of claims 7-10.