Application program processing method and apparatus, device, and storage medium

By separating the engine logic and business logic of the application, and using the uncompiled engine subroutine to compile the business subroutine, an executable file that supports browser operation is generated, which solves the problem of slow download speed, realizes the reuse of engine code and improves the download speed.

WO2025185478A1PCT designated stage Publication Date: 2025-09-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/078947
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-04
Filing Date
2025-02-25
Publication Date
2025-09-11

AI Technical Summary

Technical Problem

In the prior art, when downloading an application based on a game engine, it is necessary to download compiled engine code, resulting in a slow download speed.

Method used

Separate the engine logic and business logic of the application, compile the business subprogram through the uncompiled engine subprogram, generate an executable file that supports browser operation, and only download the compiled business subprogram if the compiled engine subprogram exists locally.

Benefits of technology

The engine code is reused, which reduces the download size of the application and improves the download speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025078947_12092025_PF_FP_ABST
    Figure CN2025078947_12092025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers. Provided are an application program processing method and apparatus, a device, and a storage medium. The method comprising: acquiring an uncompiled first subprogram and an uncompiled second subprogram; compiling the uncompiled second subprogram according to the uncompiled first subprogram, so as to obtain a compiled second subprogram, the compiled second subprogram comprising an executable file in a first format, and the executable file in the first format being a file supported to run on a browser; sending the compiled second subprogram to a second device requesting to download a first application program, and, when a compiled first subprogram exists locally, the second device running the first application program according to the compiled second subprogram and the compiled first subprogram. The described method increases the download speed of application programs.
Need to check novelty before this filing date? Find Prior Art

Description

Application processing method, device, equipment and storage medium

[0001] This application claims priority to Chinese patent application number 202410242110.2, filed on March 4, 2024, entitled “Application Processing Method, Apparatus, Device and Storage Medium,” the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for processing an application. Background Art

[0003] With the advancement of computer technology, more and more applications are being written based on game engines. Game engines provide various tools necessary for application development. Therefore, the code package of the application developed by the developer includes not only the business code for implementing the business logic, but also the engine code for implementing the engine logic.

[0004] In related technologies, an application's code package must be compiled to produce an executable file that can be run on a terminal device. For example, if you want to produce an executable file that supports running on a browser, when compiling the application's code package, the business code and engine code are typically compiled into the same executable file. This means that the executable file includes both the compiled business code and the compiled engine code.

[0005] Therefore, even if different applications are based on the same game engine, each time the application is downloaded, the executable file that needs to be downloaded includes the compiled engine code, which results in a slower download speed for the application. Summary of the Invention

[0006] The embodiments of the present application provide a method, apparatus, device, and storage medium for processing an application program, which can improve the download speed of the application program. The technical solutions provided by the present application are as follows:

[0007] According to one aspect of an embodiment of the present application, a method for processing an application is provided, the method being executed by a first device, the method including:

[0008] Obtain an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing engine logic in a first application, and the second subprogram is a program for implementing business logic in the first application;

[0009] Compiling the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that can be run on a browser;

[0010] The compiled second subprogram is sent to a second device that requests to download the first application program. If the compiled first subprogram exists locally on the second device, the second device runs the first application program according to the compiled second subprogram and the compiled first subprogram.

[0011] According to one aspect of an embodiment of the present application, a method for processing an application is provided, the method being executed by a second device, the method including:

[0012] Based on a download request of a first application, obtaining configuration information corresponding to the first application, the configuration information including attribute information of a first subprogram and attribute information of a second subprogram, the first subprogram being a program for implementing engine logic in the first application, and the second subprogram being a program for implementing business logic in the first application;

[0013] When it is determined according to the attribute information of the first subprogram that the compiled first subprogram exists locally, obtaining the compiled first subprogram from the local;

[0014] Downloading a compiled second subprogram according to the attribute information of the second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that supports running on a browser;

[0015] The first application program is run according to the compiled first subprogram and the compiled second subprogram.

[0016] According to one aspect of an embodiment of the present application, a device for processing an application is provided, the device comprising:

[0017] a program acquisition module, configured to acquire an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing engine logic in a first application program, and the second subprogram is a program for implementing business logic in the first application program;

[0018] a program compiling module, configured to compile the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, wherein the executable file in the first format is a file that supports running on a browser;

[0019] A program distribution module is used to send the compiled second subprogram to a second device that requests to download the first application. If the compiled first subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled first subprogram.

[0020] According to another aspect of an embodiment of the present application, a device for processing an application is provided, the device comprising:

[0021] an information acquisition module, configured to acquire configuration information corresponding to the first application based on a download request of the first application, the configuration information including attribute information of a first subprogram and attribute information of a second subprogram, the first subprogram being a program for implementing engine logic in the first application, and the second subprogram being a program for implementing business logic in the first application;

[0022] a local acquisition module, configured to acquire the compiled first subprogram from the local computer when it is determined based on the attribute information of the first subprogram that the compiled first subprogram exists locally;

[0023] a program download module, configured to download a compiled second subprogram according to the attribute information of the second subprogram, wherein the compiled second subprogram includes an executable file in a first format, wherein the executable file in the first format is a file that supports running on a browser;

[0024] A program running module is used to run the first application program according to the compiled first subprogram and the compiled second subprogram.

[0025] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned method for processing the application on the first device side, or the above-mentioned method for processing the application on the second device side.

[0026] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned method for processing the application on the first device side, or the above-mentioned method for processing the application on the second device side.

[0027] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program, and the computer program is loaded and executed by a processor to implement the above-mentioned processing method of the application on the first device side, or the above-mentioned processing method of the application on the second device side.

[0028] The technical solutions provided in the embodiments of the present application can bring the following beneficial effects:

[0029] The first device obtains an uncompiled first subroutine for implementing the engine logic and an uncompiled second subroutine for implementing the business logic, and uses the uncompiled first subroutine to compile the uncompiled second subroutine to obtain a compiled second subroutine, and the compiled second subroutine includes an executable file in the first format. By compiling the uncompiled second subroutine through the uncompiled first subroutine, the compiled second subroutine is obtained, and the splitting is achieved during compilation. When the second device requests to download the first application, if the compiled first subroutine exists locally on the second device, the second device only needs to download the compiled second subroutine. Therefore, the present application implements the unpacking of the engine logic and business logic of the executable file in the first format, and when the first subroutine for implementing the engine logic exists locally, there is no need to download it repeatedly. Therefore, the present application can realize the reuse of the engine code (i.e., the compiled first subroutine), reduce the download amount of the application, and thus improve the download speed of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic diagram of a computer system provided by one embodiment of the present application;

[0031] FIG2 is a schematic diagram of a method for processing an application program according to an embodiment of the present application;

[0032] FIG3 is a flowchart of a method for processing an application program according to an embodiment of the present application;

[0033] FIG4 is a flowchart of a method for processing an application program according to another embodiment of the present application;

[0034] FIG5 is a flowchart of a method for processing an application program according to another embodiment of the present application;

[0035] FIG6 is a flowchart of a method for processing an application program according to another embodiment of the present application;

[0036] FIG7 is a block diagram of a method for processing an application program according to an embodiment of the present application;

[0037] FIG8 is a block diagram of a method for processing an application program according to another embodiment of the present application;

[0038] FIG9 is a block diagram of an application processing device provided by one embodiment of the present application;

[0039] FIG10 is a block diagram of an application processing device provided by another embodiment of the present application;

[0040] FIG11 is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0042] Please refer to FIG1 , which shows a schematic diagram of a computer system provided by an embodiment of the present application. The computer system may include: a first terminal device 10 , a second terminal device 20 , and a server 30 .

[0043] The first terminal device 10 includes, but is not limited to, mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances and other electronic devices. The first terminal device 10 is a terminal device that provides a compilation function. For example, a compilation application is running on the first terminal device 10, and the compilation application provides a compilation function. In some embodiments, the first terminal device 10 is a terminal device that provides a compilation function for the target application. In some embodiments, a client of a compilation application that provides a compilation function can be installed in the first terminal device 10. For example, the compilation application can be used to compile the target application to obtain a compiled executable file. For example, the compiled executable file can be run on the second terminal device 20. The embodiment of the present application also does not limit the type of compilation application running in the first terminal device 10. For example, the compilation application is an application that needs to be downloaded and installed, or it can be an application that can be used immediately (such as a mini program). Of course, the compilation application can be an independent application, or it can be implemented as a module with compilation function. In addition to the module with compilation function, the client installed on the first terminal device 10 can also include other functional modules, such as a code writing module, etc.

[0044] The second terminal device 20 includes but is not limited to electronic devices such as mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs, vehicle terminals, smart home appliances, etc. In some embodiments, the second terminal device 20 is a terminal device for downloading and running programs. In some embodiments, the second terminal device 20 can obtain an installation package of the target application. In some embodiments, the second terminal device 20 can install the client of the target application based on the installation package of the target application. In some embodiments, the target application can be developed by the above-mentioned first terminal device 10, and the installation package of the target application is developed by the first terminal device 10. Exemplarily, the target application can be an application that needs to be downloaded and installed, or it can be an application that can be used immediately (such as a mini-program), which is not limited in this embodiment of the present application. The embodiment of the present application does not limit the type of the target application, such as the target application is an application obtained based on a game engine. Exemplarily, the target application is any one of a virtual reality (VR) game, an augmented reality (AR) game, a first-person shooter (FPS), a multiplayer survival game, a third-person shooter (TPS), a multiplayer online tactical competitive (MOBA) game, a simulation game (SLG), a social application, and an interactive entertainment application. In some embodiments, if the second terminal device 20 wants to download and install the above-mentioned target application, the second terminal device 20 can obtain the compiled executable file obtained by the first terminal device 10 compiling the target application, thereby obtaining the target application. In some embodiments, when the compiled first subroutine is stored locally on the second terminal device 20, the second terminal device 20 only needs to obtain the compiled executable file, without having to repeatedly download the compiled first subroutine, thereby achieving reuse of the engine code (i.e., the compiled first subroutine).

[0045] In some embodiments, the server 30 is used to provide background services for the client of the compiled application in the first terminal device 10. In other embodiments, the server 30 is used to provide background services for the client of the target application in the second terminal device 20. For example, the server 30 can 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.

[0046] In some embodiments, the server 30 includes at least one of a first server 31 and a second server 32 (not shown). For example, the first server 31 is used to provide background services for the compiled application in the first terminal device 10. For example, the second server 32 is used to provide background services for the target application in the second terminal device 20. For example, the first server 31 and the second server 32 can be the same or different servers.

[0047] The first terminal device 10 and the server 30 can communicate with each other via a network. The second terminal device 20 and the server 30 can also communicate with each other via a network. The network can be a wired network or a wireless network.

[0048] In the application processing method provided in the embodiments of the present application, the execution entity of each step may be a computer device. The computer device may be any electronic device with data storage and processing capabilities. Exemplarily, the computer device includes a first device and a second device. Exemplarily, the first device may be the first terminal device 10 or the server 30 in Figure 1 . Exemplarily, the second device may be the second terminal device 20 or the server 30 in Figure 1 .

[0049] First, the relevant background technology is explained.

[0050] For example, if the first application (the target application) is a mini-game (a click-to-play application), the code package of the mini-game mainly consists of the game engine, business code, and related resources. The game engine accounts for a large proportion of the code package, which leads to a long download and installation time, that is, a long cold start download time.

[0051] For games currently on the market, the top distribution and version distribution of the game engines they use are very concentrated, that is, the game engines used by the games are relatively fixed. Based on this, we are considering separating the game engine from the installation package so that many mini-games can reuse the same engine code as much as possible.

[0052] For example, when a player opens a new mini-game, they only need to download the code package excluding the engine code. By reusing the engine code, the mini-game's cold start speed is optimized. Furthermore, since players directly reuse the local engine code, server download network overhead and user storage space usage are reduced.

[0053] In some embodiments, when the first application is a common mini-game (a game with a game size less than a threshold), JS (JavaScript) is typically used to describe its execution logic. Both the engine code and the business code use JS, and the main user is Cocos (a game engine). Hereinafter, engines that use JS in their engine code are considered JS engines.

[0054] For example, for a JS engine, the engine code and the business code are usually located in different JS files, so it is easy to compile the engine code and the business code into different files during compilation to achieve code segmentation.

[0055] In other embodiments, when the first application is a heavy-duty mini-game (a game with a game size greater than or equal to a threshold), WASM (Web Assembly) is often used to describe its execution logic. Both the engine code and the business code are compiled into WASM, primarily used by Unity. Below, engines that use WASM for engine code are considered WASM engines.

[0056] For example, for a WASM engine, both the engine code and the business code are compiled into the same file, making it difficult to split the code packages compiled into the same file to achieve engine reuse. Therefore, based on this situation, it is necessary to split the business code and engine code before compilation.

[0057] For example, for the WASM engine, the engine itself is relatively large. If all the engine codes are used directly as an engine plug-in, the download amount of the engine plug-in is also relatively large. For example, a small game only uses a small part of the engine functions in the WASM engine, but still needs to download a larger engine plug-in, which also leads to a large download amount. Therefore, this application considers trimming the engine code, that is, removing the parts that are not very important in the entire engine code, and retaining the parts that most games need to use, and making this part of the engine code into an engine plug-in. In this way, the reuse rate of the engine functions in the locally downloaded engine plug-in by other small games is relatively high, thereby avoiding waste of resources.

[0058] In some embodiments, as shown in FIG2 , it shows a schematic diagram of a method for processing an application provided by an embodiment of the present application. As shown in 200 of FIG2 , the first device divides the engine functions of the entire engine into multiple engine plug-ins, that is, removes unimportant parts of the engine functions, and retains important parts that are reused more. Exemplarily, the first device provides the engine plug-in to the second device, and the second device downloads the engine plug-in. Exemplarily, after obtaining the business code, the first device builds a dynamic link between the business code and the engine plug-in, thereby compiling to obtain the compiled business code. The first device sends the compiled business code to the second device. The second device downloads the compiled business code, and in the case where the engine plug-in exists locally, runs the application according to the locally existing engine plug-in and the compiled business code, thereby realizing the reuse of the engine code and improving the cold start speed of the application.

[0059] Please refer to Figure 3, which shows a flowchart of a method for processing an application provided by an embodiment of the present application. The execution subject of each step of the method can be the first device introduced above, or a client of a compiled application running in the first device. In the following method embodiment, for the sake of ease of description, only the execution subject of each step is introduced as a "computer device". The method may include at least one of the following steps (310-330).

[0060] Step 310: Obtain an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing the engine logic in the first application, and the second subprogram is a program for implementing the business logic in the first application.

[0061] In some embodiments, the first application is the target application described above, that is, the first application is any one of a VR game, an AR game, an FPS game, a multiplayer shooter survival game, a TPS game, a MOBA game, a SLG game, a social application, and an interactive entertainment application. The first application in the embodiment of the present application is an application based on a game engine. The embodiment of the present application does not limit the type of game engine, such as the game engine is at least one of Unreal Engine, Unity, and Cocos.

[0062] In some embodiments, the first application may be an application that needs to be downloaded and installed, or an application that can be used instantly (i.e., can be used without installation, with features of click-to-play, no installation required, and easy experience). Exemplarily, the first application is a mini-program.

[0063] In some embodiments, the uncompiled first subroutine refers to a program that implements the engine logic in the first application. The engine logic here refers to the engine function part in the engine that provides services for the first application. For example, when developers write business code, they will call many functions from the engine. That is, the business code will include multiple function names called from the engine, and the called engine functions are called uncompiled first subroutines. Of course, the uncompiled first subroutine in the embodiment of the present application may include a program that implements the engine logic other than the engine logic in the first application. That is, not only the engine function called by the business code is sent as the uncompiled first subroutine, but all engine functions can also be sent to the first device as uncompiled first subroutines.

[0064] In some embodiments, the engine is a game engine. Exemplarily, the engine includes at least one of the following: Unity Engine, Unreal Engine, or Cocos Engine. In some embodiments, engine logic refers to the series of algorithms and decision-making processes within the engine that handle core gameplay, rules, physics simulation, AI behavior, input processing, rendering scheduling, and other tasks. This logic determines how the first application responds to player input, updates game status, and renders the game screen.

[0065] In some embodiments, engine functions refer to APIs (Application Programming Interfaces) or function libraries provided by the engine to implement specific functions. These functions usually encapsulate the implementation details of the underlying technology and provide developers with an efficient and flexible development environment.

[0066] In some embodiments, the uncompiled second subroutine refers to a program for implementing the business logic of the first application, that is, the source code related to the specific business logic written by the developer for the first application. Business logic in this application refers to the logic for implementing the business directed by the first application. If the first application is a game application, business logic refers to the game logic, such as the position of the controls displayed on the interface, the number of controls displayed, the movement of the game character, etc.

[0067] In some embodiments, the first device is a device for compiling a first application. Exemplarily, the first device is a developer tool. The developer tool refers to an IDE (Integrated Development Environment) for compiling and debugging the first application. For example, the developer tool for the first application can compile and debug the first application. The first application can be a mini-game, mini-program, etc. The developer tool is installed, stored, and run on the first device.

[0068] The first application mentioned on the first device side of this application is the application referred to in the code development process, and should be distinguished from the application in the user's use process.

[0069] In some embodiments, the developer writes code through a third device to develop the first application. In some embodiments, the original code of the first application, that is, the uncompiled code, includes an uncompiled first subroutine and an uncompiled second subroutine.

[0070] In some embodiments, the first device obtains the uncompiled first subprogram and the uncompiled second subprogram from the third device. Exemplarily, the developer develops the first application in the third device to obtain the uncompiled first subprogram and the uncompiled second subprogram. Exemplarily, the third device sends the uncompiled first subprogram and the uncompiled second subprogram to the first device. The third device is also referred to as an engine device, that is, a terminal device or server where the engine is located. Exemplarily, the third device and the first device are the same device, or they may be different devices. In some embodiments, the third device is an engine IDE, which refers to an IDE for developing the first application, which can be installed, stored, and run in the engine device.

[0071] In some embodiments, when the first device obtains the first application, it obtains the uncompiled first subroutine and the uncompiled second subroutine in parallel. In some embodiments, when the first device obtains the first application, it obtains the uncompiled first subroutine and the uncompiled second subroutine in serial. In some embodiments, the first device locally stores the full amount of engine functions of the above-mentioned engine, and there is no need to repeatedly obtain the uncompiled first subroutine from the third device. Exemplarily, the first device only needs to obtain the calling function indication information. Exemplarily, the calling function indication information is used to indicate the engine function called by the first application. Exemplarily, the first device determines the engine function called by the first application from the full amount of engine functions stored locally based on the calling function indication information, that is, it determines the uncompiled first subroutine. Exemplarily, at this time, the first device only needs to obtain the calling function indication information, without obtaining the uncompiled first subroutine, thereby reducing the amount of data required to be obtained, improving the acquisition efficiency, and also improving the subsequent compilation efficiency.

[0072] Step 320 , compile the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that supports running on a browser.

[0073] In some embodiments, the uncompiled second subprogram is compiled in the first device according to the uncompiled first subprogram to obtain a compiled second subprogram.

[0074] In some embodiments, the uncompiled first subprogram also needs to be compiled to obtain the compiled first subprogram, but this step can be performed in advance as a pre-execution step, so that only a compiled second subprogram is required to speed up the compilation. For example, the compilation of the uncompiled first subprogram is described in steps 540 and 550 below. The uncompiled first subprogram can be implemented as an uncompiled third subprogram or a portion of the uncompiled third subprogram.

[0075] In some embodiments, the engine plug-in mentioned in this application is a plug-in for carrying engine functions. Exemplarily, the engine plug-in runs in the above-mentioned second device. Exemplarily, the first device can encapsulate the engine function to obtain the engine plug-in. Exemplarily, the second device can run the engine plug-in. Exemplarily, when the engine plug-in runs in the second device, the engine function carried in the engine plug-in is obtained. In some embodiments, by encapsulating the common engine functions in the engine into an engine plug-in and providing it to the second device, the second device can reuse the engine functions in the engine plug-in without repeatedly downloading the same engine function.

[0076] In some embodiments, the phrase "compiling the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram" in step 320 can also be understood as processing the uncompiled second subprogram using the uncompiled first subprogram to obtain a processed first subprogram, and then compiling the processed first subprogram to obtain a compiled first subprogram.

[0077] In some embodiments, the manner in which the uncompiled second subprogram is handled by the uncompiled first subprogram is related to the uncompiled first subprogram. In some embodiments, the manner in which the uncompiled second subprogram is handled by the uncompiled first subprogram is related to the uncompiled third subprogram. In some embodiments, the manner in which the uncompiled second subprogram is handled by the uncompiled first subprogram is related to the uncompiled third subprogram and the uncompiled first subprogram.

[0078] In some embodiments, in the absence of an engine plug-in (ie, an uncompiled third subprogram), the uncompiled first subprogram and the uncompiled second subprogram are linked by static linking to obtain a processed second subprogram.

[0079] In some embodiments, when the engine plug-in exists, the engine plug-in and the uncompiled second subprogram are linked in a dynamic linking manner to obtain the processed second subprogram.

[0080] In some embodiments, when an engine plug-in is present, the uncompiled first subprogram and the uncompiled second subprogram are linked statically to obtain the processed second subprogram. The engine plug-in and the uncompiled second subprogram are linked dynamically to obtain the processed second subprogram. For specific implementations, see the explanations of the following embodiments.

[0081] In some embodiments, when all engine functions are not pruned but are all used as engine plug-ins, the compiled second subprogram does not include the engine functions in the engine plug-in, that is, the compiled second subprogram does not include the engine functions at all.

[0082] In other embodiments, when the full amount of engine functions is trimmed and part of the engine functions in the full amount of engine functions are used as engine plug-ins, the compiled second subroutine does not include the engine functions in the engine plug-in, but may include engine functions other than the engine functions in the engine plug-in, that is, the compiled second subroutine does not completely include the engine functions.

[0083] In some embodiments, an engine function that serves as an engine plug-in is found in an uncompiled first subroutine, and a dynamic link is established between this part of the engine function and the uncompiled second subroutine, and the part of the uncompiled first subroutine that does not serve as an engine function as an engine plug-in is directly built into the uncompiled second subroutine. In some embodiments, two files can be compiled based on the dynamic linking method. The embodiment of the present application realizes the splitting of the code package by the dynamic linking method to obtain a compiled second subroutine that does not include the engine function in the engine plug-in.

[0084] In the embodiments of the present application, the uncompiled first subprogram and the uncompiled second subprogram are both compiled into files of the first format, such as the compiled second subprogram includes an executable file of the first format. Files of the first format refer to files that are allowed (or supported) to run on a browser. Exemplarily, the browser here should be interpreted broadly, that is, the browser includes a web browser and a browser-like program. When the browser is interpreted as a browser-like program, the browser-like program should include all programs similar to browsers. In some embodiments, the browser-like program is a point-and-click application (such as a mini-program). Exemplarily, the first format is WASM. This is because, in the related art, when the uncompiled first subprogram and the uncompiled second subprogram are both files of the first format, when the two are compiled, the compilation result obtained is a complete file including the compiled first subprogram and the compiled second subprogram, and it is impossible to split them, thereby failing to achieve engine reuse. When the technical solution proposed in the present application is adopted, when the uncompiled first subprogram and the uncompiled second subprogram are both files of the first format, the compiled second subprogram can be compiled, that is, the splitting of the engine and the business is achieved, thereby achieving engine reuse.

[0085] In other embodiments, the uncompiled first subprogram, the uncompiled second subprogram, the compiled second subprogram, and the compiled first subprogram in this application may also be files of other formats. This application does not limit the type of file, such as the file type is in JS format.

[0086] Step 330: Send the compiled second subprogram to the second device that requests to download the first application. If the compiled first subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled first subprogram.

[0087] In some embodiments, the compiled second subprogram is sent as a whole package to the second device. In other embodiments, the compiled second subprogram is sent as subpackages to the second device. In other embodiments, when the data size of the compiled second subprogram is greater than a second data size, the compiled second subprogram is sent as subpackages to the second device. When the data size of the compiled second subprogram is not greater than the second data size, the compiled second subprogram is sent as a whole package to the second device.

[0088] In some embodiments, a communication connection is directly established between the first device and the second device. When the first device receives a download request from the second device, the first device sends the compiled second subprogram to the second device.

[0089] In other embodiments, when the second device is a terminal device, the second device sends a download request for the first application to the server of the second device. Exemplarily, a communication connection is established between the first device and the server of the second device, and the compiled second subprogram compiled by the first device is directly sent to the server of the second device. Exemplarily, when the second device sends a download request for the first application to the server of the second device, the server of the second device sends the compiled second subprogram sent by the first device to the second device.

[0090] In other embodiments, a communication connection is not established between the first device and the server of the second device, but the compiled second subprogram exported from the first device can be manually configured in the server. In some embodiments, when the second device sends a download request for the first application to the server of the second device, the server of the second device sends the compiled second subprogram compiled from the first device to the second device.

[0091] In some embodiments, in addition to compiling the compiled second subprogram, the first device also generates configuration information for the first application, which is used to be sent to the second device. The configuration information refers to information for configuring the first application. Exemplarily, the configuration information includes an identifier and version number of the first application, a storage location of each subprogram in the first application, a data size of each subprogram, an identifier of each subprogram, a version number of each subprogram, and the like.

[0092] In some embodiments, the configuration information of the first application includes attribute information of the compiled first subprogram and attribute information of the compiled second subprogram. Attribute information refers to information used to represent file attributes, such as the file identifier, file data size, file version number, etc. The attribute information of the compiled first subprogram is used to represent the attributes of the compiled first subprogram, and the attribute information of the compiled second subprogram is used to represent the attributes of the compiled second subprogram.

[0093] In some embodiments, when the second device requests to download the first application, the compiled second subprogram and the configuration information of the first application are both sent to the second device.

[0094] In some embodiments, the second device determines whether the compiled first subprogram exists locally based on the attribute information of the compiled first subprogram. For example, if the attribute information of the compiled first subprogram includes the version number of the compiled first subprogram, the second device determines whether the compiled subprogram of that version exists locally. If so, it is considered that the compiled first subprogram already exists locally, and if so, it is considered that the compiled first subprogram does not exist locally. When the second device determines that the compiled first subprogram does not exist locally, it needs to download the compiled first subprogram. In some embodiments, the second device obtains the compiled first subprogram directly from the first device. Of course, the second device can also obtain the compiled first subprogram from the first device via the server.

[0095] The technical solution provided by the embodiment of the present application is that the first device obtains an uncompiled first subroutine for implementing the engine logic and an uncompiled second subroutine for implementing the business logic, and uses the uncompiled first subroutine to compile the uncompiled second subroutine to obtain a compiled second subroutine, and the compiled second subroutine includes an executable file in a first format. By compiling the uncompiled second subroutine through the uncompiled first subroutine, unpacking is achieved during compilation to obtain the compiled second subroutine. When the second device requests to download the first application, if the compiled first subroutine exists locally on the second device, the second device only needs to download the compiled second subroutine. Therefore, the present application implements the unpacking of the engine logic and business logic of the executable file in the first format, and when the first subroutine for implementing the engine logic exists locally, there is no need to download repeatedly. Therefore, the present application can realize the reuse of the engine code (i.e., the compiled first subroutine), reduce the download amount of the application, and thus improve the download speed of the application.

[0096] The following is an example explanation of the specific compilation process.

[0097] Please refer to Figure 4, which shows a flowchart of a method for processing an application provided by another embodiment of the present application. The execution subject of each step of the method can be the first device introduced above, or a client of a compiled application running in the first device. In the following method embodiment, for the sake of ease of description, only the execution subject of each step is introduced as a "computer device". The method may include at least one of the following steps (410-440).

[0098] Step 410: Obtain an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing the engine logic in the first application, and the second subprogram is a program for implementing the business logic in the first application.

[0099] For technical details not mentioned in this embodiment, please refer to the explanations of other embodiments in the context, which will not be repeated here.

[0100] Step 420: Obtain an uncompiled third subprogram as an engine plug-in. The third subprogram is a program for implementing common engine logic in different application programs.

[0101] In some embodiments, the first device or another device pre-integrates the common engine logic from the full set of engine functions to obtain at least one engine plug-in. The common engine logic here can be understood as a relatively common engine function, or an engine function that most applications need to call.

[0102] In some embodiments, whether an engine function is a general engine function can be pre-configured by a developer or automatically determined based on the calling situation of the engine function.

[0103] In some embodiments, developers pre-configure the engine functions that are general engine functions among the full set of engine functions. In other embodiments, an engine function whose call frequency is greater than or equal to a first value within a threshold time is determined to be a general engine function. In some embodiments, an engine function whose call frequency is greater than or equal to a second value within a threshold time is determined to be a general engine function. In some embodiments, if the number of applications that call the engine function within the threshold time is greater than or equal to a third value, the engine function is determined to be a general engine function.

[0104] In some embodiments, when an engine function is a general engine function, the engine function is directly determined as the engine function included in the engine plug-in. In some embodiments, when an engine function is not a general engine function, the engine function is not determined as the engine function included in the engine plug-in.

[0105] In some embodiments, one engine plug-in corresponds to one uncompiled third subprogram. In some embodiments, one engine plug-in may also correspond to at least two uncompiled third subprograms.

[0106] In some embodiments, an uncompiled third subroutine includes one or at least two uncompiled general engine functions.

[0107] In some embodiments, on the first device side, the engine function is considered to be included in the uncompiled third subroutine, while on the second device side, the engine function is considered to be included in the engine plug-in.

[0108] In some embodiments, the number of uncompiled third subroutines is at least one. Exemplarily, different uncompiled third subroutines include engine functions for implementing different general engine logics in the application. Exemplarily, for a certain engine (such as the first engine), its general engine functions (engine functions shared by different applications) are engine functions 1 to N (N is a positive integer), then these N engine functions can be set as one engine plug-in, or as multiple engine plug-ins. Exemplarily, the N engine functions represent different functions, and are divided into different engine plug-ins according to the functions.

[0109] In some embodiments, these uncompiled third subroutines are all required to be compiled before being sent to the second device or the server of the second device, so as to be implemented as an engine plug-in on the second device. The specific process of obtaining and compiling the uncompiled third subroutines is described in the following embodiments and will not be repeated here.

[0110] Step 430 : Compile the uncompiled second subprogram according to the uncompiled first subprogram and the uncompiled third subprogram to obtain a compiled second subprogram.

[0111] In some embodiments, the uncompiled first subroutine represents the sum of engine functions that the first application needs to call, and the uncompiled third subroutine represents the sum of engine functions that the second device can obtain from the engine plug-in or a part of them.

[0112] For example, when compiling the uncompiled second subprogram based on the uncompiled first subprogram and the uncompiled third subprogram to obtain the compiled second subprogram, the logic followed is: if the called engine function is in the third subprogram, then the called engine function can be obtained from the engine plug-in. Since this part is a public engine function, it does not need to be compiled into the second subprogram. Conversely, if the called engine function is not in the third subprogram, then the called engine function cannot be obtained from the engine plug-in. In this case, in order to ensure the startup of the application, the engine function that cannot be obtained from the engine plug-in needs to be compiled into the second subprogram.

[0113] In some embodiments, the uncompiled second subprogram is processed based on the uncompiled first subprogram and the uncompiled third subprogram to obtain a processed second subprogram. In some embodiments, the processed second subprogram is compiled to obtain a compiled second subprogram.

[0114] Exemplarily, for the i-th engine function (i is a positive integer) called in the uncompiled second subroutine, a link is established with at least one of the uncompiled first subroutine and the uncompiled third subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Exemplarily, for the i-th engine function called in the uncompiled second subroutine, a link is established between the i-th engine function in the uncompiled first subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Exemplarily, for the i-th engine function called in the uncompiled second subroutine, a link is established with the i-th engine function in the uncompiled third subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Exemplarily, for the i-th engine function called in the uncompiled second subroutine, a link is established with both the i-th engine function in the uncompiled first subroutine and the i-th engine function in the uncompiled third subroutine at the location where the i-th engine function is called in the uncompiled second subroutine.

[0115] In some embodiments, priority information of a first application is obtained, where the priority information is used to indicate the priority of the first application. Exemplarily, during the process of developing the first application through a third device, a priority is simultaneously set for the first application. Exemplarily, the first device obtains the priority information of the first application from the third device. Exemplarily, the higher the priority of the first application, the more important the first application. Exemplarily, the lower the priority of the first application, the relatively unimportant the first application.

[0116] In some embodiments, when it is determined that the priority of the first application is greater than or equal to the first priority level based on the priority information of the first application, for the i-th engine function called in the uncompiled second subroutine, a link is established with the i-th engine function in the uncompiled first subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Furthermore, a link is established with the i-th engine function in the uncompiled third subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Specifically, for the i-th engine function called in the uncompiled second subroutine, a static link is established with the i-th engine function in the uncompiled first subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. Furthermore, a dynamic link is established with the i-th engine function in the uncompiled third subroutine at the location where the i-th engine function is called in the uncompiled second subroutine. In this way, through two function linking methods, the function call is ensured to be successful and the program operation efficiency is improved.

[0117] In some embodiments, when it is determined that the priority of the first application is less than the second priority level based on the priority information of the first application, for the i-th engine function called in the uncompiled second subroutine, a link is established between the i-th engine function in the uncompiled first subroutine and the location where the i-th engine function is called in the uncompiled second subroutine. Alternatively, a link is established between the i-th engine function in the uncompiled third subroutine and the location where the i-th engine function is called in the uncompiled second subroutine. In this way, by selecting only one function linking method, the relationship between the importance of the application and the download volume is balanced. While ensuring the calling efficiency as much as possible, it will not bring about excessive download volume.

[0118] In some embodiments, the first priority level is greater than or equal to the second priority level. In some embodiments, the first priority level and the second priority level are preset by a developer.

[0119] The technical solution provided in the embodiment of the present application improves the flexibility and diversity of the compilation method of the uncompiled second subprogram by obtaining an uncompiled third subprogram for implementing the common engine logic in different applications, and compiling the uncompiled second subprogram together with the uncompiled third subprogram and the uncompiled first subprogram, which is conducive to improving the compilation effect of the business logic code.

[0120] In some embodiments, for each engine function called in the uncompiled second subroutine, if the engine function exists in the uncompiled third subroutine, a dynamic link is constructed at the location where the engine function is called in the uncompiled second subroutine, and the dynamic link is used to link the location where the engine function is called in the uncompiled second subroutine and the engine function in the compiled third subroutine.

[0121] For example, the dynamic linking process does not link the linked content, but instead searches for the content to be linked during execution. The generated executable file does not contain the content to be linked, so when the dynamic library is deleted, the executable program cannot run. For example, when the engine plug-in does not exist locally, the compiled second subroutine cannot be run smoothly. Therefore, it is necessary to determine in advance whether the compiled first subroutine or the compiled third subroutine exists locally. If the engine plug-in does not exist locally, it is necessary to download the engine plug-in to ensure the smooth startup of the application.

[0122] In some embodiments, when a dynamic link is constructed at the location where the engine function is called in the uncompiled second subprogram, the second device obtains the engine function from the compiled third subprogram when running the compiled second subprogram.

[0123] Exemplarily, when the second device runs the compiled second subroutine, due to the configuration of the dynamic link, it obtains the engine function from the locally existing compiled third subroutine. That is, the second device obtains the engine function from the local engine plug-in. Exemplarily, the symbol of the engine function to be linked is configured in the dynamic link (for indicating the engine function). Exemplarily, when the second device runs the compiled second subroutine, based on the symbol of the engine function to be linked configured in the dynamic link, it searches for the engine function that matches the symbol in the local memory space (where the downloaded engine plug-in is stored), and when the engine function that matches the symbol is found, the engine function is called.

[0124] For example, dynamically linking the location where the engine function is called in the uncompiled second subroutine with the engine function in the compiled third subroutine can reduce the data size of the compiled second subroutine. This is because the engine function is not actually written into the executable file, so the data size of the executable file is relatively small.

[0125] In some embodiments, when the engine function does not exist in the uncompiled third subroutine but exists in the uncompiled first subroutine, a static link is constructed at the location where the engine function is called in the uncompiled second subroutine, and the static link is used to build the engine function in the uncompiled first subroutine into the location where the engine function is called in the uncompiled second subroutine.

[0126] For example, the process of static linking means that the content to be linked has been linked into the generated executable file, and even if the static library is deleted, it will not affect the execution of the executable program. In other words, the engine function in the uncompiled first subroutine is built into the location where the engine function is called in the uncompiled second subroutine. This method is for those trimmed engine functions, that is, engine functions that are not used as public parts. Since these engine functions are not included in the engine plug-in, they need to be built in separately. This is also to ensure the smooth startup of the application while reducing the data volume of the executable file as much as possible.

[0127] For example, when the second device runs the compiled second subprogram, due to the static linking configuration, the linked engine function is already built into the compiled second subprogram. At this point, the engine function has become part of the compiled second subprogram. That is, the second device obtains the engine function from the compiled second subprogram.

[0128] In some embodiments, each engine function called in the uncompiled second subroutine is traversed, a dynamic link or a static link is constructed, and a processed second subroutine is obtained.

[0129] In some embodiments, each engine function called in the uncompiled second subroutine is traversed in order of code location. In some embodiments, if the number of engine functions called in the uncompiled second subroutine is M. In some embodiments, after building a dynamic link or static link for the i-th engine function, a dynamic link or static link is built for the i+1-th engine function. Exemplarily, i is a positive integer less than M. In some embodiments, dynamic links or static links are built simultaneously for at least two engine functions.

[0130] In some embodiments, static linking refers to the process of linking all library code required by a program into a single executable file at compile time. This means that the entire library code becomes part of the executable file. The linker combines the code from all libraries with the program's code into a single, standalone executable file. At runtime, the program does not need to access the library code separately because it is already present in the executable file.

[0131] In some embodiments, dynamic linking refers to the process of linking library code to an executable file at runtime. This means that the library code is not part of the executable file, but is stored separately as a shared library file (such as a .dll file on Windows or a .so file on Linux). The program dynamically accesses these shared library files at runtime. This is usually achieved by a dynamic linker, which resolves symbolic references and maps the library code into the program's memory space when the program is loaded.

[0132] Exemplarily, for each engine function called in the uncompiled second subroutine, the above-mentioned step of constructing a dynamic link or a static link is performed to obtain a processed second subroutine.

[0133] In some embodiments, the processed second subprogram is compiled to obtain a compiled second subprogram.

[0134] Illustratively, after the uncompiled second subprogram is processed, the compiling function of the first device is called to compile the uncompiled second subprogram to obtain an executable file in the first format, that is, the compiled second subprogram.

[0135] In some embodiments, when a static link is constructed at the location where the engine function is called in the uncompiled second subprogram, the second device obtains the engine function from within the compiled second subprogram when running the compiled second subprogram.

[0136] In some embodiments, the first device uses a compiler to compile the uncompiled second subprogram to obtain a compiled second subprogram.

[0137] Exemplarily, the compiler is fed with GameAssembly.bc (i.e., the business code, which can also be understood as the uncompiled second subroutine), UnityEngine.bc (the full engine code), and UnityEngine.wechat.plugin.wasm (the uncompiled third subroutine, which can also be understood as the engine plug-in). Exemplarily, the compiler uses the instruction emcc-sMAIN_MODULE GameAssembly.bc GameAssembly.wasm to compile the uncompiled second subroutine. Exemplarily, the emcc in this instruction can be understood as a compiler, s MAIN_MODULE can be understood as the uncompiled third subroutine as an engine plug-in, and GameAssembly.wasm can be understood as the compiled second subroutine.

[0138] The full engine code here can be understood as the full engine function, which includes the uncompiled first subroutine. The full engine function can be input to the compiler here, or only the uncompiled first subroutine can be input.

[0139] In some embodiments, the business code is the "main" component. To determine which engine function needs to be called in the business code, the developer first checks the wechat.plugin.wasm module to see if the engine function exists (that is, first check if such a function exists in the uncompiled third subroutine). If so, the engine function is referenced using dynamic linking (searching for the function in the plugin at runtime). If the function does not exist in wechat.plugin.wasm, the developer searches for the function in UnityEngine.bc and references it using static linking (directly typing the function into the output wasm), meaning the engine function is directly built into the compiled second subroutine.

[0140] In some embodiments, after compilation, a unity.wasm file is output (a compiled second subroutine, which includes business functions and some engine functions that are not shared with other applications); and a UnityEngine.wechat.plugin.wasm file (which can be understood as a compiled third subroutine or engine plug-in), which includes engine functions as a common part. Of course, the output of the second branch can be compiled in advance, that is, when the uncompiled second subroutine is compiled, the uncompiled third subroutine has already been compiled, and there is no need to compile the uncompiled third subroutine again, and the compiled second subroutine can be directly output.

[0141] The technical solution provided by the embodiment of the present application establishes a dynamic link for the engine function called in the second subroutine if the engine function exists in the engine plug-in, and a static link if the engine function does not exist in the engine plug-in. This demonstrates the diversity of engine function acquisition methods during the compilation process. In addition, the dynamic linking method can maximize the reuse of engine functions in the locally downloaded engine plug-in, improving the utilization rate of the engine plug-in while ensuring the smooth operation of the compiled second subroutine by establishing a static link.

[0142] Step 440: Send the compiled second subprogram to the second device that requests to download the first application. If the compiled third subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled third subprogram.

[0143] In some embodiments, when step 320 is implemented as steps 420 and 430, step 330 can be implemented as step 440. That is, it is determined whether the engine plug-in exists locally. If so, the locally existing engine plug-in is directly reused. If not, the engine plug-in is downloaded.

[0144] The following is an exemplary description of how to split the engine function to obtain the engine plug-in and how to unpack and send the compiled second subroutine.

[0145] Please refer to Figure 5, which shows a flowchart of a method for processing an application provided by an embodiment of the present application. The execution subject of each step of the method can be the first device introduced above, or a client of a compiled application running in the first device. In the following method embodiment, for the sake of ease of description, only the execution subject of each step is introduced as a "computer device". The method may include at least one of the following steps (510-570).

[0146] Step 510: Obtain an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing the engine logic in the first application, and the second subprogram is a program for implementing the business logic in the first application.

[0147] Step 520: Divide all engine functions of the first engine to obtain at least one engine function group, each engine function group including at least one engine function.

[0148] In some embodiments, the first engine is determined based on the service type of the first application. The first engine may be the most used engine among multiple engines supporting the first application.

[0149] In some embodiments, each engine has its own engine function library, which stores all the engine functions of the engine.

[0150] In some embodiments, the engine device automatically divides the engine functions of the first engine into at least one engine function group. For example, the at least one engine function group corresponds to at least one engine plug-in UnityEngine_CoreModule.wasm. In some embodiments, when the engine splits the engine functions by itself, the split results are as follows: WebGLSupport_AIModule_Dynamic.a; WebGLSupport_AccessibilityModule_Dynamic.a; WebGLSupport_AndroidJNIModule_Dynamic.a; WebGLSupport_AnimationModule_Dynamic.a; WebGLSupport_AssetBundleModule_Dynamic.a; WebGLSupport_AudioModule_Dynamic.a; WebGLSupport_AutoStreamingModule_Dynamic.a; WebGLSupport_ClothModule_Dynamic.a; WebGLSupport_CoreModule_Dynamic.a; WebGLSupport_CrashReportingModule_Dynamic.a; WebGLSupport_DSPGraphModule_Dynamic.a; WebGLSupport_DirectorModule_Dynamic.a; WebGLSupport_GIModule_Dynamic.a; WebGLSupport_GameCenterModule_Dynamic.a; WebGLSupport_GridModule_Dynamic.a; WebGLSupport_HotReloadModule_Dynamic.a; WebGLSupport_IMGUIModule_Dynamic.a; WebGLSupport_ImageConversionModule_Dynamic.a; WebGLSupport_InputLegacyModule_Dynamic.a; WebGLSupport_JSONSerializeModule_Dynamic.a; WebGLSupport_LocalizationModule_Dynamic.a; WebGLSupport_ParticleSystemModule_Dynamic.a; WebGLSupport_PerformanceReportingModule_Dynamic.a; WebGLSupport_Physics2DModule_Dynamic.a; WebGLSupport_PhysicsModule_Dynamic.a; WebGLSupport_ProfilerModule_Dynamic.a; WebGLSupport_RuntimeInitializeOnLoadManagerInitializerModule_Dynamic.a; WebGLSupport_ScreenCaptureModule_Dynamic.a; WebGLSupport_SharedInternalsModule_Dynamic.a; WebGLSupport_SpriteMaskModule_Dynamic.a; WebGLSupport_SpriteShapeModule_Dynamic.a; WebGLSupport_StreamingModule_Dynamic.a; WebGLSupport_SubstanceModule_Dynamic.a; WebGLSupport_SubsystemsModule_Dynamic.a; WebGLSupport_TLSModule_Dynamic.a; WebGLSupport_TerrainModule_Dynamic.a; WebGLSupport_TerrainPhysicsModule_Dynamic.a; WebGLSupport_TextCoreFontEngineModule_Dynamic.a; WebGLSupport_TextCoreTextEngineModule_Dynamic.a; WebGLSupport_TextRenderingModule_Dynamic.a; WebGLSupport_TilemapModule_Dynamic.a; WebGLSupport_UIElementsModule_Dynamic.a; WebGLSupport_UIElementsNativeModule_Dynamic.a; WebGLSupport_UIModule_Dynamic.a; WebGLSupport_UIWidgetsModule_Dynamic.a; WebGLSupport_UNETModule_Dynamic.a; WebGLSupport_UmbraModule_Dynamic.a; WebGLSupport_UnityAnalyticsCommonModule_Dynamic.a; WebGLSupport_UnityAnalyticsModule_Dynamic.a; WebGLSupport_UnityConnectModule_Dynamic.a; WebGLSupport_UnityCurlModule_Dynamic.a; WebGLSupport_UnityTestProtocolModule_Dynamic.a; WebGLSupport_UnityWebRequestAssetBundleModule_Dynamic.a; WebGLSupport_UnityWebRequestAudioModule_Dynamic.a; WebGLSupport_UnityWebRequestModule_Dynamic.a; WebGLSupport_UnityWebRequestTextureModule_Dynamic.a; WebGLSupport_UnityWebRequestWWWModule_Dynamic.a; WebGLSupport_VFXModule_Dynamic.a; WebGLSupport_VRModule_Dynamic.a; WebGLSupport_VehiclesModule_Dynamic.a; WebGLSupport_VideoModule_Dynamic.a; WebGLSupport_WebGLModule_Dynamic.a; WebGLSupport_WindModule_Dynamic.a; WebGLSupport_XRModule_Dynamic.a. .

[0151] Exemplarily, each of the above modules corresponds to an engine function group, and each engine function group includes at least one engine function. Exemplarily, the engine device sends at least one engine function group to the first device, which compiles the at least one engine function group to obtain at least one compiled third subroutine.

[0152] The technical solution provided by the embodiments of the present application divides the full set of engine functions of the first engine into engine function groups and encapsulates these groups into uncompiled third subroutines (which become engine plug-ins). This allows the engine plug-ins ultimately running on the second device to be diverse and flexible. The second device can load the engine plug-in on demand without having to worry about the engine plug-in's excessive data size.

[0153] In some embodiments, the full amount of engine functions are divided according to the functional types of the engine functions in the full amount of engine functions to obtain at least one engine function group.

[0154] Exemplarily, the functional type of an engine function refers to the type of function implemented by the engine function. Exemplarily, the functional type of an engine function includes at least one of the following: starting an engine, exiting an engine, data exchange, data filtering, data aggregation, data sorting, and the like. Exemplarily, the first device or the developer of the first device analyzes the functional type of each engine function in the full amount of engine functions by themselves, and divides the full amount of engine functions according to the functional type. Furthermore, engine functions that are not frequently used are eliminated to obtain at least one engine function group. Exemplarily, one engine function group corresponds to one functional type. When the engine function groups are divided according to functional type, different engine plug-ins correspond to different functions. For example, if some engine plug-ins represent engine functions required to start the engine, then the engine plug-in should have the highest priority and be downloaded first.

[0155] In other embodiments, the entire set of engine functions is divided according to the usage frequency of the engine functions in the entire set of engine functions to obtain at least one engine function group.

[0156] For example, the entire amount of engine functions is divided based on usage frequency, regardless of function type.

[0157] For example, the usage frequency of an engine function refers to the frequency with which the engine function is called during the development of different applications. In some embodiments, the higher the usage frequency of an engine function, the more versatile the engine function. Conversely, the lower the usage frequency of an engine function, the less versatile the engine function.

[0158] For example, the entire set of engine functions is divided according to different usage frequency intervals to obtain at least one engine function group. One engine function group corresponds to one usage frequency interval. The technical solution provided in the embodiment of the present application divides the entire set of engine functions according to the functional type of the engine function or the usage frequency of the engine function, so that the division method of the engine function is diverse, and the engine function can be divided according to different needs, thereby obtaining different engine plug-ins.

[0159] Exemplarily, multiple applications based on the first engine are run to determine the usage frequency of each engine function in the entire engine function; engine functions with a usage frequency greater than a threshold are screened to obtain at least one engine function group.

[0160] Exemplarily, all engine functions with a usage frequency greater than a threshold are first filtered out, and then these filtered engine functions are divided into at least one engine function group again according to the frequency of use. Exemplarily, engine functions with a usage frequency greater than a first threshold are used as the first engine function group. Exemplarily, engine functions with a usage frequency not greater than the first threshold but greater than the second threshold are used as the second engine function group. Exemplarily, engine functions with a usage frequency not greater than the second threshold but greater than the third threshold are used as the third engine function group, and so on. The first threshold is greater than the second threshold and greater than the third threshold. Exemplarily, the priority of the first engine plug-in corresponding to the first engine function group is greater than the priority of the second engine plug-in corresponding to the second engine function group, and greater than the priority of the third engine plug-in corresponding to the third engine function group. The priority here represents the download priority. When the engine function in an engine plug-in is used more frequently, downloading the engine plug-in can basically support the startup or running of the application. This application does not limit the specific values ​​of the threshold, the first threshold, the second threshold and the third threshold.

[0161] The technical solution provided by the embodiments of the present application obtains at least one engine function group by screening engine functions with a usage frequency greater than a threshold. This facilitates the rapid screening of engine functions used to implement common engine logic from a full set of engine functions, improving the speed and accuracy of screening engine functions that implement common engine logic, and thereby increasing the efficiency of engine plug-in identification.

[0162] Step 530: Encapsulate at least one engine function group to obtain at least one uncompiled third subroutine.

[0163] In some embodiments, function encapsulation refers to packaging a section of code into an independent function unit so that it can be repeatedly called when needed. For example, encapsulation can improve the reusability, readability and maintainability of the code.

[0164] In some embodiments, at least one of steps 520 to 550 is a pre-execution step. At least one of steps 520 to 550 may be executed by the first device before sending the compiled second subprogram to the second device requesting to download the first application.

[0165] Step 540 : compile at least one uncompiled third subprogram to obtain at least one compiled third subprogram.

[0166] In some embodiments, at least one uncompiled third subprogram is compiled using a compiling device to obtain at least one compiled third subprogram. In some embodiments, at least one uncompiled third subprogram is compiled using a first device to obtain at least one compiled third subprogram. In some embodiments, at least one uncompiled third subprogram is compiled using a compiler in the first device to obtain at least one compiled third subprogram.

[0167] In some embodiments, when the uncompiled first subroutine is expected to be implemented as an engine plug-in, the first subroutine and the third subroutine have the same meaning, both including engine functions that can become engine plug-ins after compilation.

[0168] Step 550: Send at least one compiled third subprogram to the second device. Different third subprograms include engine functions for implementing different general engine logics in the application. The compiled third subprogram runs in the second device as an engine plug-in.

[0169] In some embodiments, when the second device requests to download the engine plug-in, the first device sends at least one compiled third subroutine to the second device. In some embodiments, the engine plug-in has identification information, and different engine plug-ins have different identification information. In some embodiments, a correspondence table is established between the identification information and the compiled third subroutine. In some embodiments, the correspondence table stores a correspondence between at least one set of identification information and the compiled third subroutine.

[0170] In some embodiments, when the second device requests the server to download the engine plug-in, the server sends at least one compiled third subprogram to the second device. The server pre-stores at least one compiled third subprogram from the first device.

[0171] In some embodiments, based on the identification information carried in the download request sent by the second device, a compiled third subprogram corresponding to the identification information is determined from at least one compiled third subprogram. Exemplarily, the compiled third subprogram corresponding to the identification information is sent to the second device. In some embodiments, based on the identification information carried in the download request sent by the second device, the first device determines, from a correspondence table, a compiled third subprogram corresponding to the identification information. Exemplarily, the compiled third subprogram corresponding to the identification information is sent to the second device.

[0172] The technical solution provided in the embodiments of the present application enables the engine code used to implement the general engine logic to be implemented as an engine plug-in in the second device by sending a compiled third subroutine to the second device. Specifically, the compiled third subroutine can be sent to the second device before or at the same time as the second device requests the download of the first application. Therefore, sending the compiled third subroutine helps ensure that the engine plug-in runs on the second device, thereby ensuring the smooth operation of the first application.

[0173] Step 560: compile the uncompiled second subprogram according to the uncompiled first subprogram and the uncompiled third subprogram to obtain a compiled second subprogram. The compiled second subprogram includes an executable file in a first format. The executable file in the first format is a file that supports running on a browser.

[0174] Step 570: Send the compiled second subprogram to the second device that requests to download the first application. If the compiled third subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled third subprogram.

[0175] In some embodiments, at least one first function for starting the first application is filtered from functions included in the compiled second subroutine.

[0176] In some embodiments, the first function is a function for starting the first application. Exemplarily, the first function is a function included in the compiled second subroutine for implementing a startup function of the first application.

[0177] In some embodiments, the first device selects, based on the function types of the functions in the compiled second subroutine, functions with a startup function type as at least one first function for launching the first application. In some embodiments, there is no limit on the number of first functions. Exemplarily, there is at least one first function.

[0178] In some embodiments, at least one first function is packaged and sent to the second device.

[0179] Illustratively, without considering the data volume of the compiled second subprogram, at least one first function for starting the first application is screened from the functions included in the compiled second subprogram, and these first functions are packaged and sent to the second device.

[0180] Exemplarily, while considering the data volume of the compiled second subroutine, at least one first function for launching the first application is screened from the functions included in the compiled second subroutine, and these first functions are packaged and sent to the second device. Exemplarily, when the data volume of the compiled second subroutine is less than or equal to the second data volume, it is not sent in separate packages. Exemplarily, when the data volume of the compiled second subroutine is greater than the second data volume, at least one first function for launching the first application is screened from the functions included in the compiled second subroutine, and these first functions are packaged and sent to the second device.

[0181] Exemplarily, the compiled second subroutine is packaged except for the first function, and is also sent to the second device. Of course, this code package is sent after the code package where the first function is located.

[0182] The technical solution provided in the embodiment of the present application, based on the reuse of engine functions, unpacks the compiled second subroutine and first sends the function for starting the first application, thereby further reducing the initial download amount and effectively improving the cold start speed of the application.

[0183] Furthermore, the present embodiment prunes the entire set of engine functions, removing unimportant portions. The remaining common portions, representing the general engine logic, are then compiled into at least one compiled third subroutine, thereby creating at least one engine plug-in. This approach maximizes the reuse rate of engine functions within the engine plug-in while also minimizing the number of executable file downloads.

[0184] Please refer to Figure 6, which shows a flowchart of a method for processing an application provided by another embodiment of the present application. The execution entity of each step of the method can be the second device described above. In the following method embodiment, for ease of description, only the execution entity of each step is described as a "computer device". The method can include at least one of the following steps (610-640).

[0185] Step 610: Based on the download request of the first application, obtain the configuration information corresponding to the first application. The configuration information includes the attribute information of the first subprogram and the attribute information of the second subprogram. The first subprogram is a program for implementing the engine logic in the first application, and the second subprogram is a program for implementing the business logic in the first application.

[0186] In some embodiments, the configuration information is information related to the first application requested to be downloaded. Exemplarily, the configuration information includes attribute information of the first subprogram and attribute information of the second subprogram.

[0187] In some embodiments, the attribute information of the first subprogram is information related to the attributes of the engine used by the first application. In some embodiments, the attribute information of the second subprogram is information related to the attributes of the first application itself. In some embodiments, the attribute information includes a version number and an identifier. Exemplarily, the first device generates a version number and an identifier for each engine plug-in. Exemplarily, the first device generates a version number and an identifier for the compiled second subprogram.

[0188] Exemplarily, when the first subprogram is implemented as an engine plug-in, the configuration information includes attribute information of the first subprogram and attribute information of the second subprogram.

[0189] Exemplarily, when the first subroutine cannot be implemented as an engine plug-in, the configuration information includes attribute information of the called engine plug-in (third subroutine) and attribute information of the second subroutine.

[0190] In some embodiments, please refer to Figure 7, which shows a block diagram of a processing method for an application provided by an embodiment of the present application. As shown in Figure 700, the engine IDE sends both the uncompiled first subroutine and the uncompiled second subroutine to the compilation terminal device. The compilation terminal device compiles the uncompiled second subroutine according to the compiled third subroutine and the uncompiled first subroutine to obtain the compiled second subroutine. Exemplarily, the compilation terminal device sends the compiled second subroutine to the server. When the client requests to download the first application, it is determined whether the compiled third subroutine (i.e., the engine plug-in) exists locally. If so, only the compiled second subroutine is downloaded. If not, it is necessary to download the compiled second subroutine and the compiled third subroutine. Of course, when the compiled first subroutine can also be implemented as an engine plug-in separately, when the client requests to download the first application, it is determined whether the compiled first subroutine (i.e., the engine plug-in) exists locally. If so, only the compiled second subroutine is downloaded. If not, it is necessary to download the compiled second subroutine and the compiled first subroutine.

[0191] Step 620 : When it is determined based on the attribute information of the first subprogram that the compiled first subprogram exists locally, the compiled first subprogram is obtained locally.

[0192] In some embodiments, when the uncompiled first subprogram includes a full set of engine functions and the compiled first subprogram is implemented as an engine plug-in, when it is determined based on the attribute information of the first subprogram that the compiled first subprogram exists locally, the compiled first subprogram is obtained locally.

[0193] In some embodiments, when it is determined based on the attribute information of the first subprogram that the compiled first subprogram does not exist locally, the compiled first subprogram is obtained from the server.

[0194] In some embodiments, the attribute information of the first subprogram includes an identifier and version information of the first subprogram; then, based on the identifier of the first subprogram, a search is performed to determine whether a compiled first subprogram corresponding to the identifier of the first subprogram exists locally.

[0195] In some embodiments, the identifier of the first subprogram is matched one by one with each local reference identifier; when a reference identifier consistent with the identifier of the first subprogram exists locally, the compiled first subprogram corresponding to the identifier of the first subprogram exists locally.

[0196] In some embodiments, when there is no reference identifier that is consistent with the identifier of the first subroutine locally, the compiled first subroutine corresponding to the identifier of the first subroutine does not exist locally. Generally, each file has a corresponding identifier. The identifier of the first subroutine is matched one by one with the reference identifiers of each local file. When there is a reference identifier that is consistent with the identifier of the first subroutine locally, it means that there is a compiled first subroutine corresponding to the identifier of the first subroutine locally. When there is no reference identifier that is consistent with the identifier of the first subroutine locally, it means that there is no compiled first subroutine corresponding to the identifier of the first subroutine locally.

[0197] In some embodiments, when a compiled first subprogram corresponding to the identifier of the local first subprogram is found, it is detected whether the version information of the locally compiled first subprogram is the same as the version information in the attribute information of the first subprogram. The version information in the attribute information of the first subprogram can be the version number of the compiled first subprogram. It should be noted that the same first subprogram can have different version information. There are certain differences between first subprograms with different version information.

