Application program running method, device, storage medium and electronic device
By using lightweight installation packages and the method of obtaining local running resources on the first server, the problem of large size of existing application installation packages is solved, and the effect of reducing promotion costs and meeting user needs is achieved.
Patent Information
- Application Number
- CN202111659009.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The installation package of existing applications is large in size, resulting in low user download rate and high promotion cost. How to reduce the installation package volume to reduce the negative impact on download rate.
A method of application operation is adopted to install it through a lightweight installation package. The lightweight installation package only contains the necessary resources for the engine and the necessary resources for the user to use, and does not include local operation resources. When the application is called, the local running resource is obtained from the first server, and the loading function is intercepted through the engine interface, and the data loading position is modified to load the resource from the first location.
It effectively reduces the size of the installation package, reduces the promotion cost, and meets the needs of users for local running resources during the application process.
Smart Images

Figure CN114296830B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an application running method, device, storage medium and electronic device. Background Art
[0002] With the development of computer technology, computer-based applications have entered thousands of households. Applications combine entertainment, participation, interactivity, and fun, and are an expansion and supplement to traditional communications, social networking, entertainment, and shopping.
[0003] Normally, users can download the installation package of an application, install the resources in the installation package to the local computer, and then start the application to experience the various functions provided by the application. However, the promotion cost of the application and the user download rate are related to the size of the application installation package itself. Generally speaking, the larger the package, the lower the user download rate, and the higher the corresponding promotion cost.
[0004] It can be seen that how to reduce the negative impact of the installation package size on the application download rate has become an urgent problem to be solved. Summary of the invention
[0005] The embodiments of this specification provide an application running method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0006] The embodiments of this specification adopt the following technical solutions:
[0007] In a first aspect, the present application provides an application program running method, comprising:
[0008] In response to an application wake-up instruction, local running resources are obtained from the first server; wherein the application is obtained after performing an installation operation based on a lightweight installation package, and the lightweight installation package includes the engine necessary resources of the application and the user necessary resources;
[0009] Displaying the initial operation information contained in the necessary resources used by the user;
[0010] Starting the engine of the application according to the necessary resources of the engine to load the local running resources;
[0011] The application is run based on the local running resources.
[0012] In an optional embodiment of the present specification, the method includes at least one of the following:
[0013] The necessary resources of the engine include: engine startup script;
[0014] The user-necessary resources include: images and / or sounds for displaying the initial operation information when the application is invoked;
[0015] The local running resources also include at least one of the following: a code file of the engine and an application code file;
[0016] The package size of the lightweight installation package is between 10 megabytes (MB) and 100 megabytes (MB).
[0017] In an optional embodiment of the present specification, obtaining local operating resources from the first server includes: storing the obtained local operating resources in a local first location.
[0018] In an optional embodiment of the present specification, loading the local running resource includes: loading the local running resource from the first location.
[0019] In an optional embodiment of the present specification, loading the local running resource includes:
[0020] Call the engine interface;
[0021] When the engine interface loads the engine code file, intercepting the first loading function;
[0022] Modify the data loading position of the first loading function to the first position;
[0023] The first loading function is executed to load the code file of the engine from the first location.
[0024] In an optional embodiment of the present specification, loading the local running resource includes:
[0025] When the engine loads the application code file of the application program, intercepting a second loading function;
[0026] Modify the data loading position of the second loading function to the first position;
[0027] The second loading function is executed to load the application code file from the first location.
[0028] In an optional embodiment of this specification, the method further includes:
[0029] Acquire application content resources from the first server and store them in a local second location;
[0030] When the engine loads the application content resource, intercepting a third loading function;
[0031] Modify the data loading position of the third loading function to the second position;
[0032] The third loading function is executed to load the application content resource from the second location.
[0033] In an optional embodiment of the present specification, the method further includes: the application includes a plurality of sub-resources divided according to a preset acquisition order of the application.
[0034] In an optional embodiment of the present specification, obtaining application content resources from the first server includes: sending a first request to the first server; receiving sub-resources returned by the first server in response to the first request; wherein the first request is used to: obtain from the first server a sub-resource among the several sub-resources that is first in the preset acquisition order.
[0035] In an optional embodiment of the present specification, obtaining application content resources from the first server includes: determining a sub-resource used by a login account as a target sub-resource; generating a second request and sending it to the first server; receiving a sub-resource returned by the first server in response to the second request; wherein the second request is used to: obtain a sub-resource from the first server that is after the target sub-resource.
[0036] In an optional embodiment of the present specification, the lightweight installation package is obtained by the following steps:
[0037] Obtaining an application file; wherein the application file includes the necessary resources for the engine, the necessary resources for user use, and the local running resources;
[0038] Extracting the local running resource from the application file;
[0039] Storing the local running resources in the first server;
[0040] Deleting the local running resource from the application file to obtain an intermediate file;
[0041] Adding a specified script to the intermediate file to obtain the lightweight installation package so that the terminal can download and install the application;
[0042] The designated script is used to obtain the local running resources from the first server in response to an application invocation instruction, so as to run the application based on the local running resources.
[0043] In an optional embodiment of the present specification, obtaining the application file includes:
[0044] Obtaining an application engineering file; wherein the application engineering file is the carrier of the application before publishing the application as an installation package corresponding to the system platform;
[0045] The application project file is compiled to obtain an application program file.
[0046] In a second aspect, this specification provides an application running device, the device comprising:
[0047] A local running resource acquisition module is configured to: in response to an application wake-up instruction, acquire local running resources from the first server; wherein the application is obtained after performing an installation operation based on a lightweight installation package, and the lightweight installation package contains the engine necessary resources of the application and the user necessary resources;
[0048] A display module, configured to: display the initial operation information contained in the necessary resources used by the user;
[0049] A startup module configured to: start the engine of the application according to the necessary resources of the engine to load the local running resources;
[0050] The application running module is configured to run the application program based on the local running resources.
[0051] The electronic device provided in this specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above-mentioned application program running method is implemented when the processor executes the program.
[0052] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0053] In the application running method, device, storage medium and electronic device in the embodiments of this specification, the terminal installs the application based on a lightweight installation package. Since the lightweight installation package contains the necessary resources for the engine and the necessary resources for user use, but does not contain local running resources. Among them, the necessary resources for the engine are the resources necessary for starting the engine, and the necessary resources for the engine only need to start the engine, while the local running resources required during the operation of the engine are not included in the necessary resources for the engine, which can effectively reduce the size of the lightweight installation package. Furthermore, the necessary resources for user use are the resources used to generate display information displayed to the user when the application is invoked, and the resources required for the user's subsequent use of the application are not included in the necessary resources for user use, which can further reduce the size of the lightweight installation package. In this specification, when the application is invoked, it will obtain local running resources from the first server to run the application. That is to say, the technical solution in this specification can effectively reduce the size of the installation package on the one hand, and on the other hand, it can also meet the needs of playing users for local running resources in the process of using the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0055] Figure 1 A schematic diagram of a scenario involved in the application program running method provided in the embodiments of this specification;
[0056] Figure 2 A flowchart of a method for running an application program provided in an embodiment of this specification;
[0057] Figure 3 A schematic diagram of a file directory at a certain level of an application file in the application running method provided in an embodiment of this specification;
[0058] Figure 4 A schematic diagram of a flow chart of obtaining a lightweight installation package in the application program running method provided in the embodiment of this specification;
[0059] Figure 5 A schematic diagram of the structure of an application processing device provided in an embodiment of this specification;
[0060] Figure 6 The embodiments of this specification provide corresponding to Figure 2 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0062] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0063] In order to reduce the size of the application installation package and reduce the negative impact of the installation package size on the application download rate, the embodiment of this specification provides an application running process. The various terminals involved in the application running process in this specification, as well as the communication relationship between the terminals, are exemplarily as follows: Figure 1 shown.
[0064] exist Figure 1 In the scenario shown, clients 1 to n are in communication connection with a first server.
[0065] In this specification, the client can be hardware or a software program that runs with the help of hardware resources provided by the terminal (i.e., "application" in this specification). In the case where the client is hardware, the client includes but is not limited to smartphones, smart speakers, smart watches, tablet computers, laptops, car clients, desktop computers, smart TVs, etc. In the case where the client is software, the client can be a file composed of code, etc.
[0066] The first server in this specification includes but is not limited to a single server, a server cluster, a cloud server or a cloud server cluster.
[0067] Exemplarily, this specification takes the interaction between client i (any client) and the first server as an example to illustrate the process in this specification. The execution subject of the application running process in this specification is client i. The application in this specification is the application installed in client i.
[0068] Figure 2 The application program running process provided in the embodiments of this specification may specifically include one or more of the following steps:
[0069] S200: In response to an application program invocation instruction, obtaining local running resources from a first server.
[0070] The terminal generates an application wake-up instruction for the client i based on the detected user operation (e.g., click operation, input operation, etc.). The application wake-up instruction is used to wake up the application. The application in this specification is obtained after performing the installation operation based on the lightweight installation package, and the lightweight installation package contains the engine necessary resources of the application and the necessary resources for user use.
[0071] The engine used by the application in this specification is a graphics engine, such as the common game engines: UE4 (Unreal Engine 4), Unity, etc. Some functions of the application need to be implemented under the control of the graphics engine, such as determining the display order of graphics, the display method of graphics, the rendering of graphics, animation drive, physical simulation, etc. The function of assisting the display of graphics through other information expression methods. The graphics engine in the application can also have the function of assisting the display of graphics through other information expression methods. For example, when the mobile phone is showing the picture of a ship crashing into a glacier, at the moment of impact, the graphics engine controls the vibration of the mobile phone to simulate the impact effect of crashing into the glacier.
[0072] Among them, the engine necessary resources are the resources necessary to start the engine. The engine necessary resources are only needed to start the engine, and the local running resources required during the engine operation are not included in the engine necessary resources. The local running resources required during the engine operation are the resources necessary for the engine to drive the application to implement certain functions. It should be noted that in this description, the process of driving the application starts with the engine being started. However, the engine being started is only a link in the process of the engine driving the application, not the entire process of the application running. In other words, the resources required for the application running process are greater than the resources required for the engine startup link.
[0073] In addition to the resources required for starting the engine, other resources required for the application program to run are regarded as local running resources. The lightweight installation package does not contain local running resources, which are stored in the first server. When the application program is invoked, the local running resources are obtained from the first server.
[0074] It can be seen that the resources in the lightweight installation package in this manual do not include all the resources required for the engine to drive the application to run, but require that the lightweight installation package contain resources that can support the engine startup (lightweight installation package), which can effectively reduce the size of the lightweight installation package.
[0075] In an optional embodiment of this specification, the engine necessary resources include an engine startup script. For example, when the application in this specification adopts the Unity engine, the engine startup script can be UnityPlayer. It should be noted that this specification does not limit the engine used by the application. In addition to the aforementioned Unity engine, the engine can also be UnrealEngine, Cry Engine, Egret, Cocos, etc.
[0076] The user-required resources in this manual are resources used to generate display information displayed to the user when the application is invoked. The resources required for the user's subsequent use of the application are not included in the user-required resources, which can further reduce the size of the lightweight installation package.
[0077] The local running resources in this specification are resources that support the operation of the engine. In an optional embodiment of this specification, the local running resources include at least one of the following: the code file of the engine, the application code file. Exemplarily, application A and application B are applications developed based on the same version of the engine. In the lightweight installation package A and lightweight installation package B obtained based on application A, the necessary engine resources of the two are the same.
[0078] In a further optional embodiment of the present specification, in addition to using at least part of the resources required for the engine to run as local running resources to reduce the size of the engine itself in the lightweight installation package, the size of the application content resources in the lightweight installation package is also reduced.
[0079] Specifically, in this embodiment, the application content resource is also a local running resource.
[0080] It should be noted that the application in this specification may be an instant messaging application, a social entertainment application, an online shopping application, a network application such as a browser; in addition, the application in this specification may also be a game application.
[0081] When the application is a game, as the player upgrades, more and more content will be unlocked. The required scenes, textures, materials, animations, and shaders are all application content resources, which are game-related resources. They are the resources that players need from the beginning of the game to the subsequent stages. Application content resources can also be called GameRes.
[0082] S202: Displaying the initial operation information included in the necessary resources used by the user.
[0083] The initial operation information in this specification is information displayed by the terminal when the application is awakened, that is, information initially displayed to the user. Exemplarily, the initial operation information may be an image and / or sound used to display the initial operation information.
[0084] In this specification, there may be many ways of “displaying”, for example, displaying through pictures, displaying through sounds, etc.
[0085] S204: Starting the engine of the application according to the necessary engine resources to load the local running resources.
[0086] Exemplarily, when the aforementioned engine is a Unity engine, the Unity engine can be started by running UnityPlayer, and then the local running resources are loaded by the Unity engine.
[0087] It should be noted that the execution order of step S202 and step S204 is not specific.
[0088] S206: Running the application based on the local running resources.
[0089] In this step, the engine has been started, and the local storage has local operating resources sufficient to support the running of the application, so the engine can run the application based on the local operating resources.
[0090] The technical solution in this specification can effectively reduce the size of the installation package on the one hand, and on the other hand, can also meet the user's demand for local operating resources during the process of using the application.
[0091] It can be seen that the process in this manual is based on a lightweight installation package. Now, several aspects are described on how to obtain a lightweight installation package and how to load local running resources.
[0092] 1. Generate a lightweight installation package.
[0093] The lightweight installation package in this specification can be obtained by processing the application program file using an application processing platform.
[0094] The application file in this specification is a file that contains the necessary resources for the engine, the necessary resources for user use, and the local running resources. The application file can contain several sub-files, and different resources can be stored in different sub-files for easy distinction and management. Optionally, to achieve privacy protection, one or several resources contained in the application file are encrypted resources. In this case, even if the name and file type of the resources in the application file can be displayed to the application processing platform, it is difficult for the application processing platform to tamper with the sub-resources contained in the application file. For example, a file directory at a certain level of the application file is as follows: Figure 3 shown.
[0095] The application file in this specification is obtained by compiling the application project file (make Project). The application project file can be a project corresponding to the application. For example, Android studio can be used to load the application project file, execute build-make project, and obtain the application file.
[0096] In the aforementioned example where the application uses the Unity engine, the application project file is a Unity project, and the application program file is an AndroidStudio project.
[0097] The application project file is the carrier of the application before the application is published as an installation package corresponding to the system platform. In the scenario where there is no need to process the application installation package to obtain a lightweight installation package, the application project file can be packaged and published as an APK. For example, Android studio can be used to load the application project file, execute build-generate signed APK, and obtain the installation package of the application.
[0098] Normally, to reduce the size of the installation package, the usual approach is to reduce the amount of necessary resources required by the APK, which requires early planning of the code part in the APK and writing it in an interpretive language, such as Lua. The development and update of applications usually requires a relatively long process. For example, some existing application development codes mostly use C#, and Lua is only used as a hot fix language. The existing method of reducing the size of the installation package is mainly to remove some resources from the package body. The Unity engine will compile the C# code into C++ code, and the resulting binary is very large. In addition, the installation package also has some necessary resources for startup. According to the existing solution, even if the necessary resources in the installation package are reduced, the size of the installation package will inevitably exceed 100 megabytes (MB) after the project's SDK is connected.
[0099] The process in this specification streamlines the resources in the application project files before packaging them into APK, which can avoid the package size being too large due to the application development language. Even for applications developed using the C# architecture, the size of the resulting lightweight package can be guaranteed to be less than 100 megabytes (MB), and can be further optimized to between 10 megabytes (MB) and 100 megabytes (MB).
[0100] In an optional embodiment of the present specification, the process of determining the package size of the lightweight installation package may be: determining the size of the unconfigured engine and determining the size of the initial operation information, and using the sizes of the two as the package size of the lightweight installation package. Specifically, determining the size of the unconfigured engine as a first value and determining the size of the initial operation information as a second value, and using the first value and the second value as the package size of the lightweight installation package.
[0101] Specifically, the process of obtaining local running resources can be:
[0102] S400: Acquire application program files.
[0103] This specification does not limit the method for obtaining application files. After an optional embodiment, the program developer can upload the application file to the application processing platform from other terminals so that the application processing platform can obtain the application file; in another optional embodiment, the program developer can generate the application file based on the resources provided by the application processing platform.
[0104] S402: Extracting the local running resources from the application file.
[0105] Since different resources are stored in different folders of the application file, the local running resources can be found from the application file by searching (such as inverted index) to distinguish the local running resources from the non-local running resources to achieve the extraction in this step.
[0106] Specifically, the application processing platform pre-stores a first target identifier for identifying local running resources. Then, the files and sub-files described by the file identifier matching the first target identifier are searched from the files and sub-files at all levels of the local running resources as the local running resources.
[0107] Alternatively, the target storage path of the local running resources is pre-stored in the application processing platform, and then the files and sub-files in the target storage path are read as local running resources. In the aforementioned example where the application uses the Unity engine, the local running resources include at least one of the following: files stored in the assets / bin / Data directory of the application file, libunity.so and libil2cpp.so in the jniLibs / arm64-v8A directory, and libunity.so and libil2cpp.so in the jniLibs / armeabi-v7a directory.
[0108] Among them, the files in the assets / bin / Data directory contain the resources required by the Unity engine when it is running (for example, the configuration files that the Unity engine needs to run, the shader files built into the Unity engine, materials and built-in icons) and some of the resources of the project itself (that is, at least some of the necessary resources for users). In the case where the application is a game application, the resources of this part of the project itself may include the first scene of the game. In the case where the game is not packaged using AssetBundle (Unity's built-in resource compression method), the assets / bin / Data directory will include all the scene resources and dependent resources of the game. Then this part of the project includes at least one of the game's textures, sounds, materials, shaders, interfaces, and configuration files.
[0109] S404: Store the local running resources in the first server.
[0110] Storing local running resources in the first server is, on the one hand, to consider where the user should obtain the local running resources when using the application. At this time, any existing terminal that has the communication function with the client can be used as the first server in this specification. For example, the terminal that provides the lightweight installation package in this specification can also be used as the first server.
[0111] On the other hand, considering that users can efficiently obtain local running resources and avoid concentrated access by clients to the end storing local running resources, which would cause excessive pressure on the end, the first server can be a CDN (Content Delivery Network).
[0112] In an optional embodiment of the present specification, local running resources can be stored in a designated file, and then the designated file is stored in the first server. Then, a designated script is generated according to the target location where the designated file is stored in the first server. When the designated script is called, the file stored in the target location is obtained as a local running resource. It should be noted that the data in the designated file in this specification includes but is not limited to local running resources. In other words, in addition to storing local running resources, the designated file can also store "application content resources" described below.
[0113] Following the example of the aforementioned application using the Unity engine, the designated files include remoteRes / assets_bin_Data (which stores files originally stored in the assets / bin / Data directory), remoteRes / arm64-v8A (which stores libunity.so and libil2cpp.so), and remoteRes / armeabi-v7a (which stores libunity.so and libil2cpp.so).
[0114] S406: Delete the local running resource from the application file to obtain an intermediate file.
[0115] Following the example of the aforementioned application using the Unity engine, delete all files except boot.config in the assets / bin / Data directory of the AndroidStudio project; delete all libUnity and libil2cpp in the jniLibs directory in the AndroidStudio project; generate empty libUnity files and empty libil2cpp in the AndroidStudio project from which the aforementioned files have been deleted and put them under the jnilibs file to obtain the intermediate files.
[0116] It should be noted that the execution order of step S404 and step S406 is not specific.
[0117] S408: Add the specified script to the intermediate file to obtain the lightweight installation package so that the terminal can download and install the application.
[0118] After an optional embodiment of the present specification, the intermediate files can be packaged and published to the corresponding application platform (such as Android platform, Windows platform, etc.) to obtain a lightweight installation package. Optionally, after obtaining the lightweight installation package, the lightweight installation package can be uploaded to the installation package provider (such as the server of the application store) for users to download.
[0119] The designated script is used to obtain the local running resources from the first server in response to an application invocation instruction, so as to run the application based on the local running resources.
[0120] 2. Load local running resources.
[0121] After the terminal stores the acquired lightweight installation package locally, it performs the application installation based on the lightweight installation package. Specifically, the process can be summarized as follows: a designated storage location for storing files parsed from the lightweight installation package is divided from the terminal locally, and the lightweight installation package is parsed to obtain the necessary resources for the engine and the necessary resources for user use. Then, a designated folder is established in the designated storage location (optionally, the designated folder is not unique, and the designated folder contains one or more subfolders), and the necessary resources for the engine and the necessary resources for user use are stored in the corresponding designated folder, thus completing the installation based on the lightweight installation package. Optionally, after completing the installation based on the lightweight installation package, the lightweight installation package can be deleted locally.
[0122] Thereafter, the aforementioned step S200 may be executed.
[0123] In an optional embodiment of the present specification, when executing step S200, the local running resources obtained from the first server are stored in the first location of the terminal. In the present specification, the first location refers to the location for storing the local running resources. For the engine code files and application code files in the local running resources, the first location is the internal storage.
[0124] Because when installing an application based on a lightweight installation package, the client has not yet obtained the local running resources, that is, the application installed based on the lightweight installation package does not know the local storage location of the local running resources. As a result, even if the client obtains the local running resources, there is still the problem of how to load the local running resources.
[0125] In view of this, in an optional embodiment of this specification, a design is made for how to load local running resources. Now, how to load the engine code file and the application code file are respectively described.
[0126] 1) Load the engine code file.
[0127] When the application is invoked, the engine startup script is executed, and the engine startup script calls the engine interface (optionally, the engine interface is a necessary resource of the engine, and is stored locally when installed based on a lightweight installation package; in addition, the engine interface can also be constructed by the engine startup script). The status of the engine interface is monitored, and when it is detected that the engine interface loads the local running resources based on the first loading function, the first loading function is intercepted. Among them, the first loading function is a function for loading the engine code file. Since the engine code file has not been stored locally when the lightweight installation package is installed, the file in the data loading position of the first loading function is empty, and even if the first loading function is executed, the engine code file cannot be loaded.
[0128] After intercepting the first loading function, the data loading position of the first loading function is modified (ie, rewritten) to change it to the first position. Thereafter, the first loading function whose data loading position has been modified is executed, and then the code file loaded into the engine from the first position is loaded.
[0129] Following the example of the aforementioned application using the Unity engine, UnityPlayer (engine startup script) calls libmain.so (engine interface). Libmain.so loads libUnity.so (engine code file) based on dlopen(libUnity) - the first loading function. Since there is no libUnity.so in the local installation location of the lightweight installation package. The application running process in this manual can intercept dlopen(libUnity) and reset the data loading position of dlopen(libUnity) to the first position. After that, execute dlopen(libUnity) to complete the loading of libUnity.so.
[0130] Among them, the dlopen function is the interface for opening the so file on the Android platform (that is, the dlopen function is used to load the runtime library). That is to say, the dlopen function must be called for all so file loading.
[0131] An engine player exists inside the application made based on the Unity engine, which is the entry point for application startup. When the Unity application is started on the Android platform, the engine will construct an engine player. UnityPlayer is this player, which is the entire entry point for the application to run. UnityPlayer is a class in a code development tool provided by the Unity engine on the Android platform. It is a java script file named UnityPlayer.java and exists in the toolkit provided by the Unity engine.
[0132] When the application is called up, the first interface on Android (called Activity in Android development) can be understood as a script corresponding to an interface. After starting, the Unity engine first opens the first Activity, named UnityPlayerActivity, to play the Splash screen of the application. After that, each Activity has its own Content, that is, its own content. At this time, the code part directly constructs a UnityPlayer as the content of UnityPlayerActivity. UnityPlayer itself will start the engine. UnityPlayer belongs to Java code, while the Unity engine is written in C++. The binary executable file it compiles is a so file. On the Android platform, three so files are generated, libmain, libUnity, and libil2cpp. LibUnity is the engine code, and libmain is the entry lib, which is responsible for starting libUnity. Libil2cpp is the code of the produced application, which is project-related.
[0133] After the engine code file is loaded, the engine (eg, Unity engine) is at least partially constructed, and in subsequent steps, the engine mainly loads other resources during its operation.
[0134] 2) Load the application code file.
[0135] After constructing the engine through the aforementioned steps, the state of the engine is monitored, and when it is detected that the engine loads the application code file of the application based on the second loading function, the second loading function is intercepted. The second loading function is a function for adding the application code file. Since the application code file is not stored locally when the lightweight installation package is installed, the file in the data loading position of the second loading function is empty, and even if the second loading function is executed, the application code file cannot be loaded.
[0136] After intercepting the second loading function, the data loading position of the second loading function is modified (ie, rewritten) to change it to the first position. Thereafter, the second loading function whose data loading position has been modified is executed, and then loaded into the application code file from the first position.
[0137] Following the example of the aforementioned application using the Unity engine, the Unity engine loads libil2cpp.so (application code file) based on dlopen (the second loading function). Since there is no libil2cpp.so in the local installation location of the lightweight installation package. The application running process in this manual can intercept dlopen and reset the data loading location of dlopen to the first location. After that, dlopen is executed to complete the loading of libil2cpp.so. After that, the engine drives the code inside libil2cpp to run, and libil2cpp uses the basic functions of the engine to run the application.
[0138] 3) Load application content resources.
[0139] The files contained in the local running file may not be unique. Since the process in this specification is intended to store the files in the installation package of the application to a large extent on the first server, thereby reducing the size of the lightweight installation package as much as possible, it may cause the size of the local running file stored in the first server to be larger. And the large local running file may also cause the problem of long download time.
[0140] In view of this, in an optional embodiment of the present specification, after determining the local running resources from the application program files, the engine code files and application code files in the local running resources are determined as the first files; and the application content resources in the local running resources are determined as the second files. That is, the local running files in the present specification include the first files and the second files.
[0141] When the application is invoked, the first file is first obtained from the first server and stored locally. After that, the first file locally can be called based on the above steps. After the download of the first file is completed, the download of the second file is executed.
[0142] Optionally, the first file is stored in the local internal storage. First, the internal storage is safe. Code is a relatively necessary resource. The application lacks resources and at most a certain model or texture is not displayed. If the application has no code, the application cannot run directly. The internal storage is invisible to users and the situation of accidental deletion will be greatly reduced. Second, the storage system of the Android system itself is divided into permissions. A storage area will distinguish whether it has readable, writable, and executable permissions. The internal storage area is an executable area, and the external storage area is a non-executable area.
[0143] Through this embodiment, the local running files are divided into a first file and a second file. During the running of the application, if the calling order of the first file is prior to that of the second file, the first file is obtained first and then the second file, which is conducive to achieving smooth running of the application and improving the user experience.
[0144] There are multiple options for the timing of obtaining the second file. In an optional embodiment of the present specification, after the first file is obtained, the second file is immediately obtained. In another optional embodiment of the present specification, when the engine calls the resource in the second file, the second file is obtained from the first server.
[0145] After obtaining the second file, the second file is stored in the second location locally. The second location in this specification can be the internal storage of the terminal or the external storage of the terminal. Among them, storing the second file in the external storage is directly visible to the resource manager of the Android phone, which is convenient for viewing and debugging. The internal storage of Android is not visible to non-rooted mobile phones, which can avoid accidental changes.
[0146] The loading of application content resources (i.e., the aforementioned second file) is also executed by the engine constructed by the aforementioned steps. Then, the state of the engine can be monitored, and when it is detected that the engine loads application content resources based on the third loading function, the third loading function is intercepted. Among them, the third loading function is a function for loading application content resources. Since the application content resources are not stored locally when the lightweight installation package is installed, the file in the data loading position of the third loading function is empty, and even if the third loading function is executed, the application content resources cannot be loaded.
[0147] After intercepting the third loading function, the data loading position of the third loading function is modified (ie, rewritten) to change it to the second position. Thereafter, the third loading function with the modified data loading position is executed to load the application content resource from the second position.
[0148] Following the example of the application using the Unity engine, the Unity engine loads application content resources (corresponding to the files stored in the assets / bin / Data directory in the application file) based on intercepting fopen, fseek, fopen and other file-related operation functions (the third loading function). Since the lightweight installation package does not have application content resources in the local installation location. The application running process in this specification can intercept the third loading function and reset the data loading position of the third loading function to the second position. After that, the third loading function is executed to complete the loading of the application content resources.
[0149] It can be seen that through the application running method in this specification, the loading of local running resources can be realized through the aforementioned "interception" and "redirection" process. The "interception" and "redirection" in this specification are implemented in the C++ layer. In other words, the process in this specification can be applied to applications written in C++. The process in this specification does not need to call the Java interface System.LoadLibrary to load lib.
[0150] With the development of technology, the content of a single application is becoming increasingly rich, resulting in a relatively large volume of application content resources for a single application. On the one hand, it takes a lot of time to download the entire application content resources to the local terminal; on the other hand, downloading the entire application content resources to the local terminal will also occupy a lot of local storage space.
[0151] In view of this, in an optional embodiment of the present specification, the application includes several sub-resources divided according to the preset acquisition order of the application. The process of obtaining the application content resource can be: the client sends a first request to the first server; receives the sub-resource returned by the first server in response to the first request; wherein the first request is used to: obtain the sub-resource that is at the first position in the preset acquisition order among the several sub-resources from the first server.
[0152] During the process of a user using an application, if it is detected that the local sub-resources can no longer meet the user's usage requirements, the sub-resources used by the login account are determined as the target sub-resources; a second request is generated and sent to the first server; and the sub-resources returned by the first server in response to the second request are received; wherein the second request is used to: obtain the sub-resources that are after the target sub-resources from the first server.
[0153] Exemplarily, when the application is a game application (or when the application has a game function implemented by a graphics engine), the application content resources are divided into several sub-resources (for example, by the aforementioned application processing platform) in the order of the game level. Usually, the application content resources are distributed according to the progress of the game (the progress can be represented by the "level" of the game). For example, in elimination games, different levels correspond to different game content. For another example, in community development games, as the level increases, players can unlock more scenes and costumes. It can be seen that, in general, game content is related to the level. It should be noted that the "level" in this specification can be the level of the game or the growth progress of the player's character in the game. The level can also refer to other quantities that change with the progress of the game, which will not be elaborated here.
[0154] In the above example of dividing the application content resource into a first file and a second file, the second file includes a plurality of sub-files, and the sub-files correspond to the sub-resources one by one, and the sub-files store the data of the corresponding sub-resources.
[0155] Through the process in this specification, obtaining sub-resources can be divided into the following two stages.
[0156] ① When installing the application, the first few levels of the game are obtained for players to use.
[0157] When the application is invoked, or after the aforementioned first file is obtained, a first request is triggered to be sent to the first server. The first request is used to: obtain the sub-resource that is ranked first among the plurality of sub-resources from the first server; receive the sub-resource returned by the first server in response to the first request, and store it in a local second location.
[0158] After that, the player can use the level corresponding to the sub-resource in the first place.
[0159] ②After completing the installation of the application, "download while playing".
[0160] As the game progresses, players may complete the levels in the first sub-resource, which will cause the player to have "no new levels to play".
[0161] In view of this, in an optional embodiment of the present specification, the client can determine the game level corresponding to the login account as the target level. Generate a second request and send it to the first server; wherein the second request is used to: obtain sub-resources of the game level after the target level from the first server; and receive the sub-resources returned by the first server in response to the second request.
[0162] In an optional embodiment of the present specification, the condition for triggering the execution of "downloading while playing" may be: judging whether the difference between the target level and the highest level in the application content resources stored in the terminal is less than a first threshold value (the first threshold value may be a preset value. When the level represents a level of the game, the first threshold value may be an integer such as 2). If so, the execution of "downloading while playing" is triggered; if not, when a change in the target level is detected, the judgment based on the first threshold value is re-executed.
[0163] After that, if the developer of the application updates the application content resources of the application, the updated application content resources can be stored as sub-resources on the first server, so that players can update the application content resources by "playing while downloading". For example, the current application content resources include 100 levels, and the developer subsequently develops levels 101 to 110, then levels 101 to 110 are the updated application content resources.
[0164] To ensure the security of player data, in an optional embodiment of the present specification, the player's information (such as account information, target level, etc.) is stored in the second server. After the application is invoked, it interacts with the second server to obtain the target level from the second server. When a change in the level currently played by the player is detected, a new target level is generated based on the level currently played by the player, and then the target level recorded in the second server is updated with the new target level.
[0165] In addition to the aforementioned loading functions, when the resources loaded by other functions are local running resources, the aforementioned "interception" and "redirection" methods can also be used for loading. The other functions include but are not limited to: libunity's fopen function, fseek function, ftell function, fread function, fgets function, fclose function, stat function, open function, read function, lseek function, lseek64 function, close function, etc.
[0166] It can be seen that by adopting the technical solution in this specification, even if an application using a relatively complex engine such as Unity is used, the size of its installation package can be reduced to the size of a lightweight installation package through the process in this specification.
[0167] Based on the same idea, the present specification also provides a corresponding embodiment Figure 2 The application program running device of the process shown in the figure is as follows: Figure 5 shown.
[0168] Figure 5 This is a schematic diagram of the structure of an application running device provided in an embodiment of this specification. The application running device may include one or more of the following modules:
[0169] The local running resource acquisition module 500 is configured to: in response to the application invocation instruction, acquire the local running resources from the first server; wherein the application is obtained after performing the installation operation based on the lightweight installation package, and the lightweight installation package contains the engine necessary resources of the application and the user necessary resources;
[0170] The display module 502 is configured to: display the initial operation information included in the necessary resources used by the user;
[0171] The startup module 504 is configured to: start the engine of the application according to the necessary resources of the engine to load the local running resources;
[0172] The application running module 506 is configured to run the application program based on the local running resources.
[0173] In an optional embodiment of this specification, at least one of the following is included:
[0174] The necessary resources of the engine include: engine startup script;
[0175] The user-necessary resources include: images and / or sounds for displaying the initial operation information when the application is invoked;
[0176] The local running resources also include at least one of the following: a code file of the engine and an application code file;
[0177] The package size of the lightweight installation package is between 10 megabytes (MB) and 100 megabytes (MB).
[0178] In an optional embodiment of the present specification, the local operation resource acquisition module 500 is specifically configured to: store the acquired local operation resources to a local first location.
[0179] In an optional embodiment of the present specification, the startup module 504 is configured to: load the local running resource from the first location.
[0180] In an optional embodiment of the present specification, the startup module 504 is configured to: call the engine interface; intercept the first loading function when the engine interface loads the engine code file; modify the data loading position of the first loading function to the first position; execute the first loading function to load the engine code file from the first position.
[0181] In an optional embodiment of the present specification, the startup module 504 is configured to: intercept a second loading function when the engine loads the application code file of the application; modify the data loading position of the second loading function to the first position; and execute the second loading function to load the application code file from the first position.
[0182] In an optional embodiment of the present specification, the device also includes an application content resource acquisition module, which is configured to: obtain application content resources from the first server and store them in a local second location; intercept a third loading function when the engine loads the application content resources; modify the data loading position of the third loading function to the second location; and execute the third loading function to load the application content resources from the second location.
[0183] In an optional embodiment of the present specification, the application includes several sub-resources divided according to a preset acquisition order of the application.
[0184] In an optional embodiment of the present specification, the application content resource acquisition module is specifically configured to: obtain application content resources from the first server, including: sending a first request to the first server; receiving sub-resources returned by the first server in response to the first request; wherein the first request is used to: obtain from the first server the sub-resource among the several sub-resources that is at the first place in the preset acquisition order.
[0185] In an optional embodiment of the present specification, the application content resource acquisition module is specifically configured to: obtain application content resources from the first server, including: determining the sub-resource used by the login account as the target sub-resource; generating a second request and sending it to the first server; receiving the sub-resource returned by the first server in response to the second request; wherein the second request is used to: obtain the sub-resource from the first server whose order follows the target sub-resource.
[0186] In an optional embodiment of the present specification, the device further includes a lightweight installation package generation module configured to: obtain an application file; wherein the application file includes the necessary resources of the engine, the necessary resources for user use, and the local running resources;
[0187] Extracting the local running resource from the application file;
[0188] Storing the local running resources in the first server;
[0189] Deleting the local running resource from the application file to obtain an intermediate file;
[0190] Adding a specified script to the intermediate file to obtain the lightweight installation package so that the terminal can download and install the application;
[0191] The designated script is used to obtain the local running resources from the first server in response to an application invocation instruction, so as to run the application based on the local running resources.
[0192] In an optional embodiment of the present specification, the lightweight installation package generation module is specifically configured as follows: obtaining an application engineering file; wherein the application engineering file is the carrier of the application before the application is released as an installation package corresponding to the system platform; and compiling the application engineering file to obtain an application file.
[0193] The embodiments of this specification also provide a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 2 Provides the process in which the application runs.
[0194] The embodiments of this specification also propose Figure 6 The schematic structure diagram of the electronic device shown in FIG. Figure 6 At the hardware level, the electronic device may include a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the process of running any of the above applications.
[0195] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as the combination of logic device XOR software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic device.
[0196] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0197] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0198] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0199] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0200] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0201] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0202] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0203] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0204] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0205] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0206] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0207] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0208] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0209] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0210] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0211] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for running an application, characterized in that: include: In response to an application wake-up instruction, local running resources are obtained from a first server; wherein the application is obtained after performing an installation operation based on a lightweight installation package, the lightweight installation package includes the engine necessary resources of the application and the user necessary resources, the lightweight installation package is obtained by deleting the local running resources in the application file and adding a specified script, the specified script is used to instruct to obtain the local running resources from the first server based on the application wake-up instruction; the application is a game application, and includes a plurality of sub-resources divided according to the level ranking order of the game application; the level ranking order is used to characterize the game progress of the game application; Displaying the initial operation information contained in the necessary resources used by the user; Starting the graphics engine of the application according to the necessary engine resources to load the local running resources; the local running resources are used to support the engine operation to drive the application to implement functions; Running the application based on the local running resources; The method also includes: obtaining from the first server the sub-resource that is at the top of the hierarchical order among the plurality of sub-resources; determining the sub-resource used by the login account as the target sub-resource; judging whether the difference between the target level of the target sub-resource and the highest level in the locally stored application content resources is less than a first threshold; if so, obtaining from the first server the sub-resource that is ranked after the target sub-resource; storing any sub-resource to a local second location each time any sub-resource is obtained; intercepting a third loading function when the engine loads any sub-resource; modifying the data loading location of the third loading function to the second location; and executing the third loading function to load any sub-resource from the second location.
2. The method according to claim 1, characterized in that Include at least one of the following: The necessary resources of the engine include: engine startup script; The user-necessary resources include: images and / or sounds for displaying the initial operation information when the application is invoked; The local running resources also include at least one of the following: a code file of the engine and an application code file; The package size of the lightweight installation package is between 10 megabytes (MB) and 100 megabytes (MB).
3. The method according to claim 1 or 2, characterized in that Acquiring local running resources from the first server includes: storing the acquired local running resources to a local first location; Loading the local running resource includes: loading the local running resource from the first location.
4. The method according to claim 3, characterized in that Loading the local running resource from the first location includes: Call the engine interface; When the engine interface loads the engine code file, intercepting the first loading function; Modify the data loading position of the first loading function to the first position; The first loading function is executed to load the code file of the engine from the first location.
5. The method according to claim 3, characterized in that Loading the local running resource from the first location includes: When the engine loads the application code file of the application program, intercepting a second loading function; Modify the data loading position of the second loading function to the first position; The second loading function is executed to load the application code file from the first location.
6. The method according to claim 1, characterized in that The lightweight installation package is obtained by following the steps below: Obtaining an application file; wherein the application file includes the necessary resources for the engine, the necessary resources for user use, and the local running resources; Extracting the local running resource from the application file; Storing the local running resources in the first server; Deleting the local running resource from the application file to obtain an intermediate file; Adding a specified script to the intermediate file to obtain the lightweight installation package so that the terminal can download and install the application; The designated script is used to obtain the local running resources from the first server in response to an application invocation instruction, so as to run the application based on the local running resources.
7. The method according to claim 6, characterized in that Get the application files, including: Obtaining an application engineering file; wherein the application engineering file is the carrier of the application before publishing the application as an installation package corresponding to the system platform; The application project file is compiled to obtain an application program file.
8. An application program running device, characterized in that: The device comprises: A local running resource acquisition module is configured to: in response to an application wake-up instruction, acquire local running resources from a first server; wherein the application is obtained after performing an installation operation based on a lightweight installation package, the lightweight installation package includes the engine necessary resources of the application and the user necessary resources, the lightweight installation package is obtained by deleting the local running resources in the application file and adding a specified script, the specified script is used to instruct to acquire the local running resources from the first server based on the application wake-up instruction; the application is a game application, and includes a plurality of sub-resources divided according to the level ranking order of the game application; the level ranking order is used to characterize the game progress of the game application; A display module, configured to: display the initial operation information contained in the necessary resources used by the user; A startup module configured to: start the engine of the application according to the necessary resources of the engine to load the local operation resources; the local operation resources are used to support the operation of the engine to drive the application to implement functions; An application running module, configured to: run the application program based on the local running resources; The application content resource acquisition module is configured to: acquire the sub-resource that is at the first place in the hierarchical arrangement order among the several sub-resources from the first server; determine the sub-resource used by the login account as the target sub-resource; determine whether the difference between the target level of the target sub-resource and the highest level in the locally stored application content resources is less than a first threshold; if so, acquire the sub-resource that is ranked after the target sub-resource from the first server; store any sub-resource to a local second location each time any sub-resource is acquired; intercept a third loading function when the engine loads any sub-resource; modify the data loading position of the third loading function to the second location; and execute the third loading function to load any sub-resource from the second location.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the application running method described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the application running method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Quick starting method for installation of cell phone games
CN104360871A
Game data method and device, electronic equipment and storage medium
CN113181646A