CN115842878A - Quic message processing method, device, readable storage medium and gateway equipment - Google Patents

Quic message processing method, device, readable storage medium and gateway equipment Download PDF

Info

Publication number
CN115842878A
CN115842878A CN202211405732.XA CN202211405732A CN115842878A CN 115842878 A CN115842878 A CN 115842878A CN 202211405732 A CN202211405732 A CN 202211405732A CN 115842878 A CN115842878 A CN 115842878A
Authority
CN
China
Prior art keywords
quic
message
protocol
determining
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211405732.XA
Other languages
Chinese (zh)
Inventor
杜叶飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202211405732.XA priority Critical patent/CN115842878A/en
Publication of CN115842878A publication Critical patent/CN115842878A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a QUIC message processing method, a device, a readable storage medium and gateway equipment, belonging to the field of QUIC message processing, wherein the QUIC message processing method comprises the following steps: receiving a QUIC message from target terminal equipment; analyzing the QUIC message, and determining the type of the QUIC protocol to which the QUIC message belongs; and processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs. The invention solves the problem that the gateway equipment in the related technology is incompatible or poor in compatible effect on different types of QUIC protocols.

Description

Quic message processing method, device, readable storage medium and gateway equipment
Technical Field
The invention relates to the field of QUIC message processing, in particular to a QUIC message processing method, a QUIC message processing device, a readable storage medium and gateway equipment.
Background
The WEB Protocol has undergone the evolution from HTTP1.0 to HTTP3, wherein the H3 (short for HTTP 3) Protocol has changed greatly, and the transport layer Protocol is not based on TCP (Transmission Control Protocol) any more, but is changed to a QUIC (fast UDP Internet Connection Protocol) Protocol based on UDP (User Datagram Protocol). The QUIC protocol realizes reliable transmission, solves the problem of head-of-line blocking, supports connection migration and flexible congestion control, and realizes the establishment of 0-RTT (Round-Trip Time) connection based on TLS1.3 (transport layer security protocol 1.3, english full name TransportLayerSecurity 1.3). The QUIC protocol has various characteristics, obviously improves the network transmission quality and is very suitable for the acceleration scene of a near-customer edge network. For example, a CDN (Content Delivery Network, which is an intelligent virtual Network built on the basis of an existing Network, depends on edge servers deployed in various places, and enables a user to obtain required Content nearby through functional modules of load balancing, content distribution, scheduling and the like of a central platform, so as to reduce Network congestion and improve user access response speed and hit rate) is an acceleration product in a cloud scenario, and the access experience of an actual user can be improved by significantly reducing client edge access delay through the QUIC protocol upgrade.
However, there are two major versions of the QUIC protocol in its development: gQUIC and iQUIC. Currently, existing gateway devices (e.g., CDN ingress gateways) all choose a standard implementation, and it is difficult to support both protocols simultaneously. Although the gQUIC protocol stack with a high version can be compatible with the two protocols, the use of the transplanted gQUIC protocol stack for processing the iQUIC message results in poor flexibility and efficiency and higher maintenance cost.
Therefore, the gateway device in the related art has a problem that it is incompatible or poorly compatible with different types of QUIC protocols, and no effective solution has been proposed so far.
The above information disclosed in the background section is only for enhancement of understanding of the background of the technology described herein. The background art may therefore contain certain information that does not form the known prior art to those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides a QUIC message processing method, a device, a readable storage medium and gateway equipment, which are used for at least solving the problem that the gateway equipment in the related technology is incompatible or poor in compatible effect on different types of QUIC protocols.
According to a first aspect of the embodiments of the present invention, there is provided a method for processing a QUIC message, including: receiving a QUIC message from target terminal equipment; analyzing the QUIC message, and determining the type of the QUIC protocol to which the QUIC message belongs; and processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
Further, analyzing the QUIC message, and determining the type of the QUIC protocol to which the QUIC message belongs includes: analyzing the QUIC message to obtain message attribute information; and determining the QUIC protocol type of the QUIC message according to the message attribute information.
Further, the message attribute information comprises the first byte of the QUIC message; determining the QUIC protocol type of the QUIC message according to the message attribute information comprises the following steps: determining whether the QUIC message is a long message or a short message according to the first byte; and under the condition that the QUIC message is not a long-short message, determining that the type of the QUIC protocol to which the QUIC message belongs is a gQUIC protocol.
Further, under the condition that the QUIC protocol type of the QUIC message is determined to be the gQUIC protocol, processing the QUIC message by using a corresponding QUIC protocol stack according to the QUIC protocol type of the QUIC message comprises the following steps: processing the QUIC message by using a gQUIC protocol stack; and under the condition that the gQUIC protocol stack fails to process the QUIC message, determining that the QUIC message is an abnormal message.
Further, under the condition that the QUIC message is a long-short message, determining the type of the QUIC protocol to which the QUIC message belongs according to the message attribute information comprises the following steps: determining the message type of the QUIC message, wherein the message type is a long message or a short message; acquiring protocol type judgment information from the QUIC message according to the message type; and determining the QUIC protocol type of the QUIC message according to the protocol type judgment information.
Further, under the condition that the message type is a long message, the protocol type judgment information comprises protocol version information; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps: and determining the QUIC protocol type of the QUIC message according to the protocol version information.
Further, under the condition that the message type is a short message, the protocol type judgment information comprises target connection ID information; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps: acquiring a session table of an iQUIC protocol stack; searching target connection ID information from a session table; under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol; and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is a gQUIC protocol.
According to the second aspect of the embodiment of the present invention, there is also provided a QUIC message processing apparatus, including: the receiving unit is used for receiving the QUIC message from the target terminal equipment; the analysis unit is used for analyzing the QUIC message and determining the type of the QUIC protocol to which the QUIC message belongs; and the processing unit is used for processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
Further, the parsing unit includes: the analysis module is used for analyzing the QUIC message to obtain message attribute information; the first determining module is used for determining the QUIC protocol type of the QUIC message according to the message attribute information;
the message attribute information comprises the first byte of the QUIC message; the first determining module includes: the first determining submodule is used for determining whether the QUIC message is a long message or a short message according to the first byte; the second determining submodule is used for determining that the type of the QUIC protocol to which the QUIC message belongs is a gQUIC protocol under the condition that the QUIC message is not a long or short message;
the processing unit includes: the processing module is used for processing the QUIC message by using a gQUIC protocol stack under the condition that the QUIC protocol type of the QUIC message is determined to be a gQUIC protocol; the second determining module is used for determining the QUIC message as an abnormal message under the condition that the gQUIC protocol stack fails to process the QUIC message;
the first determining module includes: the third determining sub-module is used for determining the message type of the QUIC message under the condition that the QUIC message is a long message or a short message; the acquisition submodule is used for acquiring protocol type judgment information from the QUIC message according to the message type; the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol type judging information;
under the condition that the message type is a long message, the protocol type judgment information comprises protocol version information; the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol version information;
under the condition that the message type is a short message, the protocol type judgment information comprises target connection ID information; the fourth determination submodule is configured to: acquiring a session table of an iQUIC protocol stack; searching target connection ID information from a session table; under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol; and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is gQUIC protocol.
According to a third aspect of the embodiments of the present invention, there is also provided a readable storage medium, on which computer instructions are stored, wherein the computer instructions, when executed by a processor, implement the QUIC message processing method described above.
According to a fourth aspect of the embodiments of the present invention, there is also provided a gateway device, including a memory and a processor, where the memory stores computer instructions, and the computer instructions, when executed by the processor, implement the above-mentioned QUIC message processing method.
In the QUIC message processing method of the embodiment of the invention, after the QUIC message from the target terminal equipment is received; and analyzing the QUIC message, determining the type of a QUIC protocol to which the QUIC message belongs according to the analysis result of the QUIC message, and then processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs. Therefore, after receiving messages with different protocol types, the QUIC protocol types of the messages can be identified and distributed to the corresponding QUIC protocol stacks for processing, so that the QUIC message processing method can simultaneously support multiple different types of QUIC protocols, and can process the messages with the corresponding protocol types through the corresponding protocol stacks more flexibly and efficiently, and has good compatibility with the different types of QUIC messages. For example, whether the QUIC message belongs to the gQUIC protocol or the iQUIC protocol may be distinguished, but it is also applicable to other types of QUIC protocols. The QUIC message processing method can solve the problem that gateway equipment in the related technology is incompatible or poor in compatible effect on different types of QUIC protocols, and effectively improves the universality of gateway products.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic flow chart of a QUIC message processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a QUIC message processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a gateway applying the QUIC message processing method according to the embodiment of the present invention when processing a QUIC message.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first", "second", and the like in the description and claims of the present invention and the accompanying drawings are used for distinguishing different objects, and are not used for limiting a specific order.
Fig. 1 is a QUIC message processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, receiving a QUIC message from a target terminal device;
step S104, analyzing the QUIC message, and determining the type of the QUIC protocol to which the QUIC message belongs;
and step S106, processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
By adopting the QUIC message processing method of the scheme, after the QUIC message from the target terminal equipment is received; and analyzing the QUIC message, determining the QUIC protocol type of the QUIC message according to the analysis result of the QUIC message, and processing the QUIC message by using a corresponding QUIC protocol stack according to the QUIC protocol type of the QUIC message. Therefore, after receiving messages with different protocol types, the QUIC protocol types of the messages can be identified and distributed to the corresponding QUIC protocol stacks for processing, so that the QUIC message processing method can simultaneously support multiple different types of QUIC protocols, and can process the messages with the corresponding protocol types through the corresponding protocol stacks more flexibly and efficiently, and has good compatibility with the different types of QUIC messages. For example, whether the QUIC message belongs to the gQUIC protocol or the iQUIC protocol can be distinguished, and of course, the method is also applicable to other types of QUIC protocols. The QUIC message processing method can solve the problem that gateway equipment in the related technology is incompatible or poor in compatible effect on different types of QUIC protocols, and effectively improves the universality of gateway products.
The target end device may be any type of networked device, among others. A Protocol stack, also called Protocol stack, is a specific software implementation of a computer network Protocol suite, and the Protocol stack is different for different types of QUIC protocols.
As described above, the determination of the QUIC protocol type to which the QUIC message belongs is based on the analysis result of the QUIC message, and in order to more accurately determine the QUIC protocol to which the QUIC message belongs based on the analysis result of the QUIC message, in this embodiment, the analyzing the QUIC message and the determining of the QUIC protocol type to which the QUIC message belongs includes: analyzing the QUIC message to obtain message attribute information; and determining the QUIC protocol type of the QUIC message according to the message attribute information.
In practical implementation, the message attribute information is information representing the attribute of the QUIC message itself, and is required to be able to determine the QUIC protocol type of the QUIC message, and specifically, it may include various information. For example, in this embodiment, the message attribute information includes the first byte of the QUIC message; after the QUIC message is analyzed to obtain message attribute information (including the first byte of the QUIC message), determining the type of the QUIC protocol to which the QUIC message belongs according to the message attribute information comprises the following steps: determining whether the QUIC message is a long message or a short message according to the first byte; and under the condition that the QUIC message is not a long-short message, determining that the type of the QUIC protocol to which the QUIC message belongs is a gQUIC protocol.
The first byte of the QUIC message is the first byte of the QUIC message, which is the first 8 bits of the head of each QUIC message, can be directly extracted from the QUIC message, and can judge whether the message is a long message or a short message according to the bits. The long and short messages refer to that the format of the message is a long message or a short message, and the message belongs to the long and short messages as long as the format of the message is one of the long message and the short message. For two mainstream gQUIC protocols and iQUIC protocols, the iQUIC protocol always adopts a format of a long and short message, and the gQUIC protocol only follows the format of the long and short message in a Q043 version and later versions. In this embodiment, whether the QUIC message is a long-short message or not can be determined according to the first byte of the message, considering that the gQUIC protocol and the iQUIC protocol are most commonly used, if the QUIC message is not in the format of the long-short message, the protocol to which the QUIC message belongs is temporarily determined as the version before Q043 of the gQUIC protocol, so that the type of the QUIC protocol to which the QUIC message belongs is determined as the gQUIC protocol, and then the gQUIC protocol is transferred to the protocol stack of the gQUIC for processing. Therefore, screening and processing of a part of QUIC messages are conveniently realized. Of course, the determination result that the QUIC message is determined to be the gQUIC message by determining that the QUIC message is not a long or short message is a temporary determination result, and the determination result is accurate in the case of only considering the gQUIC protocol and the iQUIC protocol, and needs to be further verified in the case of other protocols.
After the QUIC message is subjected to the judgment and the shunting processing, if the QUIC protocol type of the QUIC message is determined to be the gQUIC protocol, the processing of the QUIC message by using the corresponding QUIC protocol stack according to the QUIC protocol type of the QUIC message comprises the following steps: and processing the QUIC message by using a gQUIC protocol stack. As described above, the determination result that the QUIC packet protocol that is determined not to be the long and short packet type is the gQUIC protocol is a temporary determination result, and in the case that the protocol includes both the gQUIC protocol and the iQUIC protocol, it is determined that an error may occur, and therefore, when the gQUIC packet is processed by the gQUIC protocol stack, a processing failure may occur, and at this time, the packet may be damaged or the determination error of the protocol to which the packet belongs (i.e., the packet does not belong to the gQUIC protocol) may occur, and in the case that the gQUIC packet is processed by the gQUIC protocol stack, the QUIC packet may be determined to be an abnormal packet. Therefore, on the basis of conveniently realizing the message type judgment and the shunt processing, abnormal messages can be found in time, and the reliability of QUIC message processing can be effectively improved.
After judging whether the QUIC message is a long-short message or not by adopting the first byte of the QUIC message, if the QUIC message is the long-short message, the type of the QUIC protocol to which the QUIC message belongs can not be directly determined, and under the condition, the determination of the type of the QUIC protocol to which the QUIC message belongs according to the message attribute information comprises the following steps: determining the message type of the QUIC message, wherein the message type is a long message or a short message; acquiring protocol type judgment information from the QUIC message according to the message type; and determining the QUIC protocol type of the QUIC message according to the protocol type judgment information. That is, under the condition that it is determined that the QUIC message is a long or short message, the specific type of the QUIC message is further determined, that is, whether the QUIC message is a long message or a short message is determined, which is very easy to implement in the field, after the specific message type is determined, corresponding protocol type determination information is extracted from the QUIC message according to different message types, that is, the protocol type determination information is extracted differently according to different message types, so that it is ensured that the extracted protocol type determination information can be used for accurately determining the QUIC protocol type to which the QUIC message belongs.
Specifically, after the above message type determination is made, the following two situations may occur:
for the first case, the message type is a long message, and at this time, the protocol type judgment information includes protocol version information; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps: and determining the QUIC protocol type of the QUIC message according to the protocol version information. That is, after determining that the message type is a long message, the protocol version information is extracted from the QUIC message, and according to the specific format of the long message, the protocol version information is recorded in a specific field, so that on the basis of knowing that the message is a long message, the protocol version information can be easily extracted, and according to the protocol version information, the QUIC protocol type to which the message belongs can be conveniently determined.
For the second case, the message type is a short message, and at this time, the protocol type judgment information includes target connection ID information; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps: acquiring a session table of an iQUIC protocol stack; searching target connection ID information from a session table; under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol; and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is a gQUIC protocol. That is, after determining that the packet type is a short packet, the method is different from the above-mentioned long packet processing method, specifically, the short packet is encrypted and cannot be viewed in plaintext, so that the processing cannot be performed by the above-mentioned method for processing the long packet. The QUIC connection process of the iQUIC protocol is further explained here: initiating a handshake message for the first time, similar to tcp handshake, and the difference is that the QUIC is not based on a quadruplet but based on a DCID as a connection identifier, after connection, session information is established and stored in the server, and the corresponding DCID is also stored in a session table in an iQUIC protocol stack, where the session table is a session table. Under the condition that the message type of the QUIC message is determined to be a short message, in order to further judge whether the QUIC message belongs to a gQUIC protocol or an iQUIC protocol, a DCID is extracted from the QUIC message, the DCID is information which can be directly obtained, after the DCID of the QUIC message is taken, the DCID is searched from a session table of an iQUIC protocol stack, if the DCID is searched, the situation that the iQUIC message with the same connection exists before is shown, the protocol type of the new QUIC message is determined to be the iQUIC protocol, if the DCID is not searched, the protocol type of the QUIC message is determined to be the gQUIC protocol, because the corresponding DCID is stored in the session table only when the iQUIC protocol is connected for the first time, and the gQUIC protocol does not perform the processing. Therefore, the specific protocol type of the QUIC short message can be conveniently and accurately determined by the mode of searching the DCID in the session table of the iQUIC protocol stack.
As shown in fig. 3, after the QUIC message processing method described above is used, the same VIP can be used: the PORT monitors different types of QUIC messages (gQUIC messages and iQUIC messages), for example, after the gQUIC messages and the iQUIC messages enter the gateway device with an IP of 127.0.0.1 through a 443 PORT, the above-mentioned QUIC message processing method is executed through a protocol splitter (a piece of software running on the gateway), so as to determine the protocol type of each QUIC message, and further distribute the protocol type to a corresponding protocol stack (gQUIC protocol stack or iQUIC protocol stack). The QUIC message processing method can solve the problem that the gateway equipment in the prior art cannot simultaneously support different types of QUIC protocols, and effectively improves the universality of gateway products.
Secondly, as shown in fig. 2, according to an embodiment of the present invention, there is also provided a QUIC message processing apparatus, including: the receiving unit is used for receiving the QUIC message from the target terminal equipment; the analysis unit is used for analyzing the QUIC message and determining the type of the QUIC protocol to which the QUIC message belongs; and the processing unit is used for processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
The QUIC message processing device of the embodiment of the invention receives the QUIC message from the target terminal equipment by the receiving unit; the analysis unit analyzes the QUIC message, determines the QUIC protocol type of the QUIC message according to the analysis result of the QUIC message, and the processing unit further uses the corresponding QUIC protocol stack to process the QUIC message according to the QUIC protocol type of the QUIC message. Therefore, after receiving messages with different protocol types, the QUIC protocol types of the messages can be identified and distributed to the corresponding QUIC protocol stacks for processing, so that the QUIC message processing method can simultaneously support multiple different types of QUIC protocols, and can process the messages with the corresponding protocol types through the corresponding protocol stacks more flexibly and efficiently, and has good compatibility with the different types of QUIC messages. For example, whether the QUIC message belongs to the gQUIC protocol or the iQUIC protocol can be distinguished, and of course, the method is also applicable to other types of QUIC protocols. The QUIC message processing method can solve the problem that gateway equipment in the related technology is incompatible or poor in compatible effect to different types of QUIC protocols, and effectively improves the universality of gateway products.
The target end device may be any type of networked device, among others. A Protocol stack, also called Protocol stack, is a specific software implementation of a computer network Protocol suite, and the Protocol stack is different for different types of QUIC protocols.
As described above, the basis for determining the type of the QUIC protocol to which the QUIC message belongs is the analysis result of the QUIC message, and in order to more accurately determine the QUIC protocol to which the QUIC message belongs based on the analysis result of the QUIC message, in this embodiment, the analysis unit includes: the analysis module is used for analyzing the QUIC message to obtain message attribute information; and the first determining module is used for determining the QUIC protocol type of the QUIC message according to the message attribute information. In practical implementation, the message attribute information is information representing the attribute of the QUIC message itself, and it is required to be able to determine the QUIC protocol type to which the QUIC message belongs, and specifically, it may include various information. For example, in this embodiment, the message attribute information includes the first byte of the QUIC message; the first determining module includes: the first determining submodule is used for determining whether the QUIC message is a long message or a short message according to the first byte; and the second determining submodule is used for determining that the type of the QUIC protocol to which the QUIC message belongs is the gQUIC protocol under the condition that the QUIC message is not a long-short message. The first byte of the QUIC message, namely the first byte of the QUIC message, is the first 8 bits of the head byte of each QUIC message, can be directly extracted from the QUIC message, and can judge whether the message is a long message or a short message according to the bit. The long and short messages refer to that the format of the message is a long message or a short message, and the message belongs to the long and short messages as long as the format of the message is one of the long message and the short message. For two mainstream gQUIC protocols and iQUIC protocols, the iQUIC protocol always adopts the format of a long and short message, and the gQUIC protocol only follows the format of the long and short message in the Q043 version and later versions. In this embodiment, the first determining module may determine whether the QUIC packet is a long or short packet according to a first byte of the packet, and if the QUIC packet is not in the format of the long or short packet, the first determining module may determine the protocol to which the QUIC packet belongs as a version before Q043 of the gQUIC protocol, determine the QUIC protocol to which the QUIC packet belongs as the gQUIC protocol, and then transfer the gQUIC protocol to a protocol stack of the gQUIC for processing.
The processing unit includes: the processing module is used for processing the QUIC message by using a gQUIC protocol stack under the condition that the type of the QUIC protocol to which the QUIC message belongs is determined to be the gQUIC protocol; and the second determining module is used for determining the QUIC message as an abnormal message under the condition that the gQUIC protocol stack fails to process the QUIC message. If the QUIC protocol type of the QUIC message is determined to be the gQUIC protocol, the gQUIC protocol stack is used for processing the QUIC message; when the gQUIC protocol stack processes the QUIC message, the situation of processing failure may occur, at this time, the message may be damaged or the protocol determination of the message is wrong, and when the gQUIC protocol stack fails to process the QUIC message, the QUIC message is determined to be an abnormal message. Therefore, on the basis of conveniently realizing the message type judgment and the shunt processing, abnormal messages can be found in time, and the reliability of QUIC message processing can be effectively improved.
After judging whether the QUIC message is a long-short message or not by adopting the first byte of the QUIC message, if the QUIC message is the long-short message, the type of the QUIC protocol to which the QUIC message belongs can not be directly determined, and in this case, the first determining module comprises: the third determining submodule is used for determining the message type of the QUIC message under the condition that the QUIC message is a long message or a short message; the acquisition submodule is used for acquiring protocol type judgment information from the QUIC message according to the message type; and the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol type judging information. That is, under the condition that it is determined that the QUIC message is a long or short message, the specific type of the QUIC message is further determined, that is, whether the QUIC message is a long message or a short message is determined, which is very easy to implement in the field, after the specific message type is determined, corresponding protocol type determination information is extracted from the QUIC message according to different message types, that is, the protocol type determination information is extracted differently according to different message types, so that it is ensured that the extracted protocol type determination information can be used for accurately determining the QUIC protocol type to which the QUIC message belongs.
Specifically, after the above message type determination is made, the following two situations may occur:
under the condition that the message type is a long message, the protocol type judgment information comprises protocol version information; and the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol version information. That is, after determining that the message type is a long message, the protocol version information is extracted from the QUIC message, and according to the specific format of the long message, the protocol version information is recorded in a specific field, so that on the basis of knowing that the message is a long message, the protocol version information can be easily extracted, and according to the protocol version information, the QUIC protocol type to which the message belongs can be conveniently determined.
Under the condition that the message type is a short message, the protocol type judgment information comprises target connection ID information; the fourth determination submodule is configured to: acquiring a session table of an iQUIC protocol stack; searching target connection ID information from a session table; under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol; and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is a gQUIC protocol. That is, after determining that the message type is a short message, the method is different from the above-mentioned long message processing method, specifically, the short message is encrypted and cannot be viewed in a data, so that the processing cannot be performed by the above-mentioned long message processing method. The QUIC connection process of the iQUIC protocol is further explained here: initiating a handshake message for the first time, similar to tcp handshake, and the difference lies in that the QUIC is not based on quadruplet but based on DCID as a connection identifier, after connection, session information is established and stored in the server, and the corresponding DCID is also stored in a session table in the iQUIC protocol stack. Under the condition that the message type of the QUIC message is determined to be a short message, in order to further judge whether the QUIC message belongs to a gQUIC protocol or an iQUIC protocol, a DCID is extracted from the QUIC message, the DCID is information which can be directly obtained, after the DCID of the QUIC message is taken, the DCID is searched from a session table of an iQUIC protocol stack, if the DCID is searched, the situation that the iQUIC message with the same connection exists before is shown, the protocol type of the new QUIC message is determined to be the iQUIC protocol, if the DCID is not searched, the protocol type of the QUIC message is determined to be the gQUIC protocol, because the corresponding DCID is stored in the session table only when the iQUIC protocol is connected for the first time, and the gQUIC protocol does not perform the processing. Therefore, the specific protocol type of the QUIC short message can be conveniently and accurately determined by the mode of searching the DCID in the session table of the iQUIC protocol stack.
Third, the embodiment of the present invention also provides a readable storage medium, on which computer instructions are stored, wherein the computer instructions, when executed by a processor, implement the above-mentioned QUIC message processing method.
Finally, the embodiment of the invention also provides gateway equipment, which comprises a memory and a processor, wherein the memory stores computer instructions, and the computer instructions are executed by the processor to realize the QUIC message processing method. The gateway device may be any gateway device that uses gQUIC protocol and iQUIC protocol, for example, in a preferred embodiment, the gateway device is an ingress gateway of the CDN.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Moreover, the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions, and while a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than here.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (11)