[0198] In some embodiments, when the version information of the local first subprogram is identical to the version information in the attribute information of the first subprogram, the compiled first subprogram is obtained locally. When the version information of the local compiled first subprogram is identical to the version information in the attribute information of the first subprogram, it indicates that the locally compiled first subprogram is the engine plug-in called by the first application, and the compiled first subprogram is obtained locally.

[0199] In some embodiments, when the uncompiled first subprogram does not include all engine functions, or when the compiled first subprogram is not implemented as an engine plug-in, the attribute information of the first application here should be understood as the attribute information of the engine plug-in called by the first application, that is, the attributes of the compiled third subprogram mentioned above.

[0200] Exemplarily, when it is determined based on the attribute information of the called engine plug-in that the compiled third subprogram exists locally, the compiled third subprogram is obtained locally. When it is determined based on the attribute information of the called engine plug-in that the compiled third subprogram does not exist locally, the compiled third subprogram is obtained from the server.

[0201] In some embodiments, the attribute information of the called engine plug-in includes the identifier and version information of the called engine plug-in; then, based on the identifier of the called engine plug-in, a search is performed to determine whether the compiled third subroutine corresponding to the called engine plug-in exists locally. The identifier of the called engine plug-in refers to an identifier used to uniquely identify the called engine plug-in.

[0202] In some embodiments, the identifier of the called engine plug-in is matched one by one with each local reference identifier; when there is a reference identifier consistent with the identifier of the called engine plug-in locally, there is a compiled third subroutine corresponding to the identifier of the called engine plug-in locally.

[0203] In some embodiments, when there is no reference identifier that is consistent with the identifier of the called engine plug-in locally, the compiled third subroutine corresponding to the identifier of the called engine plug-in does not exist locally. Generally, each file has a corresponding identifier. The identifier of the called engine plug-in is matched one by one with the reference identifiers of each local file. When there is a reference identifier that is consistent with the identifier of the called engine plug-in locally, it means that the compiled third subroutine corresponding to the identifier of the called engine plug-in exists locally. When there is no reference identifier that is consistent with the identifier of the called engine plug-in locally, it means that the compiled third subroutine corresponding to the identifier of the called engine plug-in does not exist locally.

[0204] In some embodiments, when a compiled third subroutine corresponding to the identifier of the called engine plug-in is found locally, it is detected whether the version information of the locally compiled third subroutine is the same as the version information in the attribute information of the called engine plug-in. The version information in the attribute information of the called engine plug-in can be the version number of the compiled third subroutine. It should be noted that the same third subroutine can have different version information. There are certain differences between third subroutines with different version information.

[0205] In some embodiments, when the version information of the locally compiled third subprogram is identical to the version information in the attribute information of the called engine plug-in, the compiled third subprogram is obtained locally. When the version information of the locally compiled third subprogram is identical to the version information in the attribute information of the called engine plug-in, it indicates that the locally compiled third subprogram is the engine plug-in called by the first application, and the compiled third subprogram is obtained locally.

[0206] In some embodiments, when downloading the compiled first subprogram, a first data size of the downloaded compiled first subprogram is obtained. The data size refers to the data size of the file, such as 8B (byte), 10MB (Mbyte), 20GB (Gigabyte), etc. The first data size refers to the data size of the compiled first subprogram.

[0207] In some embodiments, when downloading the compiled first subprogram or the compiled third subprogram, the download is divided into packages according to the data volume.

[0208] In other embodiments, when the version information of the local first subprogram is different from the version information in the attribute information of the first subprogram, incremental data corresponding to the local compiled first subprogram is downloaded, wherein the incremental data is obtained by differentiating the compiled first subprogram corresponding to the attribute information of the first subprogram and the local first subprogram.

[0209] In other embodiments, when the version information of the local third subroutine is different from the version information in the attribute information of the called engine plug-in, the incremental data corresponding to the local compiled third subroutine is downloaded, wherein the incremental data is obtained by differentiating the compiled third subroutine corresponding to the attribute information of the called engine plug-in and the local compiled third subroutine.

[0210] In some embodiments, please refer to Figure 8, which shows a block diagram of a method for processing an application provided by another embodiment of the present application. As shown in 800 of Figure 8, after sending a download request for the first application, the second device obtains the configuration information of the first application. Download the compiled second subroutine according to the configuration information, and at the same time determine whether the compiled third subroutine exists locally. Exemplarily, when there is an engine plug-in with completely consistent version information and identification locally, the local engine plug-in is directly reused. Exemplarily, when there is an engine plug-in with the same identification but different version information locally, the incremental package (incremental data) of the engine plug-in is downloaded. Exemplarily, when there is no engine plug-in with the same identification locally, the complete package of the engine plug-in is downloaded, that is, the complete compiled third subroutine is downloaded. Exemplarily, when the second device gets the compiled second subroutine and the compiled third subroutine at the same time, the compiled third subroutine and the compiled second subroutine are injected to run the first application.

[0211] The technical solution provided by the embodiment of the present application is that, when the version information of the local first subprogram is different from the version information in the attribute information of the first subprogram, the incremental data corresponding to the local first subprogram is downloaded, and the incremental data and the local first subprogram are merged to generate the first subprogram corresponding to the attribute information of the first subprogram, thereby avoiding downloading the entire first subprogram and improving the download speed of the first subprogram. Similarly, when the version information of the local third subprogram is different from the version information in the attribute information of the called engine plug-in, the incremental data corresponding to the local third subprogram is downloaded, and the incremental data and the local third subprogram are merged to generate the compiled third subprogram corresponding to the attribute information of the called engine plug-in, thereby avoiding downloading the entire compiled third subprogram and improving the download speed of the third subprogram.

[0212] Step 630: Download the compiled second subprogram according to the attribute information of the second subprogram. The compiled second subprogram includes an executable file in a first format. The executable file in the first format is a file that supports running on a browser.

[0213] In some embodiments, the second subprogram's attribute information indicates the second subprogram's identifier and version information. Exemplarily, the second device sends a download request to the server based on the second subprogram's identifier and version information indicated by the second subprogram's attribute information. The download request carries the second subprogram's identifier and version information. Exemplarily, the server determines the corresponding second subprogram based on the second subprogram's identifier and version information carried in the download request. Exemplarily, the server sends the compiled second subprogram to the second device.

[0214] Step 640: Run the first application program according to the compiled first subprogram and the compiled second subprogram.

[0215] In some embodiments, a first application is obtained according to the compiled first subprogram and the compiled second subprogram.

[0216] In some embodiments, the compiled first subroutine is interpreted and executed to obtain the code generated by the first subroutine; when the interpretation and execution of the first subroutine is complete, the compiled second subroutine is interpreted and executed to obtain the first application. In some embodiments, when it is determined that the compiled first subroutine exists locally, the cached code generated by the first subroutine is obtained. The second application is run based on the cached code generated by the first subroutine and the downloaded second subroutine of the second application.

[0217] For technical details not mentioned in this embodiment, please refer to the explanations of other embodiments in the context and will not be repeated here.

[0218] The technical solution provided by the embodiment of the present application is that when the second device requests to download the first application, if the compiled first subroutine exists locally on the second device, the second device only needs to download the compiled second subroutine. Therefore, the present application implements the unpacking of the engine logic and business logic of the executable file in the first format. In the case where the first subroutine for implementing the engine logic exists locally, there is no need to download it repeatedly. Therefore, the present application can realize the reuse of the engine code (that is, the compiled first subroutine), reduce the download amount of the application, and thus increase the download speed of the application.

[0219] In addition, when the engine code does not exist locally, the engine code is obtained from the server to ensure the smooth operation of the first application program, taking into account both download speed and operation efficiency.

[0220] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0221] Please refer to Figure 9, which shows a block diagram of an application processing device provided by an embodiment of the present application. As shown in Figure 9, the device 900 may include: a program acquisition module 910, a program compilation module 920, and a program distribution module 930.

[0222] The program acquisition module 910 is used to acquire an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing the engine logic in the first application, and the second subprogram is a program for implementing the business logic in the first application.

[0223] The program compilation module 920 is used to compile the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that supports running on a browser.

[0224] The program distribution module 930 is used to send the compiled second subprogram to a second device that requests to download the first application. If the compiled first subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled first subprogram.

[0225] In some embodiments, the program compilation module 920 is used to obtain an uncompiled third subprogram as an engine plug-in, where the third subprogram is a program for implementing common engine logic in different application programs.

[0226] The program compiling module 920 is further configured to compile the uncompiled second subprogram according to the uncompiled first subprogram and the uncompiled third subprogram to obtain the compiled second subprogram.

[0227] In some embodiments, the program compilation module 920 is used to build a dynamic link at the location where the engine function is called in the uncompiled second subroutine for each engine function called in the uncompiled second subroutine, if the engine function exists in the uncompiled third subroutine. The dynamic link is used to link the location where the engine function is called in the uncompiled second subroutine and the engine function in the compiled third subroutine.

[0228] The program compilation module 920 is also used to build a static link at the location where the engine function is called in the uncompiled second subroutine when the engine function does not exist in the uncompiled third subroutine but exists in the uncompiled first subroutine. The static link is used to embed the engine function in the uncompiled first subroutine at the location where the engine function is called in the uncompiled second subroutine.

[0229] The program compiling module 920 is further configured to traverse each engine function called in the uncompiled second subprogram, construct the dynamic link or the static link, and obtain the processed second subprogram.

[0230] The program compiling module 920 is further configured to compile the processed second subprogram to obtain the compiled second subprogram.

[0231] In some embodiments, when a dynamic link is constructed at the location where the engine function is called in the uncompiled second subroutine, the second device obtains the engine function from the compiled third subroutine when running the compiled second subroutine.

[0232] In some embodiments, when a static link is constructed at the location where the engine function is called in the uncompiled second subroutine, the second device obtains the engine function from within the compiled second subroutine when running the compiled second subroutine.

[0233] In some embodiments, the program compiling module 920 is further configured to compile at least one uncompiled third subprogram to obtain at least one compiled third subprogram.

