Resource file management method and related equipment

By dividing the resource files of the business system into initialization resource files and other resource files, and storing the initialization resource files in the local warehouse, the problem of insufficient stability of remote warehouses in existing hot deployment technologies is solved, and the overall stability and reliability of the business system is improved.

CN119917478APending Publication Date: 2025-05-02KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411955694.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the existing hot deployment technology, the stability of remote warehouses is insufficient, resulting in low overall system reliability and ineffective in ensuring the stable operation of the business system when resource updates.

Method used

By dividing the resource files required for the operation of the business system into initialization resource files and other resource files, the initialization resource files are stored in the local warehouse, while other resource files may be stored in the local warehouse or remote warehouse. Therefore, when the remote warehouse is insufficient, the initialization resource files in the local warehouse ensure the stable operation of the business system.

Benefits of technology

It effectively improves the overall stability of the business system, avoids resource acquisition failures caused by insufficient stability of remote warehouses, simplifies resource maintenance processes, and enhances the maintainability and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917478A_ABST
    Figure CN119917478A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource file management method and related equipment, which are used for improving the overall stability of a service system. The method provided by the embodiment of the invention comprises the following steps: receiving a resource acquisition request sent by a service system, wherein the service system is deployed at a client; determining a target resource identifier indicated by the resource acquisition request; if a target resource file indicated by the target resource identifier belongs to an initialized resource file, acquiring the target resource file from a local warehouse based on the target resource identifier; if a target resource file indicated by the target resource identifier belongs to other resource files, the target resource file is acquired from the local warehouse or the remote warehouse based on the target resource identifier, and the other resource files refer to resource files except the initialized resource file; and returning the target resource file to the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of software deployment, and in particular to a resource file management method and related equipment. Background Art

[0002] In order to achieve non-stop resource updates, a common practice is to use hot deployment technology to deploy resources.

[0003] Generally, hot deployment technology will choose to store resource files in remote warehouses such as file servers and databases. The system obtains resource files by accessing the remote warehouse in real time. When the resource files used by the system need to be updated, the system can directly obtain the new resource files by updating the remote warehouse.

[0004] However, under the above implementation, the stability of the remote warehouse directly affects whether the system can obtain available resource files, making the overall reliability of the system low. Summary of the invention

[0005] The embodiments of the present application provide a resource file management method and related devices for improving the overall stability of a business system.

[0006] A first aspect of an embodiment of the present application provides a resource file management method, including:

[0007] Receiving a resource acquisition request sent by a business system, where the business system is deployed on a client;

[0008] Determine the target resource identifier indicated by the resource acquisition request;

[0009] If the target resource file indicated by the target resource identifier is an initialization resource file, acquiring the target resource file from the local repository based on the target resource identifier;

[0010] If the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, then obtaining the target resource file from the remote repository based on the target resource identifier, wherein the other resource files refer to resource files other than the initialization resource file;

[0011] Return the target resource file to the client.

[0012] In a specific implementation, the method further includes:

[0013] If the target resource file is obtained from the local repository, in response to a modification operation on the target resource file, the target resource file in the local repository is replaced with the modified target resource file;

[0014] According to a resource synchronization instruction, the cloud resource file indicated by the target resource identifier in the remote warehouse is replaced by the modified target resource file indicated by the target resource identifier in the local warehouse, and the resource synchronization instruction includes the target resource identifier.

[0015] In a specific implementation, the method further includes:

[0016] For each resource file in the remote repository, determining the resource identifier of the resource file as the resource identifier to be compared;

[0017] Acquire the cloud resource to be compared indicated by the resource identifier to be compared from the remote warehouse, and acquire the local resource to be compared indicated by the resource identifier to be compared from the local warehouse;

[0018] Based on the consistency between the cloud resource to be compared and the local resource to be compared, it is determined whether to generate a resource synchronization instruction including the identifier of the resource to be compared.

[0019] In a specific implementation, replacing the cloud resource file indicated by the target resource identifier in the remote warehouse with the modified target resource file indicated by the target resource identifier in the local warehouse includes:

[0020] If the file lock of the cloud resource file in the remote warehouse is obtained, the cloud resource file in the remote warehouse is replaced with the modified target resource file, and the file lock is released after the replacement is completed;

[0021] If the file lock of the cloud resource file in the remote warehouse is not obtained, wait for the file lock to be released, and replace the cloud resource file in the remote warehouse with the modified target resource file after the file lock is obtained, and release the file lock after the replacement is completed.