1. A QUIC message processing method comprises the following steps:
receiving a QUIC message from target terminal equipment;
analyzing the QUIC message, and determining the type of a QUIC protocol to which the QUIC message belongs;
and processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
2. The QUIC message processing method according to claim 1, wherein the parsing of the QUIC message and the determining of the type of QUIC protocol to which the QUIC message belongs comprises:
analyzing the QUIC message to obtain message attribute information;
and determining the QUIC protocol type of the QUIC message according to the message attribute information.
3. A QUIC message handling method according to claim 2, wherein said message attribute information includes the first byte of said QUIC message; determining the QUIC protocol type of the QUIC message according to the message attribute information comprises the following steps:
determining whether the QUIC message is a long message or a short message according to the first byte;
and determining that the QUIC protocol type of the QUIC message is a gQUIC protocol under the condition that the QUIC message is not the long and short messages.
4. The QUIC message processing method according to claim 3, wherein, in case it is determined that the QUIC protocol type to which the QUIC message belongs is the gQUIC protocol, processing the QUIC message using the corresponding QUIC protocol stack according to the QUIC protocol type to which the QUIC message belongs includes:
processing the QUIC message by using a gQUIC protocol stack;
and under the condition that the gQUIC protocol stack fails to process the QUIC message, determining that the QUIC message is an abnormal message.
5. The QUIC message processing method according to claim 3, wherein, in case that the QUIC message is a long-short message, determining the QUIC protocol type to which the QUIC message belongs according to the message attribute information includes:
determining the message type of the QUIC message, wherein the message type is a long message or a short message;
acquiring protocol type judgment information from the QUIC message according to the message type;
and determining the QUIC protocol type of the QUIC message according to the protocol type judgment information.
6. The QUIC message processing method according to claim 5, wherein said protocol type judgment information includes protocol version information in case said message type is a long message; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps:
and determining the QUIC protocol type of the QUIC message according to the protocol version information.
7. The QUIC message processing method according to claim 5, wherein, in case said message type is a short message, said protocol type judgment information includes target connection ID information; determining the QUIC protocol type of the QUIC message according to the protocol type judgment information comprises the following steps:
acquiring a session table of an iQUIC protocol stack;
looking up the target connection ID information from the session table;
under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol;
and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is a gQUIC protocol.
8. A QUIC message processing apparatus, comprising:
the receiving unit is used for receiving the QUIC message from the target terminal equipment;
the analysis unit is used for analyzing the QUIC message and determining the type of the QUIC protocol to which the QUIC message belongs;
and the processing unit is used for processing the QUIC message by using a corresponding QUIC protocol stack according to the type of the QUIC protocol to which the QUIC message belongs.
9. QUIC message processing device according to claim 8, wherein,
the analysis unit includes: the analysis module is used for analyzing the QUIC message to obtain message attribute information; the first determining module is used for determining the QUIC protocol type of the QUIC message according to the message attribute information;
the message attribute information comprises the first byte of the QUIC message; the first determining module includes: the first determining submodule is used for determining whether the QUIC message is a long message or a short message according to the first byte; the second determining submodule is used for determining that the type of the QUIC protocol to which the QUIC message belongs is a gQUIC protocol under the condition that the QUIC message is not the long and short messages;
the processing unit includes: the processing module is used for processing the QUIC message by using a gQUIC protocol stack under the condition that the QUIC protocol type of the QUIC message is determined to be a gQUIC protocol; the second determining module is used for determining that the QUIC message is an abnormal message under the condition that the gQUIC protocol stack fails to process the QUIC message;
the first determining module comprises: the third determining submodule is used for determining the message type of the QUIC message under the condition that the QUIC message is a long message or a short message; the obtaining submodule is used for obtaining protocol type judgment information from the QUIC message according to the message type; the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol type judging information;
under the condition that the message type is a long message, the protocol type judgment information comprises protocol version information; the fourth determining submodule is used for determining the QUIC protocol type of the QUIC message according to the protocol version information;
under the condition that the message type is a short message, the protocol type judgment information comprises target connection ID information; the fourth determination submodule is configured to: acquiring a session table of an iQUIC protocol stack; looking up the target connection ID information from the session table; under the condition that the target connection ID information is found, determining that the QUIC protocol type of the QUIC message is an iQUIC protocol; and under the condition that the target connection ID information is not found, determining that the QUIC protocol type of the QUIC message is a gQUIC protocol.
10. A readable storage medium having stored thereon computer instructions, wherein said computer instructions, when executed by a processor, implement the QUIC message processing method according to any of claims 1 to 7.
11. Gateway device comprising a memory and a processor, said memory having stored thereon computer instructions, wherein said computer instructions, when executed by said processor, implement the QUIC message processing method according to any of claims 1 to 7.
CN202211405732.XA 2022-11-10 2022-11-10 Quic message processing method, device, readable storage medium and gateway equipment Pending CN115842878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211405732.XA CN115842878A (en) 2022-11-10 2022-11-10 Quic message processing method, device, readable storage medium and gateway equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211405732.XA CN115842878A (en) 2022-11-10 2022-11-10 Quic message processing method, device, readable storage medium and gateway equipment

