A resource acquisition method, system, device and storage medium
By working together with a cache server cluster and a load balancer, the problems of slow application resource acquisition speed and poor stability are solved, and an efficient and reliable resource acquisition process is achieved.
Patent Information
- Application Number
- CN202011232200.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-06
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2040-12-31
AI Technical Summary
In existing technologies, application resource acquisition speed is slow and unstable. In particular, when multiple clients acquire resources at the same time, it can easily lead to bandwidth congestion and high response pressure on remote file storage terminals, affecting resource acquisition efficiency and stability.
The target cache server sends a resource information retrieval request to the remote file storage, generates and updates the initial resource information, and the client obtains the target application resources from the cache server through the load balancer server. The cache server cluster is used to perform load balancing and resource determination, reducing the dependence on the remote file storage.
It improves the efficiency and stability of resource acquisition, reduces the load on individual cache servers, reduces network latency and interference, and enhances the reliability and security of resource acquisition.
Smart Images

Figure CN114443267B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet storage, in particular to a resource acquisition method, system and device, and a storage medium. BACKGROUND
[0002] With the rapid development of the Internet, the types and quantities of application programs are constantly increasing, and with the updating of demand and upgrading of technology, new versions of each application program often need to be developed to realize version updating, so that the application program is more perfect.
[0003] In actual application, each development client often needs to use related resources to develop a new version of an application program (for example, some binary files, art resources developed by an art designer, which can include videos, audios, images, etc.), and these resources are generally stored in a remote file storage end. The client needs to go through a very long physical link (for example, an access layer switch, a convergence layer switch, a core switch, a metropolitan area network on the client side, and a core switch, a convergence switch and an access switch on the remote file storage end side) to acquire resources from the remote file storage end. There are many access shared devices in the process, the transmission speed is easily disturbed by other factors, resulting in low and unstable resource acquisition speed; and since there may be a case that multiple development clients simultaneously need to acquire multiple resources, bandwidth congestion is easily caused, the resource acquisition speed is reduced, and the response pressure of the remote file storage end is large. Therefore, a more effective solution is needed. SUMMARY
[0004] In order to solve the problems of the prior art, the present application provides a resource acquisition method, system, device and storage medium. The technical solution is as follows:
[0005] In one aspect, the present application provides a resource acquisition method, which comprises:
[0006] The target cache server sends a resource information acquisition request to the remote file storage end, and the resource information acquisition request carries a resource identifier of a target application resource;
[0007] The remote file storage end generates initial resource information based on the resource identifier of the target application resource, and sends the initial resource information to the target cache server;
[0008] The target cache server updates the initial resource information to obtain updated resource information;
[0009] The target cache server sends the updated resource information to the client;
[0010] The client sends a resource download request to a load balancing server based on the updated resource information, and the resource download request carries version identification information of the target application resource.
[0011] The load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server.
[0012] The corresponding cache server determines the target application resource based on the version identification information carried by the resource download request and sends the target application resource to the client.
[0013] Another aspect of the present application provides another resource acquisition method, which comprises:
[0014] Sending a resource information acquisition request to a remote file storage end, the resource information acquisition request carrying a resource identifier of a target application resource; so that the remote file storage end generates initial resource information based on the resource identifier of the target application resource;
[0015] Receiving the initial resource information sent by the remote file storage end;
[0016] Updating the initial resource information to obtain updated resource information;
[0017] Sending the updated resource information to a client; so that the client sends a resource download request to a load balancing server based on the updated resource information, and the resource download request carries version identification information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request;
[0018] Receiving the resource download request sent by the load balancing server;
[0019] Determining the target application resource based on the version identification information carried by the resource download request and sending the target application resource to the client.
[0020] Another aspect of the present application provides another resource acquisition method, which comprises:
[0021] Receiving updated resource information sent by a target cache server, the updated resource information being obtained by the target cache server updating initial resource information, the initial resource information being generated by a remote file storage end based on a resource identifier of a target application resource and sent to the target cache server, and the resource identifier of the target application resource being carried by a resource information acquisition request sent by the target cache server to the remote file storage end;
[0022] sending a resource download request to the load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server;
[0023] receiving the target application resource sent by the corresponding cache server, the target application resource being determined by the corresponding cache server based on the version identification information carried by the resource download request.
[0024] Another aspect of the present application provides a resource acquisition system, the system comprising:
[0025] a client, a remote file storage end, a load balancing server and a cache server cluster;
[0026] the client is configured to send a resource download request to the load balancing server based on updated resource information, the resource download request carrying version identification information of a target application resource;
[0027] the remote file storage end is configured to generate initial resource information based on resource identification of the target application resource and send the initial resource information to the cache server cluster;
[0028] the load balancing server is configured to perform load balancing distribution on a resource download request and send the resource download request to the cache server cluster;
[0029] the cache server cluster is configured to send a resource information acquisition request to the remote file storage end, the resource information acquisition request carrying resource identification of the target application resource; and update the initial resource information to obtain updated resource information; and send the updated resource information to the client; and determine the target application resource based on version identification information carried by the resource download request and send the target application resource to the client.
[0030] Another aspect of the present application provides a resource acquisition device, the device comprising:
[0031] an information acquisition request sending module configured to send a resource information acquisition request to a remote file storage end, the resource information acquisition request carrying resource identification of a target application resource; so that the remote file storage end generates initial resource information based on resource identification of the target application resource;
[0032] an initial resource information receiving module configured to receive the initial resource information sent by the remote file storage end;
[0033] an information updating module, configured to update the initial resource information to obtain updated resource information;
[0034] an updated information sending module, configured to send the updated resource information to a client, so that the client sends a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource, so that the load balancing server performs load balancing distribution on the resource download request;
[0035] a download request receiving module, configured to receive the resource download request sent by the load balancing server;
[0036] a resource determining module, configured to determine the target application resource based on the version identification information carried by the resource download request, and send the target application resource to the client.
[0037] Another aspect of the present application provides another resource acquisition device, which comprises:
[0038] an updated information receiving module, configured to receive updated resource information sent by a target cache server, the updated resource information being obtained by the target cache server by updating initial resource information, the initial resource information being generated by a remote file storage end based on resource identification of a target application resource and sent to the target cache server, the resource identification of the target application resource being carried by a resource information acquisition request sent by the target cache server to the remote file storage end;
[0039] a download request sending module, configured to send a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource, so that the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server;
[0040] a resource receiving module, configured to receive the target application resource sent by the corresponding cache server, the target application resource being determined by the corresponding cache server based on the version identification information carried by the resource download request.
[0041] Another aspect of the present application provides a device, which comprises a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the above-mentioned resource acquisition method.
[0042] In another aspect, this application provides a computer-readable storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the resource acquisition method described above.
[0043] The resource acquisition method, system, apparatus, and storage medium provided in this application have the following technical advantages:
[0044] In this application, the target cache server sends a resource information retrieval request carrying a resource identifier of the target application resource to a remote file storage terminal. The remote file storage terminal generates initial resource information based on the resource identifier and sends it to the target cache server. The target cache server updates the initial resource information and sends the updated resource information to the client, enabling the client to subsequently retrieve the required resources from the cache server, thus improving resource retrieval efficiency. The client sends a resource download request carrying version identifier information of the target application resource to a load balancer server based on the updated resource information. The load balancer server distributes the resource download requests evenly, sending them to the corresponding cache servers, ensuring a reasonable and orderly allocation of resource download requests and reducing the load on individual cache servers. The corresponding cache server determines the target application resource based on the version identifier information and sends it to the client. By utilizing caching to quickly retrieve resources, the efficiency and stability of resource retrieval are improved.
[0045] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0046] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0048] Figure 2 This is a schematic diagram of another application environment provided by an embodiment of this application;
[0049] Figure 3 This is a flowchart of a resource acquisition method provided in an embodiment of this application;
[0050] Figure 4 This is a flowchart of another resource acquisition method provided in an embodiment of this application;
[0051] Figure 5 is a flowchart of another resource acquisition method provided by an embodiment of the present application;
[0052] Figure 6 is a flowchart of another resource acquisition method provided by an embodiment of the present application;
[0053] Figure 7 is a structural schematic diagram of an embodiment of a resource acquisition system provided by an embodiment of the present application;
[0054] Figure 8 is a structural schematic diagram of a resource acquisition device provided by an embodiment of the present application;
[0055] Figure 9 is a structural schematic diagram of another resource acquisition device provided by an embodiment of the present application;
[0056] Figure 10 is a hardware structural block diagram of a resource acquisition server provided by an embodiment of the present application. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application. The examples of the described embodiments are shown in the drawings, in which the same or similar notations represent the same or similar elements or elements with the same or similar functions throughout.
[0058] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or server including a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0059] Please refer to Figure 1 , Figure 1 is a structural schematic diagram of an application environment provided by an embodiment of the present application, as Figure 1As shown, the application environment can include a client 01, a remote file storage end 02, a load balancing server 03, and a cache server cluster 04.
[0060] In the embodiments of the present application, the client 01 can be used to generate a resource information acquisition request carrying a resource identifier of a target application resource, and send it to the remote file storage end 02 through the load balancing server 03 and the cache server cluster 04, so that the remote file storage end 02 generates initial resource information and sends it to the cache server cluster 04. The cache server cluster 04 can update the initial resource information to obtain updated resource information, so that the client 01 can send a resource download request carrying version identification information of the target application resource to the load balancing server 03 based on the updated resource information, so that the load balancing server 03 load balances the resource download request and sends it to the corresponding cache server in the cache server cluster 04; the corresponding cache server in the cache server cluster 04 determines the target application resource based on the version identification information carried by the resource download request, and sends the target application resource to the client 01. Therefore, the client 01 can subsequently use the target application resource to develop, for example, a new version of software. Specifically, the client 01 can include a processor and a memory, wherein the processor can be used to generate and send related requests, and parse data, etc.; the memory can be used to store the obtained target application resource, etc. In actual application, there can be multiple clients 01 for resource acquisition at the same time; and in specific embodiments, the client 01 can include desktop computers, notebook computers, tablet computers, smart phones, smart speakers, smart watches, and other types of physical devices, but is not limited thereto. In one specific embodiment, when it is necessary to acquire related resources for new version software development, the client 01 can include a software developer's office PC (Personal Computer), or software in physical devices, such as a Git client.
[0061] In the embodiments of the present application, the remote file storage end 02 can be used to store a large number of application resources for backup storage by the cache server cluster 04; the remote file storage end 02 can also be used to generate initial resource information based on the resource identifier of the target application resource carried by the resource information acquisition request, and send the initial resource information to the cache server cluster 04 to enable the cache server cluster 04 to update the initial resource information to obtain updated resource information, so that the client 01 can subsequently directly obtain the required resources from the cache server cluster 04. In the embodiments of the present application, the remote file storage end 02 can include a server running independently, or a distributed server, or a server cluster composed of multiple servers. In actual application, the remote file storage end 02 can be a Git LFS (Large File Storage) server, which is used to store related resources, such as some large binary files (such as videos, audios, images, etc.), and the remote file storage end 02 is arranged in a remote data center.
[0062] In the embodiments of the present application, the load balancing server 03 can be used to receive the resource download request sent by the client based on the updated resource information, and perform load balancing distribution on the resource download request, and send the resource download request to the corresponding cache server in the cache server cluster 04. In some embodiments, when the number of resource information acquisition requests is large, the load balancing server 03 can also be used to perform load balancing distribution on the resource information acquisition request, and send the resource information acquisition request to the corresponding cache server in the cache server cluster 04 after distribution. Through the load balancing server 03, load balancing is achieved, which is beneficial to reduce the load pressure of a single cache server, reduce the congestion phenomenon during resource acquisition, reduce network latency, and improve the efficiency and stability of resource acquisition. In the embodiments of the present application, the load balancing server 03 can include a server running independently, or a distributed server, or a server cluster composed of multiple servers.
[0063] In the embodiments of the present application, the cache server cluster 04 can include a plurality of cache servers, each of which can send a resource backup request to the remote file storage end 02 every preset time, so that the remote file storage end 02 sends real-time local resources to the cache server, and the cache server can store the real-time local resources, so that the subsequent client can directly obtain the required resources from the cache server without frequent access to the remote service storage end. The cache server cluster 04 can be used to forward the resource information acquisition request to the remote file storage end 02; receive the initial resource information generated and sent by the remote file storage end 02 based on the resource identifier of the target application resource, and update the initial resource information to obtain updated resource information, so that the client 01 sends a resource download request to the load balancing server 03 based on the updated resource information, so that the load balancing server 03 can load balance the resource download request and send it to the corresponding cache server in the cache server cluster 04, so that the corresponding cache server determines the target application resource based on the resource download request and sends it to the client 01. Each cache server in the cache server cluster 04 can include a processor, a memory, and the like. In the embodiments of the present application, each cache server in the cache server cluster 04 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.
[0064] In actual application, the client 01 can generate a resource information acquisition request carrying a resource identifier of a target application resource, and send it to the remote file storage end 02 through the load balancing server 03 and the cache server cluster 04; the remote file storage end 02 generates initial resource information based on the resource identifier of the target application resource, and sends the initial resource information to the cache server cluster 04; the cache server cluster 04 updates the initial resource information to obtain updated resource information; the cache server cluster 04 sends the updated resource information to the client 01; the client 01 sends a resource download request carrying version identifier information of the target application resource to the load balancing server 03 based on the updated resource information; the load balancing server 03 load balances the resource download request and sends it to the corresponding cache server in the cache server cluster 04; the cache server cluster 04 determines the target application resource based on the version identifier information carried by the resource download request in the corresponding cache server, and sends it to the client 01.
[0065] In practical application, the switch is a network device for signal forwarding, which can provide exclusive electrical signal passage for any two network nodes accessing the switch. Figure 1 The application environment can further include a plurality of first access switches 07, a first aggregation switch 05, a first core switch 08, a second core switch 09, a second aggregation switch 10, and a second access switch 11. The first aggregation switch 05, the first core switch 08, and the plurality of first access switches 07 can be disposed in an office building on the client side. The second core switch 09, the second aggregation switch 10, and the second access switch 11 can be disposed in a remote data center consistent with the remote file storage end. Specifically, each client 01 can access a corresponding first access switch 07, each first access switch 07 can access the first aggregation switch 05, the first aggregation switch 05 can be connected with the first core switch 08, the first core switch 08 and the second core switch 09 disposed in the remote data center can be connected through a metropolitan area network, the second core switch 09 can be connected with the second aggregation switch 10, the second aggregation switch 10 can be connected with the second access switch 11, and the second access switch 11 can be further connected with the remote file storage end 02. In a specific embodiment, the application environment can further include a cache access switch 06. The load balancing server 03 and the cache server cluster 04 can access the cache access switch 06, and the cache access switch 06 can also be disposed in the office building on the client side and connected with the first aggregation switch 05. Thus, the client 01 can conveniently and efficiently interact with the load balancing server 03 and the cache server cluster 04, the link is short, and the client does not need to access the remote file storage end through a long link multiple times when obtaining resources, which is conducive to reducing network latency and improving the efficiency and reliability of resource acquisition. Compared with setting a local cache in the client, the setting is more reasonable, the data interaction does not need to cross the access switch, the load pressure of a single client is reduced, the impact on other businesses of the client is avoided, the stability and security of resource acquisition are improved, load balancing can be performed by the load balancing server in a high-concurrency situation, congestion is avoided, network latency is reduced, the efficiency and reliability of resource acquisition are improved, and the deployment is simple and flexible with low cost. In practical application, the first aggregation switch 05 and the cache access switch 06 can be a gigabit switch, which can provide more than 10 G of data throughput in one second. The switch can also be stacked, and several sub-switches can be connected in series as a whole switch to provide greater bandwidth and improve the efficiency and stability of resource acquisition.
[0066] In addition, it should be noted that, Figure 1 is merely a schematic diagram of an application environment provided by the embodiments of the present application. In another specific embodiment, refer to Figure 2The load balancing server 03 can access the first aggregation switch 05, and the cache server cluster 04 can be arranged at the nearest external cloud room and connected with the metropolitan area network, so that the internal layout of the office building does not need to be modified, time and cost are saved, and the application is not limited thereto.
[0067] Figure 3 is a flowchart of a resource acquisition method provided by an embodiment of the present specification, please refer to Figure 3 The resource acquisition method provided by the embodiment of the present specification includes the following steps:
[0068] S301: The client sends a resource information acquisition request to the load balancing server.
[0069] In the embodiment of the present specification, the above-mentioned resource information acquisition request can carry the resource identifier of the target application resource; the above-mentioned target application resource can be a resource related to the development of a new version of a target application, such as a video, audio, image and other art resources developed by an art personnel. Such resources are often binary files and large files in actual application, and are generally stored in a remote file storage end located in a remote data center for calling. When acquiring resources, a long link needs to be passed through, the resource acquisition efficiency is not high, and in the case of high concurrency, the network delay is larger and not stable enough, which affects the efficiency of the development of a new version of software. In actual application, the above-mentioned resource identifier can include but is not limited to the file name of the target application resource.
[0070] In the embodiment of the present specification, each cache server in the cache server cluster can be pre-run, and the preset parameter configuration can be combined with the actual application demand to ensure the normal operation of the cache server in the cache server cluster. The above-mentioned preset parameter can include but is not limited to the git service URL, the file cache directory, the cache service port and the proxy address.
[0071] In one embodiment, before the client sends a resource information acquisition request to the load balancing server, the above-mentioned method can further include:
[0072] 1) The client sends an identity authentication request to the remote file storage end in response to a resource acquisition instruction;
[0073] In the embodiment of the present specification, the above-mentioned identity authentication request can carry the identity information of the above-mentioned client, and the identity information of the above-mentioned client can include but is not limited to the username and password of the client.
[0074] 2) The remote file storage end performs identity authentication based on the above-mentioned identity information;
[0075] 3) When the identity authentication is passed, the remote file storage end sends the client permission certificate information.
[0076] 4) The client obtains resource requirement information and generates the resource information acquisition request based on the resource requirement information and the permission certificate information.
[0077] In an embodiment, the resource requirement information can include a pre-generated resource requirement list, which can include the resource identifier of at least one target application resource. The permission certificate information is obtained through identity authentication, and the resource information acquisition request is generated based on the resource requirement information and the permission certificate information. Before the remote file storage end generates the initial resource information based on the resource identifier of the target application resource, the permission information can be verified first, which is beneficial to improve the security of resource acquisition.
[0078] S303: The load balancing server sends the resource information acquisition request to the target cache server.
[0079] In the embodiments of the present application, the target cache server is a cache server in the cache server cluster; when all cache servers in the cache server cluster are idle and there are few resource information acquisition requests, the load balancing server can select any cache server in the cache server cluster as the target cache server; but in actual application, there are often multiple clients sending resource information acquisition requests at the same time, and the resource information acquisition request can include multiple requests, so it is necessary to load balance the resource information acquisition request and determine the cache server in the cache server cluster as the target cache server after load balancing. In the embodiments of the present application, the specific steps of load balancing the resource information acquisition request by the load balancing server are similar to the process of S317, and the related description of S317 can be referred to. By load balancing the resource information acquisition request and determining the cache server in the cache server cluster as the target cache server after load balancing, the resource information acquisition request can be reasonably and orderly allocated, the load pressure of a single cache server can be reduced, and the efficiency and stability of resource acquisition can be improved.
[0080] S305: The target cache server sends the resource information acquisition request to the remote file storage end.
[0081] S307: The remote file storage end generates initial resource information based on the resource identifier of the target application resource and sends the initial resource information to the target cache server.
[0082] Specifically, the initial resource information can include but is not limited to the initial address information, version identifier information and file size of the target application resource.
[0083] In the embodiments of the present application, the initial address information can represent an initial download address of the target application resource. In actual application, the initial address information can include a resource storage address of the target application resource on a remote file storage end. The version identification information can represent a version state of the target application resource. A subsequent cache server can determine whether the target application resource of the version exists locally according to the version identification information. Specifically, the version identification information is a unique identification code, and the version identification information can include but is not limited to a string composed of at least one of letters, numbers and special characters. After an application resource is updated or changed, the version identification information of the application resource is also changed accordingly. The different application resources and different versions of the same application resource can be distinguished by using the version identification information, which is beneficial to improving the accuracy of resource acquisition.
[0084] S309: The target cache server performs local resource query based on the version identification information of the target application resource.
[0085] In the embodiments of the present application, the target cache server performing local resource query based on the version identification information of the target application resource can include:
[0086] The target cache server queries whether a resource with the same version identification information as the version identification information of the target application resource exists locally. According to the above description, the version identification information is a unique identification code. If a resource with the same version identification information as the version identification information of the target application resource exists on the target cache server, the subsequent client can directly acquire the resource from the cache server without acquiring the resource from the remote file storage end. In actual application, because each cache server in the cache server cluster backs up the resource on the remote file storage end every preset time, generally most resources can be directly acquired from the cache server. However, between the target cache server receiving the initial resource information and the last time the resource backup has occurred, the resource can be updated again. In order to improve the reliability of resource acquisition, it is necessary for the target cache server to perform local resource query based on the version identification information of the target application resource.
[0087] Please continue to refer to Figure 3 The method further includes:
[0088] S311: When the local resource query result is that the resource exists, the target cache server updates the initial resource information to obtain updated resource information.
[0089] In the embodiments of the present application, the target cache server updating the initial resource information to obtain updated resource information can include:
[0090] The target cache server modifies the initial address information in the initial resource information to load balancing address information to obtain updated resource information.
[0091] The target cache server modifies the initial address information in the initial resource information to load balancing address information to obtain updated resource information. Subsequent clients can directly send resource download requests to the load balancing server based on the updated resource information, so that the load balancing server is distributed to the cache server in the cache server cluster, without resource acquisition from the remote file storage end, without interference from other networks, reduced network latency, and improved efficiency and stability of resource acquisition.
[0092] S313: The target cache server sends the updated resource information to the client.
[0093] S315: The client sends a resource download request to the load balancing server based on the updated resource information.
[0094] In the embodiments of the present specification, the updated resource information can include but is not limited to the load balancing address information, the version identification information and the file size of the target application resource; the resource download request can carry the version identification information and the file size of the target application resource. The client sends a resource download request to the load balancing server based on the updated resource information can include that the client sends a resource download request to the load balancing server based on the load balancing address information in the updated resource information
[0095] The client sends a resource download request to the load balancing server based on the updated resource information, without accessing the remote file storage end, which is beneficial to improve the efficiency and stability of resource acquisition.
[0096] S317: The load balancing server performs load balancing distribution on the resource download request and sends the resource download request to the corresponding cache server.
[0097] Since in actual application, there are often multiple clients simultaneously sending resource download requests to the load balancing server, and the resource download request can include multiple (i.e., one client can need to acquire multiple resources at a time, and multiple resource acquisition requests are sent), it is necessary to perform load balancing distribution on the resource download request and send the resource download request to the corresponding cache server in the cache server cluster.
[0098] In the embodiments of the present specification, the method for the load balancing server to perform load balancing distribution on the resource download request can include but is not limited to the following:
[0099] 1) The load balancing server distributes the resource download request in a round robin manner, i.e., the load balancing server distributes the received resource download requests to the cache servers in the cache server cluster in turn, starting from server 1 to server N and then starting the cycle again, so that the multiple resource download requests can be evenly distributed to the cache servers in the cache server cluster (the multiple resource download requests can be resource download requests from different clients or multiple resource download requests sent by one client).
[0100] 2) The load balancing server determines the preset warehouse identifier based on the resource download request and distributes the resource download request to the corresponding cache server in the cache server cluster according to the preset warehouse identifier.
[0101] In the embodiments of the present application, the resource download request can also carry the preset warehouse identifier, and each cache server in the cache server cluster can have a corresponding warehouse identifier. For example, the cache server cluster includes cache server A, cache server B and cache server C, and a resource download request carries the preset warehouse identifier A, and the load balancing server can send the resource download request to the cache server A according to the preset warehouse identifier.
[0102] 3) The load balancing server determines the source IP of the client based on the resource download request and distributes the resource download request to the corresponding cache server in the cache server cluster according to the source IP of the client.
[0103] In the embodiments of the present application, the resource download request can also carry the source IP of the client, and each cache server in the cache server cluster can have a corresponding IP. For example, the last digit of the source IP of the client carried by a resource download request is 1, and the load balancing server can send the resource download request to the cache server with the last digit of the IP being 1 according to the source IP of the client.
[0104] 4) The load balancing server obtains the attribute information and load state of each cache server in the cache server cluster, calculates the weight of each cache server based on the attribute information and load state of each cache server, and then distributes the resource download request based on the weight of each cache server. For example, the number of resource download requests that can be received by each cache server at present can be calculated according to the weight of each cache server, and the resource download request is distributed according to the number of resource download requests that can be received by each cache server at present (for example, the proportion of distribution is calculated based on the number of resource download requests that can be received by each cache server at present, and the resource download request is distributed to each cache server in proportion).
[0105] In some embodiments, the load balancing server can also monitor the running status of each cache server in the cache server cluster, and when determining that any cache server fails, the load balancing server can avoid the failed cache server when performing load balancing distribution, thereby improving the reliability of resource acquisition.
[0106] In the embodiments of the present application, the load balancing server can select any one of the above-mentioned modes 1) to 4) or combine multiple modes to perform load balancing distribution on the resource download request, and then send the resource download request to the corresponding cache server (i.e., the cache server in the allocated cache server cluster) after the distribution. By performing load balancing distribution on the resource download request by the load balancing server and sending the resource download request to the corresponding cache server, the resource download request can be reasonably and orderly distributed, the load pressure of a single cache server can be reduced, and the network congestion or server crash in a high-concurrency situation can be reduced, thereby improving the efficiency and stability of resource acquisition.
[0107] S319: The corresponding cache server determines the target application resource based on the version identification information carried in the resource download request and sends the target application resource to the client.
[0108] By determining the target application resource based on the version identification information carried in the resource download request by the corresponding cache server and sending the target application resource to the client, the client can subsequently use the target application resource to develop, for example, a new version of software, etc. In the prior art, the client downloads the target application resource from the resource storage address of the remote file storage end after receiving the initial address information, and needs to pass through a long network link. Congestion of any node in the middle can cause the resource acquisition speed to decrease and be susceptible to other network interference, and the speed is unstable. By using the scheme of the present application, the resource does not need to be frequently acquired from the remote file storage end through a long network link, and the resource can be directly acquired from the cache server, which reduces the network delay and is almost not susceptible to other network interference, thereby greatly improving the efficiency and reliability of resource acquisition.
[0109] Please refer to Figure 4 In one embodiment, before the corresponding cache server determines the target application resource based on the version identification information carried in the resource download request and sends the target application resource to the client, the method can further include:
[0110] S401: The corresponding cache server performs resource availability detection based on the version identification information carried in the resource download request.
[0111] Since in actual application, there can be data loss and the like, in order to improve the reliability of resource acquisition, it is necessary for the corresponding cache server to perform resource availability detection based on the version identification information carried in the resource download request; the resource availability detection performed by the corresponding cache server based on the version identification information carried in the resource download request can include: the corresponding cache server performing local available resource query based on the version identification information carried in the resource download request, and when a resource with consistent version identification information as that carried in the resource download request is queried, it is determined that the resource availability detection is passed.
[0112] S403: When the resource availability detection is passed, the corresponding cache server determines the target application resource from the local.
[0113] S405: The corresponding cache server sends the target application resource to the client.
[0114] By performing resource availability detection by the corresponding cache server based on the version identification information carried in the resource download request, when the resource availability detection is passed, the corresponding cache server determines the target application resource from the local, and sends the target application resource to the client, which is beneficial to improve the reliability of resource acquisition.
[0115] Please refer to Figure 5 In another embodiment, the method can further include:
[0116] S501: When the resource availability detection is not passed, a resource update request is sent to the remote file storage end.
[0117] Specifically, the resource update request carries the version identification information of the target application resource.
[0118] In the embodiments of the present specification, when no resource with consistent version identification information as that carried in the resource download request is queried by the corresponding cache server based on the version identification information carried in the resource download request, the resource availability detection is not passed, and there is no available target application resource on the corresponding cache server, and it is necessary to send a resource update request to the remote file storage end to acquire the target application resource.
[0119] S503: The remote file storage end determines the target application resource based on the version identification information of the target application resource.
[0120] In the embodiments of the present specification, the remote file storage end can determine the resource with consistent version identification information as the target application resource based on the version identification information of the target application resource from the local to return to the corresponding cache server.
[0121] S505: The remote file storage end sends the target application resource to the corresponding cache server.
[0122] S507: The corresponding cache server sends the target application resource to the client.
[0123] In the embodiments of the present application, after the corresponding cache server sends the target application resource to the client, the corresponding cache server can further store the target application resource to a local resource update backup, so that if the client requests to obtain the target application resource again subsequently, the corresponding cache server does not need to obtain the target application resource from the remote file storage end. Through resource availability detection by the corresponding cache server, if the detection fails, a resource update request is sent to the remote file storage end to obtain the target application resource, which is beneficial to improve the reliability of resource acquisition.
[0124] In one embodiment, the method can further include:
[0125] After the target cache server performs local resource query based on the version identification information of the target application resource in S309, when the local resource query result is that the resource does not exist, the method further includes:
[0126] 1) The target cache server forwards the initial resource information to the client.
[0127] Specifically, the initial resource information can include but is not limited to the initial address information, version identification information and file size of the target application resource.
[0128] 2) The client sends a resource download request to the remote file storage end based on the initial resource information.
[0129] In the embodiments of the present application, the resource download request can carry the version identification information of the target application resource.
[0130] 3) The remote file storage end determines the target application resource from the local based on the version identification information carried by the resource download request.
[0131] 4) The remote file storage end sends the target application resource to the client.
[0132] In actual application, since each cache server in the cache server cluster backs up resources on the remote file storage end at preset time intervals, generally most resources can be directly obtained from the cache server, but between the target cache server receiving the initial resource information and the last time the resource backup has occurred, the resources can be updated again. In order to improve the reliability of resource acquisition, the target cache server is necessary to query the local resources based on the version identification information of the target application resources, and when the local resource query result is that the resource does not exist, the initial resource information is directly forwarded to make the client accurately determine whether the resource to be acquired exists in the cache and send a corresponding request, thereby improving the reliability of resource acquisition.
[0133] Please refer to Figure 6 In the embodiments of the present application, the method can further include:
[0134] S601: Each cache server in the cache server cluster sends a resource backup request to the remote file storage end at preset time intervals.
[0135] In the embodiments of the present application, the resource backup request can carry resource backup requirement information, such as the need to backup the preset type of resources of the preset application, wherein the preset application and the preset type can be set according to actual needs, or all resources stored on the remote file storage end can be selected to be backed up.
[0136] S603: The remote file storage end determines real-time local resources based on the resource backup requirement information.
[0137] S605: The remote file storage end sends the real-time local resources to the corresponding cache server.
[0138] S607: The corresponding cache server stores the real-time local resources.
[0139] By sending a resource backup request to the remote file storage end at preset time intervals by each cache server in the cache server cluster, real-time local resources are obtained for storage to achieve resource backup, which can flexibly backup the required resources, so that the client can obtain the required resources from the cache server, without the need to obtain resources from the remote file storage end each time, which is fast, has strong anti-interference ability, and is conducive to improving the efficiency and stability of resource acquisition.
[0140] In the embodiments of the present application, the target cache server queries the local resource based on the version identification information of the target application resource, and when the result of the local resource query is that the resource exists, the target cache server updates the initial resource information to obtain updated resource information. Subsequent clients can directly send a resource download request to the load balancing server based on the updated resource information, so that the load balancing server is distributed to the cache server in the cache server cluster, without the need to obtain the resource from the remote file storage end, without the interference of other networks, reducing network latency, and improving the efficiency and stability of resource acquisition. By sending a resource download request to the load balancing server based on the updated resource information, the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to the corresponding cache server, which is conducive to reasonably and orderly distributing the resource download request, reducing the load pressure of a single cache server, reducing network congestion and even server crashes in high concurrency situations, and improving the efficiency and stability of resource acquisition. Then, the corresponding cache server determines the target application resource based on the version identification information carried by the resource download request and sends the target application resource to the client, so that the client can quickly and reliably acquire the required resource, and subsequent development of a new version of software and the like can be implemented using the target application resource.
[0141] Since in actual application, there may be data loss and the like, the corresponding cache server performs resource availability detection based on the version identification information carried by the resource download request, which is conducive to improving the reliability of resource acquisition. Each cache server in the cache server cluster sends a resource backup request to the remote file storage end at a preset time interval to perform resource backup, which can flexibly backup the required resource, so that the client can acquire the required resource from the cache server without the need to acquire the resource from the remote file storage end each time, which is fast, has strong anti-interference capability, and is conducive to improving the efficiency and stability of resource acquisition.
[0142] The embodiments of the present application also provide an embodiment of a resource acquisition system, as shown in Figure 7 The system can include:
[0143] a client 710, a remote file storage end 720, a load balancing server 730, and a cache server cluster 740;
[0144] The client 710 is configured to send a resource download request to the load balancing server based on the updated resource information, and the resource download request carries version identification information of a target application resource.
[0145] The remote file storage end 720 is configured to generate initial resource information based on resource identification of the target application resource and send the initial resource information to the cache server cluster.
[0146] The load balancing server 730 is configured to perform load balancing distribution on the resource download request, and send the resource download request to the cache server cluster;
[0147] The cache server cluster 740 is configured to send a resource information acquisition request to the remote file storage end, the resource information acquisition request carrying a resource identifier of the target application resource; update the initial resource information to obtain updated resource information; send the updated resource information to the client; and determine the target application resource based on version identifier information carried in the resource download request, and send the target application resource to the client.
[0148] The embodiment of the application further provides a resource acquisition device, as shown in the figure, the device can comprise: Figure 8 The information acquisition request sending module 810 is configured to send a resource information acquisition request to the remote file storage end, the resource information acquisition request carrying a resource identifier of the target application resource; so that the remote file storage end generates initial resource information based on the resource identifier of the target application resource;
[0149] The initial resource information receiving module 820 is configured to receive the initial resource information sent by the remote file storage end;
[0150] The information updating module 830 is configured to update the initial resource information to obtain updated resource information;
[0151] The updated information sending module 840 is configured to send the updated resource information to the client; so that the client sends a resource download request to the load balancing server based on the updated resource information, the resource download request carrying version identifier information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request;
[0152] The download request receiving module 850 is configured to receive the resource download request sent by the load balancing server;
[0153] The resource determining module 860 is configured to determine the target application resource based on the version identifier information carried in the resource download request, and send the target application resource to the client.
[0154] In one embodiment, the above-mentioned resource acquisition device can further comprise:
[0155] The local resource query module is configured to perform local resource query based on the version identifier information of the target application resource.
[0156]
[0157] In a specific embodiment, when the local resource query result is that the resource exists, the information updating module 830 is executed, and the information updating module 830 can include:
[0158] an updating unit, configured to modify the initial address information in the initial resource information into load balancing address information to obtain updated resource information.
[0159] In an embodiment, the resource obtaining apparatus described above can further include:
[0160] a resource availability detection module, configured to perform resource availability detection based on version identification information carried by the resource download request;
[0161] a target resource local determination module, configured to determine the target application resource locally when the resource availability detection passes, and send the target application resource to the client.
[0162] In another embodiment, the resource obtaining apparatus described above can further include:
[0163] a resource updating request sending module, configured to send a resource updating request to the remote file storage end when the resource availability detection fails, the resource updating request carrying version identification information of the target application resource, so that the remote file storage end determines the target application resource based on the version identification information of the target application resource;
[0164] an updated resource receiving module, configured to receive the target application resource sent by the remote file storage end;
[0165] an updated resource sending module, configured to send the target application resource to the client.
[0166] For details, please refer to Figure 9 The embodiment of the present application also provides another resource obtaining apparatus, which can include:
[0167] an updated information receiving module 910, configured to receive updated resource information sent by a target cache server, the updated resource information being obtained by the target cache server by updating initial resource information, the initial resource information being generated by a remote file storage end based on a resource identifier of a target application resource and sent to the target cache server, the resource identifier of the target application resource being carried by a resource information obtaining request sent by the target cache server to the remote file storage end;
[0168] The download request sending module 920 is configured to send a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request, and sends the resource download request to a corresponding cache server.
[0169] The resource receiving module 930 is configured to receive the target application resource sent by the corresponding cache server, the target application resource being determined by the corresponding cache server based on the version identification information carried in the resource download request.
[0170] The computer device provided in the embodiments of the present application comprises a processor and a memory, and the memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the resource acquisition method provided in the above method embodiments.
[0171] The memory can be used to store software programs and modules, and the processor can execute various function applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by functions, etc.; and the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory can also include a memory controller to provide access of the processor to the memory.
[0172] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal, a server or a similar computing device, that is, the above computer device can include a mobile terminal, a computer terminal, a server or a similar computing device. Taking the case of running on a server as an example, Figure 10 is a hardware structure block diagram of a server of a resource acquisition method provided in the embodiments of the present application. As shown in Figure 10As shown, the server 1000 can vary in configuration and performance based on the needs of the user. The server 1000 can include one or more Central Processing Units (CPU) 1010 (processor 1010 can include, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), etc.), a memory 1030, one or more storage media 1020 (such as one or more mass storage devices) for storing data, an operating system 1021, one or more applications 1023, and one or more user interfaces 1024. The memory 1030 and the storage media 1020 can be of any type generally known or used in the art including, but not limited to, static or dynamic random access memory, etc. The storage media 1020 can include instructions stored as software or firmware code that, when executed by the server 1000, perform various functions described herein. The server 1000 can also include one or more network interfaces 1050, one or more input / output interfaces 1040, and one or more power supplies 1060. The server 1000 can also include one or more buses 1025 for communicatively coupling the above components. TM TM TM TM TM
[0173] The input / output interface 1040 can be configured to receive and / or transmit data via a network. Examples of the network can include a wireless network provided by a communication provider of the server 1000. In one example, the input / output interface 1040 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the input / output interface 1040 can be a Radio Frequency (RF) module that is configured to communicate with the Internet via a wireless manner.
[0174] Those skilled in the art will understand that Figure 10 the structure shown is merely an example and does not limit the structure of the electronic device described above. For example, the server 1000 can include more or less components than shown in FIG. 10, or have a different configuration of components than shown in FIG. 10. Figure 10 Figure 10
[0175] The embodiment of the present application further provides a computer readable storage medium, which can be arranged in a server to store at least one instruction or at least one program related to the resource acquisition method in the method embodiment, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource acquisition method provided by the above method embodiment.
[0176] Optionally, in the embodiment, the storage medium can be located in at least one of the plurality of network servers of the computer network. Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media capable of storing program codes.
[0177] The embodiment of the present application further provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the various optional implementation manners described above.
[0178] As can be seen from the above embodiments of the resource acquisition method, system, device, computer device, storage medium or computer program provided by the present application, the target cache server performs local resource query based on the version identification information of the target application resource, and when the local resource query result is that the resource exists, the target cache server updates the initial resource information to obtain updated resource information. Subsequent clients can directly send a resource download request to the load balancing server based on the updated resource information, so that the load balancing server is allocated to a cache server in the cache server cluster, without the need to acquire the resource from the remote file storage end, without the interference of other networks, reducing network latency, and improving the efficiency and stability of resource acquisition. By sending the resource download request to the load balancing server based on the updated resource information, the load balancing server performs load balancing allocation on the resource download request and sends the resource download request to the corresponding cache server, which is conducive to reasonably and orderly allocating the resource download request, reducing the load pressure of a single cache server, reducing network congestion and even server crashes in high concurrency situations, and improving the efficiency and stability of resource acquisition. Then, the corresponding cache server determines the target application resource based on the version identification information carried in the resource download request and sends the target application resource to the client, so that the client can quickly and reliably acquire the required resource, and subsequent development of a new version of software and the like can be implemented by using the target application resource.
[0179] Since in actual application, there can be data loss and the like, the cache server performs resource availability detection based on the version identification information carried in the resource download request, which is beneficial to improving the reliability of resource acquisition; each cache server in the cache server cluster sends a resource backup request to the remote file storage end at a preset time interval to perform resource backup, which can flexibly backup the required resources, so that the client can acquire the required resources from the cache server without acquiring the resources from the remote file storage end each time, which is fast, strong in anti-interference, and beneficial to improving the efficiency and stability of resource acquisition.
[0180] It should be noted that the above sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired result. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.
[0181] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the device, equipment and storage medium embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0182] Those of ordinary skill in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0183] The above is only the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A resource acquisition method, characterized by, The method comprises: The target cache server sends a resource information acquisition request to a remote file storage end, and the resource information acquisition request carries a resource identifier of a target application resource; the target cache server is a cache server determined from a cache server cluster after the resource information acquisition request is distributed by a load balancing server; the target application resource is a resource related to development of a new version of a target application; The remote file storage end generates initial resource information based on the resource identifier of the target application resource, and sends the initial resource information to the target cache server; the initial resource information comprises initial address information and version identifier information of the target application resource, and the version identifier information represents a version state of the target application resource; The target cache server performs local resource query based on the version identifier information of the target application resource; when a local resource query result is that the resource exists, the initial address information in the initial resource information is modified into load balancing address information to obtain updated resource information; The target cache server sends the updated resource information to a client; The client sends a resource download request to a load balancing server based on the updated resource information, and the resource download request carries the version identifier information of the target application resource; The load balancing server distributes the resource download request by load balancing, and sends the resource download request to a corresponding cache server; The corresponding cache server determines the target application resource based on the version identifier information carried in the resource download request, and sends the target application resource to the client.
2. A resource acquisition method characterized by comprising: The method applied to a target cache server comprises: A resource information acquisition request is sent to a remote file storage end, and the resource information acquisition request carries a resource identifier of a target application resource; so that the remote file storage end generates initial resource information based on the resource identifier of the target application resource; the target cache server is a cache server determined from a cache server cluster after the resource information acquisition request is distributed by a load balancing server; the target application resource is a resource related to development of a new version of a target application; and the initial resource information comprises initial address information and version identifier information of the target application resource, and the version identifier information represents a version state of the target application resource; The initial resource information sent by the remote file storage end is received; local resource query is performed based on the version identifier information of the target application resource; and when a local resource query result is that the resource exists, the initial address information in the initial resource information is modified into load balancing address information to obtain updated resource information; sending the updated resource information to the client, so that the client sends a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource, so that the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server, so that the corresponding cache server determines the target application resource based on the version identification information carried by the resource download request and sends the target application resource to the client.
3. The method of claim 2, wherein, The method further comprises: The corresponding cache server is configured to perform resource availability detection based on the version identification information carried by the resource download request, and when the resource availability detection passes, determine the target application resource locally and send the target application resource to the client.
4. The method of claim 3, wherein, The method further comprises: The corresponding cache server is configured to, when the resource availability detection fails, send a resource update request to the remote file storage end, the resource update request carrying the version identification information of the target application resource, so that the remote file storage end determines the target application resource based on the version identification information of the target application resource, receives the target application resource sent by the remote file storage end, and sends the target application resource to the client.
5. A resource acquisition method characterized by comprising: The method comprises: receiving updated resource information sent by a target cache server, the updated resource information being obtained by the target cache server based on local resource query of version identification information of a target application resource, when the local resource query result is that the resource exists, modifying initial address information in initial resource information to load balancing address information, the initial resource information being generated by a remote file storage end based on a resource identifier of the target application resource and sent to the target cache server, the resource identifier of the target application resource being carried by a resource information acquisition request sent by the target cache server to the remote file storage end, the target cache server being a cache server determined from a cache server cluster after the load balancing server performs load balancing distribution on the resource information acquisition request, the target application resource being a resource related to development of a new version of a target application, the initial resource information including initial address information and version identification information of the target application resource, the version identification information representing a version state of the target application resource; sending a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource, so that the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server; receiving the target application resource sent by the corresponding cache server, the target application resource being determined by the corresponding cache server based on the version identification information carried by the resource download request.
6. A resource acquisition system, characterized by, The system comprises: The client, the remote file storage end, the load balancing server and the cache server cluster; the cache server cluster comprises a target cache server and a corresponding cache server; The client is used for sending a resource download request to the load balancing server based on updated resource information, and the resource download request carries version identification information of a target application resource; the target application resource is a resource related to development of a new version of the target application, and the version identification information represents a version state of the target application resource; The remote file storage end is used for generating initial resource information based on a resource identifier of the target application resource, and sending the initial resource information to the target cache server; the initial resource information comprises initial address information and version identification information of the target application resource; The load balancing server is used for load balancing allocation of the resource download request, and sending the resource download request to the corresponding cache server; The target cache server is used for sending a resource information acquisition request to the remote file storage end, the resource information acquisition request carrying a resource identifier of the target application resource; and performing local resource query based on version identification information of the target application resource; when a local resource query result is that the resource exists, modifying the initial address information in the initial resource information into load balancing address information to obtain updated resource information; and sending the updated resource information to the client; the target cache server is a cache server determined from the cache server cluster after the load balancing server performs load balancing allocation on the resource information acquisition request; The corresponding cache server is used for determining the target application resource based on the version identification information carried in the resource download request, and sending the target application resource to the client.
7. A resource acquisition apparatus characterized by comprising: The application is applied to a target cache server, and the device comprises: An information acquisition request sending module is used for sending a resource information acquisition request to a remote file storage end, the resource information acquisition request carrying a resource identifier of a target application resource; so that the remote file storage end generates initial resource information based on the resource identifier of the target application resource; the target cache server is a cache server determined from a cache server cluster after a load balancing server performs load balancing allocation on the resource information acquisition request; the target application resource is a resource related to development of a new version of the target application; An initial resource information receiving module is used for receiving the initial resource information sent by the remote file storage end; the initial resource information comprises initial address information and version identification information of the target application resource, and the version identification information represents a version state of the target application resource; A local resource query module is used for performing local resource query based on the version identification information of the target application resource; The information updating module is configured to update the initial resource information to obtain updated resource information; the information updating module includes an updating unit configured to modify the initial address information in the initial resource information to load balancing address information to obtain updated resource information when the local resource query result is that the resource exists; The updated information sending module is configured to send the updated resource information to the client; so that the client sends a resource download request to the load balancing server based on the updated resource information, and the resource download request carries version identification information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request; The download request receiving module is configured to receive the resource download request sent by the load balancing server; The resource determining module is configured to determine the target application resource based on the version identification information carried by the resource download request, and send the target application resource to the client.
8. A resource acquisition apparatus characterized by comprising: The device includes: The updated information receiving module is configured to receive updated resource information sent by a target cache server; the updated resource information is obtained by modifying initial address information in initial resource information to load balancing address information when a local resource query result is that the resource exists, the local resource query being performed by the target cache server based on version identification information of a target application resource, the initial resource information being generated by a remote file storage end based on a resource identifier of the target application resource and sent to the target cache server, the resource identifier of the target application resource being carried by a resource information acquisition request sent by the target cache server to the remote file storage end; the target cache server being a cache server determined from a cache server cluster by a load balancing server after performing load balancing distribution on the resource information acquisition request; the target application resource being a resource related to development of a new version of a target application; the initial resource information including initial address information and version identification information of the target application resource, the version identification information representing a version state of the target application resource; The download request sending module is configured to send a resource download request to a load balancing server based on the updated resource information, the resource download request carrying version identification information of the target application resource; so that the load balancing server performs load balancing distribution on the resource download request and sends the resource download request to a corresponding cache server; The resource receiving module is configured to receive the target application resource sent by the corresponding cache server, the target application resource being determined by the corresponding cache server based on the version identification information carried by the resource download request.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource acquisition method according to any one of claims 2 to 5.
10. A computer device comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource acquisition method according to any one of claims 2 to 5.
Citation Information
Patent Citations
Cluster service cache processing method and system
CN106856456A
Cache resource linkage updating method and system and server
CN111200634A