[0022] In a specific implementation, before receiving the resource acquisition request sent by the business system, the method further includes:

[0023] Receive resource localization operations initiated by users;

[0024] Determine the cloud resource identifier of the resource localization operation instruction;

[0025] Acquire a target cloud resource from the remote warehouse based on the cloud resource identifier;

[0026] The target cloud resource is stored in the local warehouse.

[0027] In a specific implementation, the method is applied to a hot deployment device, the hot deployment device has a resource access interface, and the receiving resource acquisition request sent by the business system includes:

[0028] Receive a resource acquisition request sent by the business system through the resource access interface.

[0029] A second aspect of an embodiment of the present application provides a hot deployment device, including:

[0030] An acquisition unit, configured to receive a resource acquisition request sent by a business system, wherein the business system is deployed on a client;

[0031] a determining unit, configured to determine a target resource identifier indicated by the resource acquisition request;

[0032] The acquisition unit is further configured to acquire the target resource file from the local repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to an initialization resource file;

[0033] The acquisition unit is further configured to acquire the target resource file from the remote repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, wherein the other resource files refer to resource files other than the initialization resource file;

[0034] A sending unit is used to return the target resource file to the client.

[0035] In a specific implementation, the hot deployment device further includes: a synchronization unit;

[0036] The synchronization unit is configured to replace the target resource file in the local repository with the modified target resource file in response to a modification operation on the target resource file if the target resource file is obtained from the local repository;

[0037] The synchronization unit is further used to replace the cloud resource file indicated by the target resource identifier in the remote warehouse with the modified target resource file indicated by the target resource identifier in the local warehouse according to the resource synchronization instruction, and the resource synchronization instruction includes the target resource identifier.

[0038] In a specific implementation, the determining unit is further configured to determine, for each resource file in the remote repository, a resource identifier of the resource file as a resource identifier to be compared;

[0039] The acquisition unit is further configured to acquire the cloud resource to be compared indicated by the resource identifier to be compared from the remote warehouse, and acquire the local resource to be compared indicated by the resource identifier to be compared from the local warehouse;

[0040] The determining unit is further configured to determine whether to generate a resource synchronization instruction including an identifier of the resource to be compared based on the consistency between the cloud resource to be compared and the local resource to be compared.

[0041] In a specific implementation, the synchronization unit is specifically configured to replace the cloud resource file in the remote repository with the modified target resource file if the file lock of the cloud resource file in the remote repository is obtained, and release the file lock after the replacement is completed;

[0042] If the file lock of the cloud resource file in the remote warehouse is not obtained, wait for the file lock to be released, and replace the cloud resource file in the remote warehouse with the modified target resource file after the file lock is obtained, and release the file lock after the replacement is completed.

[0043] In a specific implementation, before receiving the resource acquisition request sent by the business system, the hot deployment device further includes: a storage unit;

[0044] The acquisition unit is further used to receive a resource localization operation initiated by a user;

[0045] The determining unit is further used to determine the cloud resource identifier of the resource localization operation instruction;

[0046] The acquisition unit is further configured to acquire the target cloud resource from the remote warehouse based on the cloud resource identifier;

[0047] The storage unit is used to store the target cloud resource in the local warehouse.

[0048] In a specific implementation, it is applied to a hot deployment device, the hot deployment device has a resource access interface, and the acquisition unit is specifically used to receive a resource acquisition request sent by a business system through the resource access interface.

[0049] A third aspect of an embodiment of the present application provides a computer device, including:

[0050] CPU, memory and input / output interface;

[0051] The memory is a short-term storage memory or a persistent storage memory;

[0052] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method described in the first aspect.

[0053] A fourth aspect of the embodiments of the present application provides a computer program product comprising instructions, and when the computer program product is run on a computer, the computer is caused to execute the method described in the first aspect.

[0054] A fifth aspect of an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method described in the first aspect.

[0055] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: all resources required for the operation of the business system are divided into initialization resource files and other resource files except the initialization resource files. Among them, the initialization resource files are placed in the local warehouse, and other resource files may be placed in the remote warehouse or the local warehouse. In this way, even in the case of insufficient stability of the remote warehouse, the initialization resource files stored in the local warehouse are sufficient to support the business system to complete the initialization, rather than being unable to obtain any resource files as in the existing hot deployment solution. It can be seen that the resource file management solution of the embodiments of the present application can effectively improve the overall stability of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A system architecture diagram of the resource file management method disclosed in the embodiment of the present application;

[0057] Figure 2 A schematic diagram of a process flow of a resource file management method disclosed in an embodiment of the present application;

[0058] Figure 3 Another flowchart of the resource file management method disclosed in the embodiment of the present application;

[0059] Figure 4 A schematic diagram of the structure of a computer device disclosed in an embodiment of the present application;

[0060] Figure 5 Another structural schematic diagram of the computer device disclosed in the embodiment of the present application. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0062] The embodiments of the present application provide a resource file management method and related devices for improving the overall stability of a business system.

[0063] In order to better implement the resource file management method of the embodiment of the present application, the present application provides the following Figure 1 The resource file management architecture shown includes at least one business system, a hot deployment device for deploying the resource file management method of the embodiment of the present application, a local warehouse and at least one remote warehouse, wherein the hot deployment device is divided into a hot deployment device connector and a hot deployment device processor.

[0064] In actual applications, the business system can obtain resource files through the hot deployment device processor, and the hot deployment device processor obtains resources requested by the business system from the local warehouse and the remote warehouse, and obtains resources from the remote warehouse to complete the update of the local warehouse, or obtains resources from the local warehouse to complete the update of the remote warehouse, and keeps the resource files in the local warehouse and the remote warehouse synchronized. Among them, the remote connection between the hot deployment device processor and the remote warehouse for transmitting data needs to be established and deleted through the hot deployment device connector.

[0065] In addition, in addition to storing initialization resource files and other resource files required for the operation of the business system, the local warehouse also stores the system resources included in the business system when it was first deployed. In other words, the business system can be restored to its initial setting state through system resources.

[0066] exist Figure 1 Based on the examples shown, please refer to Figure 2 , the embodiment of the present application provides a resource file management method, comprising the following steps:

[0067] 201. Receive a resource acquisition request sent by a business system, where the business system is deployed on a client.

[0068] It is understandable that the same business system can be provided to different enterprises or users, and different enterprises and users access the business system through their own clients, and the resource files that the business system relies on during the access process are not exactly the same.

[0069] Any resource acquisition request initiated by any business system from different clients can be processed by the method of the embodiment of the present application.

[0070] 202. Determine the target resource identifier indicated by the resource acquisition request.

[0071] After receiving the resource acquisition request, it is first necessary to determine which resource file the business system requests. In the embodiment of the present application, the distinction between different resource files can be achieved through resource identification, and the resource identification can identify the uniqueness of the resource file. For example, the resource identification can be information such as the name and / or number of the resource file, which is not limited here.

[0072] Therefore, it is necessary to first determine the target resource identifier indicated by the resource acquisition request.

[0073] 203. If the target resource file indicated by the target resource identifier is an initialization resource file, the target resource file is obtained from the local repository based on the target resource identifier.

[0074] In the embodiment of the present application, the resource files of the business system are divided into the initialization resource files and other resource files required for each startup. Among them, since the initialization resource files are resource files that need to be obtained by different clients deploying the business system each time the business system is started, deploying them in the local warehouse of the business system can effectively improve the efficiency of resource acquisition and avoid the client even being unable to complete the startup of the business system due to the poor stability of the remote warehouse.

[0075] Among them, multiple servers for deploying local warehouses and business systems are in the same local area network, or the servers for deploying local warehouses and business systems are in the same server cluster.

[0076] 204. If the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, the target resource file is obtained from the remote repository based on the target resource identifier, where the other resource files refer to resource files other than the initialization resource file.

[0077] Based on the above embodiments, it can be known that other resource files may be required by different clients when using the business system, or resource files that are required by all clients when using the business system but have a larger file size.

[0078] For such files, part of other resource files can be deployed in the local warehouse and other part of other resource files can be deployed in the remote warehouse according to user needs, or all other resource files can be deployed in the remote warehouse. Therefore, in actual applications, if the target resource file indicated by the target resource identifier belongs to other resource files, it is also necessary to determine whether the target resource file is stored locally. And based on the above judgment results, decide where to obtain the target resource file. For example, if the target resource file indicated by the target resource identifier belongs to other resource files and the local warehouse stores the target resource file, the target resource file is directly obtained from the local warehouse based on the target resource identifier.