Publications (1)

Publication Number Publication Date
CN115842878A true CN115842878A (en) 2023-03-24

Family

ID=85577075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211405732.XA Pending CN115842878A (en) 2022-11-10 2022-11-10 Quic message processing method, device, readable storage medium and gateway equipment

Country Status (1)

Country Link
CN (1) CN115842878A (en)

Similar Documents

Publication Publication Date Title
CN109391560B (en) Network congestion notification method, proxy node and computer equipment
EP2768203B1 (en) Method and device for identifying an sctp packet field of the invention
US10348631B2 (en) Processing packet header with hardware assistance
US9923786B2 (en) System and method for performing a service discovery for virtual networks
US9929879B2 (en) Multipath support of real-time communications
EP3422656B1 (en) Udp protocol acceleration method and system
EP2055052B1 (en) Triggering bandwidth reservation and priority remarking
US7945676B2 (en) Processing requests transmitted using a first communication protocol directed to an application that uses a second communication protocol
WO2020052110A1 (en) Service quality monitoring method, apparatus, and system
EP2773073A1 (en) Entry generation method, message receiving method, and corresponding device and system
US10178015B2 (en) Methods, systems, and computer readable media for testing network equipment devices using connectionless protocols
CN107231269B (en) Accurate cluster speed limiting method and device
CN108833591B (en) method, electronic equipment, device and network architecture for data transmission in P2P network
WO2016034029A1 (en) Method and device for processing service traffic
CN107666486A (en) A kind of network data flow restoration methods and system based on message protocol feature
CN107205026A (en) A kind of Point-to-Point Data Transmission method and system
US8490173B2 (en) Unauthorized communication detection method
CN113810349B (en) Data transmission method, device, computer equipment and storage medium
CN110691007A (en) Method for accurately measuring QUIC connection packet loss rate
CN115002023B (en) Link aggregation method, link aggregation device, electronic equipment and storage medium
GB2592315A (en) Methods and systems for sending packets through a plurality of tunnels
CN108965428A (en) The transmission method of live data, device, electronic equipment, system
US20060239263A1 (en) Method for the establishing of connections in a communication system
WO2021013205A1 (en) Packet loss positioning method, apparatus and system, and computer storage medium
US9277014B2 (en) Handling of auxiliary NAS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination