Resource request processing method and device, computer equipment, readable storage medium and program product
By identifying and distributing hotspot resources within the CDN cluster, the problem of excessive load on the cache server is solved, the balanced diffusion of hotspot requests and the full utilization of server resources is achieved, and the quality and reliability of CDN services are improved.
Patent Information
- Application Number
- CN202411716997.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In CDN services, some cache servers are loaded too high, which affects service quality and may even lead to cache breakdown, directly forwarding a large number of resource requests to the original data source, causing pressure.
Reduce the load on a single server by identifying hotspot resources in the cache server within the cluster, distributing these hotspot resources to other cache servers, and forwarding relevant resource requests to other cache servers.
It achieves the equalization of pressure diffusion of hotspot requests, reduces the performance loss of cache servers, improves the utilization rate of server resources, and improves the efficiency and reliability of CDN services.
Smart Images

Figure CN119544795A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of content distribution networks, and in particular to a resource request processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Content Delivery Network (CDN) uses servers distributed around the world to store static content of websites (for example, images, web pages, videos, and audio, etc.), and supports selecting appropriate servers based on the user's location. When users access, they can obtain pre-cached resources from the nearest server without going through multiple routers, which can effectively improve access speed and is therefore becoming more and more widely used.
[0003] CDN edge nodes often face a large number of resource requests. When a user accesses an edge node, if the required resource is not cached, the edge node will request the resource from the upper node or the original data source and cache it. Resource requests are usually forwarded by the CDN gateway, which uses a consistent hashing algorithm to process the URL (Uniform Resource Locator) and forward the resource request to the corresponding cache server. However, there are currently some cache servers that are overloaded, affecting the CDN service quality, and even cache breakdown, causing a large number of resource requests to be directly returned to the original data source, causing huge pressure on the original data source. Summary of the invention
[0004] Based on this, it is necessary to provide a resource request processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the access quality of CDN services in response to the above technical problems.
[0005] In a first aspect, the present application provides a resource request processing method, which is applied to a first cache server in a cluster, and the method includes:
[0006] In response to receiving a resource request forwarded by the gateway, extracting first identification information of the resource carried in the resource request, and updating request payload data corresponding to the first identification information;
[0007] In the case where the request load data is greater than a preset threshold, determining the resource as a hotspot resource and adding second identification information to the resource request;
[0008] The hotspot resource is sent to a second cache server other than the first cache server in the cluster, and the resource request carrying the second identification information is transmitted back to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
[0009] In one embodiment, sending the hotspot resource to a second cache server other than the first cache server in the cluster includes:
[0010] Based on the hotspot resource, a message in a preset format is generated; the message includes the hotspot resource and metadata of the hotspot resource;
[0011] The message is sent to a second cache server in the cluster except the first cache server, so that the second cache server verifies the message based on the preset format to obtain a verification result for the message; the verification result includes a first verification result of the metadata of the hotspot resource and a second verification result of the hotspot resource.
[0012] In one of the embodiments, after sending the message to a second cache server other than the first cache server in the cluster, the method further comprises:
[0013] In response to receiving a first request sent by the second cache server, resending the metadata of the hotspot resource to the second cache server; the first request is sent by the second cache server when the first verification result is failed;
[0014] In response to receiving a second request sent by the second cache server, resending the hotspot resource to the second cache server; the second request is sent by the second cache server when the second verification result is failure.
[0015] In one embodiment, sending the hotspot resource to a second cache server other than the first cache server in the cluster includes:
[0016] In the case that the hotspot resource does not correspond to the third identification information, the corresponding third identification information is added to the hotspot resource, and the hotspot resource is sent to a second cache server other than the first cache server in the cluster.
[0017] In one of the embodiments, the request load data includes at least a request frequency and an amount of resources required for the request, and when the request load data is greater than a preset threshold, determining the resource as a hotspot resource includes:
[0018] When the request frequency is greater than a first preset threshold and / or the amount of resources required by the request is greater than a second preset threshold, the resource is determined as a hotspot resource.
[0019] In one embodiment, sending the hotspot resource to a second cache server other than the first cache server in the cluster includes:
[0020] The hotspot resource is sent to the second cache server in the cluster except the first cache server in a multicast manner.
[0021] In a second aspect, the present application further provides a resource request processing device, which is applied to a first cache server in a cluster, and the device includes:
[0022] A load data updating module, configured to extract first identification information of a resource carried in a resource request in response to receiving the resource request forwarded by the gateway, and update the request load data corresponding to the first identification information;
[0023] A hot resource determination module, configured to determine the resource as a hot resource when the request load data is greater than a preset threshold, and add second identification information to the resource request;
[0024] A resource request forwarding module is used to send the hotspot resource to a second cache server other than the first cache server in the cluster, and transmit the resource request carrying the second identification information back to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
[0025] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-described methods when executing the computer program.
[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the methods described above when executed by a processor.
[0027] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0028] The above-mentioned resource request processing method, device, computer equipment, computer-readable storage medium and computer program product can identify hotspot resources by responding to resource requests through the back-end cache server and counting the request load corresponding to each resource; by distributing hotspot resources to other cache servers in the cluster and instructing the gateway to disperse resource requests for accessing hotspot resources to other cache servers, it is possible to evenly spread the pressure of hotspot requests, reduce the performance loss of the cache server, fully utilize server resources, and improve the efficiency and reliability of CDN services. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] FIG1 is an application environment diagram of a resource request processing method in one embodiment;
[0031] FIG2 is a schematic diagram of a flow chart of a resource request processing method in one embodiment;
[0032] 3 is a flow chart of the steps of sending hotspot resources to a second cache server other than the first cache server in a cluster in one embodiment;
[0033] FIG4 is a schematic diagram of a flow chart of a resource request processing method in another embodiment;
[0034] FIG5 is a structural block diagram of a resource request processing device in one embodiment;
[0035] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] The resource request processing method provided in the embodiment of the present application can be applied to the application environment as shown in Figure 1. Among them, the CDN includes a group of cache server clusters. The cache server (Cache Server, CS) is a technology that stores frequently accessed data in memory or disk to improve the speed of content access, which can reduce the number of accesses to the original data source and improve system performance. At present, in order to improve the cache hit rate of edge nodes and reduce back-to-source and network congestion, the same resource is usually distributed to the same cache server. The user can send a resource request to the gateway 102 through a terminal (not shown in Figure 1). The first cache server 104 in the cluster stores the resource to be accessed by the resource request, and the gateway 102 forwards the resource request to the first cache server 104. In response to receiving the resource request forwarded by the gateway 102, the first cache server 104 can extract the first identification information of the resource carried by the resource request and update the request load data corresponding to the first identification information; when the request load data is greater than a preset threshold, the resource is determined as a hotspot resource and the second identification information is added to the resource request; the hotspot resource is sent to the second cache server 106 in the cluster except the first cache server 104, and the resource request carrying the second identification information is returned to the gateway 102. For example, the first cache server 104 may include a hotspot component and a distribution component, the hotspot component may be used to determine the hotspot resource, and the distribution component may be used to distribute the hotspot resource to the second cache server 106 in the cluster except the first cache server 104. At this time, the second cache server 106 stores the resource to be accessed by the resource request, and the gateway 102 may forward the resource request to the second cache server 106 for processing based on the second identification information. The terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices, and the IoT device may be a smart speaker, a smart TV, a smart air conditioner, a smart car device, a projection device, etc. The portable wearable device may be a smart watch, a smart bracelet, a head mounted device, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The first cache server 104 and the second cache server 106 may be independent physical servers.
[0038] In an exemplary embodiment, as shown in FIG2 , a resource request processing method is provided, which is described by taking the method applied to the first cache server 104 in FIG1 as an example, and includes the following steps S202 to S206 . Among them:
[0039] Step S202: In response to receiving a resource request forwarded by the gateway, extract the first identification information of the resource carried in the resource request, and update the request payload data corresponding to the first identification information.
[0040] Exemplarily, the gateway may receive a resource request sent by a user and forward it to the first cache server 104 in the cluster. When the first cache server 104 receives the resource request, it may parse the resource request, extract the first identification information carried by the resource request, and determine the load (e.g., network load, computing load, storage load, etc.) caused by the resource request on the first cache server 104, and update the request load data corresponding to the first identification information. The first identification information may be a cache key, which may correspond to a cache resource one-to-one and be used to uniquely identify the cache resource. The cache resource may be a pre-stored file. Specifically, the first cache server 104 may update the acquired cache key and load-related information to an information statistics medium, which may be composed of a hash object storage table, which may contain key information cache keys of resource requests and corresponding statistical data of request loads.
[0041] Step S204: when the request load data is greater than a preset threshold, the resource is determined as a hotspot resource, and second identification information is added to the resource request.
[0042] Exemplarily, multiple request load data may correspond to multiple preset thresholds respectively. The first cache server 104 may perform determination processing based on a preset threshold mechanism, and when one or more request load data is greater than a predetermined preset threshold, determine the resource as a hotspot resource, and add second identification information to the resource request for accessing the hotspot resource. The second identification information may be a response header identification.
[0043] Step S206, sending the hotspot resource to a second cache server other than the first cache server in the cluster, and returning the resource request carrying the second identification information to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
[0044] Exemplarily, the first cache server 104 may package the hotspot resources and distribute them to all other cache servers (second cache servers) in the cluster. Furthermore, the gateway may determine the resource request carrying the second identification information as being used to access the hotspot resource and diffuse these resource requests to each second cache server using a polling algorithm.
[0045] In the above-mentioned resource request processing method, hotspot resources can be identified by the backend cache server responding to resource requests and counting the request load corresponding to each resource; by distributing hotspot resources to other cache servers in the cluster and instructing the gateway to disperse resource requests for accessing hotspot resources to other cache servers, the pressure of hotspot requests can be evenly distributed, the performance loss of the cache server can be reduced, the server resources can be fully utilized, and the efficiency and reliability of CDN services can be improved.
[0046] It can evenly distribute the pressure of hot spot requests to different machines, fully utilize server resources, reduce the amount of return to the source, thereby improving the CDN service quality and saving network bandwidth costs.
[0047] In an exemplary embodiment, as shown in FIG3 , the step of sending the hotspot resource to the second cache server other than the first cache server in the cluster may include:
[0048] Step A1, based on the hotspot resource, generate a message in a preset format; the message includes the hotspot resource and metadata of the hotspot resource.
[0049] Exemplarily, the message of the preset format may include a first packet and a non-first packet. The first packet may consist of a 16-byte data transmission ID (e.g., a multicast ID), a 1-byte data packet type marked as 1, and other file metadata. The file metadata may include the file name and file size. The non-first packet may consist of a 16-byte data transmission ID, a 1-byte data packet type marked as 2, a 4-byte file offset, a 2-byte data length, and other file content.
[0050] Step A2, sending a message to a second cache server other than the first cache server in the cluster, so that the second cache server verifies the message based on a preset format and obtains a verification result for the message; the verification result includes a first verification result of the metadata of the hotspot resource and a second verification result of the hotspot resource.
[0051] Exemplarily, after receiving the message, the second cache server may first determine whether the message lacks metadata of the hotspot resource to obtain a first verification result. The first verification result may include pass / fail. Then, when it is determined that the metadata of the hotspot resource is not missing, it is determined whether the message lacks the hotspot resource to obtain a second verification result. The second verification result may include pass / fail. In a possible implementation, the first verification result and the second verification result can be used to determine a second cache server for processing a resource request carrying the second identification information.
[0052] In this embodiment, by double verification of hotspot resource metadata and content, the consistency of hotspot resource distribution can be improved, message duplication and disorder can be avoided, and the consistency and integrity of hotspot resource distribution can be ensured.
[0053] Furthermore, as shown in FIG4 , the resource request processing method may further include:
[0054] Step S2071, in response to receiving a first request sent by the second cache server, resending metadata of the hotspot resource to the second cache server; the first request is sent by the second cache server when the first verification result is failed.
[0055] Step S2072: in response to receiving a second request sent by the second cache server, resend the hotspot resource to the second cache server; the second request is sent by the second cache server when the second verification result is failed.
[0056] Exemplarily, the second cache server may request metadata of the hotspot resource from the data transmission source address (e.g., multicast source address) when it is determined that metadata of the hotspot resource is missing; and determine whether the message is missing the hotspot resource when it is determined that metadata of the hotspot resource is not missing. When it is determined that the hotspot resource is missing, request the missing portion of the hotspot resource from the data transmission source address; and cache the hotspot file when it is determined that the hotspot resource is not missing. In one possible implementation, when it is determined that the file content is missing, the second cache server may use a Range request to request the missing portion from the multicast source address.
[0057] In this embodiment, by setting a retransmission mechanism, timely detecting and reacquiring missing hotspot resources or metadata of hotspot resources, the risk of content access failure due to data loss can be reduced. For example, multicast based on the UDP protocol is avoided, and there is no error correction mechanism, and packet loss or file inconsistency may occur during the transmission process.
[0058] In an exemplary embodiment, the step of sending the hotspot resource to a second cache server other than the first cache server in the cluster may include:
[0059] Step B1: if the hotspot resource does not correspond to the third identification information, add the corresponding third identification information to the hotspot resource, and send the hotspot resource to the second cache server in the cluster except the first cache server.
[0060] Among them, the fact that the hotspot resource does not correspond to the third identification information can be used to characterize that the hotspot resource has not been diffused. Exemplarily, the correspondence between the hotspot resource and the third identification information can be stored in the first cache server 104 and the second cache server that receives the hotspot resource. In a possible implementation, the first cache server 104 can query the cache list according to the cache key carried by the resource request, and extract the identification header information related to the resource request to determine whether the requested hotspot resource has been multicast. For example, the file identifier can be used to determine whether it is a multicast file, and the file identifier of 1 can be used to characterize that the file has been multicast. If so, add a response header to identify the request as a hotspot file, and respond to the file content to the gateway at the same time. If not, multicast the file, write the multicast identification information into the cache of the file, and add the hotspot file response header identifier when responding to the file to the gateway.
[0061] In this embodiment, by monitoring the diffusion status of hotspot resources, it is possible to accurately track the processing status of each hotspot resource and avoid repeated resource transmission.
[0062] In an exemplary embodiment, the request load data includes at least the request frequency and the amount of resources required for the request. When the request load data is greater than a preset threshold, the step of determining the resource as a hotspot resource may include:
[0063] Step C1: when the request frequency is greater than a first preset threshold and / or the amount of resources required by the request is greater than a second preset threshold, the resource is determined as a hotspot resource.
[0064] Exemplarily, the first cache server 104 can extract the CTL-STORT-URL field (cache key), CONTENT-LENGTH field, and request number information of the resource request by parsing the resource request. The number of requests is accumulated with the cache key and saved in the hash table, specifically: the cache key is used as the key value, and the number of requests per unit time of the cache key is counted as the value. The CONTENT-LENGTH field is accumulated with the cache key and saved in the hash table, specifically: the request bandwidth per unit time is calculated through the CONTENT-LENGTH field.
[0065] In this embodiment, by adopting a dual threshold comparison method, a hot resource identification mechanism for large files and high QPS (Queries Per Second) can be implemented, which can identify hot resources in advance and diffuse them in high concurrency and high QPS scenarios, thereby reducing response delays caused by server overload.
[0066] In an exemplary embodiment, the step of sending the hotspot resource to a second cache server other than the first cache server in the cluster may include:
[0067] Step D1, sending hotspot resources to the second cache server in the cluster except the first cache server in a multicast manner.
[0068] Exemplarily, a message in a preset format can be generated based on hotspot resources; the message includes the hotspot resources and metadata of the hotspot resources; when the hotspot resources do not correspond to the third identification information, the message is sent to the second cache server in the cluster except the first cache server in a multicast manner, and the corresponding third identification information is added for the hotspot resources.
[0069] Among them, multicast is a network communication mode used for one-to-many data transmission. The multicast network of a multicast group is usually divided into three parts: multicast source, multicast router, and multicast member. The multicast source is the sender of information and can send data to multiple multicast members at the same time. In the multicast mode, data packets can be transmitted to multiple receivers (for example, the second cache server) at the same time without establishing a separate connection for each receiver. In multicast, the sender only needs to send one data packet, and the network will be responsible for copying and transmitting the data packet to all places that need to receive the data. Transmitting multiple copies of the same data through multicast can achieve that the message only needs to be transmitted once on each network link, and the message will only be copied when the link is bifurcated, which greatly saves server load and network bandwidth resources; multicast messages are sent on demand, reducing redundant traffic in the network while ensuring a certain degree of data security.
[0070] In this embodiment, by adopting a multicast transmission strategy, hotspot resources are distributed from the first cache server to all other cache servers in the cluster, which can achieve one-to-many efficient data distribution, reduce the waste of multi-link bandwidth, and effectively reduce network load.
[0071] To sum up, in the above-mentioned resource request processing method, hotspot resources can be identified by the backend cache server responding to resource requests and counting the request load corresponding to each resource; by distributing hotspot resources to other cache servers in the cluster and instructing the gateway to disperse resource requests for accessing hotspot resources to other cache servers, the pressure of hotspot requests can be evenly distributed, the performance loss of the cache server can be reduced, the server resources can be fully utilized, and the efficiency and reliability of CDN services can be improved.
[0072] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0073] Based on the same inventive concept, the embodiment of the present application also provides a resource request processing device for implementing the resource request processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more resource request processing device embodiments provided below can refer to the limitations on the resource request processing method above, and will not be repeated here.
[0074] In an exemplary embodiment, as shown in FIG5 , a resource request processing device 300 is provided, comprising: a load data updating module 301, a hotspot resource determining module 302 and a resource request forwarding module 303, wherein:
[0075] The load data updating module 301 is used to extract the first identification information of the resource carried in the resource request in response to receiving the resource request forwarded by the gateway, and update the request load data corresponding to the first identification information.
[0076] The hot resource determination module 302 is used to determine the resource as a hot resource when the request load data is greater than a preset threshold, and add second identification information to the resource request.
[0077] The resource request forwarding module 303 is used to send hot resources to the second cache server other than the first cache server in the cluster, and return the resource request carrying the second identification information to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
[0078] In an exemplary embodiment, the resource request forwarding module 303 is further configured to:
[0079] Generate a message in a preset format based on the hotspot resource; the message includes the hotspot resource and metadata of the hotspot resource;
[0080] A message is sent to a second cache server other than the first cache server in the cluster, so that the second cache server verifies the message based on a preset format to obtain a verification result for the message; the verification result includes a first verification result of the metadata of the hotspot resource and a second verification result of the hotspot resource.
[0081] In an exemplary embodiment, the resource request processing device 300 further includes:
[0082] The hotspot resource verification module is used to resend the metadata of the hotspot resource to the second cache server in response to receiving a first request sent by the second cache server; the first request is sent by the second cache server when the first verification result is failed.
[0083] The hotspot resource verification module is further configured to resend the hotspot resource to the second cache server in response to receiving a second request sent by the second cache server; the second request is sent by the second cache server when the second verification result is failed.
[0084] In an exemplary embodiment, the resource request forwarding module 303 is further configured to:
[0085] In the case that the hotspot resource does not correspond to the third identification information, the corresponding third identification information is added to the hotspot resource, and the hotspot resource is sent to the second cache server except the first cache server in the cluster.
[0086] In an exemplary embodiment, the request load data includes at least the request frequency and the amount of resources required for the request. The hot resource determination module 302 is further used to:
[0087] When the request frequency is greater than a first preset threshold and / or the amount of resources required by the request is greater than a second preset threshold, the resource is determined as a hotspot resource.
[0088] In an exemplary embodiment, the resource request forwarding module 303 is further configured to:
[0089] The hotspot resource is sent to the second cache server in the cluster except the first cache server in a multicast manner.
[0090] Each module in the resource request processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0091] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store cache resources. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a resource request processing method is implemented.
[0092] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0093] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0094] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0095] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0096] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0097] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0098] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A resource request processing method, characterized in that: Applied to a first cache server in a cluster, the method comprises: In response to receiving a resource request forwarded by the gateway, extracting first identification information of the resource carried in the resource request, and updating request payload data corresponding to the first identification information; In the case where the request load data is greater than a preset threshold, determining the resource as a hotspot resource and adding second identification information to the resource request; The hotspot resource is sent to a second cache server other than the first cache server in the cluster, and the resource request carrying the second identification information is transmitted back to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
2. The method according to claim 1, characterized in that The sending the hotspot resource to a second cache server other than the first cache server in the cluster includes: Based on the hotspot resource, a message in a preset format is generated; the message includes the hotspot resource and metadata of the hotspot resource; The message is sent to a second cache server in the cluster except the first cache server, so that the second cache server verifies the message based on the preset format to obtain a verification result for the message; the verification result includes a first verification result of the metadata of the hotspot resource and a second verification result of the hotspot resource.
3. The method according to claim 2, characterized in that After sending the message to a second cache server other than the first cache server in the cluster, the method further comprises: In response to receiving a first request sent by the second cache server, resending the metadata of the hotspot resource to the second cache server; the first request is sent by the second cache server when the first verification result is failed; In response to receiving a second request sent by the second cache server, resending the hotspot resource to the second cache server; the second request is sent by the second cache server when the second verification result is failure.
4. The method according to claim 1, characterized in that: The sending the hotspot resource to a second cache server other than the first cache server in the cluster includes: In the case that the hotspot resource does not correspond to the third identification information, the corresponding third identification information is added to the hotspot resource, and the hotspot resource is sent to a second cache server other than the first cache server in the cluster.
5. The method according to claim 1, characterized in that The request load data at least includes a request frequency and a resource amount required for the request, and when the request load data is greater than a preset threshold, determining the resource as a hotspot resource includes: When the request frequency is greater than a first preset threshold and / or the amount of resources required by the request is greater than a second preset threshold, the resource is determined as a hotspot resource.
6. The method according to any one of claims 1 to 5, characterized in that: The sending the hotspot resource to a second cache server other than the first cache server in the cluster includes: The hotspot resource is sent to the second cache server in the cluster except the first cache server in a multicast manner.
7. A resource request processing device, characterized in that: Applied to a first cache server in a cluster, the device comprises: A load data updating module, configured to extract first identification information of a resource carried in a resource request in response to receiving the resource request forwarded by the gateway, and update the request load data corresponding to the first identification information; A hot resource determination module, configured to determine the resource as a hot resource when the request load data is greater than a preset threshold, and add second identification information to the resource request; A resource request forwarding module is used to send the hotspot resource to a second cache server other than the first cache server in the cluster, and transmit the resource request carrying the second identification information back to the gateway, so that the gateway forwards the resource request to the second cache server for processing based on the second identification information.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method, system and device for realizing re-orientation in P2P network
CN101729581A
Data request method and device in CDN, equipment and CDN node
CN111432039A
Data resource scheduling method and system, server, and storage medium
CN114077483A
Method and system for realizing data full life cycle integrity management and control
CN118152375A
Data management method and corresponding apparatus
WO2023125380A1
Cited By
Edge cloud collaborative distribution method and device for model resources, electronic equipment and medium
CN121531032A