[0079] Among them, multiple servers for deploying remote warehouses and business systems are in different local area networks, or the servers for deploying remote warehouses and business systems are in different server clusters.

[0080] In the embodiment of the present application, other resource files are quickly retrieved from the local warehouse first, which improves the system response speed and the management efficiency of resource files when the local search has lower network latency.

[0081] 205. Return the target resource file to the client.

[0082] After the target resource file is obtained, the target resource file may be returned to the client as the reply information of the resource acquisition request in step 201 .

[0083] In an embodiment of the present application, all resources required for the operation of the business system are divided into initialization resource files and other resource files except the initialization resource files. Among them, the initialization resource files are placed in the local warehouse, and other resource files may be placed in the remote warehouse or the local warehouse. In this way, even in the case of insufficient stability of the remote warehouse, the initialization resource files stored in the local warehouse are sufficient to support the business system to complete the initialization, rather than being unable to obtain any resource files as in the existing hot deployment solution. It can be seen that the resource file management solution of the embodiment of the present application can effectively improve the overall stability of the business system. In addition, the resource files are all obtained in real time by the business system during operation, which simplifies the resource maintenance process and enhances the maintainability and scalability of the system.

[0084] Based on the above embodiments, other resource files can be deployed in the local warehouse or remote warehouse as needed, and this setting can be modified at any time. The embodiment of the present application takes the resource localization operation as an example for explanation. The embodiment of the present application also includes the following steps: receiving a resource localization operation initiated by a user; determining the cloud resource identifier indicated by the resource localization operation; obtaining the target cloud resource from the remote warehouse based on the cloud resource identifier; and storing the target cloud resource in the local warehouse.

[0085] Specifically, if the target cloud resource has been stored in a remote warehouse, and the user needs to frequently obtain this target cloud resource recently, and therefore hopes to localize it, it can be synchronized and stored from the remote warehouse to the local warehouse by initiating a resource localization operation. Specifically, when a resource localization operation is received, the target cloud resource can be obtained from the remote warehouse through the cloud resource identifier indicated by the resource localization operation, and the target cloud resource can be stored in the local warehouse. It should be noted that each resource file stored in the local warehouse needs to maintain consistency with the corresponding resource file in the remote warehouse.

[0086] On the basis of the foregoing embodiments, in some specific implementations, the client or the user using the client will initiate a modification operation on the acquired target resource file as needed. In order to ensure data consistency between the local warehouse and the remote warehouse, each resource file stored in the local warehouse also needs to be stored in the remote warehouse. In this business scenario, the embodiment of the present application also includes the following steps: if the target resource file is obtained from the local warehouse, then in response to the modification operation on the target resource file, the target resource file in the local warehouse is replaced with the modified target resource file; according to the resource synchronization instruction, the cloud resource file indicated by the target resource identifier in the remote warehouse is replaced with the modified target resource file indicated by the target resource identifier in the local warehouse, and the resource synchronization instruction includes the target resource identifier.

[0087] Specifically, if the target resource file obtained from the local warehouse is modified, it is first necessary to replace the target resource file in the local warehouse with the modified target resource file, that is, adjust the resource file indicated by the target resource identifier in the local warehouse to the modified target resource file. On this basis, when a resource synchronization instruction for the target resource file (or a resource synchronization instruction containing the target resource identifier) ​​is received, it is necessary to perform an operation similar to that of the local warehouse, that is, adjust the resource file indicated by the target resource identifier in the remote warehouse to the modified target resource file. Among them, the resource synchronization instruction refers to completing the synchronization of data consistency between the local warehouse and the remote warehouse.

[0088] It should be noted that the synchronization of corresponding resource files between the local warehouse and the remote warehouse can be achieved through incremental synchronization, full synchronization or any other synchronization method. It is only necessary to ensure that the corresponding resource files between the local warehouse and the remote warehouse remain consistent after synchronization.

[0089] It is understandable that the resource synchronization instruction for the target resource file can be indirectly triggered by the resource synchronization instruction for the business system, or directly triggered when the resource file indicated by the target resource identifier changes, which is not limited in the embodiments of the present application.

