Program data processing method and device, product, equipment and medium

By generating index indication information to download and compile the target source code package, the pointer call method solves the problem of high memory and performance overhead in function calls, thus improving the running performance of the application.

CN121635997APending Publication Date: 2026-03-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, function calls in applications require the functions to be converted into JavaScript files, resulting in significant memory and performance overhead, especially in scenarios like mini-games where performance is poor.

Method used

By generating index indication information, the target source code package is downloaded and compiled in real time, and business logic is executed using pointer calls, reducing memory usage and performance overhead during function calls.

Benefits of technology

It enables fast function calls, reduces the overall performance overhead of the application, and improves runtime performance, especially in mini-game scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635997A_ABST
    Figure CN121635997A_ABST
Patent Text Reader

Abstract

The invention discloses a program data processing method and device, a product, equipment and a medium. The method comprises the steps that a first function is called to execute first service logic of an application program; in response to service triggering of the first service logic, first index indication information is generated based on the first function, and the first index indication information is used for indicating one index position in the function index table; according to indication of the first index indication information, a target source code packet of a second function needing to be called is downloaded, and the second function is used for executing a second service logic triggered in the application program; compiling the target source code packet to generate a target compiling packet of a second function; and based on the first index indication information, calling the target compiling package in a pointer calling mode to execute the second business logic. By adopting the application, the overall overhead of calling the second function through the first function can be reduced, so that the running performance of the application program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, product, device, and medium for processing program data. Background Technology

[0002] Applications typically have several functions. Calling these functions executes the application's business logic to achieve its corresponding business functions. In applications like mini-games, if function calls need to be implemented at the function level, the various functions of the application (e.g., the mini-game) need to be pre-converted into JavaScript files (a type of text file). When a function call is triggered, a stub function for calling the function is first compiled, and then this compiled stub function indirectly calls the JavaScript file containing the function, thus achieving the function call.

[0003] Converting functions into JS files incurs significant overhead, compiling stub functions for calling JS files consumes a large amount of application memory, and subsequent calls to JS files via compiled stub functions also incur further performance overhead. This results in a substantial overall overhead for calling functions within the application, which, in the specific context of mini-games, leads to poor performance. Summary of the Invention

[0004] This application provides a method, apparatus, product, device, and medium for processing program data, which can reduce the overall overhead of calling a second function through a first function, thereby improving the running performance of the application.

[0005] This application provides a method for processing program data, the method comprising:

[0006] The first function is called to execute the application's first business logic.

[0007] In response to a business triggering of the first business logic, a first index indication information is generated based on the first function. The first index indication information is used to indicate an index position in the function index table.

[0008] Following the instructions of the first index information, download the target source code package of the second function to be called. The second function is used to execute the second business logic triggered in the application.

[0009] The target source code package is compiled to generate the target compiled package for the second function;

[0010] Based on the first index indication information, the target compilation package is invoked to execute the second business logic using a pointer invocation method.

[0011] This application provides a program data processing apparatus, the apparatus comprising:

[0012] The first calling module is used to call the first function to execute the first business logic of the application.

[0013] The response module is used to respond to the business trigger of the first business logic and generate first index indication information based on the first function. The first index indication information is used to indicate an index position in the function index table.

[0014] The download module is used to download the target source code package of the second function to be called according to the instructions of the first index information. The second function is used to execute the second business logic triggered in the application.

[0015] The compilation module is used to compile the target source code package and generate the target compiled package for the second function;

[0016] The second calling module is used to call the target compiled package to execute the second business logic based on the first index indication information using the pointer calling method.

[0017] Optionally, the second calling module, based on the first index indication information, uses a pointer-based calling method to invoke the target compiled package to execute the second business logic, including:

[0018] Establish the association between the target compilation package and the function index of the second function, and add the function index of the second function to the index position indicated by the first index indicator information in the function index table;

[0019] Using the first index indication information, the function index at the indicated index position is queried in the function index table;

[0020] The target compiled package that is associated with the function index queried is invoked to execute the second business logic;

[0021] The first index indication information is the pointer information of the second function. The pointer calling method refers to the method of calling the function based on the result queried from the function index table using the pointer information.

[0022] Optionally, the second function has a corresponding intermediate function, which is used to call the second function. The function index of the intermediate function is recorded at the index position indicated by the first index indication information in the function index table.

[0023] The download module downloads the target source code package of the second function to be called according to the instructions in the first index information, including:

[0024] Based on the first index indication information, the function index of the intermediate function is retrieved from the function index table;

[0025] The query-based function index calls an intermediate function to download the target source code package based on the first index indication information through the called intermediate function.

[0026] Optionally, the second calling module establishes the association between the target compiled package and the function index of the second function, and adds the function index of the second function to the index position indicated by the first index indicator information in the function index table, including:

[0027] Using the called intermediate function, establish the association between the function index of the target compiled package and the second function; and,

[0028] Using the called intermediate function, the function index of the intermediate function at the index position indicated by the first index indication information in the function index table is overwritten and updated to the function index of the second function.

[0029] Optionally, the second function is contained in a function group, which contains N functions, where N is a positive integer, and the N functions have the same signature information and correspond to the same intermediate function;

[0030] Among them, the signature information of any function among the N functions contains the data format of the input data and the data format of the return data of any function. The signature information of any function is used to verify the data format of the input data and the data format of the return data of any function.

[0031] Once the signature verification of any function is successful, the call process for that function is initiated.

[0032] Optionally, an index position in the function index table corresponds to a marker position in the status marker table and a function of the associated application. An index position in the function index table is used to record the function index of the associated function.

[0033] Among them, a marker position in the status marker table is used to mark the loading status of the function associated with the corresponding index position in the function index table. The loading status is either unloaded or loaded.

[0034] If a marker position in the status marker table is used to mark a loaded state, then the corresponding index position in the function index table has recorded the function index of the associated function. If a marker position in the status marker table is used to mark an unloaded state, then the corresponding index position in the function index table has not recorded the function index of the associated function.

[0035] Optionally, the download module may download the target source code package of the second function to be called according to the instructions of the first index information, including:

[0036] According to the instructions of the first index, the loading status of the second function is obtained from the corresponding mark position in the status mark table;

[0037] If the second function is in an unloaded state, the target source code package is downloaded based on the first index indication information.

[0038] Optionally, if a function of the application is in a loaded state, the application has a compilation package for that function, and the compilation package is associated with the function index of that function;

[0039] The second calling module mentioned above can also be used for:

[0040] If the second function is in a loaded state, then the function index of the second function is queried in the function index table based on the first index indication information;

[0041] The compiled package in the application that is associated with the function index of the second function being queried is invoked to execute the second business logic.

[0042] Optionally, the source code package created for each function of the application is identified with the function index of each function, and the source code package of each function is stored in the background device of the application.

[0043] The download module downloads the target source code package based on the first index indication information, including:

[0044] Obtain the function index of the second function associated with the first index indication information;

[0045] Download the target source code package that is identified by the function index of the second function from the backend device.

[0046] Optionally, the above-mentioned program data processing device further includes a memory allocation module, which is used to: When the application is started, the memory allocation module is used to:

[0047] Write the status flag table to the end of the application's program memory;

[0048] Request memory allocation for the status flag table from the application's memory allocator, so that the memory allocator allocates the target memory for the status flag table in the program's memory;

[0049] The state flag table written at the tail position is transferred and written to the target memory.

[0050] Optionally, the application has an original source code package, which is divided into a source code head package and source code sub-packages. The source code head package contains the application's head package functions, and the source code sub-packages contain the application's sub-package functions.

[0051] When the application is started, each function in the first package of the source code is loaded, and each function in the first package is in a loaded state after being loaded.

[0052] The application has a compiled package containing the first package function that is in a loaded state, and this compiled package is associated with the function index of the first package function to which it belongs, and the function index of the first package function that is in a loaded state has been recorded in the function index table.

[0053] Optionally, the first function can be any function in the first package of the source code or any function in a sub-package of the source code; and,

[0054] The second function is any function in any sub-package of the source code sub-package.

[0055] Optionally, the source code sub-package contains a third function, and the source code header contains a fourth function. The third function is used to call the fourth function, and the third function is used to execute the third business logic of the application. The fourth function is used to execute the fourth business logic of the application. The above-mentioned program data processing device further includes a third calling module, which is used for:

[0056] In response to a business triggering of the third business logic, a second index indication information is generated based on the third function;

[0057] Based on the second index indication information, look up the function index of the fourth function to be called in the function index table;

[0058] The compiler package in the application that is associated with the function index of the fourth function being queried is invoked to execute the fourth business logic.

[0059] This application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the method of this application.

[0060] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the method described in the above-mentioned aspect.

[0061] According to one aspect of this application, a computer program product is 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 perform the methods provided in the various alternative embodiments described above.