[0234] The program compilation module 920 is also used to send the at least one compiled third subroutine to the second device. Different third subroutines include engine functions for implementing different general engine logics in the application. The compiled third subroutine runs in the second device as an engine plug-in.

[0235] In some embodiments, the program compilation module 920 is further configured to divide the entire engine function of the first engine into at least one engine function group, each engine function group including at least two engine functions.

[0236] The program compiling module 920 is further configured to encapsulate the at least one engine function group to obtain the at least one uncompiled third subprogram.

[0237] In some embodiments, the program compilation module 920 is further configured to divide the full set of engine functions according to functional types of the engine functions in the full set of engine functions to obtain the at least one engine function group.

[0238] The program compilation module 920 is further configured to divide the entire set of engine functions according to the usage frequency of the engine functions in the entire set of engine functions to obtain the at least one engine function group.

[0239] In some embodiments, the program compilation module 920 is further configured to run at least two application programs developed by the first engine to determine a usage frequency of each engine function in the full set of engine functions;

[0240] The program compilation module 920 is further configured to filter engine functions whose usage frequency is greater than a threshold value to obtain the at least one engine function group.

[0241] In some embodiments, the program distribution module 930 is configured to filter at least one first function for starting the first application from the functions included in the compiled second subprogram;

[0242] The program distribution module 930 is further configured to package the at least one first function and send the package to the second device.

[0243] Please refer to Figure 10, which shows a block diagram of an application processing device provided by another embodiment of the present application. As shown in Figure 10, the device 1000 may include: an information acquisition module 1010, a local acquisition module 1020, a program download module 1030, and a program execution module 1040.

[0244] The information acquisition module 1010 is used to obtain configuration information corresponding to the first application based on a download request of the first application, and the configuration information includes attribute information of the first subroutine and attribute information of the second subroutine. The first subroutine is a program for implementing the engine logic in the first application, and the second subroutine is a program for implementing the business logic in the first application.

[0245] The local acquisition module 1020 is configured to acquire the compiled first subprogram from the local computer when it is determined based on the attribute information of the first subprogram that the compiled first subprogram exists locally.

[0246] The program download module 1030 is used to download the compiled second subprogram according to the attribute information of the second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that supports running on a browser.

[0247] The program running module 1040 is configured to run the first application program according to the compiled first subprogram and the compiled second subprogram.

[0248] In some embodiments, the program download module 1030 is further configured to obtain the compiled first subprogram from the server when it is determined based on the attribute information of the first subprogram that the compiled first subprogram does not exist locally.

[0249] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0250] Please refer to Figure 11, which shows a block diagram of a computer device 1100 provided in one embodiment of the present application. The computer device 1100 can be any electronic device with data computing, processing, and storage capabilities. The computer device 1100 can be used to implement the processing method for the application on the first device side or the processing method for the application on the second device side provided in the above embodiments.

[0251] Typically, the computer device 1100 includes a processor 1101 and a memory 1102 .

[0252] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence, referred to as AI) processor, which is used to process computing operations related to machine learning.

[0253] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-mentioned processing method of the application on the first device side, or the processing method of the application on the second device side.

[0254] Those skilled in the art will appreciate that the structure shown in FIG11 does not limit the computer device 1100 and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.

[0255] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is executed by the processor, the processing method of the application on the first device side or the processing method of the application on the second device side is implemented. Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0256] In an exemplary embodiment, a computer program product is further provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to execute the aforementioned method for processing an application on the first device side or the method for processing an application on the second device side.

[0257] It should be noted that the collection and processing of relevant data (such as business codes) in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in instances, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0258] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.

[0259] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for processing an application, the method being executed by a first device, the method comprising: Obtain an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing engine logic in a first application, and the second subprogram is a program for implementing business logic in the first application; Compiling the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that can be run on a browser; The compiled second subprogram is sent to a second device that requests to download the first application program. If the compiled first subprogram exists locally on the second device, the second device runs the first application program according to the compiled second subprogram and the compiled first subprogram.

2. The method according to claim 1, wherein The method further comprises: Obtaining an uncompiled third subprogram as an engine plug-in, wherein the third subprogram is a program for implementing common engine logic in different application programs; Compiling the uncompiled second subprogram according to the uncompiled first subprogram to obtain the compiled second subprogram includes: The uncompiled second subprogram is compiled according to the uncompiled first subprogram and the uncompiled third subprogram to obtain the compiled second subprogram.

3. The method according to claim 2, wherein: Compiling the uncompiled second subprogram according to the uncompiled first subprogram and the uncompiled third subprogram to obtain the compiled second subprogram includes: For each engine function called in the uncompiled second subroutine, if the engine function exists in the uncompiled third subroutine, a dynamic link is constructed at the location where the engine function is called in the uncompiled second subroutine, wherein the dynamic link is used to link the location where the engine function is called in the uncompiled second subroutine with the engine function in the compiled third subroutine; If the engine function does not exist in the uncompiled third subprogram but exists in the uncompiled first subprogram, a static link is constructed at the location where the engine function is called in the uncompiled second subprogram, wherein the static link is used to embed the engine function in the uncompiled first subprogram at the location where the engine function is called in the uncompiled second subprogram; Traversing each engine function called in the uncompiled second subroutine, building the dynamic link or the static link, and obtaining a processed second subroutine; The processed second subprogram is compiled to obtain the compiled second subprogram.

4. The method according to claim 3, wherein: In a case where a dynamic link is constructed at a location where the engine function is called in the uncompiled second subprogram, the second device obtains the engine function from the compiled third subprogram when running the compiled second subprogram; In a case where a static link is constructed at the position where the engine function is called in the uncompiled second subprogram, the second device obtains the engine function from inside the compiled second subprogram when running the compiled second subprogram.

5. The method according to any one of claims 1 to 4, wherein: The method further comprises: compiling at least one uncompiled third subprogram to obtain at least one compiled third subprogram; The at least one compiled third subprogram is sent to the second device, where different third subprograms include engine functions for implementing different general engine logics in the application program, and the compiled third subprogram runs in the second device as an engine plug-in.

6. The method according to claim 5, wherein: The method further comprises: Dividing all engine functions of the first engine into at least one engine function group, each engine function group including at least one engine function; The at least one engine function group is encapsulated to obtain the at least one uncompiled third subroutine.

7. The method according to claim 6, wherein: The dividing of the entire engine function of the first engine to obtain at least one engine function group includes: Dividing the full set of engine functions according to functional types of the engine functions in the full set of engine functions to obtain the at least one engine function group; or, The full amount of engine functions are divided according to the usage frequency of the engine functions in the full amount of engine functions to obtain the at least one engine function group.

8. The method according to claim 7, wherein: The method further comprises: running at least two applications developed using the first engine to determine a usage frequency of each engine function in the full set of engine functions; The step of dividing the entire set of engine functions according to the usage frequencies of the engine functions to obtain the at least one engine function group includes: The engine functions whose usage frequencies are greater than a threshold are filtered to obtain the at least one engine function group.

9. The method according to any one of claims 1 to 8, wherein: The sending the compiled second subprogram to the second device that requests to download the first application program includes: screening at least one first function for starting the first application from the functions included in the compiled second subroutine; The at least one first function is packaged and sent to the second device.

10. A method for processing an application, the method being executed by a second device, the method comprising: Based on a download request of a first application, obtaining configuration information corresponding to the first application, the configuration information including attribute information of a first subprogram and attribute information of a second subprogram, the first subprogram being a program for implementing engine logic in the first application, and the second subprogram being a program for implementing business logic in the first application; When it is determined according to the attribute information of the first subprogram that the compiled first subprogram exists locally, obtaining the compiled first subprogram from the local; Downloading a compiled second subprogram according to the attribute information of the second subprogram, wherein the compiled second subprogram includes an executable file in a first format, and the executable file in the first format is a file that supports running on a browser; The first application program is run according to the compiled first subprogram and the compiled second subprogram.

11. The method according to claim 10, wherein: The method further comprises: When it is determined according to the attribute information of the first subprogram that the compiled first subprogram does not exist locally, the compiled first subprogram is obtained from the server.

12. A device for processing an application, the device comprising: a program acquisition module, configured to acquire an uncompiled first subprogram and an uncompiled second subprogram, wherein the first subprogram is a program for implementing engine logic in a first application program, and the second subprogram is a program for implementing business logic in the first application program; a program compiling module, configured to compile the uncompiled second subprogram according to the uncompiled first subprogram to obtain a compiled second subprogram, wherein the compiled second subprogram includes an executable file in a first format, wherein the executable file in the first format is a file that supports running on a browser; A program distribution module is used to send the compiled second subprogram to a second device that requests to download the first application. If the compiled first subprogram exists locally on the second device, the second device runs the first application according to the compiled second subprogram and the compiled first subprogram.

13. A device for processing an application, the device comprising: an information acquisition module, configured to acquire configuration information corresponding to the first application based on a download request of the first application, the configuration information including attribute information of a first subprogram and attribute information of a second subprogram, the first subprogram being a program for implementing engine logic in the first application, and the second subprogram being a program for implementing business logic in the first application; a local acquisition module, configured to acquire the compiled first subprogram from the local computer when it is determined based on the attribute information of the first subprogram that the compiled first subprogram exists locally; a program download module, configured to download a compiled second subprogram according to the attribute information of the second subprogram, wherein the compiled second subprogram includes an executable file in a first format, wherein the executable file in the first format is a file that supports running on a browser; A program running module is used to run the first application program according to the compiled first subprogram and the compiled second subprogram.

14. A computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the application processing method according to any one of claims 1 to 9, or the application processing method according to any one of claims 10 to 11.

15. A computer-readable storage medium storing a computer program, wherein the computer program is loaded and executed by a processor to implement the method for processing an application according to any one of claims 1 to 9, or the method for processing an application according to any one of claims 10 to 11.

16. A computer program product, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the method for processing an application according to any one of claims 1 to 9, or the method for processing an application according to any one of claims 10 to 11.

Citation Information

Patent Citations

  • Application program information processing method and device

    CN108647028A

  • Operating system interface calling method and device and electronic equipment

    CN114490103A

  • Rule engine file generation method and device, server and storage medium

    CN117032651A

  • Avoiding gather and scatter when calling Fortran 77 code from Fortran 90 code

    US6647546B1