[0090] Furthermore, in some specific implementations, the resource synchronization instruction can be generated specifically through the following steps: for each resource file in the remote warehouse, the resource identifier of the resource file is determined as the resource identifier to be compared; the cloud resource to be compared indicated by the resource identifier to be compared is obtained from the remote warehouse, and the local resource to be compared indicated by the resource identifier to be compared is obtained from the local warehouse; based on the consistency between the cloud resource to be compared and the local resource to be compared, it is determined whether to generate a resource synchronization instruction including the resource identifier to be compared.

[0091] Specifically, if the resource synchronization instruction is indirectly triggered by a resource synchronization instruction for the business system, then in actual applications, it is not necessary to use each local resource in the local warehouse to replace the corresponding cloud resource in the remote warehouse, because there may be a local resource that has not been modified since its last synchronization. At this time, it is unnecessary to use the local resource to replace the corresponding cloud resource in the remote warehouse, and it will lead to a decrease in the overall resource synchronization efficiency.

[0092] Therefore, the resource identifier of each resource file in the remote warehouse is determined as the resource identifier to be compared, and the cloud resource to be compared indicated by the resource identifier to be compared is obtained from the remote warehouse, and the local resource to be compared indicated by the resource identifier to be compared is obtained from the local warehouse. Finally, through the consistency between the cloud resource to be compared and the local resource to be compared, it can be determined whether the two are consistent. If the two are not consistent, it is necessary to generate a resource synchronization instruction including the resource identifier to be compared, otherwise it is not necessary to generate a resource synchronization instruction including the resource identifier to be compared.

[0093] In actual applications, whether the cloud resources to be compared and the local resources to be compared are consistent can be achieved through any preset difference comparison algorithm, such as a context-based difference comparison algorithm, or a hash value, etc., which is not limited in the embodiments of the present application.

[0094] It should be noted that the difference comparison algorithm preset in the embodiment of the present application can be configured on demand according to the consistency requirements of different resource files. For example, if the key information (configured on demand) in the resource file is consistent, it can be considered that the two are consistent; or if all the contents in the resource file are consistent, it can be considered that the two are consistent. The embodiment of the present application does not limit this.

[0095] Furthermore, the aforementioned step of "replacing the cloud resource file indicated by the target resource identifier in the remote warehouse with the modified target resource file indicated by the target resource identifier in the local warehouse" specifically includes: if the file lock of the cloud resource file in the remote warehouse is obtained, the cloud resource file in the remote warehouse is replaced with the modified target resource file, and the file lock is released after the replacement is completed; if the file lock of the cloud resource file in the remote warehouse is not obtained, wait for the file lock to be released until the file lock is obtained, then replace the cloud resource file in the remote warehouse with the modified target resource file, and release the file lock after the replacement is completed.

[0096] Specifically, a lock mechanism, namely a file lock, is introduced in the embodiment of the present application. Different clients accessing the remote warehouse cannot modify the same cloud resource file at the same time, thereby avoiding data consistency being destroyed. The business systems run by different clients in the embodiment of the present application need to modify the same cloud resource file in sequence to maintain good data consistency. Among them, cloud resource files refer to resource files stored in a remote warehouse. For example, there is only one file lock for each resource file, and each client needs to obtain the file lock to modify the resource file. When the file lock is taken away, the next client that needs to modify the resource file needs to wait for the previous client to complete the resource file modification and release the file lock before it can obtain the file lock and modify it.

[0097] Similarly, the resource files in the local warehouse of the embodiment of the present application can also introduce file locks in accordance with the above method to maintain data consistency, which will not be repeated here.

[0098] In some specific implementations, the resource file management method of the embodiment of the present application can be applied to a hot deployment device, which has a resource access interface, and the client can receive a resource acquisition request sent by the business system through the resource access interface, that is, the client can access the hot deployment device through the resource access interface. Through the unified resource access interface provided by the hot deployment device, the business system requesting resources and the client business do not need to pay attention to the logic of implementing resource file management inside the hot deployment device, and the entire hot deployment device can be provided to any business system for use, which improves the ease of use of the resource file management method of the embodiment of the present application.

[0099] The above describes various implementations of the resource file management method of this application. Figure 3 In a specific business scenario, in the resource file management solution of the embodiment of the present application, the resource update solution that maintains the consistency of local warehouse and remote warehouse resources is shown as follows.