[0062] This application can call a first function to execute the first business logic of an application; and in response to a business triggering the first business logic, generate first index indication information based on the first function, the first index indication information being used to indicate an index position in a function index table; and, according to the indication of the first index indication information, download the target source code package of a second function to be called, the second function being used to execute the second business logic triggered in the application; thereby, the target source code package can be compiled to generate a target compiled package of the second function, so as to call the target compiled package to execute the second business logic based on the first index indication information using a pointer call method. Therefore, the method proposed in this application can create source code packages for each function (including the target source code package of the second function) at the function granularity. Thus, when the second function is called through the first function, the target source code package of the second function can be downloaded and compiled in real time to obtain the target compiled package of the second function. Then, the target compiled package of the second function can be quickly called through pointer calls. Moreover, there is no need to convert the second function to other file formats and store it before it is triggered. Therefore, the memory space occupied by the application is reduced and the performance overhead of calling the second function through the first function is reduced. In addition, the entire process of calling the application in this application can be carried out within the Wasm virtual machine without having to go outside the Wasm virtual machine to the JavaScript virtual machine to implement the function call. This series of operations also improves the running performance of the application. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a schematic diagram of a network architecture for program data processing provided in an embodiment of this application;

[0065] Figure 2 This is a schematic diagram illustrating a scenario of function calls provided in an embodiment of this application;

[0066] Figure 3 This is a flowchart illustrating a method for processing program data provided in an embodiment of this application;

[0067] Figure 4 This is a schematic diagram illustrating a scenario of calling a second function, provided in an embodiment of this application.

[0068] Figure 5 This is a flowchart illustrating a method for downloading the source code package of a second function according to an embodiment of this application;

[0069] Figure 6 This is a schematic diagram illustrating a scenario where a second function is called through an intermediate function, as provided in an embodiment of this application.

[0070] Figure 7 This is a flowchart illustrating another method for downloading the source code package of the second function provided in an embodiment of this application;

[0071] Figure 8 This is a schematic diagram illustrating the effect of a mapping relationship between a state flag table and a function index table provided in an embodiment of this application;

[0072] Figure 9 This is a schematic diagram illustrating a scenario where a status flag table is stored in program memory, as provided in an embodiment of this application.

[0073] Figure 10 This is a schematic diagram of the structure of a program data processing device provided in an embodiment of this application;

[0074] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0075] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0076] First, it should be noted that all data collected in this application (such as functions in the application, source code packages of functions, index information of functions, signature information of functions, and compilation packages of functions, etc.) are collected with the consent and authorization of the data owner (such as users, organizations, or enterprises), and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions.

[0077] Here, the relevant technical concepts involved in this application are explained:

[0078] Mini-games are a new form of game product that relies on traffic platforms and uses mini-programs as a carrier. In addition to not requiring downloads, they also meet players' needs for a convenient, instant-play experience. Mini-games are a specific type of mini-program.

[0079] wasm: WebAssembly, a new code format designed for the web, is a type of intermediate compiled bytecode.

[0080] `table`: A function index table that stores function references, used to implement indirect function calls, such as calls via `call_indirect` (pointer-based calls). In WebAssembly, this function index table can be denoted as `WebAssembly.Table`.

[0081] wasm first package: The first package after code is packaged (such as the wasm package), containing the main functions that the application needs to call.

[0082] wasm subpackage: The second package after code subpackaging (such as subpackaging the wasm package), containing relevant functions that the application needs to call in a minor way.

[0083] An application typically has a wasm main package and a wasm sub-package.

[0084] Please see Figure 1 , Figure 1 This is a schematic diagram of a network architecture for program data processing provided in an embodiment of this application. For example... Figure 1 As shown, this network architecture may include a server 200 and a terminal device cluster. The terminal device cluster may include one or more terminal devices; the number of terminal devices is not limited here, and the specific number of terminal devices can be determined according to the actual application scenario. Figure 1 As shown, multiple terminal devices may specifically include terminal device 1, terminal device 2, terminal device 3, ..., terminal device n; as... Figure 1 As shown, terminal device 1, terminal device 2, terminal device 3, ..., terminal device n can all connect to server 200 via the network, so that each terminal device can interact with server 200 through the network connection.

[0085] like Figure 1 The server 200 shown can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal device can be a smartphone, tablet, laptop, desktop computer, smart TV, in-vehicle terminal, smart home device, or other smart terminal. The following description uses the communication between terminal device 1 and server 200 as an example to illustrate the specific implementation of this application.

[0086] The terminal device 1 may contain a runnable application (such as a game program), and the server 200 may be a backend server for that application, which may be any program that needs to be run. The server 200 may provide the application with relevant data required during its operation (such as the source code packages of the functions called), as described below.

[0087] Please see also Figure 2 , Figure 2 This is a schematic diagram illustrating a scenario of function calls provided in an embodiment of this application. For example... Figure 2 As shown, during the running of the application on terminal device 1, a first function can be called to execute the first business logic of the application. Thus, terminal device 1 can receive the business trigger of the first business logic according to the corresponding user operation (which can be called business operation) in the application interface of the application. In response to the business trigger of the first business logic, the first function can generate index indication information of the function to be called (such as the second function). This index indication information can be called the first index indication information. The second function can be used to execute the second business logic triggered in the application.

[0088] Terminal device 1 can download the target source code package of the second function to be called from server 200 through the generated first index indication information, and can compile the target source code package in real time to generate the target compiled package of the second function. Therefore, terminal device 1 can use the first index indication information to call the target compiled package using pointer invocation to execute the second business logic of the application, thus realizing the call to the second function and achieving the purpose of calling the second function to execute the second business logic of the application.

[0089] Using the method provided in this application, for functions that need to be called on demand (such as the second function), their source code packages can be created in advance. Thus, when the function is triggered for invocation, the source code package of the function can be downloaded and compiled in real time, so as to realize the real-time and fast invocation of the function, thereby improving the performance of function invocation.

[0090] Please see Figure 3 , Figure 3 This is a flowchart illustrating a method for processing program data provided in an embodiment of this application. The executing entity in this embodiment can be a processing device, which can be a single computer device or a cluster of multiple computer devices. The computer device can be a terminal device capable of running applications, or other devices capable of running applications; there are no limitations on this. Figure 3 As shown, the method may include:

[0091] Step S101: Call the first function to execute the first business logic of the application.

[0092] Specifically, the application in this application can be any form of program, such as a software program, a mini-program (e.g., a mini-game), or a web application, etc. Depending on the application scenario, the application can also be any type of program. For example, in a game application scenario, the application can be a game program; in a shopping application scenario, the application can be a shopping program; in a communication application scenario, the application can be a communication program, etc.

[0093] This application can have several functions, which can be used to execute the application's business logic to implement the application's corresponding program functions, such as navigating to a page, providing voice prompts, or displaying a page, etc. It can be understood that a function of the application can be used to implement a corresponding sub-function (i.e., program function) of the application, and the specific function of this sub-function can be determined according to the actual application scenario.

[0094] An application can have an original source code package, which can be a complete source code package developed and written for the application. This original source code package can contain the source code of each function of the application. The original source code package can be divided into a main source code package and sub-source code packages based on the sub-functionality implemented by each function. For example, if the original source code package is a wasm package for the application, the main source code package can be called the wasm main package, and the sub-source code packages can be called wasm sub-packages.

[0095] The first source code package can contain functions that the application will frequently call. In other words, the first source code package can contain all the functions that the application mainly needs to call during its operation. The functions in the first source code package can be called the first package functions of the application. The first source code package can contain multiple first package functions.

[0096] A source code subpackage can contain functions that are not frequently called by the application. In other words, the source code subpackage can contain functions that the application needs to call less frequently during its operation. The functions in the source code subpackage can be called subpackage functions of the application. A source code subpackage can contain multiple subpackage functions.

[0097] It should be noted that the functions in the source code's initial package can be loaded as a whole when the application starts. Once loaded, these functions are in a loaded state. Therefore, it can be understood that when the application starts, the functions in the source code's initial package can be loaded and thus be in a loaded state. The entire source code's initial package can be loaded as a whole, without needing to load each function separately.

[0098] Sub-package functions in the source code sub-package can be loaded as needed to implement the corresponding function calls. For example, sub-package functions in the source code sub-package can be loaded when they are triggered during the application's runtime, so as to call the corresponding sub-package functions. That is, when the sub-package functions have not been triggered, they can be in an unloaded state.

[0099] Here, we explain the loading states of an application: A function in an application can be in a loaded state or an unloaded state. A function in the loaded state is a compiled function that can be called directly, while a function in the unloaded state is an uncompiled function that needs to be compiled before it can be called.

[0100] Therefore, it can be understood that an application can have compiled packages for functions that are already loaded. These packages are compiled from the function's source code (such as wasm format code) and are in machine language (i.e., a language that a machine can recognize and execute), such as binary language. For functions that are not yet loaded, the application may not have their compiled packages. Furthermore, these compiled packages can be associated with the function index of their respective functions. The function index (which can be denoted as func_id) can serve as an identifier for the function, uniquely identifying it.

