Method for acquiring resource data, electronic device, electronic equipment and medium
By using a protocol adaptation mechanism between edge servers and upper-layer servers, the problem of resource data transmission caused by inconsistent transmission protocols is solved, thereby improving business processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUIZHOU BAISHANCLOUD TECH CO LTD
- Filing Date
- 2021-12-29
- Publication Date
- 2026-04-28
AI Technical Summary
Inconsistent transmission protocols between edge servers and upper-layer servers can prevent the transmission of resource data, impacting the efficiency of user business processing.
The edge server checks the local resource data storage status. If it doesn't have it, it sends a request to the upper-layer server based on the QUIC protocol. If the upper-layer server doesn't support the QUIC protocol, it resends the request via HTTPS or HTTP, and records the protocol association for later direct use. The upper-layer server checks QUIC support; if not, it sends a response message indicating protocol downgrading.
This avoids resource data transmission failures caused by upper-layer servers not supporting the QUIC protocol, thus improving the efficiency of user business processing.
Smart Images

Figure CN116418793B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and in particular to a method, electronic device, electronic equipment, and medium for acquiring resource data. 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] In related technologies, a common problem arises when an edge server requests resource data from an upper-layer server based on the QUIC protocol. Because the upper-layer server does not support the QUIC protocol, it is unable to send the requested resource data to the edge server, thus affecting the efficiency of user business processing. Summary of the Invention
[0004] This application provides a method, electronic device, electronic device, and medium for acquiring resource data. The technical solution of this application can solve the problem in related technologies where resource data cannot be transmitted due to the inconsistency in the transmission protocols between edge servers and upper-layer servers.
[0005] According to one aspect of the embodiments of this application, a method for acquiring resource data is provided, applied to an edge server, comprising:
[0006] Receive user access requests sent by clients;
[0007] Check whether it has stored the resource data corresponding to the user access request;
[0008] If not, a resource acquisition request is sent to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request.
[0009] If the edge server receives the first response message from the upper-layer server, it sends the resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol next time.
[0010] 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:
[0011] If a second response message is received from the upper-layer server, the resource data is sent to the client. The second response message includes the resource data corresponding to the resource acquisition request.
[0012] Optionally, in another embodiment based on the method described above in this application, the step of sending the resource acquisition request to the upper-layer server based on HTTPS or HTTP protocol upon receiving the first response message from the upper-layer server includes:
[0013] Parse the first response message;
[0014] If it is determined that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, then the resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol; or,
[0015] If it is determined that the first response message corresponds to a timeout response message or the first response message is empty, then the resource acquisition request is sent to the upper-layer server again based on the QUIC protocol. When the response message sent by the upper-layer server is received again, the resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0016] Optionally, in another embodiment based on the method described above in this application, after receiving the first response message sent by the upper-layer server, the method further includes:
[0017] Record the association between the upper-layer server and the HTTPS or HTTP protocol;
[0018] When a resource retrieval request needs to be sent to the upper-layer server again, the request is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0019] According to one aspect of the embodiments of this application, a method for obtaining resource data is provided, applied to an upper-layer server, comprising:
[0020] Receive resource acquisition requests sent by the edge server based on the QUIC protocol;
[0021] The system checks whether it supports the QUIC protocol. If not, it sends a first response message to the edge server. The first response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server next time based on the HTTPS or HTTP protocol.
[0022] When a resource acquisition request is received from the edge server based on the HTTPS or HTTP protocol, the resource data corresponding to the resource acquisition request is sent to the edge server.
[0023] Optionally, in another embodiment based on the method described above in this application, sending the first response message to the edge server includes:
[0024] Send a response message containing an error identifier to the edge server; or,
[0025] Do not respond to the user access request; or,
[0026] Send a timeout response message to the edge server; or,
[0027] Send a response message indicating protocol degradation to the edge server.
[0028] Optionally, in another embodiment based on the method described above in this application, after detecting whether it supports the QUIC protocol, the method further includes:
[0029] If supported, a second response message is sent to the edge server, the second response message including the resource data corresponding to the resource acquisition request.
[0030] According to another aspect of the embodiments of this application, an electronic device for acquiring resource data is provided, applied to an edge server, comprising:
[0031] The first receiving module is configured to receive user access requests sent by the client.
[0032] The first detection module is configured to detect whether it stores resource data corresponding to the user access request.
[0033] The first sending module is configured to send a resource acquisition request to the upper-layer server based on the QUIC protocol if there is no such request. The resource acquisition request is used to obtain the resource data corresponding to the user access request.
[0034] The second sending module is configured to, upon receiving a first response message from the upper-layer server, send the resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol. The first 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.
[0035] According to another aspect of the embodiments of this application, an electronic device for acquiring resource data is provided, applied to an upper-layer server, comprising:
[0036] The second receiving module is configured to receive resource acquisition requests sent by the edge server based on the QUIC protocol;
[0037] The second detection module is configured to detect whether it supports the QUIC protocol. If not, it sends a first response message to the edge server. The first response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server next time based on the HTTPS or HTTP protocol.
[0038] The third sending module is configured to send the resource data corresponding to the resource acquisition request to the edge server when it receives a resource acquisition request sent by the edge server based on the HTTPS or HTTP protocol.
[0039] According to another aspect of the embodiments of this application, an electronic device is provided, comprising:
[0040] Memory, used to store executable instructions; and
[0041] A display is provided for displaying the executable instructions to the memory to perform the operation of any of the methods described above for acquiring resource data.
[0042] 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 operations of any of the methods for obtaining resource data described above.
[0043] In this application, after receiving a user access request from a client, the edge server can check whether it stores the resource data corresponding to the user access request. If not, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request. If a first response message is received from the upper-layer server, a resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol. By applying the technical solution of this application, during the process of the edge server requesting resource data from the upper-layer server based on the QUIC protocol, the upper-layer server can return different response messages to the edge server according to whether it supports the QUIC protocol, thereby avoiding the problem that the two cannot transmit resource data when the upper-layer server does not support the QUIC protocol.
[0044] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0045] 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.
[0046] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:
[0047] Figure 1 This is a schematic diagram of a method for obtaining resource data proposed in this application;
[0048] Figure 2 This is a schematic diagram of another method for obtaining resource data proposed in this application;
[0049] Figure 3 This is a schematic diagram of a method for obtaining resource data proposed in this application;
[0050] Figures 4-5 This is a schematic diagram of an electronic device for acquiring resource data according to this application;
[0051] Figure 6 This is a schematic diagram of an electronic device for acquiring resource data according to this application. Detailed Implementation
[0052] Various exemplary embodiments of this 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 this application.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only on the basis that they can be implemented by those skilled in the art. 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. It should be noted that those skilled in the art will readily conceive of other embodiments of this application after considering the specification and practicing 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 technical means in the art that are not disclosed in this application. The specification and embodiments are to be regarded as exemplary only, and the true scope and spirit of this application are indicated in the claims.
[0058] It should be understood that this application is not limited to the precise structure 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.
[0059] The following is combined Figures 1-3 This application describes a method for acquiring resource data 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.
[0060] In one embodiment, this application also proposes a method for acquiring resource data. Figure 1 A schematic flowchart illustrating a method for acquiring resource data according to an embodiment of this application is shown. Figure 1 As shown, this method is applied to an edge server and includes:
[0061] S101 receives user access requests sent by the client.
[0062] S102, check whether it has stored resource data corresponding to the user access request.
[0063] QUIC is a low-latency internet transport protocol based on UDP. It was developed to address some problems in the existing TCP network transport protocol, including TCP head-of-line blocking, handshake delay, and TCP protocol rigidity. On the basis of UDP, QUIC provides reliable, ordered, secure, and faster transmission services. These advantages are particularly important for CDN networks serving a large number of users. Therefore, some CDN providers have begun to offer QUIC protocol request processing capabilities.
[0064] 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 upper-layer servers: the upper-layer server may not support the QUIC protocol, preventing it from sending the requested resource data to the edge server and thus impacting user business processing efficiency.
[0065] To address the aforementioned issues, this application addresses the problem by having the edge server, upon receiving a user access request from a client, first check whether the corresponding resource data is stored in its local storage area. Understandably, if the edge server has the resource data cached locally, it returns the corresponding resource data to the client. However, if the edge server does not have the resource data cached locally, it needs to send a request to the corresponding upper-layer server to retrieve the resource data.
[0066] S103, if not, then send a resource acquisition request to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request.
[0067] In one approach, this application does not specifically limit the upper-layer server; for example, it can be any one of other edge servers, parent servers, central servers, and origin servers.
[0068] In one approach, after the edge server detects that it does not have the resource data corresponding to the user access request, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol.
[0069] S104. If a first response message is received from the upper-layer server, a resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol next time.
[0070] In one scenario, when an upper-layer server that does not support the QUIC protocol receives a resource acquisition request sent via the QUIC protocol, the upper-layer server is unable to parse the QUIC request and therefore cannot respond with QUIC protocol data to the corresponding edge, thus preventing the two from transmitting resource data and affecting business processing efficiency.
[0071] Based on this, this application proposes a method whereby, when an upper-layer server detects that it does not support the QUIC protocol, it no longer attempts to parse the request, but instead proactively sends a response message to the edge server that initiated the QUIC request, instructing it to send the resource acquisition request based on a lower version protocol. Understandably, upon receiving this response message, the edge server resends the resource acquisition request to the upper-layer server using a protocol downgrade method (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.
[0072] In this application, after receiving a user access request from a client, the edge server can check whether it stores the resource data corresponding to the user access request. If not, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request. If a first response message is received from the upper-layer server, the edge server sends a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol next time. By applying the technical solution of this application, 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, thus affecting the efficiency of user business processing.
[0073] Optionally, in another embodiment based on the method described above in this application, after S101 (sending a resource acquisition request to the upper-layer server based on the QUIC protocol), the following steps can be implemented:
[0074] If a second response message is received from the upper-layer server, the resource data will be sent to the client. The second response message includes the resource data corresponding to the resource acquisition request.
[0075] In one approach, if the upper-layer server detects that it supports the QUIC protocol, it returns resource data corresponding to the user's access request to the edge server based on the QUIC protocol. Understandably, since QUIC is a low-latency internet transport protocol based on UDP, it provides reliable, ordered, secure, and faster transmission services. By sending resource data to the edge server through the QUIC protocol, the upper-layer server achieves the goal of improving the efficiency of user business processing.
[0076] Optionally, in another embodiment based on the method described above in this application, the following steps can be implemented in S104 (if a first response message is received from the upper-layer server, a resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol):
[0077] Parse the first response message;
[0078] If it is determined that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, then a resource retrieval request is sent to the upper-layer server based on the HTTPS or HTTP protocol; or,
[0079] If it is determined that the first response message corresponds to a timeout response message or the first response message is empty, then the resource acquisition request is sent to the upper-layer server again based on the QUIC protocol. When a response message is received from the upper-layer server again, the resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0080] Furthermore, if an upper-layer server detects that it does not support the QUIC protocol, it can send a first response message to the edge server that sends the resource acquisition request based on the QUIC protocol, instructing it to resend the resource acquisition request based on the HTTPS or HTTP protocol.
[0081] In one approach, 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 in the future.
[0082] In another approach, if the first response message received by the edge server corresponds to a timeout response message or is empty, a resource acquisition request can be sent again 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 first 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 first 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.
[0083] In another approach, the upper-layer server can also send a first response message to the edge server indicating protocol downgrading. This first response message is used to instruct the edge server to send a resource acquisition request based on a lower version protocol. It may carry identification information indicating whether to send a resource acquisition request to the upper-layer server again using HTTPS or HTTP. Optionally, this identification information can be a predefined string, including but not limited to 001, a, and A. This application does not limit the identification information. Furthermore, the identification information can be set at a specified location in the response message, which may include the response header, response line, or response body. When the edge server receives the identification information sent by the upper-layer server, it determines that the upper-layer server does not support the QUIC protocol, and then sends a resource acquisition request to it again using HTTPS or HTTP in subsequent requests.
[0084] Understandably, the above method allows the edge server to determine whether the upper-layer server supports the QUIC protocol by parsing the response message sent by the upper-layer server, and then determine whether it is necessary to resend the resource acquisition request in a protocol downgrade manner, thereby ensuring that the resource data corresponding to the resource acquisition request is obtained from the upper-layer server.
[0085] Optionally, in another embodiment based on the method described above in this application, after S104 (if a first response message sent by the upper-layer server is received), the following steps may be implemented:
[0086] Record the association between the upper-layer server and the HTTPS or HTTP protocol;
[0087] When a resource retrieval request needs to be sent to the upper-layer server again, it is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0088] In one approach, to avoid the time wasted when the edge server needs to send two resource retrieval requests to obtain resource data from the upper-layer server again, this application can record the association between the upper-layer server and the HTTPS or HTTP protocol in a local storage area (e.g., in historical access data) when the edge server determines that the upper-layer server supports the HTTPS or HTTP protocol. When the edge server needs to send a resource retrieval request to the upper-layer server again, it can directly send the resource retrieval request to the upper-layer server based on the HTTPS or HTTP protocol.
[0089] For example, when the edge server subsequently sends a resource acquisition request to the upper-layer server, it can first retrieve the historical access data pre-stored in the local storage area and iterate through the historical access data to see if there is a historical access record of the upper-layer server. If it does, it reads the association relationship between the upper-layer server and the transport protocol stored in the historical access record. That is, the edge server can use the historical access record to determine whether the upper-layer server supports the QUIC protocol. If it is determined that it supports it, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol. If it does not support it, it sends a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol.
[0090] Optionally, if the edge server does not store historical access data in its local storage area, or if the historical access data does not contain historical access records of the upper-layer server, the edge server will prioritize sending resource acquisition requests to the upper-layer server based on the QUIC protocol.
[0091] Furthermore, in the above embodiments of this application, the transmission protocol supported by the upper-layer server can be clearly defined, and a resource acquisition request can be sent to the upper-layer server based on the corresponding transmission protocol to obtain the corresponding resource data, thereby saving the transmission time of business data and reducing the data transmission and reception resources of the server.
[0092] By applying the technical solution of this application, during the process of the edge server 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, thus affecting the efficiency of user business processing.
[0093] In another embodiment, this application also proposes a method for acquiring resource data. Figure 2 A schematic flowchart illustrating a method for acquiring resource data according to an embodiment of this application is shown. Figure 2 As shown, this method is applied to an upper-layer server and includes:
[0094] S201, Receive resource acquisition request sent by the edge server based on the QUIC protocol.
[0095] This application does not specifically limit the upper-layer server; for example, it can be any one of other edge servers, parent servers, central servers, and origin servers.
[0096] S202, check if it supports the QUIC protocol. If not, send a first response message to the edge server. The first 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.
[0097] In one scenario, when an upper-layer server that does not support the QUIC protocol receives a resource acquisition request sent via the QUIC protocol, the upper-layer server is unable to parse the QUIC request and therefore cannot respond with QUIC protocol data to the corresponding edge, thus preventing the two from transmitting resource data and affecting business processing efficiency.
[0098] Based on this, this application proposes a method whereby, when an upper-layer server detects that it does not support the QUIC protocol, it no longer attempts to parse the request, but instead proactively sends a response message to the edge server that initiated the QUIC request, instructing it to re-request the resource data via protocol downgrading. Understandably, upon receiving this response message, the edge server re-sends the resource retrieval request to the upper-layer server via protocol downgrading (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.
[0099] S203: When a resource acquisition request is received from an edge server based on HTTPS or HTTP protocol, the resource data corresponding to the resource acquisition request is sent to the edge server.
[0100] Understandably, when an upper-layer server receives a resource retrieval request sent by an edge server based on the HTTPS or HTTP protocol, it can use the HTTPS or HTTP protocol to parse the resource retrieval request and then return the resource data corresponding to the resource retrieval request to the edge server based on the HTTPS or HTTP protocol.
[0101] In this application, after the upper-layer server receives a resource acquisition request sent by the edge server based on the QUIC protocol, it can check whether it supports the QUIC protocol. If not, it sends a first response message to the edge server instructing the edge server to send a resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol. Upon receiving a resource acquisition request from the edge server based on the HTTPS or HTTP protocol, the upper-layer server sends the resource data corresponding to the resource acquisition request to the edge server. By applying the technical solution of this application, during the process of the client requesting resource data from the upper-layer server based on the QUIC protocol, the upper-layer server can selectively return different response messages to the client based on 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, thus affecting the efficiency of user business processing.
[0102] Optionally, in another embodiment based on the method described above in this application, the following steps may be implemented in S202 (sending a first response message to the edge server):
[0103] Send a response message containing an error identifier to the edge server; or,
[0104] Do not respond to user access requests; or,
[0105] Send a timeout response message to the edge server; or,
[0106] Send a response message to the edge server indicating protocol degradation.
[0107] Furthermore, if the upper-layer server detects that it does not support the QUIC protocol, it can send a first response message to the edge server that initiated the QUIC request, instructing it to resend the resource acquisition request based on HTTPS or HTTP.
[0108] In one approach, 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 can generate an ECONNREFUSED error code or a 5XX status code and send 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 in the future.
[0109] In another approach, if the first response message received by the edge server corresponds to a timeout response message or is empty, a resource acquisition request can be sent again 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 first 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 first 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.
[0110] In another approach, the upper-layer server can also send a first response message to the edge server indicating protocol downgrading. This first response message is used to instruct the edge server to send a resource acquisition request based on a lower version protocol. It may carry identification information indicating whether to send a resource acquisition request to the upper-layer server again using HTTPS or HTTP. Optionally, this identification information can be a predefined string, including but not limited to 001, a, or A. This application does not limit the identification information. Furthermore, the identification information can be set at a specified location in the response message, which may include the response header, response line, or response body. When the edge server receives the identification information sent by the upper-layer server, it determines that the upper-layer server does not support the QUIC protocol, and then sends a resource acquisition request to it again using HTTPS or HTTP. It is understood that the above method allows the edge server to determine whether the upper-layer server supports the QUIC protocol by parsing the response message sent by the upper-layer server, and thus determine whether to resend the resource acquisition request using protocol downgrading, thereby ensuring that the resource data corresponding to the resource acquisition request is obtained from the upper-layer server.
[0111] Optionally, in another embodiment based on the method described above in this application, after S202 (sending a first response message to the edge server based on the QUIC protocol), the following steps can be implemented:
[0112] If supported, a second response message is sent to the edge server, which includes the resource data corresponding to the resource acquisition request.
[0113] In one approach, if the upper-layer server detects that it supports the QUIC protocol, it can directly return resource data corresponding to the user's access request to the edge server based on the QUIC protocol. Alternatively, if the upper-layer server does not have the resource data cached, it can obtain the resource data from the source server and then return the resource data to the edge server based on the QUIC protocol. This is understandable, as QUIC is a low-latency internet transport protocol based on UDP, which provides reliable, ordered, secure, and faster transmission services, thereby improving the efficiency of user business processing.
[0114] In one approach, such as Figure 3 The diagram shown is a flowchart of a method for obtaining resource data proposed in this application, which includes:
[0115] First, the client sends a user access request to the edge server. Upon receiving the user access request, the edge server, after detecting that it does not have the resource data corresponding to the user access request, sends a resource acquisition request to the upper-layer server based on the QUIC protocol. The resource data requested in this resource acquisition request is the content requested in the user access request.
[0116] Furthermore, when the upper-layer server receives a resource acquisition request sent by the edge server based on the QUIC protocol, it checks whether it supports the QUIC protocol. If not, it sends a first response message to the edge server to instruct the edge server to send a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol next time, or sends a response message to indicate that it does not support the QUIC protocol.
[0117] Furthermore, after the edge server receives the first response message sent by the upper-layer server, it sends a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol, and after receiving the resource data sent by the upper-layer server, it sends the resource data to the client.
[0118] By applying the technical solution of this application, during the process of the edge server 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, thus affecting the efficiency of user business processing.
[0119] In another embodiment of this application, such as Figure 4 As shown, this application also provides an electronic device for acquiring resource data. Specifically, it is applied to an edge server and includes...
[0120] The first receiving module 301 is configured to receive user access requests sent by the client.
[0121] The first detection module 302 is configured to detect whether it stores resource data corresponding to the user access request;
[0122] The first sending module 303 is configured to send a resource acquisition request to the upper-layer server based on the QUIC protocol if there is no such request. The resource acquisition request is used to obtain the resource data corresponding to the user access request.
[0123] The second sending module 304 is configured to send a resource acquisition request to the upper-layer server based on HTTPS or HTTP protocol if it receives a first response message from the upper-layer server. The first response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server based on HTTPS or HTTP protocol next time.
[0124] In another embodiment of this application, the first receiving module 301 is configured as follows:
[0125] If a second response message is received from the upper-layer server, the resource data will be sent to the client. The second response message includes the resource data corresponding to the resource acquisition request.
[0126] In another embodiment of this application, the second sending module 304 is configured as follows:
[0127] Parse the first response message;
[0128] If it is determined that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, then a resource retrieval request is sent to the upper-layer server based on the HTTPS or HTTP protocol; or,
[0129] If it is determined that the first response message corresponds to a timeout response message or the first response message is empty, then a resource acquisition request is sent to the upper-layer server again based on the QUIC protocol. When a response message is received from the upper-layer server again, a resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0130] In another embodiment of this application, the second sending module 304 is configured as follows:
[0131] Record the association between the upper-layer server and the HTTPS or HTTP protocol;
[0132] When a resource retrieval request needs to be sent to the upper-layer server again, it is sent to the upper-layer server based on the HTTPS or HTTP protocol.
[0133] In this application, after receiving a user access request from a client, the edge server can check whether it stores the resource data corresponding to the user access request. If not, it sends a resource acquisition request to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request. If a first response message is received from the upper-layer server, a resource acquisition request is sent to the upper-layer server based on the HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send a resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol next time. By applying the technical solution of this application, 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, thus affecting the efficiency of user business processing.
[0134] In another embodiment of this application, such as Figure 5 As shown, this application also provides an electronic device for acquiring resource data. Specifically, it is applied to an upper-layer server and includes:
[0135] The second receiving module 305 is configured to receive resource acquisition requests sent by the edge server based on the QUIC protocol;
[0136] The second detection module 306 is configured to detect whether it supports the QUIC protocol. If not, it sends a first response message to the edge server. The first 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.
[0137] The third sending module 307 is configured to send the resource data corresponding to the resource acquisition request to the edge server when it receives a resource acquisition request sent by the edge server based on the HTTPS or HTTP protocol.
[0138] In another embodiment of this application, the second receiving module 305 is configured as follows:
[0139] Send a response message containing an error identifier to the edge server; or,
[0140] Do not respond to user access requests; or,
[0141] Send a timeout response message to the edge server; or,
[0142] Send a response message to the edge server indicating protocol degradation.
[0143] In another embodiment of this application, the second detection module 306 is configured as follows:
[0144] If supported, a second response message is sent to the edge server, which includes the resource data corresponding to the resource acquisition request.
[0145] In this application, after the upper-layer server receives a resource acquisition request sent by the edge server based on the QUIC protocol, it can check whether it supports the QUIC protocol. If not, it sends a first response message to the edge server instructing the edge server to send a resource acquisition request to the upper-layer server again based on the HTTPS or HTTP protocol. Upon receiving a resource acquisition request from the edge server based on the HTTPS or HTTP protocol, the upper-layer server sends the resource data corresponding to the resource acquisition request to the edge server. By applying the technical solution of this application, during the process of the client requesting resource data from the upper-layer server based on the QUIC protocol, the upper-layer server can selectively return different response messages to the client based on 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, thus affecting the efficiency of user business processing.
[0146] Figure 6 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 6 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 404 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 the 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 for 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 European Union'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] In some embodiments, the electronic device 400 further includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: an accelerometer 411, a gyroscope 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, and a proximity sensor 416.
[0159] Accelerometer 411 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established by electronic device 400. For example, accelerometer 411 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 401 can control touch screen 405 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 411. Accelerometer 411 can also be used for games or for acquiring user motion data.
[0160] The gyroscope sensor 412 can detect the orientation and rotation angle of the electronic device 400. The gyroscope sensor 412 can work in conjunction with the accelerometer sensor 411 to collect 3D motion data from the user on the electronic device 400. Based on the data collected by the gyroscope sensor 412, the processor 401 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0161] The pressure sensor 413 can be disposed on the side bezel of the electronic device 400 and / or on the lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side bezel of the electronic device 400, it can detect the user's grip signal on the electronic device 400, and the processor 401 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed on the lower layer of the touch display screen 405, the processor 401 can control the operable controls on the UI interface based on the user's pressure operation on the touch display screen 405. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0162] The fingerprint sensor 414 is used to collect a user's fingerprint. The processor 401 identifies the user based on the fingerprint collected by the fingerprint sensor 414, or vice versa. When the user's identity is identified as trusted, the processor 401 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 414 can be located on the front, back, or side of the electronic device 400. When the electronic device 400 has physical buttons or a manufacturer's logo, the fingerprint sensor 414 can be integrated with the physical buttons or manufacturer's logo.
[0163] An optical sensor 415 is used to collect ambient light intensity. In one embodiment, the processor 401 can control the display brightness of the touch screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch screen 405 is decreased. In another embodiment, the processor 401 can also dynamically adjust the shooting parameters of the camera assembly 406 based on the ambient light intensity collected by the optical sensor 415.
[0164] A proximity sensor 416, also known as a distance sensor, is typically located on the front panel of an electronic device 400. The proximity sensor 416 is used to detect the distance between the user and the front of the electronic device 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 400 is gradually decreasing, the processor 401 controls the touchscreen display 405 to switch from a screen-on state to a screen-off state; when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 400 is gradually increasing, the processor 401 controls the touchscreen display 405 to switch from a screen-off state to a screen-on state.
[0165] Those skilled in the art will understand that Figure 6 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.
[0166] 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; detecting whether it stores resource data corresponding to the user access request; if not, sending a resource acquisition request to an upper-layer server based on the QUIC protocol, the resource acquisition request being used to acquire the resource data corresponding to the user access request; if a first response message is received from the upper-layer server, sending the resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol, the first response message being 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. 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.
[0167] 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; detecting whether it stores resource data corresponding to the user access request; if not, sending a resource acquisition request to an upper-layer server based on the QUIC protocol, the resource acquisition request being used to acquire the resource data corresponding to the user access request; if a first response message is received from the upper-layer server, sending the resource acquisition request to the upper-layer server based on the HTTPS or HTTP protocol, the first response message being 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. 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.
[0168] 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.
[0169] 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 acquiring resource data, characterized in that, Applications to edge servers include: Receive user access requests sent by clients; Check whether it has stored the resource data corresponding to the user access request; If not, a resource acquisition request is sent to the upper-layer server based on the QUIC protocol. The resource acquisition request is used to obtain the resource data corresponding to the user access request. If the edge server receives the first response message from the upper-layer server, it sends the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol next time. If the upper-layer server detects that it does not support the QUIC protocol, the upper-layer server does not parse the resource acquisition request. The step of receiving a first response message from the upper-layer server and sending the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol includes: parsing the first response message; if it is determined that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, then sending the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol; or, if it is determined that the first response message corresponds to a timeout response message or the first response message is empty, then sending the resource acquisition request to the upper-layer server again based on the QUIC protocol; and when a response message from the upper-layer server is received again, then sending the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol. After receiving the first response message sent by the upper-layer server, the method further includes: recording the association between the upper-layer server and the TCP HTTPS or HTTP protocol; when it is necessary to send a resource acquisition request to the upper-layer server again, a resource acquisition request is sent to the upper-layer server based on the TCP HTTPS or HTTP protocol.
2. 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 second response message is received from the upper-layer server, the resource data is sent to the client. The second response message includes the resource data corresponding to the resource acquisition request.
3. A method for acquiring resource data, characterized in that, Applied to upper-layer servers, including: Receive resource acquisition requests sent by the edge server based on the QUIC protocol; The system checks whether it supports the QUIC protocol. If not, it does not parse the resource acquisition request and sends a first response message to the edge server. The edge server is configured to parse the first response message; if it determines that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, it sends the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol; or, if it determines that the first response message corresponds to a timeout response message or the first response message is empty, it sends the resource acquisition request to the upper-layer server again based on the QUIC protocol, and when it receives the response message sent by the upper-layer server again, it sends the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol. The edge server is also used to record the association between the upper-layer server and the TCP HTTPS or HTTP protocol; when it is necessary to send a resource acquisition request to the upper-layer server again, the resource acquisition request is sent to the upper-layer server based on the TCP HTTPS or HTTP protocol. When a resource acquisition request is received from the edge server via TCP HTTPS or HTTP protocol, the resource data corresponding to the resource acquisition request is sent to the edge server.
4. The method as described in claim 3, characterized in that, Sending the first response message to the edge server includes: Send a response message containing an error identifier to the edge server; or, Do not respond to user access requests; or, Send a timeout response message to the edge server; or, Send a response message indicating protocol degradation to the edge server.
5. The method as described in claim 3, characterized in that, After detecting whether it supports the QUIC protocol, the following is also included: If supported, a second response message is sent to the edge server, the second response message including the resource data corresponding to the resource acquisition request.
6. An electronic device for acquiring resource data, characterized in that, Applications to edge servers include: The first receiving module is configured to receive user access requests sent by the client. The first detection module is configured to detect whether it stores resource data corresponding to the user access request. The first sending module is configured to send a resource acquisition request to the upper-layer server based on the QUIC protocol if there is no such request. The resource acquisition request is used to obtain the resource data corresponding to the user access request. The second sending module is configured to, upon receiving a first response message from the upper-layer server, send the resource acquisition request to the upper-layer server via TCP HTTPS or HTTP protocol. The first response message is used to instruct the edge server to send the resource acquisition request to the upper-layer server via TCP HTTPS or HTTP protocol next time. If the upper-layer server detects that it does not support the QUIC protocol, the upper-layer server will not parse the resource acquisition request. The second sending module is configured to: parse the first response message; if it is determined that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, then send the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol; or, if it is determined that the first response message corresponds to a timeout response message or the first response message is empty, then send the resource acquisition request to the upper-layer server again based on the QUIC protocol; when the response message sent by the upper-layer server is received again, then send the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol. The second sending module is configured to: record the association between the upper-layer server and the TCP HTTPS or HTTP protocol; when it is necessary to send a resource acquisition request to the upper-layer server again, send the resource acquisition request to the upper-layer server based on the TCP HTTPS or HTTP protocol.
7. An electronic device for acquiring resource data, characterized in that, Applied to upper-layer servers, including: The second receiving module is configured to receive resource acquisition requests sent by the edge server based on the QUIC protocol; The second detection module is configured to detect whether it supports the QUIC protocol. If not, the upper-layer server does not parse the resource acquisition request and sends a first response message to the edge server. The first response message instructs the edge server to send the resource acquisition request to the upper-layer server again using the TCP-based HTTPS or HTTP protocol. The edge server parses the first response message. If it determines that the first response message corresponds to a response message containing an error identifier or a response message indicating protocol degradation, it sends the resource acquisition request to the upper-layer server using the TCP-based HTTPS or HTTP protocol. Alternatively, if it determines that the first response message corresponds to a timeout response message or that the first response message is empty, it sends the resource acquisition request to the upper-layer server again using the QUIC protocol. When it receives a response message from the upper-layer server again, it sends the resource acquisition request to the upper-layer server again using the TCP-based HTTPS or HTTP protocol. The edge server also records the association between the upper-layer server and the TCP-based HTTPS or HTTP protocol. When it needs to send a resource acquisition request to the upper-layer server again, it sends the resource acquisition request to the upper-layer server again using the TCP-based HTTPS or HTTP protocol. The third sending module is configured to send the resource data corresponding to the resource acquisition request to the edge server when it receives a resource acquisition request sent by the edge server based on the TCP HTTPS or HTTP protocol.
8. An electronic device, characterized in that, include: Memory, used to store executable instructions; as well as, A processor configured to interact with the memory to execute the executable instructions to perform the operation of the method for acquiring resource data according to any one of claims 1-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 method for obtaining resource data as described in any of claims 1-5.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the operation of the method for acquiring resource data as described in any one of claims 1-5.
Citation Information
Patent Citations
Event request transmission method and device, storage medium and electronic equipment
CN111885093A