[0100] First, after triggering the resource update, the hot deployment device will establish a remote connection with the remote warehouse. Then, based on the resource identifier to be compared that triggers the resource update, the cloud resource to be compared and the local resource to be compared are obtained. Use the preset difference comparison algorithm to compare the resource version and resource content and other resource information of the two to determine whether there is a difference between the two. If there is no difference between the two, the resource update operation is terminated. If there is a difference between the two, it is necessary to try to obtain a file lock to determine whether other businesses or threads are using this resource, and wait for the resource to be released before updating the warehouse resource. Specifically, if there is a difference between the cloud resource to be compared and the remote resource to be compared, the updated version of the two can also be found out according to the resource versions corresponding to the two for synchronization. For example, if the resource version of the cloud resource to be compared is newer than the resource version of the local resource to be compared, the cloud resource to be compared is synchronized to the local warehouse to replace the local resource to be compared in the local warehouse; if the resource version of the local resource to be compared is newer than the resource version of the cloud resource to be compared, the local resource to be compared is synchronized to the remote warehouse to replace the cloud resource to be compared in the remote warehouse.

[0101] It should be noted that if the resource corresponding to the identifier to be compared is only stored in the remote warehouse, after completing the warehouse resource update, the resource corresponding to the identifier to be compared in the local warehouse needs to be deleted to release the local storage space.

[0102] During the entire hot deployment process, the business system does not need to be restarted. It only needs to obtain the resources corresponding to the identifier to be compared again through the unified interface of the device, and then the latest resources corresponding to the identifier to be compared can be obtained from the local warehouse. At the same time, relying on redundantly deployed remote warehouses, when a remote warehouse fails or is abnormal, it can switch to other remote warehouses to obtain resources. It can be seen that the embodiment of the present application significantly improves the stability and reliability of the resource file management system in a high-concurrency, multi-threaded environment, and provides solid support for the continuous operation of the business system.

[0103] See also Figure 4 , an embodiment of the present application provides a hot deployment device, including:

[0104] The acquisition unit 401 is used to receive a resource acquisition request sent by a business system, where the business system is deployed on a client;

[0105] A determining unit 402 is used to determine a target resource identifier indicated by a resource acquisition request;

[0106] The acquisition unit 401 is further configured to acquire the target resource file from the local repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to the initialization resource file;

[0107] The acquisition unit 401 is further configured to acquire the target resource file from the remote repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, wherein the other resource files refer to resource files other than the initialization resource file;

[0108] The sending unit 403 is used to return the target resource file to the client.

[0109] In a specific implementation, the hot deployment device further includes: a synchronization unit;

[0110] A synchronization unit, configured to replace the target resource file in the local repository with the modified target resource file in response to a modification operation on the target resource file if the target resource file is obtained from the local repository;

[0111] The synchronization unit is also used to replace the cloud resource file indicated by the target resource identifier in the remote warehouse with the modified target resource file indicated by the target resource identifier in the local warehouse according to the resource synchronization instruction, and the resource synchronization instruction includes the target resource identifier.

[0112] In a specific implementation, the determining unit 402 is further configured to determine, for each resource file in the remote repository, a resource identifier of the resource file as a resource identifier to be compared;

[0113] The acquisition unit 401 is further used to acquire the cloud resources to be compared indicated by the resource identifier to be compared from the remote warehouse, and acquire the local resources to be compared indicated by the resource identifier to be compared from the local warehouse;

[0114] The determination unit 402 is further configured to determine whether to generate a resource synchronization instruction including an identifier of the resource to be compared based on the consistency between the cloud resource to be compared and the local resource to be compared.

[0115] In a specific implementation, the synchronization unit is specifically configured to replace the cloud resource file in the remote repository with the modified target resource file if a file lock of the cloud resource file in the remote repository is obtained, and release the file lock after the replacement is completed;

[0116] If the file lock of the cloud resource file in the remote warehouse is not obtained, wait for the file lock to be released. After the file lock is obtained, replace the cloud resource file in the remote warehouse with the modified target resource file, and release the file lock after the replacement is completed.

[0117] In a specific implementation, before receiving the resource acquisition request sent by the business system, the hot deployment device further includes: a storage unit;

[0118] The acquisition unit 401 is further used to receive a resource localization operation initiated by a user;

[0119] The determining unit 402 is further used to determine the cloud resource identifier of the resource localization operation instruction;

[0120] The acquisition unit 401 is further used to acquire the target cloud resource from the remote warehouse based on the cloud resource identifier;

[0121] The storage unit is used to store the target cloud resources in the local warehouse.