[0101] The function index can be recorded in the function index table. This function index table (which can be denoted as table) is a table that can be used to index and query functions through function pointer information (also called index indication information). By querying this function index table, indirect calls to functions of the application can be realized.

[0102] It should be noted that an index position in the function index table (i.e., the position used to record a function index) can be indicated by the corresponding index indication information. That is, an index indication information can be a position offset in the function index table. Therefore, an index indication information can be used to indicate an index position in the function index table.

[0103] In a function index table, an index position can be associated with a function, and the functions associated with each index position are predetermined. One index position can be associated with one function, or multiple index positions can be associated with the same function. In other words, multiple index positions in the function index table can be used to record the function index of the same function, and multiple index indications associated with a function can all call that function.

[0104] The pointer information (i.e., index indicators) of each function in the application can be calculated in advance. The application can record the mapping relationship between each index indicator and each function; that is, an index indicator of a function can be mapped to the function index of that function, and this mapping relationship can be obtained by the application. For example, this mapping relationship can be contained in the source code package of the function. Therefore, after the application obtains the source code package of the function, it can know which index positions in the function index table the function index needs to be filled in. The function associated with an index position can be the function that has a mapping relationship with the index indicator used to indicate that index position. Therefore, the function associated with an index position can also be called the function associated with the index indicator used to indicate that index position. In summary, the function index of each index position in the function index table that needs to record which function's index is determined and fixed in advance.

[0105] As explained above, if a function is loaded and is in a loading state, then the function index of that function can be recorded at the index position indicated by all the index indicators that have a mapping relationship with that function in the function index table. That is, the function index of the loaded function can be recorded at the index position indicated by all the index indicators that have a mapping relationship with that function.

[0106] Furthermore, if a function has not been loaded (i.e., is in an unloaded state), then all index positions indicated by the index indicators that have a mapping relationship with the function in the function index table can be empty. In other words, the function index will not be recorded at the index positions indicated by all index indicators that have a mapping relationship with the function.

[0107] In summary, it can be understood that an application can have a compiled package containing a first package function that is already loaded, and this compiled package can be associated with the function index of its corresponding first package function. Furthermore, the function index of the loaded first package function can already be recorded in the function index table. Here, each index position in the function index table used to record the function index of the first package function can be filled with the function index of each first package function after it has been loaded. That is, when the application is started, the index indication information of a loaded first package function can already record the function index of that first package function at each index position indicated in the function index table.

[0108] The first function mentioned above can be used to call the second function, which can be a function capable of real-time loading. Since the first package function in the source code first package does not need to be loaded in real-time during application runtime (which may include compilation processing), and the sub-package function can be called by the first package function or other sub-package functions, the first function can be any first package function in the source code first package or any sub-package function in the source code sub-package, and the second function can be any sub-package function in the source code sub-package. The first function and the second function are different functions.

[0109] Step S102: In response to the business trigger of the first business logic, generate first index indication information based on the first function. The first index indication information is used to indicate an index position in the function index table.

[0110] Specifically, in response to a business trigger of the first business logic, the processing device can generate an index indication information for the function to be called (such as the second function) through the first function. This index indication information can be called the first index indication information, which is used to indicate an index position in the function index table.

[0111] In this context, the business trigger in response to the first business logic is essentially triggering the first function to call other functions. This business trigger can be initiated by the user in the application's interface through the execution of the first business logic, resulting in output elements (such as controls) that display or broadcast information. For example, calling the first function to execute the first business logic can implement a program function of the application. This program function can be manifested as a corresponding control displayed in the application's interface, which the user can click (or use other touch or voice control methods) to trigger the first business logic.

[0112] Optionally, one or more second functions can be called through the first function. Therefore, it can be understood that if one second function can be called through the first function, then the first index indication information generated above can be one, and if multiple second functions can be called through the first function, then multiple first index indication information can be generated above. One first index indication information can be generated for each second function to be called. One first index indication information can be used to indicate an index position in the function index table, and different first index indication information can be used to indicate different index positions in the function index table.

[0113] Specifically, the processing device can calculate the first index indication information of the function to be called through the expression in the function body of the first function (i.e., the expression of the first function). There can be multiple calculation logics, and the specific calculation logic used can be determined according to the actual settings of the application. This application does not impose any restrictions on this.

[0114] For example, the expression of the first function may contain a specific parameter of a specific parent class (the parent class of the function). This parent class may have multiple derived classes, each of which may correspond to a table_id (i.e., index indication information). Each derived class may correspond to a table_id, and the table_ids corresponding to each of the multiple derived classes may be stored in the application's program memory. The specific parameter in the expression of the first function may be used to indicate one or more specific derived classes among the multiple derived classes of the parent class. Therefore, the processing device may use the specific parameter to read the table_id corresponding to one or more derived classes indicated by the parent class from the program memory as the first index indication information calculated by the expression of the first function.

[0115] Since the principle of calling each of the required second functions is the same, the following explanation will use the process of calling a corresponding second function with the generated first index indication information as an example.

[0116] Step S103: According to the instructions of the first index indication information, download the target source code package of the second function to be called. The second function is used to execute the second business logic triggered in the application.

[0117] Specifically, the processing device can download the source code package of the second function to be called according to the instructions of the first index instruction information. The source code package of the second function can be referred to as the target source code package. The second function can be used to execute the second business logic triggered in the application. The process of executing the second business logic can also be the process of implementing a program function of the application, such as the function of displaying the corresponding program space, jumping to the corresponding application interface, or performing the corresponding audio broadcast, etc.

[0118] In this application, source code packages can be created for the functions of the application. One function can correspond to one source code package (also known as source code sub-package). The source code package corresponding to a function includes the relevant source code required to call the function in the original source code package (excluding redundant source code related to the function, which is source code that is not needed when calling the function).

[0119] Typically, the creation of source code packages for application functions is performed before the original source code package of the application is divided into source code header packages and source code sub-packages. That is, when creating the source code packages for application functions, it is not yet known which functions in the application are header package functions and which are sub-package functions. Therefore, this application can create its own source code package for each function of the application. A function can have one source code package, which contains the relevant source code required to call the function. In other words, a source code package for a function can be understood as a representation of that function.

[0120] In reality, the functions requiring real-time loading in this application are those within sub-packages of the source code sub-packages. The main package functions are loaded when the application starts. Therefore, during application execution, typically only the source code packages of the sub-package functions are used. If it were possible to determine which functions in the application are main package functions and which are sub-package functions when creating the function source code packages, then only the source code packages of each sub-package function would need to be created.

[0121] Furthermore, the source code package created for each function in the application can be individually identified with its own function index. Each function's source code package can be stored in the application's background device (such as a background server). In other words, the source code package created for a function can be identified with that function's index; therefore, the source code package for that function can be found using that index.

[0122] Optionally, the process of creating the source code package for each function described above can be executed by the application's background device. The process of the background device creating a source code package for a function may include: the background device traversing the function source code within the function body of the original source code package, and copying the relevant function source code required to call the function (such as global variables, imported functions, and tag code). The source code package for the function can then be constructed using the copied source code, and the functions belonging to this source code package can be called through the table (function index table) of the first package function. It should be noted that, while the first package function might correspond to one table and sub-package functions to another, in this application, both the first package function and sub-package functions can share the table corresponding to the first package function; that is, the table corresponding to the first package function can be used as the function index table in this application.

[0123] Since the first index indication information of the second function is mapped to the function index of the second function, the processing device can obtain the function index of the associated second function through the first index indication information. Thus, the source code package identified with the function index can be downloaded to the background device through the obtained function index, and the source code package is the target source code package.

[0124] For example, the processing device can generate a download request using the obtained function index. The download request can carry the function index, and the background device can use the download request to find the target source code package that is identified by the function index it carries, so that the processing device can download it.

[0125] The premise for the processing device to download the target source code package of the second function may be that the second function has not yet been loaded. Regarding how to determine whether the second function has been loaded when deciding whether to download the target source code package, please refer to the following. Figure 5 and Figure 7 The relevant descriptions in the corresponding embodiments.

[0126] Step S104: Compile the target source code package to generate the target compiled package of the second function.

[0127] Specifically, the processing device can perform real-time compilation processing on the downloaded target source code package to generate a compilation package of the second function. This compilation package can be called the target compilation package, which is the code package obtained by compiling the target source code package into machine language (such as binary language) in real time.

[0128] Step S105: Based on the first index indication information, the target compilation package is invoked to execute the second business logic using a pointer invocation method.

[0129] Specifically, the first index indication information mentioned above is the pointer information of the second function to be called. Therefore, the processing device can use the first index indication information to call the target compilation package in the pointer call method to execute the second business logic. This process is described below.

[0130] The processing device can establish an association between the target compiled package obtained in real time and the function index of the second function. Here, the function index of the second function can be obtained from the source code package of the second function, or it can be obtained through the first index indication information.

[0131] The processing device can also add the function index of the second function to the index position indicated by the first index indicator information in the function index table (this operation can be performed during compilation and instantiation of the target source code package), thereby setting the second function in the function index table. The function loading process can include compiling the function into a compiled package and setting the function in the function index table. The process of setting the second function in the function index table can be considered part of the instantiation process of the target source code package of the second function.

[0132] Therefore, the processing device can use the pointer information of the second function (i.e., the first index indication information) to look up the function index at the index position indicated by the pointer information in the function index table. The function index found is the function index of the second function to be called.

[0133] The processing device can invoke the aforementioned target compiled package that is associated with the queried function index to execute the application's second business logic. This process achieves indirect invocation of the second function based on the function index table.

[0134] The aforementioned pointer invocation method refers to a method of invoking a function by using pointer information to retrieve the result of a query in the function index table (such as the function index of the second function found). In practical operation, retrieving the function index from the function index table using pointer information can mean indirectly invoking the function index table using pointer information, thus obtaining the function index at the index position indicated by the pointer information. In other words, this pointer invocation method is a method of invoking a function based on the function index obtained from the function index table.

[0135] Through the process described above in this application, the second function is called by means of pointer calls (which is a type of indirect call) based on the first function.

[0136] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating a scenario of calling a second function, as provided in an embodiment of this application. Figure 4 As shown, after the processing device compiles the target package of the second function, it can establish an association between the function index of the second function and the target package of the second function, and can also store the function index of the second function (which could be...) Figure 4 Add “func_2” to the index position indicated by the first index indicator information in the function index table.

[0137] Therefore, by using the first index indication information generated above, the function index "func_2" of the second function can be found at the index position indicated by the function index table, and the target compilation package associated with the queried function index "func_2" can be called to execute the second business logic, thus realizing the call to the second function.

[0138] Furthermore, the following describes the process of calling the first package function through a sub-package function. This process may include: the source code sub-package may contain a third function, and the source code first package may contain a fourth function. That is, the third function is a sub-package function, which may be the same function as the first or second function mentioned above, or it may be a different function. The fourth function is a first package function, which may be the same function as the first function mentioned above, or it may be a different function. The third function and the fourth function are different functions.

[0139] The third function can be used to call the fourth function, the third function can be used to execute the third business logic of the application, and the fourth function can be used to execute the fourth business logic of the application. The process of executing the third business logic and the process of executing the fourth business logic can both belong to the process of implementing the corresponding program functions of the application.

[0140] After the application calls the third function to execute the third business logic, the processing device can generate a second index indication information in response to the business trigger of the third business logic through the third function. Alternatively, the second index indication information can be generated through the expression of the third function. This second index indication information is the index indication information of the function to be called (such as the fourth function).

[0141] Since the first package function (containing the fourth function) is loaded when the application is started, the processing device can directly look up the function index of the fourth function to be called in the function index table using the generated second index indication information.

[0142] Therefore, the processing device can call the compiled package (i.e., the compiled package of the fourth function) in the application that is associated with the function index of the queried fourth function to execute the fourth business logic of the application. Through the above process, the calling of the first package function (such as the fourth function) by the sub-package function (such as the third function) is realized.

[0143] The method provided in this application can achieve high-performance operation of the application. When applied to specific application scenarios, it can provide a smooth running experience for the application in the corresponding application scenario, thereby improving the user's experience of using the application.

[0144] For example, when applying the method of this application to the application scenario of mini-games, mini-games are inherently lightweight and require no download. Users want a convenient and smooth gaming experience. However, in the existing operation of mini-games, it is necessary to call the pre-converted JS files of the mini-game functions through generated stub functions. This not only increases the memory overhead of the mini-game runtime but also reduces the efficiency of calling the mini-game functions, resulting in a poor gaming experience. The method of this application can overcome this problem. This application downloads, compiles, and runs the mini-game functions in real time by splitting them into packages (i.e., source code packages), without pre-converting the mini-game functions into JS files and then calling the JS files through generated stub functions. This can greatly improve the running performance of the mini-game, improve the efficiency of calling the mini-game functions, and reduce the related overhead of calling the mini-game, thus providing users with a very smooth gaming experience.

[0145] This application can call a first function to execute the first business logic of an application; and in response to a business triggering the first business logic, generate first index indication information based on the first function, the first index indication information being used to indicate an index position in a function index table; and, according to the indication of the first index indication information, download the target source code package of a second function to be called, the second function being used to execute the second business logic triggered in the application; thereby, the target source code package can be compiled to generate a target compiled package of the second function, so as to call the target compiled package to execute the second business logic based on the first index indication information using a pointer call method. Therefore, the method proposed in this application can create source code packages for each function (including the target source code package of the second function) at the function granularity. Thus, when the second function is called through the first function, the target source code package of the second function can be downloaded and compiled in real time to obtain the target compiled package of the second function. Then, the target compiled package of the second function can be quickly called through pointer calls. Moreover, there is no need to convert the second function to other file formats and store it before it is triggered. Therefore, the memory space occupied by the application is reduced and the performance overhead of calling the second function through the first function is reduced. In addition, the entire process of calling the application in this application can be carried out within the Wasm virtual machine without having to go outside the Wasm virtual machine to the JavaScript virtual machine to implement the function call. This series of operations also improves the running performance of the application.

[0146] In one implementation, this application can load and call the second function through an intermediate function corresponding to the second function. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a flowchart illustrating a method for downloading the source code package of a second function provided in an embodiment of this application. Figure 5 As shown, the method may include:

[0147] Step S201: Based on the first index indication information, query the function index of the intermediate function from the function index table.

[0148] Specifically, the second function may have a corresponding intermediate function, which is used to call (e.g., indirectly call) the second function. Since which index positions in the function index table can be used to record the function index of the second function (i.e., which index positions the second function is associated with) can be known in advance, the function index of the intermediate function can be pre-recorded at each index position associated with the second function in the function index table. For example, the function index of the intermediate function can be written to each index position associated with the second function in the function index table when the application is started. Thus, the index position indicated by the first index indication information also has the function index of the intermediate function pre-recorded.

[0149] The function index recorded in the function index table (such as the intermediate function) can be a function that has already been loaded and processed. Therefore, the application can also have a compilation package of the intermediate function, which is obtained by compiling the source code package of the intermediate function (such as compiling the source code package of the application when starting the application). There can be an association between the compilation package and the function index of the intermediate function.

[0150] The processing device can use the first index indication information generated above to query the function index of the intermediate function corresponding to the second function from the index position indicated by the first index indication information in the function index table.

[0151] Step S202: Invoke an intermediate function based on the query function index to download the target source code package based on the first index indication information through the invoked intermediate function.

[0152] Specifically, by using the function index of the intermediate function obtained above, the compiler package associated with that function index can be called. This compiler package is the compiler package for the intermediate function, and calling the compiler package is equivalent to calling the intermediate function. This achieves the calling of the intermediate function corresponding to the second function using the first index indication information. Optionally, the intermediate function corresponding to the second function can be a function belonging to the application's first package.

[0153] Therefore, the processing device can download the target source code package based on the first index indication information through the called intermediate function. For example, it can obtain the function index (i.e. the function index of the second function) that has a mapping relationship with the first index indication information through the called intermediate function, and download the target source code package identified with the function index to the background device through the called intermediate function.

[0154] In this embodiment, the processing device is as described above. Figure 3In the corresponding embodiment, the process of establishing the association between the target compilation package and the function index of the second function, and adding the function index of the second function to the index position indicated by the first index indication information in the function index table, can include:

[0155] The processing device can use the aforementioned intermediate function to establish the association between the target compiled package and the function index of the second function; and the processing device can use the intermediate function to update the function index of the intermediate function at the index position indicated by the first index indicator information in the function index table to the function index of the second function. In other words, after the processing device loads the second function through the intermediate function, it can modify the function index of the intermediate function recorded at the index position indicated by the first index indicator information in the function index table to the function index of the second function. This allows the second function to be called directly through the first index indicator information in subsequent calls to the second function after it is loaded, without having to call the intermediate function corresponding to the second function again.

[0156] Once the second function is loaded, it can remain in a loaded state throughout the continuous operation of the application (i.e., until the application is closed).

[0157] From the above, it can be understood that when the second function is first called during the application's runtime (i.e., before it is loaded), it can be called through the intermediate function corresponding to the second function. However, during the runtime, when the second function is called again (i.e., after the first call to the second function), the corresponding index position in the function index table no longer stores the function index of the intermediate function corresponding to the second function, but stores the function index of the second function itself. Therefore, by using the first index indication information, the second function, which is already loaded, can be directly called by querying the function index table, without having to indirectly call the second function by calling the intermediate function corresponding to the second function.

[0158] In this implementation, the target compiled package of the second function can also be obtained by the intermediate function that calls the target source code package of the second function in real time, and subsequently, the intermediate function can call the target compiled package to execute the second business logic by means of the first index indication information and pointer calling method.

[0159] Please see Figure 6 , Figure 6This is a schematic diagram illustrating a scenario where a second function is called through an intermediate function, as provided in an embodiment of this application. Here, "call_indirect 2" can be the first call triggered by the first index indication information to the second function, i.e., the second index position in the function index table. The index position indicated by the first index indication information (here, the second index position) in the function index table can be pre-filled with the function index of the intermediate function corresponding to the second function (here, the function index of the intermediate function can be "func_10"). Therefore, through "call_indirect 2", the function index "func_10" of the intermediate function can be retrieved from the index position indicated in the function index table, and the intermediate function can be called through the retrieved function index "func_10".

[0160] The processing device can load the second function through the intermediate function it calls, using the first index indication information. For example, it can download and compile the target source code package of the second function in real time to obtain the target compiled package of the second function. It can also modify the table (function index table). For example, it can modify the function index of the intermediate function filled in at the index position indicated by all index indication information (i.e., not just the first index indication information) that has a mapping relationship with the second function in the function index table to the function index of the second function (here, the function index of the second function can be "func_9"). In other words, the processing device can use the function index of the second function to overwrite and update the function index of the intermediate function recorded at the index position indicated by each index indication information that has a mapping relationship with the second function in the function index table.

[0161] Therefore, the processing device can also call the function index table again within the called intermediate function using the aforementioned "call_indirect 2". It can then obtain the function index "func_9" of the second function from the index position indicated by the first index indicator information (i.e., the second index position) in the currently updated function index table. By obtaining the function index "func_9", it can call the target compilation package that has a relationship with it, thus realizing the call to the second function.

[0162] Optionally, the second function may be contained in a function group, which may contain N functions, where N is a positive integer, and the N functions may have the same signature information. The N functions with the same signature information may correspond to the same intermediate function.

[0163] The signature information of any of the N functions may include the data format of the input data (such as input parameters) and the data format of the return data (i.e., the data calculated by the function). For example, the data format may be an integer data format or a floating-point data format, and so on.

[0164] The signature information of any function (which can be the second function or any of the N functions mentioned above) can be used to verify the data format of the input data and the data format of the return data of that function. Specifically, it verifies whether the data format of the input data and the data format of the return data are correct and valid, and whether the actual data format of the input data and the actual data format of the return data are the same as the data format pre-configured for that function. The N functions mentioned above can share the same signature information.

[0165] When any of these functions is triggered, the data format of the input data and the data format of the return data of the function can be validated first using the function's signature information. After successful validation, the call process for the function can then be initiated (as described above). Figure 3 (The call flow for the second function described in the corresponding embodiment).

[0166] In this application, by setting the same intermediate function for functions with the same signature information, the number of intermediate functions set for functions in the application can be reduced, thereby reducing the overhead of calling other functions of the application through intermediate functions.

[0167] In the method of calling functions through intermediate functions, a global variable can be added to the application to record the calculated first index indication information. This allows the intermediate function to access and obtain the calculated first index indication information through the global variable each time and use it accordingly.

[0168] By employing the intermediate function calling method of this application, there is no need to additionally record the loading state of the second function; that is, there is no need to additionally record whether the second function is in a loaded or unloaded state. When the second function is in an unloaded state, it can be loaded and called through the corresponding intermediate function. When the second function is in a loaded state, there is no need to perform loading processing on the second function again; it can be called directly. Furthermore, using the intermediate function calling method for the second function does not require modification of the application's memory.

[0169] In another implementation, this application can use a status flag table to load and call the second function. The calling method using the status flag table and the function calling method using the intermediate function described above can be two parallel methods. That is, when using the status flag table, there is no need to use the intermediate function corresponding to the second function, and the function index of the intermediate function will not be pre-recorded in the function index table at the index positions associated with the second function. Similarly, when using the intermediate function, there is no need to use the status flag table, and the processing device does not need to maintain and store the status flag table.

[0170] Please see Figure 7 , Figure 7 This is a flowchart illustrating another method for downloading the source code package of a second function provided in an embodiment of this application. Figure 7 As shown, the method may include:

[0171] Step S301: According to the indication of the first index indication information, obtain the loading status of the second function from the corresponding mark position in the status mark table.

[0172] Specifically, an index position in the function index table can correspond to a marker position in the status marker table and a function in the associated application. An index position in the function index table can be used to record the function index of the associated function.

[0173] In other words, there is a correspondence between the index positions in the function index table and the marker positions in the status marker table. This correspondence can be pre-recorded in the application. A marker position in the status marker table can be used to mark the loading status of the function associated with the corresponding index position in the function index table. The loading status of a function can be either loaded or unloaded. Since a function can be associated with multiple index indicators, the status index table can also contain multiple marker positions to mark the loading status of the same function. The loading status of the same function under different associated index indicators is usually the same.

[0174] Since there is a correspondence between each index position in the function index table and each mark position in the status mark table, this application only needs to use one byte to mark the loading status of the corresponding function in the status mark table. If a mark position is recorded as 0, then the mark position is used to mark the unloaded state of the function, and if a mark position is recorded as 1, then the mark position is used to mark the loaded state of the function.

[0175] If a flag position in the status flag table is used to mark a loaded state, then the corresponding index position in the function index table can already record the function index of the associated function. Conversely, if a flag position in the status flag table is used to mark an unloaded state, then the corresponding index position in the function index table cannot yet record the function index of the associated function; for example, this index position can be empty at this time.

[0176] Therefore, the processing device can obtain (i.e., query) the loading status of the second function from the corresponding mark position in the status mark table (i.e., the mark position corresponding to the index position indicated by the first index indication information) according to the first index indication information. If the first index indication information is marked as 0 at the corresponding mark position in the status mark table, it indicates that the second function has not been loaded under the first index indication information; conversely, if the first index indication information is marked as 1 at the corresponding mark position in the status mark table, it indicates that the second function has been loaded under the first index indication information, that is, the second function is in the loaded state under the first index indication information.

[0177] Optionally, this application can add a code block before all indirect calls (i.e., calls via a function index table). This code block determines (e.g., via a status flag table) whether the currently triggered function (e.g., the second function) has been loaded. In other words, this code block can query the loading status of the second function; therefore, this code block (a piece of code) can also be called a loading determination program. If the second function is not loaded (i.e., in an unloaded state), the call to the second function can be blocked (e.g., using a wait function, a function used to implement waiting), and the second function can be loaded synchronously, because it can only be called after it has been loaded (i.e., after compilation and instantiation are complete). If the second function is loaded (i.e., in a loaded state), the loaded second function can be called directly.

[0178] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating the mapping relationship between a state flag table and a function index table provided in an embodiment of this application. Here, the first packet flag table is the state flag table. For example, the function index table here can have three index positions recording the function indices of three functions, including the function index func_x of function x, the function index func_y of function y, and the function index func_z of function z.

[0179] Correspondingly, the first packet tag table can also contain the first packet tag of function x (i.e., the first packet tag of func_x), the first packet tag of function y (i.e., the first packet tag of func_y), and the first packet tag of function z (i.e., the first packet tag of func_z). The first packet tag is the loading status of the function tag, which can be marked as 1 (loaded status) or marked as 0 (unloaded status).

[0180] Specifically, the index position of the function index func_x is mapped to the position of the first packet marker of the function x in the first packet marker table; the index position of the function index func_y is mapped to the position of the first packet marker of the function y in the first packet marker table; and the index position of the function index func_z is mapped to the position of the first packet marker of the function z in the first packet marker table. In other words, the index positions in the function index table and the marker positions in the first packet marker table can be in one-to-one correspondence.

[0181] Step S302: If the second function is in an unloaded state, then download the target source code package based on the first index indication information.

[0182] Specifically, if the second function is in an unloaded state (i.e., the index position indicated by the first index indication information is marked as unloaded at the corresponding mark position in the status mark table), the processing device can download the target source code package of the second function from the background device through the first index indication information, and can perform real-time compilation processing on the target source code package, thereby calling the second function. Furthermore, in this case, after completing the loading process of the second function, the processing device can also change the mark at the corresponding mark position in the status mark table indicated by the first index indication information to a loaded state, such as changing it from a 0 mark to a 1 mark. That is, the status mark table can be updated. The status mark table is used to record the real-time loading status of each function of the application during its execution.

[0183] As can be seen from the above, if a function of an application is in a loaded state, the application can have a compilation package for that function. This compilation package is obtained by compiling the source code package of that function, and the compilation package can be associated with the function index of that function.

[0184] Therefore, if the second function is in a loaded state (i.e., the index position indicated by the first index indication information is marked as loaded at the corresponding mark position in the status mark table), the processing device can directly query the function index of the second function from the index position indicated by the first index indication information, and can call the compiled package in the application that is associated with the queried function index of the second function to execute the second business logic. In this case, there is no need to download the source code package of the second function in real time, and therefore no need to perform real-time compilation processing on the source code package of the second function, i.e., no need to perform real-time loading processing on the second function again.

