Resource loading method and device, storage medium and electronic equipment
By subcontracting resource files and directly determining storage space reading, data redundancy and loading performance problems caused by complex dependencies are solved, and efficient resource loading and safe storage are achieved.
Patent Information
- Application Number
- CN202310365362.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Due to complex dependencies when loading resources, the existing technology leads to data redundancy and reduced loading performance, which reduces the update efficiency of the application.
Use the file system to subcontract resource files. Each subcontract stores a set of resource files of a business type. By receiving loading instructions, the storage space of the subcontracted target resource file is determined, and the resource files are directly read and returned to avoid complex dependencies. operate.
It achieves non-redundant resource storage, shortens loading time, reduces memory usage, improves loading performance, and improves storage security.
Smart Images

Figure CN118733136A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, storage medium and electronic device for loading resources. Background Art
[0002] With the rapid development of terminal technology, mobile phones, tablet computers and other terminals are being used more and more frequently. Various applications are usually installed on the terminal. During the update process of some applications, it is necessary to load the target resource file containing the target resource to update the application resources; for example, some terminals are installed with game applications. In the game scenario, the game application can load the corresponding target resource file to update the game resources.
[0003] In the related technology, the dependency between resources is based on the resource package to store the resource files of the application. In this storage mode, since multiple resource packages are generated based on the dependency of resource files, in order to ensure the loading integrity of the target resource file, when loading the target resource file, it is necessary not only to load the main part of the target resource file from the target resource package, but also to load the auxiliary part of the target resource file from other resource packages based on the dependency corresponding to the target resource file.
[0004] However, as the number of dependencies between resource packages increases, the management of dependencies becomes more complicated. This way of storing dependencies will cause data redundancy. Furthermore, based on the dependencies, loading the main part of the target resource file and the auxiliary part of the target resource file from different resource packages separately requires longer loading time, which has a negative impact on loading performance and reduces the update efficiency of the application.
[0005] For example: in a game scenario, based on the built-in resource package function of the game engine, to load the target game resource file represented as a cylinder of iron material, it is necessary to first load the first game resource file represented as a cylinder from one resource package, and then load the second game resource file represented as iron material from another resource package based on the dependency relationship corresponding to the target game resource file. When the first game resource file has other dependencies with game resource files in other resource packages, the storage of other dependencies will cause data redundancy in the file system, and the management of the dependencies between various resource packages will also become complicated, resulting in a longer loading time for the target game resource file, which has a negative impact on loading performance. Summary of the invention
[0006] The present application provides a method, device, storage medium and electronic device for loading resources. Based on the file system proposed in the present application, non-redundant storage of resources is achieved to improve the efficiency of loading resources and optimize loading performance.
[0007] In a first aspect, the present application provides a method for loading a target resource file, which is applied to a file system, wherein the file system includes at least one sub-package for storing resource files of a target application, each sub-package being a resource file set of a business type obtained after business logic splitting is performed on the target application, and the method includes:
[0008] Receive at least one loading instruction for updating the target application, each loading instruction is used to instruct to load a target resource file; wherein each time a loading instruction is received, perform the following operations:
[0009] In at least one sub-package, determining a target storage space where a target sub-package to which a corresponding target resource file belongs is located;
[0010] After reading the target resource file in the target storage space, the target resource file is returned to the sending end of the one load instruction.
[0011] In a second aspect, the present application provides a device for loading resources, which is applied to a file system, wherein the file system includes at least one sub-package for storing resource files of a target application, each sub-package being a resource file set of a business type obtained after business logic splitting of the target application, and the device includes:
[0012] A receiving unit receives at least one loading instruction for updating the target application, each loading instruction is used to instruct to load a target resource file; wherein each time a loading instruction is received, the following operations are performed:
[0013] A determination unit, in at least one sub-package, determines a target storage space where a target sub-package to which a corresponding target resource file belongs is located;
[0014] The loading unit returns the target resource file to the sending end of the loading instruction after reading the target resource file in the target storage space.
[0015] Optionally, the target storage space includes at least any one of the following target areas: a target read-only area and a target writable area;
[0016] The loading unit is used to read the target resource file in the target storage space, specifically to:
[0017] If the target resource file is retrieved in the target writable area, the target resource file is read in the target writable area; wherein the target writable area is used to store resource files of updated application versions;
[0018] If the target resource file is not found in the target writable area, the target resource file is read in the target read-only area; wherein the target read-only area is used to store the resource file of the initial application version.
[0019] Optionally, the device also includes a response unit; after determining the target storage space where the target subpackage to which the corresponding target resource file belongs is located in the at least one subpackage, if the target resource file is not retrieved in the target storage space, it is determined that the storage status of the target resource file in the target storage space is abnormal, and response information representing a read error is returned to the sending end of the loading instruction.
[0020] Optionally, each target area stores the following database files: an index database file and at least one resource database file;
[0021] The loading unit is used to read the target resource file in the target writable area, specifically to: determine the target resource database file storing the file content of the target resource file in the index database file in the target writable area; read the target resource file in the target resource database file;
[0022] The loading unit is used to read the target resource file in the target read-only area, specifically to: determine the target resource database file storing the file content of the target resource file in the index database file of the target read-only area; and read the target resource file in the target resource database file.
[0023] Optionally, each resource database file stores: at least one compressed page corresponding to a single resource file;
[0024] The loading unit is used to read the target resource file in the target resource database file, specifically to:
[0025] In the target resource database file, at least one target compressed page corresponding to the target resource file is read; wherein the at least one target compressed page is obtained by dividing the target resource file according to a set file size;
[0026] Decompression operations are performed on the at least one target compressed page respectively to obtain file content of the target resource file.
[0027] Optionally, a subpackage in the file system is identified as an internal package, and the internal package is also used to store special resource files;
[0028] The receiving unit is further configured to, before receiving at least one loading instruction for updating the target application, each loading instruction being used to instruct loading a target resource file, specifically:
[0029] receiving a start instruction for instructing the target application to start updating;
[0030] Based on the startup instruction, the special resource file read in the internal package is returned to the sender of the enable instruction, so that the sender generates at least one loading instruction for updating the target application based on the special resource file.
[0031] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any one of the resource loading methods described in the first aspect is implemented.
[0032] In a fourth aspect, the present application provides a computer storage medium, wherein the computer-readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement any one of the methods for loading resources in the first aspect.
[0033] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer program instructions, which, when executed by a processor, implement any one of the methods for loading resources in the first aspect.
[0034] The beneficial effects of this application are as follows:
[0035] In an embodiment of the present application, a file system is proposed, which includes at least one sub-package, each sub-package is used to store resource files of a target application, and each sub-package is a resource file set of a business type obtained after business logic division of the target application. In this way, the file system does not need to store the dependency relationship between resources, and no redundant data will be generated, thereby realizing non-redundant resource file storage, solving the problem that related storage solutions rely on dependency relationships, resulting in high complexity and high maintenance costs; and the file system can be a relatively independent system, in which each sub-package can also be relatively independent. In other words, this design can realize the opaque storage of the resource files of the target application relative to the outside world, thereby avoiding data leakage and improving the security of storage.
[0036] In addition, a resource loading method applied to the above-mentioned file system is also proposed, in which at least one loading instruction for updating a target application is received, and each loading instruction is used to instruct the loading of a target resource file, wherein each time a loading instruction is received, the following operations are performed: in at least one sub-package, the target storage space where the target sub-package to which the corresponding target resource file belongs is determined, and after reading the target resource file in the target storage space, the target resource file is returned to the sending end of a loading instruction. In this way, since each sub-package in the file system stores a resource file of a business type, when loading the target resource file for the file system, there is no need to perform complex operations based on the dependency relationship between resources, but the target storage space where the target sub-package is located can be directly determined to read the target resource file. Since resource reading does not need to rely on dependency relationships, the loading time can be shortened and the memory consumed by loading can be reduced, thereby achieving an improvement in loading performance.
[0037] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0039] Figure 1 A schematic diagram showing a file system in an embodiment of the present application;
[0040] Figure 2A to Figure 2B A schematic diagram of an optional application scenario in an embodiment of the present application;
[0041] Figure 3A to Figure 3C A schematic diagram of a file system provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of a method flow for resource loading provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of a method flow for loading target game resources provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of a resource loading device provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0047] In the embodiments of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0048] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are first explained.
[0049] Graphical User Interface (GUI) refers to a computer operation user interface that uses graphics to display. In a graphical user interface, users see and operate graphic objects, and computer graphics technology is used.
[0050] In the embodiment of the present application, the graphical user interface can be used to present the storage data of the file system (such as: sub-packets and their storage paths, resource files in the target writable area and their storage paths, resource files in the target read-only area and their storage paths, etc.). Figure 1 As shown, it is a schematic diagram presenting a file system in an embodiment of the present application.
[0051] Cyclic Redundancy Check (CRC) refers to a fast algorithm that generates a short fixed-bit check code based on data such as network data packets or computer files. It is mainly used to detect or check errors that may occur after data transmission or storage.
[0052] In an embodiment of the present application, on the one hand, resource files are stored in the file system, and the stability of their storage can be ensured by a cyclic redundancy check of the resource files; on the other hand, in response to a load instruction, the target resource file in the file system is loaded and returned to the sender of the load instruction, wherein the communication process also involves a cyclic redundancy check.
[0053] The embodiments of the present application relate to Internet technology, mainly to game engine technology.
[0054] Internet technology is an information technology developed on the basis of computer technology. Specifically, Internet technology connects different devices to each other through computer networks, speeds up the transmission of information, broadens the channels for obtaining information, and promotes the development of various different applications.
[0055] Game engine refers to some pre-written editable computer game systems or core components of some interactive real-time graphics applications. Game engine includes the following systems: rendering engine (i.e. "renderer", including 2D graphics engine and 3D graphics engine), physics engine, collision detection system, sound effect, script engine, computer animation, artificial intelligence, network engine and scene management. These systems provide users with various tools needed to write games, with the aim of allowing users to easily and quickly make game programs.
[0056] Unity game engine refers to a real-time 3D (3-Dimensions, three-dimensional graphics) interactive content creation and operation platform. All users, including game development, art, architecture, automotive design, film and television, use Unity to turn their ideas into reality. The Unity platform provides a complete set of software solutions that can be used to create, operate and realize any real-time interactive 2D (2-Dimensions, two-dimensional graphics) and 3D content, and supports platforms including mobile phones, tablets, PCs, game consoles, augmented reality and virtual reality devices.
[0057] The AssetBundle function is a built-in resource storage function of the Unity game engine. In this function, each AssetBundle is a compressed package file containing models, textures, prefabs, sounds, and even the entire scene, which can be loaded when the game is running. In addition, the AssetBundle itself stores the mutual dependencies; for example, the material resources in AssetBundle A can reference (that is, depend on) the texture resources in AssetBundle B.
[0058] The following is a brief introduction to the design concept of the embodiments of the present application.
[0059] Currently, in order to update the game application, it is usually based on the Unity game engine and uses the built-in AssetBundle function of the Unity game engine to complete the loading of the target resource file.
[0060] The key design of the AssetBundle function is to treat each AssetBundle as a complete and usable resource package. If a resource A is included in an AssetBundle, then the resources that resource A depends on need to be included in the same AssetBundle.
[0061] The problem caused by this is that when resources in two different AssetBundles use the same shared resource, resource redundancy will occur.
[0062] For example, AssetBundleA contains the first game resource file A.prefab (prefab is a recognizable prefab file applied to Unity), and AssetBundleB contains the second game resource file B.prefab. Both A.prefab and B.prefab depend on the third game resource file C.mat (mat is a recognizable material file applied to Unity). The Unity game engine will perform redundant processing on the third game resource file C.mat to ensure that AssetBundleA and AssetBundleB each store a copy of the third game resource file C.mat. This results in data redundancy and waste of storage space. This storage method in turn affects the efficiency of loading resources and has a negative impact on loading performance.
[0063] Furthermore, the inventors discovered through creative work that in the related technologies, the core of the improvement scheme derived from the AssetBundle function is still to rely on the dependencies between resources to the AssetBundle. In other words, as the data increases, the management of dependencies becomes tighter and more complex, and loading resources takes more time and occupies more memory.
[0064] In view of this, an embodiment of the present application provides a file system suitable for loading resources, the file system includes at least one subpackage, each subpackage is used to store resource files of a target application, and each subpackage is a set of resource files of a business type obtained after business splitting for the target application. This solves the data redundancy problem caused by storage dependencies in related technologies, realizes non-redundant storage, and can reduce the complexity of storage. In addition, the file system can be isolated from the external environment and improve the security of data storage.
[0065] Based on the above file system, the embodiment of the present application also provides a method for loading resources, in which at least one loading instruction for updating a target application is received, and the loading instruction is used to instruct the loading of a target resource file. Then, each time an instruction is received, the target storage space where the target subpackage to which the corresponding target resource file belongs is determined in the file system, and after reading the target resource file in the target storage space, the target resource file is returned to the sending end of the loading instruction. Since the file system implements non-redundant storage, based on the file system, the loading time for the target resource file can be shortened, the memory space occupied by the loading can be reduced, and the loading performance can be optimized.
[0066] The following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0067] The solution provided in the embodiment of the present application can be applied to most scenarios involving resource loading, such as loading game resources, etc. Figure 2A As shown, it is a schematic diagram of an application scenario provided by an embodiment of the present application. In this scenario, a terminal device 210 and a server 220 may be included.
[0068] The terminal device 210 may be, for example, a mobile phone, a tablet computer (PAD), a laptop computer, a desktop computer, a smart TV, a smart vehicle-mounted device, and a smart wearable device. The terminal device 210 may be installed with or connected to an application that can perform resource updates; for example, a game application that performs game updates. The game application involved in the embodiment of the present application may be implemented based on a game engine (such as the Unity game engine, etc.). The server 220 is a background server corresponding to the file system for storing resource files of the application, and does not limit the storage form of the file system.
[0069] The server 220 may be a background server corresponding to the file system where the resource files of the application installed or downloaded on the terminal device 210 are located, which may implement the function of storing data (such as storing the resource files of the application, etc.), and read the target resource files from the file system according to the loading instruction to implement the steps of the resource loading method provided in the embodiment of the present application. For example, it may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, i.e., content delivery networks (CDNs), as well as big data and artificial intelligence platforms, but is not limited thereto.
[0070] The method for loading resources provided in the embodiment of the present application can be executed by the terminal device 210 or the server 220, or can also be executed by the combination of the terminal device 210 and the server 220. The terminal device 210 or the server 220 may include one or more processors, a memory, and an I / O interface for interacting with the terminal. In addition, the terminal device 210 or the server 220 may also be configured with a database, or interact with the server 220 configured with a database, and the database may be used to store preset component nodes and component tree disassembly records, etc. Among them, the program instructions of the method for loading resources provided in the embodiment of the present application may also be stored in the memory of the terminal device 210 or the server 220, and these program instructions can be used to implement the steps of the method for loading resources provided in the embodiment of the present application when executed by the processor, so as to realize the non-redundant storage of the application and optimize the loading performance of the loaded resources.
[0071] Specifically, the solution provided in the embodiments of the present application can also be applied to most application scenarios of loading resources suitable for application updates.
[0072] like Figure 2B As shown, it is a schematic diagram of a scenario of loading resources for application update provided in an embodiment of the present application. In this scenario, the server 220 is used as the storage physical space corresponding to the file system for storing the resource files of the target application, and the terminal device 210 is used as the subject for interacting with the user by installing or downloading the target application; the user can use the target application on the terminal device 210, and trigger the update instruction of the target application so that the data analysis module, in response to the update module, generates at least one loading instruction for loading the target resource file, and sends it to the server 220 in sequence, and then the server loads the corresponding target resource files in sequence according to the corresponding received loading instructions, and returns them to the terminal device 210, so that the terminal device 210 implements the update of the target application.
[0073] In one embodiment, the application scenario may be an update scenario for loading resources of a game application. Taking a target game application based on the Unity game engine as an example, in this scenario, the terminal device is used to run the target game application implemented based on the Unity game engine, and the server corresponds to a file system, which is used to store game resource files of the target game application. Then: the terminal device responds to the update operation triggered for the target game application, starts the initialization resources of the Unity game engine, analyzes the target resource files and their corresponding loading order required to load the target game application for updating the target game application through the Unity game engine, generates at least one loading instruction for loading the target resources, and then, the server enables the file system when it receives the loading instruction for the first time, and reads the corresponding target resource files from the file system based on the loading instructions received in sequence, and returns them to the terminal device for updating the target game application.
[0074] It should be noted that in the update scenario of the above-mentioned target game application, the Unity game engine can determine the target resource files to be loaded and their corresponding order according to the corresponding update instructions, thereby realizing the automation of loading and updating, which is also applicable in the hot update scenarios of some target game applications.
[0075] In addition, since the Unity game engine can analyze the target resource files to be loaded, in the actual loading process, a target resource file can be directly loaded according to a loading instruction, avoiding the loading of the target resource file according to the complex dependency relationship in the file system in the related technology; for example, after loading game resource file A (ie: game resource A), based on the dependency of game resource A on game resource B, game resource file B (ie: game resource B) is read. As the amount of data stored in the file system increases, the management of dependent resources becomes very complicated, which has a negative impact on the loading performance of the target resource file.
[0076] In addition, the present application also provides a storage optimization solution for a file system in an embodiment, which is used to solve the problems of storage redundancy, memory occupation or poor loading performance caused by the above-mentioned storage dependencies. In this storage optimization solution, the resource files of the target application are logically split and stored in at least one sub-package according to the business type. In this way, each sub-package is independent of each other, and there is no need to store the dependencies that may exist between resources in different sub-packages. Furthermore, since the dependencies are not stored, storage space can be saved, and the problem of occupying the running memory due to analyzing the dependencies, which in turn affects the loading performance, can be avoided.
[0077] It should be noted that the file system provided in the embodiment of the present application can be applicable to all resource files of the target application to be updated, especially in the scenario based on the Unity game engine. Compared with the built-in AssetBundle function of the Unity game engine, this file system can achieve independent storage, which is opaque to the outside world, and avoids cracking the Unity game engine and causing the leakage of resource files of the stored target application based on its built-in AssetBundle function. Of course, the file system provided in the embodiment of the present application can provide an interface to connect with the Unity game engine, or it can be placed in the Unity game engine. Different logics are used for the implementation of this file system and the Unity game engine. Even if it is placed inside, it is relatively independent of the Unity game engine itself, so it is not easy to crack, which improves security. The architecture of the file system and the functions that can be achieved will be described together in the subsequent method embodiments, so I will not go into details here.
[0078] The terminal device 210 and the server 220 may be directly or indirectly connected to each other through one or more networks 230. The network 230 may be a wired network or a wireless network, for example, a mobile cellular network or a wireless fidelity (Wireless-Fidelity, WIFI) network, or other possible networks, which are not limited in the embodiment of the present invention.
[0079] It should be noted that in the embodiment of the present application, the number of terminal devices 210 can be one or more, and similarly, the number of servers 220 can be one or more, that is, there is no limitation on the number of terminal devices 210 or servers 220.
[0080] In a possible application scenario, in order to reduce the communication delay of retrieval, servers 220 can be deployed in various regions, or for load balancing, different servers 220 can serve terminal devices 210 in different regions respectively. For example, the terminal device 210 is located at location a and establishes a communication connection with the server 220 serving location a; the terminal device 210 is located at location b and establishes a communication connection with the server 220 serving location b. Multiple servers 220 form a data sharing system to achieve data sharing through blockchain.
[0081] Each server 220 in the data sharing system has a node identifier corresponding to the server 220. Each server 220 in the data sharing system can store the node identifiers of other servers 220 in the data sharing system, so that the generated blocks can be broadcast to other servers 220 in the data sharing system according to the node identifiers of other servers 220. A node identifier list can be maintained in each server 220, and the server 220 name and the node identifier are stored in the node identifier list accordingly. The node identifier can be an Internet Protocol (IP) address for interconnection between networks and any other information that can be used to identify the node.
[0082] Of course, the method provided in the embodiment of the present application is not limited to Figure 2A or Figure 2B The application scenarios shown can also be used in other possible application scenarios, and the embodiments of the present application are not limited thereto. Figure 2A or Figure 2B The functions that can be implemented by each device in the application scenario shown will be described in the subsequent method embodiments, and will not be described in detail here.
[0083] In the following, the system architecture and method flow provided in each embodiment of the present application are described separately in conjunction with the accompanying drawings, wherein the method flow can be Figure 2A or Figure 2B The process may be executed by the server 220 or the terminal device 210, or may be executed by the terminal device 210 and the server 220 together. The following mainly takes the execution by the terminal device 210 as an example for introduction.
[0084] See also Figure 3A , which is a schematic diagram of a file system provided in an embodiment of the present application.
[0085] Specifically, the storage space occupied by the file system is shown by the outer dotted line. In the file system, several sub-packages can be stored, wherein at least one sub-package is used to store the resource files of the target application, and each sub-package stores a set of resource files of a business type. Figure 3A In the file system shown, after the business logic of the target application is decomposed, 5 sub-packages are obtained. There is no specific limit on the number of sub-packages here; accordingly, the storage space occupied by the file system is divided, and 5 Virtual Packages are used to store these 5 sub-packages respectively.
[0086] For a single subpackage Package, it can be divided into a basic subpackage Prime Package and an updated subpackage OverridePackage. Correspondingly, the storage space where a single subpackage Package is located can be divided into a read-only area where the basic subpackage PrimePackage is located and a writable area where the updated subpackage Override Package is located.
[0087] The above-mentioned basic sub-package Prime Package is stored in the read-only area of the device, which is used to store the initial resource files of the target application (such as: resource files of the initial application version). The initial resource files can be partial resource files; for example, in Android's APK (full name: Android Application Package) or IOS (mobile operating system developed by Apple), it is used to put the initial resource files into the application package for downloading, etc.
[0088] The above-mentioned update sub-package Override Package is stored in a writable area of the device, which is used to store the update resource files of the target application. The update resource files can be partial resource files of the target application, which are used to update the initial resource files to update the target application, or directly used to update the target application; for example, on an Android memory card (Memory Card, SD card), it is used to download resource files within the target application, and to perform differential updates on downloaded resource files.
[0089] It should be noted that the storage areas where the above-mentioned Prime Package and Override Package are located respectively store actual resource files of the target application, and these resource files can be read and written by the business side under corresponding conditions.
[0090] In addition, the above-mentioned Prime Package is not necessary. Figure 3A In the Package4 (subpackage 4) and Package5 (subpackage 5) shown, it can be seen that only the subpackage Override Package is updated in the aforementioned two subpackages. In other words, when the target application is split to form Package1 (subpackage 1), Package2 (subpackage 2) and Package3 (subpackage 3), Package4 (subpackage 4) and Package5 (subpackage 5) have not yet been generated. In the future, further updates are required to the target application (such as: modifying the resource files stored in the file system based on business-side reading and writing), and the business type of the resource files to be stored does not match the existing Package1 (subpackage 1), Package2 (subpackage 2) and Package3 (subpackage 3), then Package4 (subpackage 4) or Package5 (subpackage 5) is created according to the business type of the resource files to be stored.
[0091] As an example, see Figure 3B As shown, it is a schematic diagram of the file system in the embodiment of the present application, taking the storage of the target game application as an example, wherein Package1 (subpackage 1) is used to store the game resource files of the character type in the target game application, and Package2 (subpackage 2) is used to store the game resource files of the item type in the target game application; when the file system receives a storage instruction, and the storage instruction indicates the storage of the game resources of the language type (such as Chinese, English, Japanese, etc.) in the target game application, then Package3 (subpackage 3) is required to store it, and store it in the update subpackage OverridePackage, and there is no basic subpackage Prime Package in the Package3 (subpackage 3). Of course, if the aforementioned storage instruction indicates the storage of the resource files of the character type or language type in the target game application, it can be directly stored in the update subpackage Override Package in Package1 (subpackage 1) or Package2 (subpackage 2).
[0092] Furthermore, for a single sub-package (such as: Prime Package, OverridePackage), each sub-package can be a folder on the hard disk, the name of the folder is the name of the sub-package, and each folder contains multiple database files (DB files). In other words, for the area where a single sub-package is located (such as: read-only area, writable area), multiple database files are stored in each area.
[0093] The above-mentioned multiple database files may include: an index database file (Node DB) and at least one resource database file (File DB).
[0094] Among them, a single area generally includes an index database file, which is used to store index information of at least one resource database file in the single area. The index information may include: the file name of at least one resource database file, the file size of at least one resource database file, the cyclic redundancy check of at least one resource database file, and the file hierarchy structure of at least one resource database file.
[0095] The resource database file is used to store the contents of resource files. A single resource database file stores: at least one compressed page corresponding to a single resource file. In other words, a single resource file can be divided into multiple pages based on a preset file size. In order to save storage space and optimize subsequent loading performance, multiple pages are compressed separately, and each compressed page is stored in a resource database file.
[0096] It should be noted that in the design of the database file, in order to improve the performance of subsequent loading, querying and IO (Input / Output), the structure of the B+ tree (data structure) can be adopted, that is, a single index database file or a single resource database file is implemented using the structure of the B+ tree. Specifically, the leaf nodes on the B+ tree are used to store keywords and the addresses of the corresponding records, and the layers above the leaf nodes are used as indexes, which will not be described in detail here.
[0097] Furthermore, in order to ensure the normal operation of the file system and normal interaction with the outside world, a Virtual Package needs to be specified in the file system as an internal package to store the corresponding resource files. In addition, the aforementioned designation method is not limited here, and it can be specified according to preset rules or randomly specified. Accordingly, the specified VirtualPackage is also called an internal package, which is used to store at least some specified special resources and can also be used to store resource files of the target application.
[0098] Specifically, the internal package is used to store special resource files, which may include at least: resource files of non-application files required for application file startup or update, internal resource files required for file system activation or operation, and resource files that can be loaded when application file startup or update is required.
[0099] The following uses a game application as an example to explain the role of the internal package. For example, in the game process, before executing the resource package download or update logic on the business side of the game application, it is necessary to start the corresponding game engine and display the corresponding resource update interface to the user. The resource files required to execute the aforementioned startup step or display step are stored in the internal package.
[0100] What is needed is that, in addition to storing the above-mentioned special resource files, the internal package is no different from other sub-packages, and the internal package can include an update sub-package Override Package, so the above-mentioned special resource files can also realize resource updates.
[0101] As an example of an internal package, see Figure 3C As shown, it is a schematic diagram of the file system provided in the embodiment of the present application, in which subpackage 1 is designated as an internal package, its name is defined as "Internal", and subpackage 2 is named "1001" and subpackage 3 is named "1002". It can be seen that: the basic subpackage Prime Package in "Internal" includes 4 database files (such as: index database file "Internal.db" and 3 resource database files "Internal_0.db, Internal_1.db, Internal_2.db"); the update subpackage Override Package in "Internal" includes 4 database files (such as: index database file "Internal.db" and 3 resource database files "Internal_0.db, Internal_1.db, Internal_2.db"); that is, the database files stored in the storage space where "Internal" is located have the same name as its name, and are distinguished by the following table of numbers. Of course, there is no specific limitation on this.
[0102] To summarize, the design concept of a file system provided by an embodiment of the present application is explained, and the file system includes at least one subpackage for storing resource files of a target application, and each subpackage is a set of resource files of a business type obtained after business logic splitting of the target application, thereby realizing independent storage between each subpackage. For example: in the scenario applied to the Unity game engine, compared with the built-in AssetBundle function of the Unity game engine, the embodiment of the present application proposes that there is no dependency between the subpackages in the file system, so the file system can realize non-redundant storage of resource files.
[0103] In addition, the file system proposed in the present application describes a storage structure, for example, how resource files are stored as files on a computer's physical disk; and how resource files become storage files on a computer's physical disk. For example, the above-mentioned resource files are compressed, paging, and packaging mechanisms, and then become files at the computer operating system level, and then storage operations in the operating system are performed on the file, and the file is written to the computer's physical disk for storage.
[0104] The following further describes a resource loading method provided in an embodiment of the present application in combination with the above-mentioned file system and the accompanying drawings.
[0105] See also Figure 4 The figure is a schematic diagram of the method flow of resource loading provided in an embodiment of the present application. The method is applied to the above-mentioned file system, and the specific steps are as follows.
[0106] Step 400: receiving at least one loading instruction for updating a target application, each loading instruction being used to instruct loading of a target resource file;
[0107] In the embodiment of the present application, a sub-package in the file system is identified as an internal package for storing special resource files. For details, please refer to the description of the file system, which will not be described in detail here.
[0108] In one embodiment, the terminal device where the file system is located receives a startup instruction for instructing the target application to start updating, and based on the startup instruction, returns the special resource file read in the internal package to the sender of the enablement instruction, so that the sender generates at least one loading instruction for updating the target application based on the special resource file.
[0109] Optionally, the terminal device enables the file system and keeps the file system running in response to the special resource file read in the internal package.
[0110] As an example, in a scenario where a game engine is used, the terminal device where the file system is located receives a startup instruction for instructing the target game application to start updating, and based on the startup instruction, reads a special resource file in the internal package. On the one hand, the special resource file is sent to the sending end of the startup instruction so that the sending end starts the game engine, and based on the game engine, presents the resource update interface of the target game application at the sending end of the startup instruction, and loads the resource files required for enabling the target game application. On the other hand, the terminal device loads the special resource file to enable the internal resource files required by the file system itself.
[0111] In the embodiment of the present application, at least one loading instruction for updating a target application is received, and each loading instruction is used to instruct to load a target resource file; wherein each time a loading instruction is received, the following operations are performed:
[0112] Step 4001: in at least one sub-package, determine a target storage space where a target sub-package to which a corresponding target resource file belongs is located;
[0113] In an embodiment of the present application, the above-mentioned determination operation can be obtained by traversing each subpackage of the target application for the file system, or it can be determined according to a preset comparison table to determine the target storage space where the target subpackage to which the target resource file belongs is located, wherein the preset comparison table can be designed according to the business type; for example, taking the target game application as an example, the preset comparison table records the correspondence relationship 1 between subpackage 1 and the character type, and the correspondence relationship 2 between subpackage 2 and the language type. Then, when the target resource file to be loaded corresponds to the character category, it can be determined that it belongs to the target storage space where subpackage 1 is located.
[0114] Step 4002: After reading the target resource file in the target storage space, the target resource file is returned to a sending end of a load instruction.
[0115] In the embodiment of the present application, the target storage space includes at least any one of the following target areas: a target read-only area and a target writable area, wherein the target writable area is used to store resource files of the updated application version, and the target read-only area is used to store resource files of the initial application version.
[0116] Specifically, if the target resource file is retrieved in the target writable area, the target resource file is read in the target writable area; if the target resource file is not retrieved in the target writable area, the target resource file is read in the target read-only area.
[0117] As an example, after the target storage space is determined, there are two situations with a time sequence relationship. In the first situation, it is determined whether there is a target writable area in the target storage space. When there is no target writable area, the second situation will occur, that is, further searching for the target resource file in the target writable area of the target storage space. It is easy to know that most of the resource files required for the update of the target application are the resource files of the latest application version. Most of these resource files are stored in the target writable area. Therefore, searching the target writable area first can reduce the events required to load resources and improve the efficiency of loading resources.
[0118] Further, according to the description of the file system, each target area stores the following database files: an index database file and at least one resource database file. For the above situation one, the target resource file is retrieved from the target writable area, which can be specifically, in the index database file of the target writable area, the target resource database file storing the file content of the target resource file is determined, and then the target resource file is read from the target resource database file. For the above situation two, the target resource file is retrieved from the target read-only area, which can be specifically, in the index database file of the target read-only area, the target resource database file storing the file content of the target resource file is determined, and then the target resource file is read from the target resource database file.
[0119] The index information in the above index database file includes at least: the file name of at least one resource database file, the file size of at least one resource database file, the cyclic redundancy check of at least one resource database file, and the file hierarchy structure of at least one resource database file.
[0120] The above-mentioned resource database file stores: at least one compressed page corresponding to a single resource file, and at least one target compressed page is obtained by dividing the target resource file according to the set file size. Then, the target resource file is read in the target resource database file. Specifically, in the target resource database file, at least one target compressed page corresponding to the target resource file is read, and then the at least one target compressed page is decompressed respectively to obtain the file content of the target resource file.
[0121] It should be noted that each of the above resource database files is stored in the corresponding target area using a tree data structure; for example, a B+ tree data structure.
[0122] In one embodiment, if the target resource file is not retrieved in the target storage space, it is determined that the storage status of the target resource file in the target storage space is abnormal, and response information representing the read error is returned to the sender of a loading instruction to avoid problems such as failure to update the target application due to failure to read the target resource file.
[0123] In summary, the embodiment of the present application provides a file system that realizes non-redundant storage of resource files, which is suitable for game engines and is used to solve the problems of high complexity, high maintenance cost, and poor security in related technologies based on built-in solutions such as the Unity game engine. The file system is applied to update scenarios of applications such as game applications, and has made significant progress in performance indicators such as update download volume and CDN (Content Delivery Network) pressure, and helps to ensure the stability of updated versions of applications. In the process of loading resources, the loading time, memory peak and loading performance are significantly improved. In addition, based on the file system, complete autonomy of storage can be achieved, which has the characteristics of being opaque to the outside world, and is difficult to crack, which can bring better security.
[0124] In a specific implementation scenario, taking loading a game resource file as an example, when the game is running, the target game resource file needs to be loaded, then based on the game engine, a corresponding loading instruction of the file is issued to the file system, see Figure 5 The figure shows a flowchart of loading game resources, which is as follows.
[0125] Step 501: receiving a loading instruction for loading a target game resource file, and determining a target storage space where a subpackage to which the target game resource file belongs is located.
[0126] The above sub-package may be a virtual program package, which will not be described again.
[0127] Step 502: Determine whether a target game resource file exists in a target writable area of a target storage space.
[0128] The target writable area stores: an index database file and at least one resource database file.
[0129] In the embodiment of the present application, if it is determined that the target game resource file exists in the target writable area, step 503 is executed; if it is determined that the target game resource file does not exist in the target writable area, step 506 is executed.
[0130] Step 503: Read the file size of the target game resource file from the index database file in the target writable area.
[0131] In the embodiment of the present application, the above-mentioned index database file can store the file name, file size, cyclic redundancy check and file hierarchy structure of the target game resource file, which will not be repeated here.
[0132] Step 504: Based on the file size of the target game resource file, read at least one target compressed page corresponding to the target game resource file from the resource data file in the target writable area.
[0133] In the embodiment of the present application, the at least one target compressed page is obtained by dividing the target game resource file according to the set file size.
[0134] Step 505: Decompress at least one target compressed page to obtain corresponding page data, and then obtain the file content of the target game resource file from the page data.
[0135] In the embodiment of the present application, at least one target compressed page is first decompressed, and then the corresponding page data is decompressed to obtain the file content.
[0136] Step 506: Determine whether the target game resource file exists in the target read-only area of the target storage space.
[0137] The target read-only area stores: an index database file and at least one resource database file.
[0138] In the embodiment of the present application, if it is determined that the target game resource file exists in the target read-only area, step 507 is executed; if it is determined that the target game resource file does not exist in the target read-only area, step 509 is executed.
[0139] Step 507: Read the file size of the target game resource file from the index database file in the target read-only area.
[0140] In the embodiment of the present application, the above-mentioned index database file can store the file name, file size, cyclic redundancy check and file hierarchy structure of the target game resource file, which will not be repeated here.
[0141] Step 508: Based on the file size of the target game resource file, read at least one target compressed page corresponding to the target game resource file from the resource data file in the target writable area.
[0142] In the embodiment of the present application, the at least one target compressed page is obtained by dividing the target game resource file according to the set file size.
[0143] Step 509: Determine that the storage status of the target game resource file in the target storage space is abnormal.
[0144] In the embodiment of the present application, after determining that the storage state is abnormal, response information indicating a read error may also be returned to the sending end of the load instruction.
[0145] In summary, the embodiment of the present application proposes to apply the design concept of the file system to the scenario of updating game applications. Since the dependencies between game resources are not stored in the file system, the loading time of the target game resource file is shortened and the loading efficiency is improved. In addition, since the storage space where each sub-package is located in the file system is designed with a writable area and a read-only area, it is used to distinguish resource files of different game versions of the same business type, and then the design of preferentially retrieving the writable area can speed up the efficiency of the target game resource file in the game update scenario. In addition, what is actually loaded from the file system is at least one compressed page corresponding to the target game resource file, so that the loading performance is further optimized.
[0146] See also Figure 6 As shown, based on the agreed inventive concept, the embodiment of the present application further provides a device 600 for loading resources, which is applied to a file system. The so-called file system includes at least one sub-package for storing resource files of a target application. Each sub-package is a resource file set of a business type obtained after business logic splitting of the so-called target application. The so-called device 600 includes:
[0147] The receiving unit 601 receives at least one loading instruction for updating a so-called target application, each loading instruction being used to instruct to load a target resource file; wherein each time a loading instruction is received, the following operations are performed:
[0148] A determination unit 6011 determines, in at least one sub-package, a target storage space where a target sub-package to which a corresponding target resource file belongs is located;
[0149] The loading unit 6013, after reading the so-called target resource file in the so-called target storage space, returns the so-called target resource file to the so-called sending end of a loading instruction.
[0150] Optionally, the so-called target storage space includes at least any one of the following target areas: a target read-only area and a target writable area;
[0151] The so-called loading unit 6013 is used to read the so-called target resource file in the so-called target storage space, specifically used to:
[0152] If the so-called target resource file is retrieved in the so-called target writable area, then the so-called target resource file is read in the so-called target writable area; wherein the so-called target writable area is used to store resource files of updated application versions;
[0153] If the so-called target resource file is not retrieved in the so-called target writable area, the so-called target resource file is read in the so-called target read-only area; wherein the so-called target read-only area is used to store the resource file of the initial application version.
[0154] Optionally, the so-called device 600 also includes a response unit 6012, which is used to determine the target storage space where the target subpackage to which the corresponding target resource file belongs is located in at least one subpackage. If the so-called target resource file is not retrieved in the so-called target storage space, it is determined that the storage status of the so-called target resource file in the so-called target storage space is abnormal, and return response information representing a read error to the sending end of the so-called loading instruction.
[0155] Optionally, each target area stores the following database files: an index database file and at least one resource database file;
[0156] The so-called loading unit 6013 is used to read the so-called target resource file in the so-called target writable area, specifically to: determine the target resource database file storing the file content of the so-called target resource file in the index database file in the so-called target writable area; read the so-called target resource file in the so-called target resource database file;
[0157] The so-called loading unit 6013 is used to read the so-called target resource file in the so-called target read-only area, and is specifically used to: determine the target resource database file storing the file content of the so-called target resource file in the index database file of the so-called target read-only area; and read the so-called target resource file in the so-called target resource database file.
[0158] Optionally, each resource database file stores: at least one compressed page corresponding to a single resource file;
[0159] The so-called loading unit 6013 is used to read the so-called target resource file in the so-called target resource database file, specifically used to:
[0160] In the so-called target resource database file, at least one target compressed page corresponding to the so-called target resource file is read; wherein the so-called at least one target compressed page is obtained by dividing the so-called target resource file according to a set file size;
[0161] Decompression operations are performed on the so-called at least one target compressed page to obtain the file content of the so-called target resource file.
[0162] Optionally, a subpackage in the so-called file system is identified as an internal package, and the so-called internal package is also used to store special resource files;
[0163] The so-called receiving unit 601 is further used for, before receiving at least one loading instruction for updating the so-called target application, each loading instruction is used to instruct to load the target resource file, specifically for:
[0164] receiving a start instruction for instructing a so-called target application to start updating;
[0165] Based on the so-called startup instruction, the so-called special resource file read in the so-called internal package is returned to the sender of the so-called enable instruction, so that the so-called sender generates at least one loading instruction for updating the so-called target application based on the so-called special resource file.
[0166] In the above device, a file system is proposed, which includes at least one sub-package, each sub-package is used to store the resource files of the target application, and each sub-package is a resource file set of a business type obtained after the business logic division of the target application. In this way, the file system does not need to store the dependency relationship between resources, and no redundant data will be generated, thereby realizing non-redundant resource file storage, solving the problem that the related storage scheme relies on the dependency relationship, resulting in high complexity and high maintenance cost; and the file system can be a relatively independent system, in which each sub-package can also be relatively independent. In other words, this design can realize the opaque storage of the resource files of the target application relative to the outside world, thereby avoiding data leakage and improving the security of storage.
[0167] In addition, a resource loading method applied to the above-mentioned file system is also proposed, in which at least one loading instruction for updating a target application is received, and each loading instruction is used to instruct the loading of a target resource file, wherein each time a loading instruction is received, the following operations are performed: in at least one sub-package, the target storage space where the target sub-package to which the corresponding target resource file belongs is determined, and after reading the target resource file in the target storage space, the target resource file is returned to the sending end of a loading instruction. In this way, since each sub-package in the file system stores a resource file of a business type, when loading the target resource file for the file system, there is no need to perform complex operations based on the dependency relationship between resources, but the target storage space where the target sub-package is located can be directly determined to read the target resource file. Since resource reading does not need to rely on dependency relationships, the loading time can be shortened and the memory consumed by loading can be reduced, thereby achieving an improvement in loading performance.
[0168] The device can be used to execute the methods shown in the various embodiments of the present application. Therefore, for the functions that can be implemented by the various functional modules of the device, reference can be made to the description of the aforementioned embodiments and no further details will be given.
[0169] See also Figure 7 As shown, based on the same technical concept, the embodiment of the present application also provides a computer device 700, which can be Figure 2A or Figure 2B As shown in the terminal device or server, the computer device 700 may include a memory 701 and a processor 702 .
[0170] The so-called memory 701 is used to store computer programs executed by the processor 702. The memory 701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the computer device, etc. The processor 702 may be a central processing unit (CPU), or a digital processing unit, etc. The specific connection medium between the above-mentioned memory 701 and the processor 702 is not limited in the embodiments of the present application. The embodiments of the present application are Figure 7 In the embodiment, the memory 701 and the processor 702 are connected via a bus 703. The bus 703 is connected to the processor 702 via a bus 703. Figure 7 The connection between other components is shown by bold lines, and is not intended to be limiting. The so-called bus 703 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0171] The memory 701 may be a volatile memory, such as a random-access memory (RAM); the memory 701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 701 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 701 may be a combination of the above memories.
[0172] The processor 702 is used to execute the method executed by the device in each embodiment of the present application when calling the computer program stored in the so-called memory 701.
[0173] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the so-called program product is run on a computer device, the so-called program code is used to enable the so-called computer device to execute the steps of the method according to the various exemplary implementations of the present application described above in this specification. For example, the so-called computer device can execute the method executed by the device in each embodiment of the present application.
[0174] The so-called program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0175] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0176] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for loading resources, It is characterized in that Applied to a file system, the file system includes at least one sub-package for storing resource files of a target application, each sub-package is a resource file set of a business type obtained after business logic splitting of the target application, the method includes: Receive at least one loading instruction for updating the target application, each loading instruction is used to instruct to load a target resource file; wherein each time a loading instruction is received, perform the following operations: In at least one sub-package, determining a target storage space where a target sub-package to which a corresponding target resource file belongs is located; After reading the target resource file in the target storage space, the target resource file is returned to the sending end of the one load instruction.
2. The method according to claim 1, It is characterized in that The target storage space includes at least any one of the following target areas: a target read-only area and a target writable area; Then, reading the target resource file in the target storage space includes: If the target resource file is retrieved in the target writable area, the target resource file is read in the target writable area; wherein the target writable area is used to store resource files of updated application versions; If the target resource file is not found in the target writable area, the target resource file is read in the target read-only area; wherein the target read-only area is used to store the resource file of the initial application version.
3. The method according to claim 1, It is characterized in that After determining the target storage space where the target subpackage to which the corresponding target resource file belongs is located in the at least one subpackage, the method further includes: If the target resource file is not found in the target storage space, it is determined that the storage state of the target resource file in the target storage space is abnormal, and response information indicating a read error is returned to the sending end of the load instruction.
4. The method according to claim 2, It is characterized in that Each target area stores the following database files: an index database file and at least one resource database file; If the target resource file is retrieved in the target writable area, reading the target resource file in the target writable area includes: Determine, in the index database file of the target writable area, a target resource database file storing the file content of the target resource file; and read the target resource file in the target resource database file; Then, reading the target resource file in the target read-only area includes: In the index database file of the target read-only area, a target resource database file storing the file content of the target resource file is determined; and in the target resource database file, the target resource file is read.
5. The method according to claim 4, It is characterized in that Each resource database file stores: at least one compressed page corresponding to a single resource file; Then, in the target resource database file, reading the target resource file includes: In the target resource database file, at least one target compressed page corresponding to the target resource file is read; wherein the at least one target compressed page is obtained by dividing the target resource file according to a set file size; Decompression operations are performed on the at least one target compressed page respectively to obtain file content of the target resource file.
6. The method according to claim 1, It is characterized in that A subpackage in the file system is marked as an internal package, and the internal package is also used to store special resource files; Then, before receiving at least one loading instruction for updating the target application, each loading instruction is used to instruct to load a target resource file, the method further includes: receiving a start instruction for instructing the target application to start updating; Based on the startup instruction, the special resource file read in the internal package is returned to the sender of the enable instruction, so that the sender generates at least one loading instruction for updating the target application based on the special resource file.
7. A device for loading resources, It is characterized in that Applied to a file system, the file system includes at least one sub-package for storing resource files of a target application, each sub-package is a resource file set of a business type obtained after business logic splitting of the target application, the device includes: A receiving unit receives at least one loading instruction for updating the target application, each loading instruction is used to instruct to load a target resource file; wherein each time a loading instruction is received, the following operations are performed: A determination unit, in at least one sub-package, determines a target storage space where a target sub-package to which a corresponding target resource file belongs is located; The loading unit returns the target resource file to the sending end of the loading instruction after reading the target resource file in the target storage space.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer storage medium, It is characterized in that Computer program instructions are stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising computer program instructions, It is characterized in that When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Systems and methods for updating system-level services within read-only system images
CN105683910A
Page loading method and device
CN108287839A
File loading method and device and readable storage medium
CN111008048A
Application program loading method and device, electronic equipment and readable storage medium
CN111666497A
Resource data processing method and device of application program
CN111722865A