[0122] In a specific implementation, it is applied to a hot deployment device, the hot deployment device has a resource access interface, and the acquisition unit 401 is specifically used to receive a resource acquisition request sent by the business system through the resource access interface.

[0123] Figure 5 It is a schematic diagram of a computer device structure provided in an embodiment of the present application. The computer device 500 may include one or more central processing units (CPU) 501 and a memory 505. The memory 505 stores one or more application programs or data.

[0124] The memory 505 may be a volatile storage or a persistent storage. The program stored in the memory 505 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processing unit 501 may be configured to communicate with the memory 505 and execute a series of instruction operations in the memory 505 on the computer device 500.

[0125] The computer device 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input and output interfaces 504, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0126] The CPU 501 can execute the aforementioned Figures 1 to 4 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.

[0127] It should be noted that, although the steps in the flowcharts involved in the embodiments are drawn in sequence according to the instructions of the arrows, unless otherwise clearly stated in this document, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the embodiments may 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 sequential, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0129] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

[0133] The embodiment of the present application also provides a computer program product including instructions, and when the computer program product is run on a computer, the computer executes the resource file management method as described above.

Claims

1. A resource file management method, characterized in that: include: Receiving a resource acquisition request sent by a business system, where the business system is deployed on a client; Determine the target resource identifier indicated by the resource acquisition request; If the target resource file indicated by the target resource identifier is an initialization resource file, acquiring the target resource file from the local repository based on the target resource identifier; If the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, then obtaining the target resource file from the remote repository based on the target resource identifier, wherein the other resource files refer to resource files other than the initialization resource file; Return the target resource file to the client.

2. The method according to claim 1, characterized in that The method further comprises: If the target resource file is obtained from the local repository, in response to a modification operation on the target resource file, the target resource file in the local repository is replaced with the modified target resource file; According to a resource synchronization instruction, the cloud resource file indicated by the target resource identifier in the remote warehouse is replaced by the modified target resource file indicated by the target resource identifier in the local warehouse, and the resource synchronization instruction includes the target resource identifier.

3. The method according to claim 2, characterized in that The method further comprises: For each resource file in the remote repository, determining the resource identifier of the resource file as the resource identifier to be compared; Acquire the cloud resource to be compared indicated by the resource identifier to be compared from the remote warehouse, and acquire the local resource to be compared indicated by the resource identifier to be compared from the local warehouse; Based on the consistency between the cloud resource to be compared and the local resource to be compared, it is determined whether to generate a resource synchronization instruction including the identifier of the resource to be compared.

4. The method according to claim 2, characterized in that: The replacing the cloud resource file indicated by the target resource identifier in the remote warehouse with the modified target resource file indicated by the target resource identifier in the local warehouse includes: If the file lock of the cloud resource file in the remote warehouse is obtained, the cloud resource file in the remote warehouse is replaced with the modified target resource file, and the file lock is released after the replacement is completed; If the file lock of the cloud resource file in the remote warehouse is not obtained, wait for the file lock to be released, and replace the cloud resource file in the remote warehouse with the modified target resource file after the file lock is obtained, and release the file lock after the replacement is completed.

5. The method according to claim 1, characterized in that Before receiving the resource acquisition request sent by the business system, the method further includes: Receive resource localization operations initiated by users; Determine the cloud resource identifier of the resource localization operation instruction; Acquire a target cloud resource from the remote warehouse based on the cloud resource identifier; The target cloud resource is stored in the local warehouse.

6. The method according to claim 1, characterized in that Applied to a hot deployment device, the hot deployment device has a resource access interface, and the receiving resource acquisition request sent by the business system includes: Receive a resource acquisition request sent by the business system through the resource access interface.

7. A hot deployment device, characterized in that: include: An acquisition unit, configured to receive a resource acquisition request sent by a business system, wherein the business system is deployed on a client; a determining unit, configured to determine a target resource identifier indicated by the resource acquisition request; The acquisition unit is further configured to acquire the target resource file from the local repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to an initialization resource file; The acquisition unit is further configured to acquire the target resource file from the remote repository based on the target resource identifier if the target resource file indicated by the target resource identifier belongs to other resource files and the local repository does not store the target resource file, wherein the other resource files refer to resource files other than the initialization resource file; A sending unit is used to return the target resource file to the client.

8. A computer device, characterized in that: include: CPU, memory and input / output interface; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 6.

9. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.