[0185] Optionally, in the method of function calling through the status flag table, this application can modify the original direct call (i.e., call without using the function index table) but cross-package (such as cross-package between different source code packages, or cross-package between the source code package of a sub-package function and the source code head package) function call (such as a sub-package function calling another sub-package function) to an indirect call (in fact, this modification also exists when calling functions through intermediate functions, that is, changing direct call to indirect call), that is, modifying it to call through the function index table. In this case, the index indicator information of the function to be called (such as the second function) (such as the first index indicator information, which can belong to the call target) can be a constant. Because the function to be called is clear, the constant can be understood as being directly included in the first function. Therefore, every time the index indicator information is needed, the constant can be set in real time to perform the corresponding call operation, because setting the constant is relatively simple and quick.

[0186] If the target of the call is not a constant but an expression (such as the expression in the first function), a local variable can be added to the function body of the first function (which can be the compiled function body, such as the function body in the compiled package of the first function). This local variable stores the index indication information (such as the first index indication information) calculated by the expression of the first function. This allows the first index indication information to be directly retrieved from the local variable each time it is needed, reducing the instruction time required to retrieve the first index indication information each time, as it eliminates the need to recalculate the index indication information each time. It also ensures the correctness of calling the second function using the first index indication information stored in the local variable.

[0187] Furthermore, the following description of the storage process for the state flag table includes: When the processing device starts the application, it can write the state flag table (the initial state flag table, at which point the load status recorded for each sub-package function can be unloaded, while the load status recorded for each first package function can be loaded) to the end of the application's program memory. The starting address of the memory space at the end of the state flag table can be stored in a global variable (which can be represented as RedirBaseAddr), which can be used to indicate the memory location of the state flag table. That is, initially, the state flag table can be recorded in the memory space at the end of the application's program memory, because there is usually free (i.e., unoccupied) memory space at the end of the application's program memory.

[0188] The application's program memory is the memory managed (or run) by the application, which can be used to store any relevant information generated during the application's operation.

[0189] The processing device can then request memory allocation for the status flag table from the application's memory allocator (such as dlmalloc), so that the memory allocator can allocate target memory for the status flag table in the program memory. This target memory can be the corresponding unused memory in the program memory allocated by the memory classifier for the status flag table.

[0190] Therefore, the processing device can call the memory allocator to read the status flag table written at the end of the program memory through the aforementioned global variable (i.e., RedirBaseAddr), and transfer and write the status flag table to the target memory. Alternatively, the status flag table can be retrieved from the memory space at the end of the memory first, and then written to the allocated target memory. At this time, the status flag table is recorded in the target memory and no longer exists in the memory space at the end of the memory.

[0191] After transferring the status flag table to the target memory, the processing device can also call the memory allocator to store the starting address of the target memory where the status flag table is now located into the aforementioned global variable (i.e., RedirBaseAddr). This modifies the starting address of the memory space originally stored at the end of the target memory location in the global variable to the starting address of the target memory. Thus, the global variable contains the final storage location of the status flag table, allowing the processing device to determine where (i.e., the target memory) to read the status flag table. This status flag table can be stored and recorded during application startup. After the status flag table is stored in the target memory, the processing device can continue executing CallMain (the logic related to starting the application).

[0192] Please see Figure 9 , Figure 9 This is a schematic diagram illustrating a scenario where a state flag table is stored in program memory, as provided in an embodiment of this application. Figure 9 As shown, when an application is first started, the first part of the application's memory space may be occupied, while the second part of the application's memory space may be unoccupied. At this time, the status flag table can be written to the memory space at the end of the application's memory.

[0193] The processing device can also request memory allocation for the status flag table from the application's memory allocator. The memory allocator can allocate unoccupied target memory in the program memory to the status flag table. Thus, the processing device can transfer the status flag table written at the end of the program memory to the allocated target memory for storage. After the transfer, the memory space at the end of the program memory is no longer occupied, and the target memory is occupied by the written status flag table.

[0194] Using the method provided in this application, the loading status of each function of the application can be recorded through a status flag table. By querying the loading status of a function through the status flag table, the corresponding function can be called. This method eliminates the need to pre-set corresponding intermediate functions for the functions of the application.

[0195] The aforementioned method of using intermediate functions for function calls, compared to the method of function calls based on the status flag table, reduces the application's memory access instructions (such as accessing the status flag table in memory to obtain the function's loading status) and branch instructions (such as how to operate when the second function is in the loaded state and how to operate when it is in the unloaded state), thereby further improving the application's function call performance.

[0196] This application allows for high-performance function invocation by selecting an appropriate invocation method (such as through a status flag table or through an intermediate function) based on actual application requirements in real-world application scenarios.

[0197] In this application, by creating separate source code packages for each sub-package function (i.e., each single function), and creating a wasmModule (i.e., a wasm package, which is the source code package of a single function) for each single function, the application can call each sub-package function on demand and in real time, without having to call all the sub-package functions together, or convert each sub-package function to other language formats and then call them through some generated stub functions. Therefore, the overall performance of function calls is improved and the overhead of function calls is reduced.

[0198] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a program data processing device provided in an embodiment of this application. Figure 10 As shown, the modules in the program data processing device 2000 may include: a first calling module 2001, a response module 2002, a download module 2003, a compilation module 2004, and a second calling module 2005.

[0199] The first calling module 2001 is used to call the first function to execute the first business logic of the application.

[0200] The response module 2002 is used to respond to the business trigger of the first business logic and generate first index indication information based on the first function. The first index indication information is used to indicate an index position in the function index table.

[0201] Download module 2003 is used to download the target source code package of the second function to be called according to the instructions of the first index indication information. The second function is used to execute the second business logic triggered in the application.

[0202] Compiler module 2004 is used to compile the target source code package and generate the target compiled package for the second function;

[0203] The second calling module 2005 is used to call the target compilation package to execute the second business logic based on the first index indication information and using the pointer calling method.

[0204] Optionally, the second calling module 2005, based on the first index indication information, uses a pointer-based calling method to invoke the target compiled package to execute the second business logic, including:

[0205] Establish the association between the target compilation package and the function index of the second function, and add the function index of the second function to the index position indicated by the first index indicator information in the function index table;

[0206] Using the first index indication information, the function index at the indicated index position is queried in the function index table;

[0207] The target compiled package that is associated with the function index queried is invoked to execute the second business logic;

[0208] The first index indication information is the pointer information of the second function. The pointer calling method refers to the method of calling the function based on the result queried from the function index table using the pointer information.

[0209] Optionally, the second function has a corresponding intermediate function, which is used to call the second function. The function index of the intermediate function is recorded at the index position indicated by the first index indication information in the function index table.

[0210] The download module 2003 downloads the target source code package of the second function to be called according to the instructions of the first index information, including:

[0211] Based on the first index indication information, the function index of the intermediate function is retrieved from the function index table;

[0212] The query-based function index calls an intermediate function to download the target source code package based on the first index indication information through the called intermediate function.

[0213] Optionally, the second calling module 2005 establishes the association between the target compiled package and the function index of the second function, and adds the function index of the second function to the index position indicated by the first index indicator information in the function index table, including:

[0214] Using the called intermediate function, establish the association between the function index of the target compiled package and the second function; and,

[0215] Using the called intermediate function, the function index of the intermediate function at the index position indicated by the first index indication information in the function index table is overwritten and updated to the function index of the second function.

[0216] Optionally, the second function is contained in a function group, which contains N functions, where N is a positive integer, and the N functions have the same signature information and correspond to the same intermediate function;

[0217] Among them, the signature information of any function among the N functions contains the data format of the input data and the data format of the return data of any function. The signature information of any function is used to verify the data format of the input data and the data format of the return data of any function.

[0218] Once the signature verification of any function is successful, the call process for that function is initiated.

[0219] Optionally, an index position in the function index table corresponds to a marker position in the status marker table and a function of the associated application. An index position in the function index table is used to record the function index of the associated function.

[0220] Among them, a marker position in the status marker table is used to mark the loading status of the function associated with the corresponding index position in the function index table. The loading status is either unloaded or loaded.

[0221] If a marker position in the status marker table is used to mark a loaded state, then the corresponding index position in the function index table has recorded the function index of the associated function. If a marker position in the status marker table is used to mark an unloaded state, then the corresponding index position in the function index table has not recorded the function index of the associated function.

[0222] Optionally, the download module 2003 downloads the target source code package of the second function to be called according to the instructions of the first index indication information, including:

[0223] According to the instructions of the first index, the loading status of the second function is obtained from the corresponding mark position in the status mark table;

[0224] If the second function is in an unloaded state, the target source code package is downloaded based on the first index indication information.

