User access request processing method, electronic device, electronic equipment, and medium
By carrying QUIC protocol identification information on the client and switching protocols, the problem of data transmission failure caused by inconsistent transmission protocols between the edge server and the client is solved, realizing efficient resource data transmission and improving business processing efficiency.
Patent Information
- Application Number
- CN202111678311.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The inconsistency in transmission protocols between edge servers and clients prevents resource data from being transferred between them, impacting business processing efficiency.
When sending a user access request, the client carries the QUIC protocol identification information. After detecting this, the edge server actively instructs the client to switch to the QUIC protocol for data transmission, or directly transmits data based on the QUIC protocol, ensuring efficient data transmission between clients that support the QUIC protocol and the edge server.
By detecting and switching protocols, resource data transmission failures caused by inconsistent transmission protocols are avoided, thus improving business processing efficiency.
Smart Images

Figure CN116418795B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and in particular to a method for processing user access requests, electronic devices, electronic equipment, and media. Background Technology
[0002] QUIC is a low-latency internet transport protocol based on UDP. It provides reliable, ordered, secure, and faster transmission services on top of UDP. These advantages are especially important for CDN networks serving a large number of users. Therefore, business platforms are increasingly using the QUIC protocol for business processing.
[0003] One reason why the QUIC protocol is widely used is that it can achieve higher business processing efficiency compared to HTTPS or HTTP transport protocols. However, in related technologies, it often occurs that during the process of business data interaction between the client and the edge server, the two transport protocols are not consistent. If the routing is completely based on the client's protocol, it will lead to business processing failure, which will also affect the efficiency of business processing. Summary of the Invention
[0004] This application provides a method for processing user access requests, an electronic device, an electronic device, and a medium. The technical solution of this application can solve the problem of inability to transmit resource data due to the inconsistency of transmission protocols between edge servers and clients in related technologies.
[0005] According to one aspect of the embodiments of this application, a method for processing user access requests is provided, applied to an edge server, including:
[0006] Receive user access requests sent by clients based on HTTPS or HTTP protocols;
[0007] Detect whether the user access request contains identification information corresponding to the QUIC protocol;
[0008] If so, and if it is determined that it supports the QUIC protocol, it sends a first response message to the client based on the HTTPS or HTTP protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time.
[0009] Receive user access requests sent by the client based on the QUIC protocol;
[0010] A second response message is sent to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user access request.
[0011] Optionally, in another embodiment based on the method described above in this application, after detecting whether the user access request contains identification information corresponding to the QUIC protocol, the method further includes:
[0012] If not, a second response message is sent to the client based on the HTTPS or HTTP protocol. The second response message includes the resource data corresponding to the user's access request.
[0013] Optionally, in another embodiment based on the method described above in this application, after detecting whether the user access request contains identification information corresponding to the QUIC protocol, the method further includes:
[0014] Detect whether the edge server stores the resource data;
[0015] If not, a resource acquisition request is sent to the upper-layer server based on the QUIC protocol.
[0016] Optionally, in another embodiment based on the method described above, after sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the method further includes:
[0017] If a third response message is received from the upper-layer server, the third response message includes the resource data corresponding to the resource acquisition request;
[0018] The resource data is then sent to the client based on the QUIC protocol.
[0019] Optionally, in another embodiment based on the method described above, after sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the method further includes:
[0020] If a fourth response message is received from the upper-layer server, the fourth response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol;
[0021] After the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
[0022] Optionally, in another embodiment based on the method described above in this application, after detecting whether the edge server stores the resource data, the method further includes:
[0023] If so, a second response message is sent to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user access request.
[0024] According to one aspect of the embodiments of this application, a method for processing user access requests is provided, applied to a client, including:
[0025] The user access request is sent to the edge server based on the HTTPS or HTTP protocol, and the user access request contains identification information corresponding to the QUIC protocol;
[0026] The client receives a first response message sent by the edge server, the first response message being used to instruct the client to send a user access request based on the QUIC protocol next time.
[0027] The user access request is sent to the edge server based on the QUIC protocol;
[0028] The system receives a second response message sent by the edge server, the second response message including resource data corresponding to the user access request.
[0029] Optionally, in another embodiment based on the method described above, after receiving the second response message sent by the edge server, the method further includes:
[0030] Record the association between the edge server and the QUIC protocol;
[0031] When a user access request is sent to the edge server again, the user access request is sent to the edge server based on the QUIC protocol.
[0032] According to another aspect of the embodiments of this application, an electronic device for processing user access requests is provided, applied to an edge server, comprising:
[0033] The first receiving module is configured to receive user access requests sent by clients based on HTTPS or HTTP protocols;
[0034] The detection module is configured to detect whether the user access request contains identification information corresponding to the QUIC protocol;
[0035] The first sending module is configured to send a first response message to the client based on HTTPS or HTTP if it determines that it supports the QUIC protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time.
[0036] The second receiving module is configured to receive user access requests sent by the client based on the QUIC protocol;
[0037] The second sending module is configured to send a second response message to the client based on the QUIC protocol. The second response message includes resource data corresponding to the user access request.
[0038] According to another aspect of the embodiments of this application, an electronic device for processing user access requests is provided, applied to a client, comprising:
[0039] The third sending module is configured to send user access requests to the edge server based on the HTTPS or HTTP protocol. The user access requests contain identification information corresponding to the QUIC protocol.
[0040] The third receiving module is configured to receive a first response message sent by the edge server, the first response message being used to instruct the client to send a user access request based on the QUIC protocol next time.
[0041] The fourth sending module is configured to send the user access request to the edge server based on the QUIC protocol;
[0042] The fourth receiving module is configured to receive a second response message sent by the edge server, the second response message including resource data corresponding to the user access request.
[0043] According to another aspect of the embodiments of this application, an electronic device is provided, comprising:
[0044] Memory, used to store executable instructions; and
[0045] A display is provided for displaying the executable instructions to the memory to complete the operation of any of the user access request processing methods described above.
[0046] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided for storing computer-readable instructions, which, when executed, perform the operation of any of the user access request processing methods described above.
[0047] In this application, the edge server receives user access requests sent by clients based on HTTPS or HTTP protocols; detects whether the user access request contains identification information corresponding to the QUIC protocol; if so, and if it determines that it supports the QUIC protocol, it sends a first response message to the client based on HTTPS or HTTP protocols. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time; it receives user access requests sent by clients based on the QUIC protocol; and sends a second response message to the client based on the QUIC protocol. The second response message includes resource data corresponding to the user access request. By applying the technical solution of this application, the user access request initiated by the client to the edge server based on HTTPS or HTTP protocols can carry identification information to inform the edge server that the client supports the QUIC protocol. This allows the edge server to return different response messages to the client based on whether it supports the QUIC protocol, and subsequently transmit data through the corresponding protocol, thereby avoiding the problem that resource data transmission between the two cannot be performed when the edge server does not support the QUIC protocol.
[0048] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0049] The accompanying drawings, which form part of this specification, illustrate embodiments of this application and, together with the description, serve to explain the principles of this application.
[0050] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:
[0051] Figure 1 This is a schematic diagram illustrating a user access request processing method proposed in this application;
[0052] Figure 2 This is a schematic diagram illustrating another method for processing user access requests proposed in this application;
[0053] Figures 3-4 A schematic diagram of an electronic device for processing user access requests as proposed in this application;
[0054] Figure 5 This is a schematic diagram of an electronic device for processing user access requests as proposed in this application. Detailed Implementation
[0055] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0056] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0057] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.
[0058] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0059] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0060] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0061] It should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this application are indicated in the claims section.
[0062] It should be understood that this application is not limited to the precise structures described below and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
[0063] The following is combined Figures 1-3 This application describes a method for processing user access requests according to exemplary embodiments thereof. It should be noted that the following application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.
[0064] In one embodiment, this application also proposes a method for processing user access requests. Figure 1 A schematic flowchart illustrating a user access request processing method according to an embodiment of this application is shown. Figure 1As shown, this method is applied to an edge server and includes:
[0065] S101 receives user access requests sent by clients based on HTTPS or HTTP protocols.
[0066] S102, Detect whether the user access request contains identification information corresponding to the QUIC protocol.
[0067] QUIC is a low-latency internet transport protocol based on UDP. It emerged primarily to address issues in existing TCP network transport protocols, including TCP head-of-line blocking, handshake delays, and TCP protocol rigidity. Building upon UDP, QUIC provides reliable, ordered, secure, and faster transmission services. These advantages are particularly important for CDN networks serving massive numbers of users, leading some CDN providers to offer QUIC request processing capabilities.
[0068] One reason for the widespread use of the QUIC protocol is its higher efficiency in business processing compared to HTTPS or HTTP. However, a common problem arises during resource data transfer between edge servers and QUIC-enabled clients: the edge server's inability to send requested resource data to the client due to QUIC support, thus impacting user business processing efficiency.
[0069] To address the aforementioned issues, this application involves the client sending a user access request to the edge server using HTTPS or HTTP protocols commonly supported by the edge server. Furthermore, when the edge server receives the user access request from the client, it checks whether the request contains identification information corresponding to the QUIC protocol. If so, the edge server determines that the client is a client that supports the QUIC protocol.
[0070] In one approach, this application does not specifically limit the identification information, as long as it corresponds to the QUIC protocol. The identification information can be a predefined string, including but not limited to 001, a, and A. It is understood that as long as the meaning of the number or letter field is agreed upon in advance on the edge server side to correspond to the client's support for the QUIC protocol, this application does not limit the identification information.
[0071] S103, if applicable, then if it is determined that it supports the QUIC protocol, it sends a first response message to the client based on the HTTPS or HTTP protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time.
[0072] In one approach, if the edge server detects that it supports the QUIC protocol, since the QUIC protocol can improve business processing efficiency, in order to prioritize data transmission based on the QUIC protocol, this application proposes that when the edge server detects that it supports the QUIC protocol, it proactively sends a first response message to the client, instructing the client to send a user access request to the edge server based on a higher version protocol (i.e., switching from HTTPS or HTTP to QUIC). This enables the client to send a user access request to the edge server based on the QUIC protocol next time, thereby enabling the client supporting the QUIC protocol and the edge server to transmit resource data based on the faster QUIC protocol.
[0073] S104. Receive user access requests sent by the client based on the QUIC protocol.
[0074] S105. Send a second response message to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user's access request.
[0075] In one approach, if the edge server receives a user access request sent by the client based on the QUIC protocol, it first checks whether the resource data corresponding to the user access request is stored in its own storage area. If so, it reads the resource data and sends the resource data to the client based on the QUIC protocol.
[0076] In this application, a user access request sent by a client based on HTTPS or HTTP protocol is received; it detects whether the user access request contains identification information corresponding to the QUIC protocol; if so, if it determines that it supports the QUIC protocol, it sends a first response message to the client based on HTTPS or HTTP protocol, which instructs the client to send a user access request based on the QUIC protocol next time; it receives a user access request sent by the client based on the QUIC protocol; and it sends a second response message to the client based on the QUIC protocol, which includes resource data corresponding to the user access request. By applying the technical solution of this application, a user access request initiated by the client to the edge server based on HTTPS or HTTP protocol can carry identification information to inform the edge server that the client supports the QUIC protocol. This allows the edge server to return different response messages to the client based on whether it supports the QUIC protocol, and subsequently transmit data through the corresponding protocol, thereby avoiding the problem that resource data transmission between the two cannot be carried out when the edge server does not support the QUIC protocol.
[0077] Optionally, in another embodiment based on the method described above in this application, after S102 (detecting whether the user access request contains identification information corresponding to the QUIC protocol), the following steps can be implemented:
[0078] If not, a second response message is sent to the client based on the HTTPS or HTTP protocol. The second response message includes the resource data corresponding to the user's access request.
[0079] Furthermore, when the edge server receives a user access request from a client and detects that the user access request does not contain identification information corresponding to the QUIC protocol, the edge server can determine that the client is a client that does not support the QUIC protocol. Therefore, the edge server sends the resource data corresponding to the user access request to the client based on the HTTPS or HTTP protocol, thereby ensuring that the client can receive the resource data in a timely manner to avoid problems affecting the progress of business processing.
[0080] Optionally, in another embodiment based on the method described above in this application, after S102 (detecting whether the user access request contains identification information corresponding to the QUIC protocol), the following steps can be implemented:
[0081] Detect whether the edge server stores resource data;
[0082] If not, a resource acquisition request is sent to the upper-layer server based on the QUIC protocol.
[0083] In one approach, if the edge server does not store the resource data corresponding to the user's access request, it sends a resource acquisition request to the upper-layer server. This application does not specifically limit the upper-layer server; for example, it can be any one of other edge servers, a parent server, a central server, or an origin server. The edge server obtains the corresponding resource data by sending a resource acquisition request to any one of the origin server, other edge servers, parent servers, or central servers that stores the resource data, and then sends the resource data to the client based on the QUIC protocol.
[0084] Optionally, in another embodiment based on the method described above in this application, after sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the following steps can be implemented:
[0085] If a third response message is received from the upper-layer server, the third response message includes the resource data corresponding to the resource acquisition request;
[0086] The resource data is then sent to the client based on the QUIC protocol.
[0087] In one approach, if the upper-layer server supports the QUIC protocol, it will send the requested resource data to the edge server based on the QUIC protocol. After the edge server receives the resource data returned by the upper-layer server, it will send the requested resource data to the client based on the QUIC protocol, thereby ensuring that the client can receive the resource data in a timely manner to avoid problems that affect the progress of business processing.
[0088] Optionally, in another embodiment based on the method described above in this application, after sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the following steps can be implemented:
[0089] If a fourth response message is received from the upper-layer server, the fourth response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server next time based on the HTTPS or HTTP protocol;
[0090] After the edge server obtains resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
[0091] In one approach, after receiving a resource acquisition request from an edge server based on the QUIC protocol, the upper-layer server can first check whether it supports the QUIC protocol. If the upper-layer server detects that it does not support the QUIC protocol, it can stop attempting to parse the request and instead proactively send a response message to the edge server that sent the resource acquisition request based on the QUIC protocol, instructing it to send the resource acquisition request based on the lower version protocol. Understandably, upon receiving this response message, the edge server will resend the resource acquisition request to the upper-layer server using a protocol downgrade approach (switching from QUIC to HTTPS or HTTP), enabling the upper-layer server, which does not support the QUIC protocol, to send resource data to the edge via HTTPS or HTTP.
[0092] In one approach, the fourth response message sent by the upper-layer server corresponds to a response message containing an error identifier or a response message indicating protocol degradation. The response error identifier can be an ECONNREFUSED error code or a 5XX status code. That is, when the upper-layer server detects that it does not support the QUIC protocol, it generates an ECONNREFUSED error code or a 5XX status code and sends it to the edge server. After parsing the response message and obtaining the ECONNREFUSED error code or 5XX status code, the edge server can directly determine that the upper-layer server does not support the QUIC protocol based on the error code or 5XX status code, and then send the resource acquisition request again based on the HTTPS or HTTP protocol.
[0093] In another approach, if the fourth response message received by the edge server corresponds to a timeout response message or is empty, it can send another resource acquisition request to the upper-layer server based on the QUIC protocol to further confirm whether the upper-layer server supports the QUIC protocol. Specifically, if the fourth response message sent by the upper-layer server still corresponds to a timeout response message (such as a response message with a status code of 504) or the upper-layer server does not send a response message, i.e., the fourth response message is empty, it is determined that the upper-layer server does not support the QUIC protocol, and a resource acquisition request can then be sent again based on the HTTPS or HTTP protocol.
[0094] In this way, during the process of the client requesting resource data from the upper-layer server based on the QUIC protocol, the upper-layer server can return different response messages to the client according to whether it supports the QUIC protocol. This avoids the problem that the upper-layer server cannot send the requested resource data to the edge server due to its lack of support for the QUIC protocol, which would affect the efficiency of user business processing.
[0095] Optionally, in another embodiment based on the method described above in this application, after detecting whether the edge server stores resource data, the following steps can be implemented:
[0096] If so, a second response message is sent to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user's access request.
[0097] In one approach, if the edge server receives a user access request sent by the client based on the QUIC protocol, it first checks whether the resource data corresponding to the user access request is stored in its own storage area. If so, it reads the resource data and sends the resource data to the client based on the QUIC protocol.
[0098] By applying the technical solution of this application, a client can include an identifier in its user access request to the edge server based on HTTPS or HTTP protocols, indicating that the client supports the QUIC protocol. This allows the edge server to return different response messages to the client based on whether it supports the QUIC protocol, and subsequently use the corresponding protocol for data transmission. This avoids the problem that resource data transmission between the two parties cannot occur when the edge server does not support the QUIC protocol.
[0099] In another embodiment, this application also proposes a method for processing user access requests. Figure 2 A schematic flowchart illustrating a user access request processing method according to an embodiment of this application is shown. Figure 2As shown, this method is applied to the client and includes:
[0100] S201, send a user access request to the edge server based on HTTPS or HTTP protocol. The user access request contains identification information corresponding to the QUIC protocol.
[0101] QUIC is a low-latency internet transport protocol based on UDP. It emerged primarily to address issues in existing TCP network transport protocols, including TCP head-of-line blocking, handshake delays, and TCP protocol rigidity. Building upon UDP, QUIC provides reliable, ordered, secure, and faster transmission services. These advantages are particularly important for CDN networks serving massive numbers of users, leading some CDN providers to offer QUIC request processing capabilities.
[0102] One reason for the widespread use of the QUIC protocol is its higher efficiency in business processing compared to HTTPS or HTTP. However, a common problem arises during resource data transfer between edge servers and QUIC-enabled clients: the edge server's inability to send requested resource data to the client due to QUIC support hinders its business processing efficiency.
[0103] To address the aforementioned issues, since the client is unaware of whether the edge server it is communicating with supports the QUIC protocol, and sending a request directly to the edge server using QUIC might result in the edge server failing to respond if it does not support QUIC, this application proposes a different approach. The client first sends a user access request to the edge server using HTTPS or HTTP, a protocol that the edge server is guaranteed to support. To prioritize resource data transmission using QUIC, the client needs to add an identifier to this request to inform the edge server that it supports QUIC. Upon detecting this user access request with the identifier and recognizing that it also supports QUIC, the edge server will proactively send a first response message to the client instructing it to upgrade its protocol (i.e., switch from HTTPS or HTTP to QUIC) to send a user access request to the edge server. This ensures that subsequent user access requests from the client will be sent using QUIC, enabling both the client and the edge server to transmit resource data using the faster QUIC protocol.
[0104] S202, Receive the first response message sent by the edge server. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time.
[0105] In one approach, when a client sending a user access request based on HTTPS or HTTP receives a first response message from the edge server instructing it to resend the resource acquisition request to the edge server based on a protocol upgrade (switching from HTTPS or HTTP to QUIC), the client then resends the user access request to the edge server based on the QUIC protocol. This allows clients that both support the QUIC protocol and the edge server to transmit resource data using the faster QUIC protocol.
[0106] S203 sends user access requests to the edge server based on the QUIC protocol.
[0107] In one approach, when the edge server receives a user access request from a client based on the QUIC protocol, the edge server also sends a user access request to the edge server based on the QUIC protocol, so that clients that both support the QUIC protocol and the edge server can transmit resource data through the faster QUIC protocol.
[0108] S204, Receive a second response message sent by the edge server. The second response message includes resource data corresponding to the user access request.
[0109] In one approach, after receiving a user access request sent by a client based on the QUIC protocol, the edge server can retrieve the corresponding resource data from its own storage area or from a server that stores the resource data (e.g., an upper-layer server or other edge servers, parent servers, or central servers). After obtaining the resource data, the edge server sends a second response message containing the resource data to the client based on the QUIC protocol.
[0110] In this application, a user access request is sent to an edge server based on HTTPS or HTTP protocols. The user access request includes identification information corresponding to the QUIC protocol. A first response message is received from the edge server, instructing the client to send a user access request again based on the QUIC protocol. A user access request is then sent to the edge server based on the QUIC protocol. A second response message is received from the edge server, including resource data corresponding to the user access request. By applying the technical solution of this application, during the process of the client requesting resource data from the edge server based on HTTPS or HTTP protocols, the edge server can return different response messages to the client based on whether it supports the QUIC protocol. This enables data transmission between clients that both support the QUIC protocol and the edge server based on the QUIC protocol. It also avoids the problem of resource data transmission failure between the edge server and the client due to the edge server's inability to parse the user request sent by the client when the transmission protocols of the edge server and the client are inconsistent.
[0111] Optionally, in another embodiment based on the method described above in this application, after S204 (receiving the second response message sent by the edge server), the following steps may be implemented:
[0112] Record the association between the edge server and the QUIC protocol;
[0113] When a user access request is sent to the edge server again, it is sent to the edge server based on the QUIC protocol.
[0114] In one approach, to avoid the time-consuming business processing caused by the client having to send two resource retrieval requests when subsequently requesting resource data from the edge server, this application can record the association between the edge server and the QUIC protocol in a local storage area (e.g., in historical access data), provided the client knows the protocols supported by the edge server. When a resource retrieval request needs to be sent to the edge server again, the client can directly send the resource retrieval request based on the QUIC protocol.
[0115] For example, when a client subsequently sends a resource acquisition request to the edge server, it can first retrieve historical access data pre-stored in the local storage area and iterate through this historical access data to see if there are any historical access records for the edge server. If so, it reads the relationship between the historical access record and the transport protocol associated with the edge server. That is, the client can use this historical access record to determine whether the edge server supports the QUIC protocol. If it is determined that it supports it, it can directly send a resource acquisition request to the edge server based on the QUIC protocol. Understandably, if the QUIC protocol is not supported, then it can also directly send a resource acquisition request to the edge server based on the HTTPS or HTTP protocol.
[0116] Furthermore, the above-described embodiments of this application can avoid the need for subsequent clients to send resource acquisition requests to the edge server based on HTTPS or HTTP protocols and QUIC protocols to obtain the corresponding resource data when requesting resource data from the edge server again. This saves the transmission time of business data and reduces the data transmission and reception resources of the server.
[0117] In another embodiment of this application, such as Figure 3 As shown, this application also provides an electronic device for processing user access requests. This device, applied to an edge server, includes:
[0118] The first receiving module 301 is configured to receive user access requests sent by the client based on the HTTPS or HTTP protocol;
[0119] The detection module 302 is configured to detect whether the user access request contains identification information corresponding to the QUIC protocol;
[0120] The first sending module 303 is configured to send a first response message to the client based on HTTPS or HTTP protocol if it determines that it supports the QUIC protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time.
[0121] The second receiving module 304 is configured to receive user access requests sent by the client based on the QUIC protocol;
[0122] The second sending module 305 is configured to send a second response message to the client based on the QUIC protocol. The second response message includes resource data corresponding to the user access request.
[0123] In this application, a user access request sent by a client based on HTTPS or HTTP protocol is received; it detects whether the user access request contains identification information corresponding to the QUIC protocol; if so, if it determines that it supports the QUIC protocol, it sends a first response message to the client based on HTTPS or HTTP protocol, which instructs the client to send a user access request based on the QUIC protocol next time; it receives a user access request sent by the client based on the QUIC protocol; and it sends a second response message to the client based on the QUIC protocol, which includes resource data corresponding to the user access request. By applying the technical solution of this application, a user access request initiated by the client to the edge server based on HTTPS or HTTP protocol can carry identification information to inform the edge server that the client supports the QUIC protocol. This allows the edge server to return different response messages to the client based on whether it supports the QUIC protocol, and subsequently transmit data through the corresponding protocol, thereby avoiding the problem that resource data transmission between the two cannot be carried out when the edge server does not support the QUIC protocol.
[0124] In another embodiment of this application, the detection module 302 is configured as follows:
[0125] If not, a second response message is sent to the client based on the HTTPS or HTTP protocol. The second response message includes the resource data corresponding to the user's access request.
[0126] In another embodiment of this application, the detection module 302 is configured as follows:
[0127] Detect whether the edge server stores the resource data;
[0128] If not, a resource acquisition request is sent to the upper-layer server based on the QUIC protocol.
[0129] In another embodiment of this application, the first sending module 303 is configured as follows:
[0130] If a third response message is received from the upper-layer server, the third response message includes the resource data corresponding to the resource acquisition request;
[0131] The resource data is then sent to the client based on the QUIC protocol.
[0132] In another embodiment of this application, the second sending module 305 is configured as follows:
[0133] If a fourth response message is received from the upper-layer server, the fourth response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol;
[0134] After the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
[0135] In another embodiment of this application, the second sending module 305 is configured as follows:
[0136] If so, a second response message is sent to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user access request.
[0137] In another embodiment of this application, such as Figure 4 As shown, this application also provides an electronic device for processing user access requests. This device, applied to a client, includes:
[0138] The third sending module 306 is configured to send a user access request to the edge server based on the HTTPS or HTTP protocol, wherein the user access request contains identification information corresponding to the QUIC protocol;
[0139] The third receiving module 307 is configured to receive a first response message sent by the edge server, the first response message being used to instruct the client to send a user access request based on the QUIC protocol next time.
[0140] The fourth sending module 308 is configured to send the user access request to the edge server based on the QUIC protocol;
[0141] The fourth receiving module 309 is configured to receive a second response message sent by the edge server, the second response message including resource data corresponding to the user access request.
[0142] In this application, a user access request is sent to an edge server based on HTTPS or HTTP protocols. The user access request includes identification information corresponding to the QUIC protocol. A first response message is received from the edge server, instructing the client to send a user access request again based on the QUIC protocol. A user access request is then sent to the edge server based on the QUIC protocol. A second response message is received from the edge server, including resource data corresponding to the user access request. By applying the technical solution of this application, during the process of the client requesting resource data from the edge server based on HTTPS or HTTP protocols, the edge server can return different response messages to the client based on whether it supports the QUIC protocol. This enables data transmission between clients that both support the QUIC protocol and the edge server based on the QUIC protocol. It also avoids the problem of resource data transmission failure between the edge server and the client due to the edge server's inability to parse the user request sent by the client when the transmission protocols of the edge server and the client are inconsistent.
[0143] In another embodiment of this application, the fourth receiving module 309 is configured as follows:
[0144] Record the association between the edge server and the QUIC protocol;
[0145] When a user access request is sent to the edge server again, the user access request is sent to the edge server based on the QUIC protocol.
[0146] Figure 5 This is a logical structure block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0147] Reference Figure 5 The electronic device 400 may include one or more of the following components: processor 401 and memory 402.
[0148] Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0149] Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 402 are used to store at least one instruction, which is executed by processor 401 to implement the interactive effect calibration method provided in the method embodiments of this application.
[0150] In some embodiments, the electronic device 400 may optionally include a peripheral device interface 403 and at least one peripheral device. The processor 401, memory 402, and peripheral device interface 403 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power supply 409.
[0151] Peripheral device interface 403 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 401 and memory 402. In some embodiments, processor 401, memory 402 and peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 401, memory 402 and peripheral device interface 403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0152] The radio frequency (RF) circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 404 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 404 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 404 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0153] Display screen 405 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 405 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 401 for processing. In this case, display screen 405 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 405, which serves as the front panel of electronic device 400; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of electronic device 400 or in a folded design; in still other embodiments, display screen 405 may be a flexible display screen, disposed on a curved or folded surface of electronic device 400. Furthermore, display screen 405 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 405 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0154] The camera assembly 406 is used to acquire images or videos. Optionally, the camera assembly 406 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 406 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0155] The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 401 for processing, or input to the radio frequency circuit for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the electronic device 400. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 407 may also include a headphone jack.
[0156] Positioning component 408 is used to locate the current geographic location of electronic device 400 in order to enable navigation or LBS (Location Based Service). Positioning component 408 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Granas system, or the EU's Galileo system.
[0157] Power supply 409 is used to supply power to various components in electronic device 400. Power supply 409 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 409 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0158] Those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device 400, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions. These instructions can be executed by a processor 420 of an electronic device 400 to complete the aforementioned method for pushing audio and video streams. The method includes: receiving a user access request sent by a client based on HTTPS or HTTP protocols; detecting whether the user access request contains identification information corresponding to the QUIC protocol; if so, sending a first response message to the client based on HTTPS or HTTP protocols if it determines that it supports the QUIC protocol, the first response message instructing the client to send a user access request based on the QUIC protocol next time; receiving the user access request sent by the client based on the QUIC protocol; and sending a second response message to the client based on the QUIC protocol, the second response message including resource data corresponding to the user access request. Optionally, the instructions can also be executed by the processor 420 of the electronic device 400 to complete other steps involved in the aforementioned exemplary embodiment. For example, the non-transitory computer-readable storage medium can be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0160] In an exemplary embodiment, an application / computer program product is also provided, including one or more instructions that can be executed by the processor 420 of the electronic device 400 to complete the above-described method for pushing audio and video streams. The method includes: receiving a user access request sent by a client based on HTTPS or HTTP protocols; detecting whether the user access request contains identification information corresponding to the QUIC protocol; if so, sending a first response message to the client based on HTTPS or HTTP protocols if it determines that it supports the QUIC protocol, the first response message instructing the client to send a user access request based on the QUIC protocol next time; receiving the user access request sent by the client based on the QUIC protocol; and sending a second response message to the client based on the QUIC protocol, the second response message including resource data corresponding to the user access request. Optionally, the above instructions can also be executed by the processor 420 of the electronic device 400 to complete other steps involved in the above exemplary embodiment.
[0161] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0162] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing user access requests, characterized in that, Applied to edge servers, which may or may not support the QUIC protocol, including: Receive user access requests sent by clients based on HTTPS or HTTP protocols; Detect whether the user access request contains identification information corresponding to the QUIC protocol; If so, the client is determined to be a client that supports the QUIC protocol. If it is determined that it supports the QUIC protocol, a first response message is sent to the client based on the HTTPS or HTTP protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time. Receive the user access request sent by the client based on the QUIC protocol; The client sends a second response message to the edge server based on the QUIC protocol. The second response message includes resource data corresponding to the user access request. After receiving the second response message sent by the edge server, the client records the association between the edge server and the QUIC protocol. When the client sends a user access request to the edge server again, it sends the user access request to the edge server based on the QUIC protocol. After detecting whether the user access request contains identification information corresponding to the QUIC protocol, the method further includes: detecting whether the edge server stores the resource data; if not, sending a resource acquisition request to the upper-layer server based on the QUIC protocol. The upper-layer server detects whether it supports the QUIC protocol. If the upper-layer server detects that it does not support the QUIC protocol, it sends a fourth response message to the edge server that sends the resource acquisition request based on the QUIC protocol, instructing it to send the resource acquisition request based on the HTTPS or HTTP protocol. The fourth response message includes a response message with an error identifier or a response message indicating protocol degradation. After sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the following is also included: If a fourth response message is received from the upper-layer server, the fourth response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol; After the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
2. The method as described in claim 1, characterized in that, After detecting whether the user access request contains identification information corresponding to the QUIC protocol, the method further includes: If not, a second response message is sent to the client based on the HTTPS or HTTP protocol. The second response message includes the resource data corresponding to the user's access request.
3. The method as described in claim 1, characterized in that, After sending a resource acquisition request to the upper-layer server based on the QUIC protocol, the following is also included: If a third response message is received from the upper-layer server, the third response message includes the resource data corresponding to the resource acquisition request; The resource data is then sent to the client based on the QUIC protocol.
4. The method as described in claim 1, characterized in that, After detecting whether the edge server stores the resource data, the method further includes: If so, a second response message is sent to the client based on the QUIC protocol. The second response message includes the resource data corresponding to the user access request.
5. A method for processing user access requests, characterized in that, Applied to the client side, including: The user access request is sent to the edge server based on the HTTPS or HTTP protocol. The user access request contains identification information corresponding to the QUIC protocol. The identification information is used to determine whether the client is a client that supports the QUIC protocol, and whether the edge server supports the QUIC protocol or not. The client receives a first response message sent by the edge server, the first response message being used to instruct the client to send a user access request based on the QUIC protocol next time. The user access request is sent to the edge server based on the QUIC protocol; Receive a second response message sent by the edge server, the second response message including resource data corresponding to the user access request; After receiving the second response message sent by the edge server, the method further includes: Record the association between the edge server and the QUIC protocol; When a user access request is sent to the edge server again, the user access request is sent to the edge server based on the QUIC protocol; The edge server is configured to detect whether it stores the resource data; if not, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol; the upper-layer server checks whether it supports the QUIC protocol; if the upper-layer server detects that it does not support the QUIC protocol, it sends a fourth response message to the edge server that sent the resource acquisition request based on the QUIC protocol, instructing it to send the resource acquisition request based on the HTTPS or HTTP protocol. The fourth response message includes an error flag or an instruction to downgrade the protocol. The edge server is also configured to, if it receives the fourth response message returned by the upper-layer server, which instructs it to send the resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol, then after the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
6. An electronic device for processing user access requests, characterized in that, Applied to edge servers, which may or may not support the QUIC protocol, including: The first receiving module is configured to receive user access requests sent by clients based on HTTPS or HTTP protocols; The detection module is configured to detect whether the user access request contains identification information corresponding to the QUIC protocol; The first sending module is configured to determine, if any, that the client is a client that supports the QUIC protocol, and if it determines that it supports the QUIC protocol, send a first response message to the client based on the HTTPS or HTTP protocol. The first response message is used to instruct the client to send a user access request based on the QUIC protocol next time. The second receiving module is configured to receive user access requests sent by the client based on the QUIC protocol; The second sending module is configured to send a second response message to the client based on the QUIC protocol. The second response message includes resource data corresponding to the user access request. After receiving the second response message sent by the edge server, the client is used to record the association between the edge server and the QUIC protocol. When sending a user access request to the edge server again, the client sends the user access request to the edge server based on the QUIC protocol. The device is also configured to detect whether the edge server stores the resource data; if not, to send a resource acquisition request to the upper-layer server based on the QUIC protocol; The upper-layer server detects whether it supports the QUIC protocol. When the upper-layer server detects that it does not support the QUIC protocol, it sends a fourth response message to the edge server that sends the resource acquisition request based on the QUIC protocol, indicating that it sends the resource acquisition request based on the HTTPS or HTTP protocol. The fourth response message includes a response message with an error identifier or a response message indicating protocol degradation. The device is also configured to, if a fourth response message is received from the upper-layer server, instruct the edge server to send the resource acquisition request to the upper-layer server again based on HTTPS or HTTP protocol; After the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
7. An electronic device for processing user access requests, characterized in that, Applied to the client side, including: The third sending module is configured to send a user access request to the edge server based on the HTTPS or HTTP protocol. The user access request contains identification information corresponding to the QUIC protocol. The identification information is used to determine whether the client is a client that supports the QUIC protocol, and whether the edge server supports the QUIC protocol or not. The third receiving module is configured to receive a first response message sent by the edge server, the first response message being used to instruct the client to send a user access request based on the QUIC protocol next time. The fourth sending module is configured to send the user access request to the edge server based on the QUIC protocol; The fourth receiving module is configured to receive a second response message sent by the edge server, the second response message including resource data corresponding to the user access request; The fourth receiving module is also configured to: record the association between the edge server and the QUIC protocol; and when a user access request is sent to the edge server again, send the user access request to the edge server based on the QUIC protocol. The edge server detects whether it stores the resource data. If not, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol. The upper-layer server checks whether it supports the QUIC protocol. If the upper-layer server detects that it does not support the QUIC protocol, it sends a fourth response message to the edge server that sent the resource acquisition request based on the QUIC protocol, instructing it to send the resource acquisition request based on the HTTPS or HTTP protocol. The fourth response message includes an error flag or an indication of protocol downgrading. If the edge server receives the fourth response message from the upper-layer server, the fourth response message instructs the edge server to send the resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol. After the edge server obtains the resource data from the upper-layer server based on the HTTPS or HTTP protocol, it sends the resource data to the client based on the QUIC protocol.
8. An electronic device, characterized in that, include: Memory, used to store executable instructions; as well as, A processor, configured to execute the executable instructions with the memory to perform the operation of the user access request processing method according to any one of claims 1 to 5.
9. A computer-readable storage medium for storing computer-readable instructions, characterized in that, When the instruction is executed, it performs the operation of the user access request processing method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Event request transmission method and device, storage medium and electronic equipment
CN111885093A
Load implementation method and device for domain name resolution system, equipment and medium
CN112600953A
Data updating method of industrial system, electronic equipment and storage medium
CN113347269A