[0225] Optionally, if a function of the application is in a loaded state, the application has a compilation package for that function, and the compilation package is associated with the function index of that function;

[0226] The second calling module 2005 mentioned above can also be used for:

[0227] If the second function is in a loaded state, then the function index of the second function is queried in the function index table based on the first index indication information;

[0228] The compiled package in the application that is associated with the function index of the second function being queried is invoked to execute the second business logic.

[0229] Optionally, the source code package created for each function of the application is identified with the function index of each function, and the source code package of each function is stored in the background device of the application.

[0230] The download module 2003 downloads the target source code package based on the first index indication information, including:

[0231] Obtain the function index of the second function associated with the first index indication information;

[0232] Download the target source code package that is identified by the function index of the second function from the backend device.

[0233] Optionally, the above-mentioned program data processing device 2000 further includes a memory allocation module 2006, which, when the application is started, is used to:

[0234] Write the status flag table to the end of the application's program memory;

[0235] Request memory allocation for the status flag table from the application's memory allocator, so that the memory allocator allocates the target memory for the status flag table in the program's memory;

[0236] The state flag table written at the tail position is transferred and written to the target memory.

[0237] Optionally, the application has an original source code package, which is divided into a source code head package and source code sub-packages. The source code head package contains the application's head package functions, and the source code sub-packages contain the application's sub-package functions.

[0238] When the application is started, each function in the first package of the source code is loaded, and each function in the first package is in a loaded state after being loaded.

[0239] The application has a compiled package containing the first package function that is in a loaded state, and this compiled package is associated with the function index of the first package function to which it belongs, and the function index of the first package function that is in a loaded state has been recorded in the function index table.

[0240] Optionally, the first function can be any function in the first package of the source code or any function in a sub-package of the source code; and,

[0241] The second function is any function in any sub-package of the source code sub-package.

[0242] Optionally, the source code sub-package contains a third function, and the source code header contains a fourth function. The third function is used to call the fourth function, and the third function is used to execute the third business logic of the application. The fourth function is used to execute the fourth business logic of the application. The above-mentioned program data processing device 2000 further includes a third calling module 2007, which is used for:

[0243] In response to a business triggering of the third business logic, a second index indication information is generated based on the third function;

[0244] Based on the second index indication information, look up the function index of the fourth function to be called in the function index table;

[0245] The compiler package in the application that is associated with the function index of the fourth function being queried is invoked to execute the fourth business logic.

[0246] According to one embodiment of this application, Figure 3 The method steps involved in the data processing method shown can be derived from... Figure 10 The program data processing device 2000 shown is executed by various modules. For example, Figure 3 Step S101 shown can be performed by Figure 10 The first calling module, 2001, is used for execution. Figure 3 Step S102 shown can be performed by Figure 10 The response module 2002 in the middle is used to execute; Figure 3 Step S103 shown can be performed by Figure 10 The download module in 2003 is used to execute this. Figure 3 Step S104 shown can be derived from Figure 10 The compiler module 2004 is used to execute it. Figure 3 Step S105 shown can be performed by Figure 10 The second calling module 2005 in the process is used to execute.

[0247] This application can call a first function to execute the first business logic of an application; and in response to a business triggering the first business logic, generate first index indication information based on the first function, the first index indication information being used to indicate an index position in a function index table; and, according to the indication of the first index indication information, download the target source code package of a second function to be called, the second function being used to execute the second business logic triggered in the application; thereby, the target source code package can be compiled to generate a target compiled package of the second function, so as to call the target compiled package to execute the second business logic based on the first index indication information using a pointer call method. Therefore, the method proposed in this application can create source code packages for each function (including the target source code package of the second function) at the function granularity. Thus, when the second function is called through the first function, the target source code package of the second function can be downloaded and compiled in real time to obtain the target compiled package of the second function. Then, the target compiled package of the second function can be quickly called through pointer calls. Moreover, there is no need to convert the second function to other file formats and store it before it is triggered. Therefore, the memory space occupied by the application is reduced and the performance overhead of calling the second function through the first function is reduced. In addition, the entire process of calling the application in this application can be carried out within the Wasm virtual machine without having to go outside the Wasm virtual machine to the JavaScript virtual machine to implement the function call. This series of operations also improves the running performance of the application.

[0248] According to one embodiment of this application, Figure 10The modules in the program data processing apparatus 2000 shown can be individually or entirely combined into one or more units, or some of these units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can be implemented by multiple units, or the function of multiple modules can be implemented by one unit. In other embodiments of this application, the program data processing apparatus 2000 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0249] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0250] According to one embodiment of this application, a computer program capable of executing the steps involved in the corresponding methods shown in the various embodiments of this application can be run on a general-purpose computer device (which may include processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM)) to construct, as described in the embodiments of this application. Figure 10 The program data processing apparatus 2000 shown herein. The aforementioned computer program can be recorded on a computer-readable recording medium, and can be loaded into the aforementioned computer device through the computer-readable recording medium and run therein.

[0251] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 11As shown, the computer device 1000 may specifically include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, in some embodiments, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 11 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.

[0252] exist Figure 11 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0253] The first function is called to execute the application's first business logic.

[0254] In response to a business triggering of the first business logic, a first index indication information is generated based on the first function. The first index indication information is used to indicate an index position in the function index table.

[0255] Following the instructions of the first index information, download the target source code package of the second function to be called. The second function is used to execute the second business logic triggered in the application.

[0256] The target source code package is compiled to generate the target compiled package for the second function;

[0257] Based on the first index indication information, the target compilation package is invoked to execute the second business logic using a pointer invocation method.

[0258] In one feasible implementation, the processor 1001 can also be used to invoke a device control application stored in the memory 1005 to achieve:

[0259] Establish the association between the target compilation package and the function index of the second function, and add the function index of the second function to the index position indicated by the first index indicator information in the function index table;

[0260] Using the first index indication information, the function index at the indicated index position is queried in the function index table;

[0261] The target compiled package that is associated with the function index queried is invoked to execute the application's second business logic;

[0262] The first index indication information is the pointer information of the second function. The pointer calling method refers to the method of calling the function based on the result queried from the function index table using the pointer information.

[0263] In one feasible implementation, the second function has a corresponding intermediate function, which is used to call the second function. The function index of the intermediate function is recorded at the index position indicated by the first index indication information in the function index table.

[0264] Processor 1001 can also be used to call device control applications stored in memory 1005 to achieve:

[0265] Based on the first index indication information, the function index of the intermediate function is retrieved from the function index table;

[0266] The query-based function index calls an intermediate function to download the target source code package based on the first index indication information through the called intermediate function.

[0267] In one feasible implementation, the processor 1001 can also be used to invoke a device control application stored in the memory 1005 to achieve:

[0268] Using the called intermediate function, establish the association between the function index of the target compiled package and the second function; and,

[0269] Using the called intermediate function, the function index of the intermediate function at the index position indicated by the first index indication information in the function index table is overwritten and updated to the function index of the second function.

[0270] In one feasible implementation, the second function is contained in a function group, which contains N functions, where N is a positive integer, and the N functions have the same signature information and correspond to the same intermediate function.

[0271] Among them, the signature information of any function among the N functions contains the data format of the input data and the data format of the return data of any function. The signature information of any function is used to verify the data format of the input data and the data format of the return data of any function.

[0272] Once the signature verification of any function is successful, the call process for that function is initiated.

[0273] In one feasible implementation, an index position in the function index table corresponds to a marker position in the status marker table and a function of the associated application. An index position in the function index table is used to record the function index of the associated function.

[0274] Among them, a marker position in the status marker table is used to mark the loading status of the function associated with the corresponding index position in the function index table. The loading status of the function associated with the index position is either unloaded or loaded.

[0275] If a marker position in the status marker table is used to mark a loaded state, then the corresponding index position in the function index table has recorded the function index of the associated function. If a marker position in the status marker table is used to mark an unloaded state, then the corresponding index position in the function index table has not recorded the function index of the associated function.

[0276] In one feasible implementation, the processor 1001 can also be used to invoke a device control application stored in the memory 1005 to achieve:

[0277] According to the instructions of the first index, the loading status of the second function is obtained from the corresponding mark position in the status mark table;

[0278] If the second function is in an unloaded state, the target source code package is downloaded based on the first index indication information.

[0279] In one feasible implementation, if a function of an application is in a loaded state, the application has a compilation package for that function, and there is an association between the compilation package and the function index of that function;

[0280] Processor 1001 can also be used to call device control applications stored in memory 1005 to achieve:

[0281] If the second function is in a loaded state, then the function index of the second function is queried in the function index table based on the first index indication information;

[0282] The compiled package in the application that is associated with the function index of the second function being queried is invoked to execute the second business logic.

[0283] In one feasible implementation, the source code package created for each function of the application is identified with the function index of each function, and the source code package of each function is stored in the background device of the application.

[0284] Processor 1001 can also be used to call device control applications stored in memory 1005 to achieve:

[0285] Obtain the function index of the second function associated with the first index indication information;

[0286] Download the target source code package that is identified by the function index of the second function from the backend device.

[0287] In one feasible implementation, when the application is launched, the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:

[0288] Write the status flag table to the end of the application's program memory;

[0289] Request memory allocation for the status flag table from the application's memory allocator, so that the memory allocator allocates the target memory for the status flag table in the program's memory;

[0290] The state flag table written at the tail position is transferred and written to the target memory.

[0291] In one feasible implementation, the application has an original source code package, which is divided into a source code head package and source code sub-packages. The source code head package contains the application's head package functions, and the source code sub-packages contain the application's sub-package functions.

[0292] When the application is started, each function in the first package of the source code is loaded, and each function in the first package is in a loaded state after being loaded.

[0293] The application has a compiled package containing the first package function that is in a loaded state, and this compiled package is associated with the function index of the first package function to which it belongs, and the function index of the first package function that is in a loaded state has been recorded in the function index table.

[0294] In one feasible implementation, the first function is any first package function in the first package of the source code or any sub-package function in a sub-package of the source code; and,

[0295] The second function is any function in any sub-package of the source code sub-package.

[0296] In one feasible implementation, the source code sub-package contains a third function, and the source code head package contains a fourth function. The third function is used to call the fourth function, and the third function is used to execute the third business logic of the application. The fourth function is used to execute the fourth business logic of the application. The processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve the following:

[0297] In response to a business triggering of the third business logic, a second index indication information is generated based on the third function;

[0298] Based on the second index indication information, look up the function index of the fourth function to be called in the function index table;

[0299] The compiler package in the application that is associated with the function index of the fourth function being queried is invoked to execute the fourth business logic.

[0300] It should be understood that the computer device 1000 described in the embodiments of this application can execute the processing methods for the above-mentioned program data described in the various embodiments of this application, and can also execute the methods described above. Figure 10 The description of the processing apparatus 2000 for the above-mentioned program data in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0301] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program. When a processor executes the computer program, it can perform the processing methods for program data described in the various embodiments of this application; therefore, these methods will not be repeated here. Additionally, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the embodiments of the computer storage medium involved in this application, please refer to the description of the method embodiments of this application.

[0302] As an example, the aforementioned computer program can be deployed and executed on a single computer device, or deployed and executed on multiple computer devices located in one location, or executed on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network can form a blockchain network.

[0303] The aforementioned computer-readable storage medium can be an internal storage unit of the computer device, such as a hard drive or memory. It can also be an external storage device, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD) card, or flash card. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. This computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. It can also be used to temporarily store data that has been output or will be output.

[0304] This application provides a computer program product 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 perform the processing methods for program data described in the embodiments of this application; therefore, these methods will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application.

[0305] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0306] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0307] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method of processing program data, characterized by, The method comprises: calling a first function to execute first business logic of an application program; in response to a business trigger of the first business logic, generating first index indication information based on the first function, the first index indication information being used to indicate an index position in a function index table; downloading a target source code package of a second function to be called according to the indication of the first index indication information, the second function being used to execute second business logic triggered in the application program; compiling the target source code package to generate a target compiled package of the second function; based on the first index indication information, calling the target compiled package in a pointer calling mode to execute the second business logic.

2. The method of claim 1, wherein, The calling of the target compiled package in the pointer calling mode based on the first index indication information to execute the second business logic comprises: establishing an association between the target compiled package and a function index of the second function, and adding the function index of the second function to the index position indicated by the first index indication information in the function index table; querying the function index at the index position indicated by the first index indication information in the function index table using the first index indication information; calling the target compiled package associated with the queried function index to execute the second business logic. The first index indication information is pointer information of the second function, and the pointer calling mode refers to a calling mode based on the result of querying the function index table using the pointer information.

3. The method of claim 2, wherein, The second function has a corresponding intermediate function used to call the second function, and a function index of the intermediate function is recorded at the index position indicated by the first index indication information in the function index table. The downloading of the target source code package of the second function to be called according to the indication of the first index indication information comprises: querying a function index of the intermediate function from the function index table based on the first index indication information; calling the intermediate function based on the queried function index to download the target source code package based on the first index indication information through the called intermediate function.

4. The method of claim 3, wherein, The establishing of the association between the target compiled package and the function index of the second function, and the adding of the function index of the second function to the index position indicated by the first index indication information in the function index table comprises: establishing the association between the target compiled package and the function index of the second function using the called intermediate function; and updating the function index of the intermediate function at the index position indicated by the first index indication information in the function index table to the function index of the second function using the called intermediate function.

5. The method of claim 3, wherein, The second function is included in a function group, the function group includes N functions, N is a positive integer, and the N functions have the same signature information, and the N functions correspond to the same intermediate function. The signature information of any function in the N functions includes a data format of input data and a data format of returned data of the any function, and the signature information of the any function is used for checking the data format of the input data and the data format of the returned data of the any function; The checking of the signature information of the any function is started after being checked successfully.

6. The method of claim 1, wherein, One index position in the function index table corresponds to one mark position in the state mark table and is associated with one function of the application program, and the one index position in the function index table is used for recording the function index of the associated function; The one mark position in the state mark table is used for marking the loading state of the function associated with the corresponding index position in the function index table, and the loading state is an unloaded state or a loaded state; If the one mark position in the state mark table is used for marking the loaded state, the function index of the associated function has been recorded at the corresponding index position in the function index table, and if the one mark position in the state mark table is used for marking the unloaded state, the function index of the associated function has not been recorded at the corresponding index position in the function index table.

7. The method of claim 6, wherein, The target source code package of the second function to be called is downloaded according to the indication of the first index indication information, including: The loading state of the second function is obtained from the corresponding mark position in the state mark table according to the indication of the first index indication information; If the second function is in the unloaded state, the target source code package is downloaded based on the first index indication information.

8. The method of claim 7, wherein, If one function of the application program is in the loaded state, the compiled package with the function in the application program has an associated relationship with the function index of the function; The method further includes: If the second function is in the loaded state, the function index of the second function is queried in the function index table based on the first index indication information; The compiled package associated with the function index of the second function in the application program is called to execute the second business logic.

9. The method of claim 7, wherein, The source code package of each function of the application program is respectively identified with the function index of each function, and the source code package of each function is stored in the background device of the application program; The target source code package of the second function is downloaded to the background device based on the function index of the second function. When the application program is started, the method further includes: The state mark table is written to the tail position of the program memory of the application program; 10. The method of claim 6, wherein, The memory allocator of the application program is applied for memory allocation of the state mark table, so that the memory allocator allocates target memory for the state mark table in the program memory; The state mark table written at the tail position is transferred and written into the target memory. The state mark table is written to the tail position of the program memory of the application program; The memory allocator of the application program is applied for memory allocation of the state mark table, so that the memory allocator allocates target memory for the state mark table in the program memory; The state mark table written at the tail position is transferred and written into the target memory.

11. The method of claim 1, wherein, The application program has an original source code package, the original source code package is divided into a source code first package and a source code sub-package, the source code first package contains first package functions of the application program, and the source code sub-package contains sub-package functions of the application program; When the application program is started, each first package function in the source code first package is loaded, and each first package function after being loaded is in a loaded state; The application program has a compiled package of the first package function in the loaded state, the compiled package has an association relationship with a function index of the first package function, and the function index of the first package function in the loaded state is recorded in the function index table.

12. The method of claim 11, wherein, The first function is any first package function in the source code first package or any sub-package function in the source code sub-package; and The second function is any sub-package function in the source code sub-package.

13. The method of claim 11, wherein, The source code sub-package contains a third function, the source code first package contains a fourth function, the third function is used to call the fourth function, the third function is used to execute third business logic of the application program, the fourth function is used to execute fourth business logic of the application program, and the method further comprises: In response to business triggering of the third business logic, second index indication information is generated based on the third function; Based on the second index indication information, the function index of the fourth function to be called is queried in the function index table; The compiled package associated with the function index of the fourth function is called to execute the fourth business logic.

14. An apparatus for processing program data, characterized by The device comprises: A first calling module is configured to call a first function to execute first business logic of an application program; A response module is configured to, in response to business triggering of the first business logic, generate first index indication information based on the first function, the first index indication information being used to indicate an index position in a function index table; A downloading module is configured to download a target source code package of a second function to be called according to the indication of the first index indication information, the second function being used to execute second business logic of the application program that is triggered; A compiling module is configured to compile the target source code package to generate a target compiled package of the second function; A second calling module is configured to, based on the first index indication information, call the target compiled package to execute the second business logic in a pointer calling mode.

15. A computer program product, characterised in that, A computer program is included, which is executed by a processor to implement the steps of the method in any one of claims 1-13.

16. A computer device, comprising: A memory and a processor are included, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the method in any one of claims 1-13.

17. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor to implement the steps of the method in any one of claims 1-13.