Application program generation and operation method and device, equipment and storage medium
By generating packaged main program and plug-in program files using specific programming languages and packaging tools, the problems of low development efficiency and security risks in application function plug-in solutions are solved, enabling flexible function changes and convenient module access, and improving the efficiency of application plug-in development.
Patent Information
- Application Number
- CN202410502210.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
Existing application function plug-in solutions are difficult to support flexible function changes, plug-in program development is inefficient, and there are security risks and inconvenient access to function modules.
The application's functional modules are developed using a specific programming language, and packaging tools are used to add code logic to the main program and plugin programs, generating packaged files for the main program and plugin programs. This enables dynamic loading and access of plugin functional modules, and allows for automatic export and access of dependent modules using target data tables.
It improves the development efficiency of plug-in programs, enhances the flexibility of application function changes and the universality of plug-in development, and ensures secure and convenient access to functional modules.
Smart Images

Figure CN120832178A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to an application program generation and running method, device, equipment and storage medium. BACKGROUND
[0002] In order to adapt to the use requirements of people, the functions of the application program need to be changed constantly. In order to adapt to the frequent changes of the functions of the application program and reduce the number of times of downloading and installing the package to update the application program, the application program function plug-in solution appears. The solution implements some functions of the application program in the form of plug-in program, and the user can increase or decrease the corresponding application program functions by installing or uninstalling the plug-in program.
[0003] The current application program function plug-in solution is mainly implemented through an application program interface object. The solution is to independently develop the plug-in program, and provide an application program interface API for external calling after the development is completed. The application program accesses the corresponding plug-in program by calling the API to implement the corresponding plug-in function. However, the plug-in solution can only access the parameters defined by the interface API in the plug-in function, and the development efficiency of the plug-in program is low, which is difficult to support more flexible changes of the application program functions. SUMMARY
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide an application program generation and running method, device, equipment and storage medium.
[0005] In a first aspect, the embodiments of the present disclosure provide an application program generation method, which comprises:
[0006] In response to an editing operation on a code editing tool, a plurality of main program function modules and plug-in function modules are generated;
[0007] In response to a starting operation on a packaging tool, a first code conversion component in the packaging tool is run to add a first code to a target function module in each of the main program function modules, to generate a main program packaging file; wherein the target function module is a main program function module relied on by the plug-in function module; and the first code is used to store the target function module to a target data table;
[0008] An external dependency component in the packaging tool is run to mark the plug-in function module as an externally dependent function module, and determine a target access logic of a dependency module access function of the plug-in function module, to generate a plug-in program packaging file; wherein the target access logic is used to determine the target function module relied on by the plug-in function module at runtime;
[0009] An application program is generated based on the main program packaging file and the plug-in program packaging file.
[0010] In a second aspect, the embodiments of the present disclosure provide an application running method, which comprises:
[0011] In response to an application starting operation, loading each main program function module in a main program packaging file and running the main program function module, generating a target data table by executing first code; wherein the target data table stores a target function module; the target function module is the main program function module relied on by a plug-in function module; the first code is code added to the target function module when the main program packaging file is generated by a packaging tool;
[0012] Loading a plug-in function module in a plug-in program packaging file and calling a plug-in entry object of the plug-in function module to generate an instantiated plug-in object;
[0013] Calling a dependent module access function of the plug-in object to access the target data table with information of a configured dependent function module to determine the target function module relied on by the plug-in function module; wherein the dependent module access function is a function defined when the plug-in program packaging file is generated by the packaging tool;
[0014] Running the application based on the target function module and the plug-in object.
[0015] In a third aspect, the embodiments of the present disclosure further provide an application generation device, which comprises:
[0016] An encoding module is configured to generate a plurality of main program function modules and plug-in function modules in response to an editing operation on a code editing tool;
[0017] A main program packaging module is configured to run a first code conversion component in the packaging tool to add first code to a target function module in each main program function module in response to a starting operation on the packaging tool to generate a main program packaging file; wherein the target function module is the main program function module relied on by the plug-in function module; the first code is used to store the target function module to a target data table;
[0018] A plug-in program packaging module is configured to run an external dependent component in the packaging tool to mark the plug-in function module as an externally dependent function module and determine a target access logic of a dependent module access function of the plug-in function module to generate a plug-in program packaging file; wherein the target access logic is used to determine the target function module relied on by the plug-in function module when running;
[0019] An application program generation module is configured to generate an application program based on the main program package file and the plug-in program package file.
[0020] In a fourth aspect, the embodiments of the present disclosure further provide an application program running device, which comprises:
[0021] A main program running module is configured to load each main program function module in the main program package file and run the main program function module in response to an application program starting operation, and generate a target data table by executing first code; the target data table stores a target function module; the target function module is a main program function module relied on by a plug-in function module; and the first code is code added to the target function module when the main program package file is generated by a packaging tool.
[0022] A plug-in object generation module is configured to load a plug-in function module in the plug-in program package file and call a plug-in entry object of the plug-in function module to generate an instantiated plug-in object.
[0023] A target function module determination module is configured to call a dependent module access function of the plug-in object to access the target data table with information of a configured dependent function module, and determine the target function module relied on by the plug-in function module; the dependent module access function is a function defined when the plug-in program package file is generated by the packaging tool.
[0024] An application program running module is configured to run the application program based on the target function module and the plug-in object.
[0025] In a fifth aspect, the embodiments of the present disclosure further provide an electronic device, which comprises:
[0026] A processor;
[0027] A memory configured to store executable instructions;
[0028] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the application program generation method or the application program running method described in any of the embodiments of the present disclosure.
[0029] In a sixth aspect, the embodiments of the present disclosure further provide a computer readable storage medium, which stores a computer program; when the computer program is executed by a processor, the processor implements the application program generation method or the application program running method described in any of the embodiments of the present disclosure.
[0030] In a seventh aspect, the embodiments of the present disclosure further provide a computer program product for executing the application generation method or the application running method described in any of the embodiments of the present disclosure.
[0031] The application generation method, apparatus, device and storage medium provided by the embodiments of the present disclosure can generate a plurality of main program function modules and plug-in function modules in response to an editing operation on a code editing tool; run a first code conversion component in the packaging tool to add a first code to a target function module in each main program function module to generate a main program packaging file in response to a starting operation on the packaging tool; the first code is used to store the target function module to a target data table; run an external dependency component in the packaging tool to mark the plug-in function module as an externally dependent function module, and determine a target access logic of a dependency module access function of the plug-in function module to generate a plug-in program packaging file; the target access logic is used to determine a target function module that the plug-in function module depends on at runtime; generate an application based on the main program packaging file and the plug-in program packaging file; provide a development framework for extending the function of the application in the form of a plug-in program, so that many functions in the application can be implemented as a plug-in program, and the development code form of the plug-in program is consistent with the development code form of the main program, which reduces the development difficulty of the plug-in program and improves the development efficiency of the plug-in program; and during the program packaging process, the implementation code for automatically exporting the target function module accessed by other function module programs to the target data table and the implementation code for automatically accessing the target data table by the plug-in function module to obtain the target function module that it depends on are provided, which provides an implementation basis for dynamically parsing and loading the plug-in function module at runtime of the application, and more conveniently and comprehensively accessing each parameter object in the function module, thereby improving the universality and efficiency of the functional plug-in development of the application and improving the flexibility of the function change of the application.
[0032] The application program running method, device, equipment and storage medium provided by the embodiments of the present disclosure can respond to an application program starting operation, load each main program function module in a main program packaging file, and run the main program function module, generate a target data table storing a target function module through a first code added to the target function module when a packaging tool generates the main program packaging file; load a plug-in function module in a plug-in program packaging file, and call a plug-in entry object of the plug-in function module to generate an instantiated plug-in object; call a dependent module access function in the plug-in object, which is defined when the packaging tool generates the plug-in program packaging file, to access the target data table with information of a configured dependent function module, to determine a target function module on which the plug-in function module depends; and run the application program based on the target function module and the plug-in object. The embodiments of the present disclosure achieve the process of loading and running each packaged function module in the application program, export the target function module accessed by other function module programs through the target data table, and run the target function module on which the plug-in depends through the plug-in object accessing the target data table, so that the plug-in function module can be dynamically parsed and loaded, and the target function module of the main program and the plug-in object can more conveniently and comprehensively access each parameter object involved therein, to improve the implementation efficiency and flexibility of each function module of the application program, thereby improving the flexibility of application program function change in the form of function module plug-in. BRIEF DESCRIPTION OF DRAWINGS
[0033] The above and other features, advantages, and aspects of the present disclosure will become more apparent by describing in detail the following specific embodiments thereof with reference to the attached drawings. Throughout the drawings, the same or similar reference numerals can refer to the same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.
[0034] Figure 1 A flowchart of an application program generation method provided by the embodiments of the present disclosure;
[0035] Figure 2 A flowchart of a program debugging process in an application program generation method provided by the embodiments of the present disclosure;
[0036] Figure 3 A flowchart of an application program running method provided by the embodiments of the present disclosure;
[0037] Figure 4 A structural diagram of an application program generation device provided by the embodiments of the present disclosure;
[0038] Figure 5 A structural diagram of an application program running device provided by the embodiments of the present disclosure;
[0039] Figure 6A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 1. DETAILED DESCRIPTION
[0040] Embodiments of the present disclosure will be described in more detail by referring to the drawings. Although certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein, but rather the embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It is understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of the present disclosure.
[0041] It should be understood that each step recited in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present disclosure is not limited in this respect.
[0042] The term “comprising” and variations thereof as used herein are open-ended, that is, “comprising but not limited to.” The term “based on” means “based, at least in part, on.” The term “one embodiment” means “at least one embodiment.” The term “another embodiment” means “at least one additional embodiment.” The term “some embodiments” means “at least some embodiments.” Related terms are defined as follows.
[0043] It should be noted that the terms “first”, “second”, and the like in the present disclosure are merely used to distinguish different devices, modules or units, and do not imply the order or interdependence of the functions performed by these devices, modules or units.
[0044] It should be noted that the terms “one”, “multiple” in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that “one or more” should be understood unless otherwise explicitly stated in the context.
[0045] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are merely for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0046] Currently, there is a demand for the functions of application programs to be changed constantly. In order to adapt to the changes in the functions of application programs, the user clients also need to be updated accordingly. The main ways of updating the clients are the ordinary updating method of downloading all installation packages and the hot updating method of downloading partial installation packages of function changes. Regardless of which updating method, it is necessary for the user to download and install the installation package, which makes the implementation of the function changes of the application program inefficient. Based on this, the plug-in solution of the application program function appears, which implements some functions of the application program in the form of plug-ins. The user can increase or decrease the corresponding application program functions by installing or uninstalling the plug-in package without downloading the application program installation package.
[0047] The plug-in solution in the related art mainly has two kinds. One solution is a function module developed by a specific programming language or other programming languages based on the specific programming language, which can be dynamically parsed and loaded, so as to be directly accessed and run in different platforms, which well realizes the effect of the plug-in of the function module. The above specific programming language is an object-oriented programming language, which can compile the source code into a platform-independent bytecode file through a compiler, and then dynamically load the bytecode file (also called class file) through a virtual machine with cross-platform characteristics to convert into machine code for execution. However, the application program generated by this plug-in solution exposes the source code, causing a security risk, and the source code is scattered and stored on the disk, which is not easy to maintain later. The function module program package packaged by the above function module does not have the permission to be directly accessed and loaded by other function modules, and cannot realize the plug-in effect. Another solution is to realize through an application program interface object (API). This solution develops the functions of the application program into function plug-ins, and provides a program interface API for external calls after the development is completed. The application program accesses the corresponding plug-in program by calling the API to realize the corresponding plug-in function. However, the access object that can be provided by this plug-in solution is limited to the parameters defined by the interface API, which reduces the parameter access convenience of the plug-in module function, and because the plug-in program is developed separately, the development efficiency of the plug-in function is low.
[0048] Based on the above, the embodiment of the present disclosure provides a scheme for application program generation and running, to develop each functional module in the application program through the above specific programming language or other programming languages based on the specific programming language, and to add corresponding code logic for each functional module through a packaging tool, to add code logic for the target functional module relied on in the main program to export to the target data table, and to add code logic for the plug-in functional module to access the target data table to determine the target functional module relied on, and then to realize the above code logic through loading and running of each functional module after packaging, to complete dynamic loading and normal running of the plug-in functional module, so as to obtain an application program that can well support plug-in function change.
[0049] The application program generation method provided by the embodiment of the present disclosure can be applied to the scenario of application program development of extended function or changed function. The method can be executed by an application program generation device, which can be realized by software and / or hardware, and can be integrated in an electronic device installed with an application program development tool. The electronic device can include but is not limited to notebook computers, desktop computers, personal workstations, etc.
[0050] Figure 1 A flowchart of an application program generation method provided by the embodiment of the present disclosure is shown. As shown in the figure, Figure 1 The application program generation method can include the following steps:
[0051] S110, in response to the editing operation on the code editing tool, generating a plurality of main program functional modules and plug-in functional modules.
[0052] The code editing tool is a tool capable of code editing operation for program development, which can be a software with text editing function, a program development platform integrated with many code libraries / library, etc. The main program functional module is a program module of the main function of the application program, which can realize at least one main function of the application program. The plug-in functional module is a program module of the extended function of the application program, which can realize the extended function other than the main function of the application program.
[0053] Specifically, the developer can develop the code of the application program through the code editing tool, that is, write the code of the application program. The electronic device can generate a plurality of main program functional modules and at least one plug-in functional module in response to the above editing operation of the developer on the code editing tool.
[0054] For example, the developer creates the main project of the application through the code editing tool, and writes the code logic of at least one functional module contained in the main project by using the specific programming language or other programming languages based on the specific programming language, so as to generate a corresponding number of main program functional modules. Similarly, the developer creates the plug-in project of the application through the code editing tool, and writes the code logic of the functional module in the plug-in project by using the specific programming language or other programming languages based on the specific programming language, so as to generate a corresponding plug-in functional module. In order to facilitate the application function expansion and plug-in management, each plug-in functional module can be caused to implement an expanded application function.
[0055] S120, in response to the starting operation of the packaging tool, running the first code conversion component in the packaging tool to add the first code to the target functional module in each main program functional module, generating a main program packaging file; the target functional module is a main program functional module relied on by the plug-in functional module; the first code is used to store the target functional module to a target data table.
[0056] The packaging tool is a tool for packaging a program and its related files into an executable file or an installation program. The packaging tool in the embodiment of the present disclosure has a code conversion function to convert the source code into a version compatible with the application program mounting platform, and has a function of packaging the main program functional module and the plug-in functional module, and has a plug-in expansion function to realize more customized packaging functions and the like. The code conversion component is used to convert the source code of the coded program module into a version compatible with other platforms. The first code conversion component is a customized code conversion component, which can customize code processing functions in addition to the function of converting code, such as the function of adding code of custom function logic to the source code module in the embodiment of the present disclosure. The target functional module is a main program functional module, which is a functional module relied on by the plug-in functional module when running. The first code is a code added by the packaging tool to the source code of the target functional module, and the implementation logic is to store the target functional module to a target data table. The target data table is a data table created in advance, which is used to store the exported functional module object, and the data structure can not be limited. The main program packaging file is a result file obtained after packaging each main program functional module.
[0057] Specifically, after the application program coding is completed, the developer can use the packaging tool to package the main program function modules and the plug-in function modules, so as to subsequently release the application program. After the electronic device detects the start operation performed by the developer on the packaging tool, the packaging tool can perform the packaging processing of the application program from the main program function module according to the configuration information of the packaging tool and by using the corresponding code conversion component in the packaging tool. In order to enable the packaged function modules to still have the ability of being flexibly accessed by other function modules, the first code conversion component of the packaging tool can be customized in advance. In this way, the packaging tool can identify the specified target function module during the execution of the first code conversion component, and automatically add the first code to the source code of the target function module and perform the code conversion packaging processing on the target function module after the first code is added.
[0058] After the code conversion compilation processing of each main program function module is completed, the compilation results can be packaged and output, and a main program packaging file is obtained.
[0059] In some embodiments, the first code realizes the function of storing the target function module into the target data table in the following manner: the first object identifier of the target function module and the target function module are correspondingly stored into the target data table in the form of a key-value pair.
[0060] Specifically, the target data table can be defined in the form of a key-value pair in the embodiments of the present disclosure, wherein the key information is defined as the identifying information (i.e., the first object identifier) of the function module, such as the name, abbreviation or number of the function module object, and the value information is defined as the function module object itself. Based on this, the function logic of the added first code is to obtain the first object identifier of the target function module, export the target function module, and store the first object identifier and the target function module into the target data table as the key information and the value information, respectively. In this way, the multiple target function modules can be more efficiently managed, thereby improving the efficiency and convenience of the function plug-in processing of the application program.
[0061] S130, run the external dependency component in the packaging tool to mark the plug-in function module as an externally dependent function module, determine the target access logic of the dependency module access function of the plug-in function module, and generate a plug-in program packaging file; the target access logic is used to determine the target function module that the plug-in function module depends on during runtime.
[0062] The external dependency component is another packaging function in the packaging tool, which is used to separate some function modules in the packaging process, so that the application installation package finally obtained does not contain these function modules, and these separated function modules are obtained from the outside at runtime. In this way, the external dependency component can package the plug-in function module into a plug-in form. The dependent module access function is a custom function of the plug-in function module, and the function logic thereof is the target access logic, which is used to automatically identify and obtain the function module dependent at runtime. The target access logic in the embodiment of the present disclosure is to obtain the dependent target function module by actively accessing the target data table. The plug-in program packaging file is an independent packaging result generated after the plug-in function module is packaged.
[0063] Specifically, the packaging tool can declare / label which function modules belong to the plug-in function module through the function of the external dependency component in the configuration information, and customize the dependent module access function and the target access logic inside the plug-in function module, for example, the dependent module access function and the target access logic inside the plug-in function module can be added. Then, when compiling each function module of the application program, the source code of the plug-in function module with the above target access logic added is still converted and compiled by using the corresponding code conversion component, to obtain the corresponding compilation result. Then, the packaging tool enables the above external dependency component, that is, the compilation result of the plug-in function module is independently packaged to be packaged outside the packaging file of the main program, to generate the plug-in program packaging file.
[0064] In some embodiments, when the target data table is implemented in the key-value pair structure, the target access logic determines the function of the target function module dependent by the plug-in function module at runtime by the following way: querying the target data table with the second object identifier of the dependent function module configured by the plug-in function module, determining the key-value pair data corresponding to the second object identifier, and taking the value information in the key-value pair data as the target function module dependent by the plug-in function module at runtime.
[0065] Specifically, the custom target access logic can obtain the object identifier (i.e., the second object identifier) of the target function module dependent by the plug-in function module at runtime from the configuration information of the application program development. Then, the target data table in the key-value pair structure is queried with the second object identifier as the key information, the key-value pair data corresponding to the second object identifier is determined, and the value information therein is determined as the target function module dependent by the plug-in function module at runtime. In this way, the plug-in function module can more quickly determine its dependency, and the parameter access efficiency and function implementation efficiency of the plug-in function are improved.
[0066] In some embodiments, before S130, the application generation method further comprises: running a second code conversion component in the packaging tool to add a second code to the plug-in function module; wherein the second code is used to store the plug-in function module to the target data table.
[0067] The second code conversion component is another customized code conversion component, which can customize code processing functions in addition to the function of converting codes, such as the function of adding codes of custom function logic to the source code module in the embodiments of the present disclosure, and the processing object is the plug-in function module. The second code is a code added by the packaging tool to the source code of the plug-in function module, and the implementation logic is to store the plug-in function module to the target data table.
[0068] Specifically, in order to enable the packaged plug-in function module to have the ability to be flexibly accessed by other function modules, the second code conversion component of the packaging tool can be customized in advance. In this way, the packaging tool can use the execution of the second code conversion component to compile and process the plug-in function module, to identify the specified plug-in function module, and automatically add a second code to the source code of the plug-in function module, and to perform code conversion and packaging processing on the plug-in function module with the added second code.
[0069] In the subsequent running process of the plug-in function module, the execution of the second code can be triggered to store the plug-in function module to the target data table. In order to improve the query efficiency of the target data table, the object identifier of the plug-in function module (i.e. the third object identifier) can be obtained first, and then the third object identifier and the exported plug-in function module are stored in the target data table as key information and value information in the key-value pair structure respectively.
[0070] It should be noted that the plug-in project can also export a plug-in entry object conforming to the plug-in interface in the process of exporting the plug-in function module, so that the main program function module can load the corresponding plug-in function module through the plug-in entry object.
[0071] S140, generating an application based on the main program packaging file and the plug-in program packaging file.
[0072] Specifically, after the electronic device obtains the main program packaging file and the plug-in program packaging file, a complete application can be obtained. When the application is published, the main program packaging file can be published. In the running process, if plug-in function needs to be implemented, the plug-in program packaging file can be obtained and run by parsing and loading to implement plug-in function in a plug-in manner.
[0073] The development framework for extending the application program function in the form of plug-ins provided by the application program generation method of each embodiment of the present disclosure can be applied to the application program or program project developed in the specific programming language or other programming languages based on the specific programming language, and without making many code improvements to the application program or program project, the application program or program project can be implemented in the form of plug-in application program function development, and the efficiency and flexibility of the application program plug-in development can be improved.
[0074] The application program generation method provided by each embodiment of the present disclosure can generate a plurality of main program function modules and plug-in function modules in response to the editing operation of the code editing tool, run the first code conversion component in the packaging tool to add the first code to the target function module in each main program function module to generate a main program packaging file; the first code is used to store the target function module to a target data table; run the external dependency component in the packaging tool to mark the plug-in function module as an externally dependent function module, and determine the target access logic of the dependent module access function of the plug-in function module to generate a plug-in program packaging file; the target access logic is used to determine the target function module that the plug-in function module depends on at runtime; generate an application program based on the main program packaging file and the plug-in program packaging file; a development framework for extending the application program function in the form of plug-ins is provided, so that many functions in the application program can be implemented as plug-in programs, and the development code form of the plug-in program is consistent with the development code form of the main program, which reduces the development difficulty of the plug-in program and improves the development efficiency of the plug-in program; and during the program packaging process, the implementation code for automatically exporting the target function module accessed by other function module programs to the target data table and the implementation code for automatically accessing the target data table by the plug-in function module to obtain the target function module it depends on are provided, which provides an implementation basis for dynamically parsing and loading the plug-in function module at runtime of the application program, and more conveniently and comprehensively accessing each parameter object in the function module, thereby improving the universality and efficiency of the function plug-in development of the application program and improving the flexibility of the function change of the application program.
[0075] In some embodiments, the application program generation method further includes a process of sharing a third-party library, that is: importing the third-party library; based on the functions and interfaces of the third-party library, creating a second proxy object to encapsulate and manage the third-party library; exporting the second proxy object and storing the second proxy object to a target data table.
[0076] The third-party library is shared by the main program function module and the plug-in function module. The second proxy object is a pre-defined proxy object, which is used to encapsulate and abstract the third-party library.
[0077] Specifically, the main program function module and the plug-in function module of the application program can depend on the same third-party library at runtime. In the related art, the third-party library is packaged into the main program package file and the plug-in program package file respectively. However, the implementation manner has the problems of storage resource waste and inconsistent versions of the third-party library. Based on this, in the embodiment of the present disclosure, the third-party library is first imported into the main project. Then, according to the functions and interfaces of the third-party library, a second proxy object is created to encapsulate and manage the third-party library. After that, in order to share the third-party library more conveniently, the electronic device can export the second proxy object and store it in the target data table. In this way, the main program function module and the plug-in function module can share the third-party library by accessing the target data table, which not only saves storage space, but also ensures that the versions of the third-party library used by any function module are consistent.
[0078] In some embodiments, the packaging configuration of the main program function module and / or the plug-in function module can be defined in advance through the configuration information of the packaging tool. In this way, the electronic device can complete the packaging process of the application program by reading the configuration information of the packaging tool, without the need for the developer to separately set the corresponding packaging configuration content during the development of each function module, so that the developer can focus on the implementation of the function logic of the function module itself, reduce the additional processing work such as engineering setting and configuration of the plug-in, and further improve the development efficiency of the plug-in function module of the application program.
[0079] Figure 2 A flowchart of a program debugging process in an application program generation method provided by an embodiment of the present disclosure is shown. As shown in Figure 2 The program debugging process in the application program generation method can include the following steps:
[0080] S210, in response to an editing operation on a code editing tool, generating a plurality of main program function modules and plug-in function modules.
[0081] S220, in response to a triggering operation of program debugging, creating a first proxy object to proxy the dependent module access function of the plug-in function module through the interception processing function of the first proxy object.
[0082] The first proxy object is another proxy object that is set in advance, which intercepts and proxies the function of the dependent module access function of the plug-in function module through a custom interception processing function. The interception processing function can be a function such as a set function, a get function, etc. that operates on the properties of the proxied object.
[0083] Specifically, after the application program is coded, it can be debugged. The application program generation method in the embodiment of the present disclosure can also implement the process of plug-in calling in the debugging process, that is, the development function of the plug-in can be debugged.
[0084] Before the program debugging function is executed, the above-mentioned encoded main program function module and plug-in function module can be exported through relevant operations, and the exported function modules are stored in the local storage space.
[0085] When the developer triggers the debugging function, the electronic device can create a first proxy object in response to the triggering operation of the program debugging, and implement an interception processing function in the first proxy object to proxy the custom access logic of the dependent module access function of the plug-in function module, that is, the interception processing function can implement the function of obtaining the target function module relied on by the plug-in function module.
[0086] S230, if the calling operation of the dependent module access function of the plug-in function module is detected, the interception processing function of the first proxy object is called to access the local storage path of the main program function module, and the target function module relied on by the plug-in function module at runtime is determined.
[0087] Specifically, when the electronic device detects the calling operation of the dependent module access function of the plug-in function module, if it is judged that the target function module is called, the calling of the dependent module access function is intercepted, and the interception processing function of the first proxy object is called. The interception processing function can obtain the target function module from the corresponding storage space through the storage path (i.e. the local storage path) of the above-mentioned local storage space. In this way, the plug-in function module in the debugging process can still obtain the target function module it relies on, ensuring the normal debugging of the plug-in function module.
[0088] S240, running the target function module and the plug-in function module to debug the application program.
[0089] Specifically, the electronic device completes the debugging of the plug-in function module in the application program by running the target function module and the plug-in function module.
[0090] It can be understood that each main program function module can also be run during the debugging process to complete the debugging of each main program function module.
[0091] Figure 3 A flowchart of an application program running method provided by an embodiment of the present disclosure is shown. The application program running method can be applied to a scenario of running an application program that extends or changes the function of the application program in a plug-in manner. The method can be executed by an application program running device, which can be implemented in software and / or hardware, and can be integrated in an electronic device that installs the above-mentioned application program. The electronic device can include, but is not limited to, a smart phone, a tablet computer, a personal digital assistant, a smart wearable device, a vehicle-mounted terminal, a notebook computer, a desktop computer, a personal workstation, a smart furniture device, etc.
[0092] As Figure 3 shown, the application program running method can include the following steps:
[0093] S310, in response to an application program starting operation, loading each main program function module in the main program packaging file and running the main program function module, generating a target data table by executing the first code.
[0094] The target data table stores a target function module. The target function module is a main program function module relied on by the plug-in function module. The first code is a code added to the target function module when the main program packaging file is generated by the packaging tool.
[0095] Specifically, the user can download the main program packaging file in advance to install the application program. After the user starts the application program, the electronic device can load each main program function module in the main program packaging file in response to the starting operation through the import function. Then, the loaded main program function module is run. When running to the target function module, it will execute the first code added therein, export the target function module, and store it to the target data table.
[0096] In some embodiments, the electronic device exports the target function module by executing the first code, obtains the corresponding first object identifier at the same time, and stores the first object identifier and the target function module in the target data table in a key-value pair structure.
[0097] In some embodiments, if the main program function module and / or the plug-in function module relies on a third-party library, the application program running method further includes: querying the target data table based on the information of the third-party library to determine a second proxy object to import the third-party library encapsulated by the second proxy object.
[0098] Specifically, the electronic device loads the main program function module at the same time, and if it is determined that the running of the application program relies on a third-party library, the target data table can be queried according to the information (such as the third-party library identifier) of the third-party library to obtain the second proxy object and import it. In this way, the third-party library can be loaded through the second proxy object.
[0099] S320, loading the plug-in function module in the plug-in program packaging file and calling the plug-in entry object of the plug-in function module to generate an instantiated plug-in object.
[0100] Specifically, if the plug-in function is to be executed in the application program, the electronic device can download the plug-in program packaging file in response to the corresponding operation of the user. Then, the plug-in function module therein is loaded through the dynamic loading function. Then, the plug-in object is instantiated through the plug-in entry object of the plug-in function module.
[0101] S330, calling a dependent module access function of the plug-in object to access a target data table according to the configured dependent function module information, to determine a target function module on which the plug-in function module depends.
[0102] The dependent module access function is a function defined when the plug-in program package file is generated by the packaging tool.
[0103] Specifically, after instantiating the plug-in object, the electronic device can call the dependent module access function of the plug-in object. Through the execution of the function, the target function module on which the plug-in function module depends can be obtained by accessing the target data table according to the configured dependent function module information (such as the second object identifier).
[0104] It should be noted that if the plug-in function module also depends on the third-party library, the plug-in function module can directly access the third-party library without being imported again, because the third-party library has been loaded during the running of the main program function module.
[0105] It should be further noted that if the running of the plug-in function module also depends on other plug-in function modules, the other plug-in function modules on which the plug-in function module depends can be obtained by accessing the target data table according to the configured dependent function module information (such as the third object identifier) in the same manner.
[0106] S340, running the application program based on the target function module and the plug-in object.
[0107] Specifically, the electronic device can run each main program function module including the target function module and the plug-in function module, to complete the running of the main program function module and the plug-in function module of the application program.
[0108] The application program running method provided by the embodiments of the present disclosure can load each main program function module in the main program packaging file and run the main program function module in response to an application program starting operation, generate a target data table storing a target function module through the first code added to the target function module by the packaging tool when generating the main program packaging file; load the plug-in function module in the plug-in program packaging file and generate an instantiated plug-in object by calling the plug-in entry object of the plug-in function module; call the dependent module access function in the plug-in object, which is defined when generating the plug-in program packaging file by the packaging tool, to access the target data table with the information of the configured dependent function module, so as to determine the target function module on which the plug-in function module depends; and run the application program based on the target function module and the plug-in object. In the process of loading and running each packaged function module in the application program, the target function module accessed by other function module programs is exported through the target data table, and the target function module on which the plug-in depends is run by accessing the target data table through the plug-in object, so that the plug-in function module can be dynamically parsed and loaded, and the target function module of the main program and the plug-in object can be more conveniently and comprehensively accessed with each parameter object involved, the implementation efficiency and flexibility of each function module of the application program are improved, and the flexibility of application program function change is improved in the form of function module plug-in.
[0109] Figure 4 A structure schematic diagram of an application program generation apparatus provided by an embodiment of the present disclosure is shown. As shown in the figure, the application program generation apparatus 400 can include: Figure 4
[0110] The encoding module 410 is configured to generate a plurality of main program function modules and plug-in function modules in response to an editing operation on a code editing tool.
[0111] The main program packaging module 420 is configured to run a first code conversion component in the packaging tool to add the first code to a target function module in each main program function module in response to a starting operation on the packaging tool, so as to generate a main program packaging file. The target function module is a main program function module on which a plug-in function module depends. The first code is used to store the target function module to a target data table.
[0112] The plug-in program packaging module 430 is configured to run an external dependent component in the packaging tool to mark the plug-in function module as an externally dependent function module, and determine a target access logic of a dependent module access function of the plug-in function module, so as to generate a plug-in program packaging file. The target access logic is used to determine a target function module on which the plug-in function module depends when running.
[0113] The application program generation module 440 is configured to generate an application program based on the main program packaging file and the plug-in program packaging file.
[0114] In some embodiments, the application program generation apparatus 400 further comprises a program debugging module configured to:
[0115] After the plurality of main program function modules and plug-in function modules are generated in response to the editing operation on the code editing tool, the first proxy object is created in response to a triggering operation of program debugging, so as to proxy the dependent module access function of the plug-in function module through the interception processing function of the first proxy object;
[0116] If the calling operation on the dependent module access function of the plug-in function module is detected, the interception processing function of the first proxy object is called to access the local storage path of the main program function module, so as to determine the target function module relied on by the plug-in function module at runtime;
[0117] The target function module and the plug-in function module are run, and the application program is debugged.
[0118] In some embodiments, the first code is configured to implement the function of storing the target function module into the target data table in the following manner:
[0119] The first object identifier of the target function module and the target function module are correspondingly stored into the target data table in the form of a key-value pair;
[0120] The target function module relied on by the plug-in function module at runtime is determined, including:
[0121] The second object identifier of the dependent function module configured by the plug-in function module is queried from the target data table, the key-value pair data corresponding to the second object identifier is determined, and the value information in the key-value pair data is taken as the target function module relied on by the plug-in function module at runtime.
[0122] In some embodiments, the plug-in program packaging module 430 is further configured to:
[0123] Before the external dependent component in the packaging tool is run to mark the plug-in function module as a function module dependent on an external component and to determine the target access logic of the dependent module access function of the plug-in function module, the second code conversion component in the packaging tool is run to add the second code to the plug-in function module; wherein the second code is configured to store the plug-in function module into the target data table.
[0124] In some embodiments, the application program generation apparatus 400 further comprises a third-party library exporting module configured to:
[0125] The third-party library is imported; wherein the third-party library is shared by the main program function module and the plug-in function module.
[0126] Based on the function and interface of the third-party library, a second proxy object is created to encapsulate and manage the third-party library.
[0127] The second proxy object is exported and stored in the target data table.
[0128] The application program generation device provided in the embodiments of the present application can execute the application program generation method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0129] Figure 5 A structural schematic diagram of an application program running device provided by an embodiment of the present disclosure is shown. Figure 5 As shown, the application program running device 500 can include:
[0130] The main program running module 510 is configured to load each main program function module in the main program packaging file and run the main program function module in response to an application program starting operation, generate a target data table by executing first code, wherein the target data table stores a target function module; the target function module is a main program function module relied on by the plug-in function module; the first code is a code added to the target function module when the main program packaging file is generated by a packaging tool;
[0131] The plug-in object generation module 520 is configured to load the plug-in function module in the plug-in program packaging file and call a plug-in entry object of the plug-in function module to generate an instantiated plug-in object.
[0132] The target function module determination module 530 is configured to call a dependent module access function of the plug-in object to access the target data table with the information of the configured dependent function module to determine the target function module relied on by the plug-in function module; wherein the dependent module access function is a function defined when the plug-in program packaging file is generated by the packaging tool.
[0133] The application program running module 540 is configured to run the application program based on the target function module and the plug-in object.
[0134] In some embodiments, the application program running device 500 further includes a third-party library import module configured to:
[0135] If the main program function module and / or the plug-in function module relies on a third-party library, the target data table is queried based on the information of the third-party library to determine a second proxy object to import the third-party library encapsulated by the second proxy object.
[0136] The application program running device provided in the embodiments of the present application can execute the application program running method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0137] It is worth noting that the embodiments of the application program generation device described above include various modules only according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional module are only for easy mutual differentiation, and are not used to limit the protection scope of the present disclosure.
[0138] The embodiments of the present disclosure also provide an electronic device, which can include a processor and a memory, and the memory can be used to store executable instructions. Wherein, the processor can be used to read the executable instructions from the memory and execute the executable instructions to realize the application program generation method or the application program running method in the above embodiments.
[0139] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0140] As shown in Figure 6 The electronic device 600 can include a processing device 601 (such as a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output interface (I / O interface) 605 is also connected to the bus 604.
[0141] Generally, the following devices can be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication devices 609 can allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data.
[0142] It should be noted that Figure 6 The electronic device 600 shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure. That is, although Figure 6 The electronic device 600 with various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be alternatively implemented or provided.
[0143] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the application generation method or the application operation method of any embodiment of the present disclosure are executed.
[0144] An embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the application generation method or application running method in any embodiment of the present disclosure.
[0145] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0146] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP, and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0147] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0148] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the steps of the application generation method or the application running method described in any embodiment of the present disclosure.
[0149] In embodiments of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0150] The diagrams of the drawing figures illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart and / or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and
[0151] The functionality described herein above can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, example types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0152] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0153] The above description merely illustrates the preferred embodiments of the disclosure and a principle for applying the technologies. It is understood by those skilled in the art that the disclosed scope of the disclosure is not limited to the technical solutions formed by the specific combinations of the technical features described above, and should also cover other technical solutions formed by the combinations of the technical features described above or their equivalent features without departing from the disclosed concept. For example, the technical solutions formed by the mutual replacement of the above-described features and the technical features with similar functions disclosed in the disclosure (but not limited to) can be formed.
[0154] Further, although operations are depicted in a particular, sequential order, this should not be understood as requiring or implying that the operations are performed in the order illustrated or sequentially. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, although specific implementation details are included for the purpose of providing a thorough disclosure, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.
[0155] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. An application program generation method characterized by comprising: The method comprises the following steps: in response to an editing operation on a code editing tool, a plurality of main program function modules and plug-in function modules are generated; in response to a starting operation on a packaging tool, a first code conversion component in the packaging tool is run to add first code to a target function module in each of the main program function modules, to generate a main program packaging file; the target function module is a main program function module relied on by the plug-in function module; the first code is used to store the target function module in a target data table; an external dependency component in the packaging tool is run to mark the plug-in function module as an externally dependent function module, and to determine a target access logic of a dependent module access function of the plug-in function module, to generate a plug-in program packaging file; the target access logic is used to determine the target function module relied on by the plug-in function module at runtime; an application program is generated based on the main program packaging file and the plug-in program packaging file.
2. The method of claim 1, wherein, After the step of generating the plurality of main program function modules and the plug-in function modules in response to the editing operation on the code editing tool, the method further comprises the following steps: in response to a triggering operation of program debugging, a first proxy object is created to proxy the dependent module access function of the plug-in function module through an interception processing function of the first proxy object; if an operation of calling the dependent module access function of the plug-in function module is detected, the interception processing function of the first proxy object is called to access a local storage path of the main program function module, to determine the target function module relied on by the plug-in function module at runtime; the target function module and the plug-in function module are run to debug the application program.
3. The method of claim 1, wherein, storing the target function module in the target data table comprises the following steps: a first object identifier of the target function module and the target function module are correspondingly stored in the target data table in a key-value pair structure; determining the target function module relied on by the plug-in function module at runtime comprises the following steps: a second object identifier of a dependent function module configured by the plug-in function module is used to query the target data table, to determine key-value pair data corresponding to the second object identifier, and to take value information in the key-value pair data as the target function module relied on by the plug-in function module at runtime.
4. The method of claim 1, wherein, Before the step of running the external dependency component in the packaging tool to mark the plug-in function module as an externally dependent function module, and to determine a target access logic of a dependent module access function of the plug-in function module, to generate a plug-in program packaging file, the method further comprises the following step: a second code conversion component in the packaging tool is run to add second code to the plug-in function module; the second code is used to store the plug-in function module in the target data table.
5. The method of claim 1, wherein, The method further comprises the following steps: a third-party library is imported; the third-party library is shared by the main program function modules and the plug-in function modules; based on functions and interfaces of the third-party library, a second proxy object is created to encapsulate and manage the third-party library; Deriving the second proxy object and storing the second proxy object into the target data table.
6. An application program execution method characterized by comprising: Comprising: In response to an application startup operation, loading each main program function module in a main program packaging file and running the main program function module, and generating a target data table by executing first code; wherein the target data table stores a target function module; the target function module is the main program function module relied on by a plug-in function module; the first code is code added to the target function module when the main program packaging file is generated by a packaging tool; Loading a plug-in function module in a plug-in program packaging file and calling a plug-in entry object of the plug-in function module to generate an instantiated plug-in object; Calling a dependent module access function of the plug-in object to access the target data table with information of a configured dependent function module to determine the target function module relied on by the plug-in function module for running; wherein the dependent module access function is a function defined when the plug-in program packaging file is generated by the packaging tool; Based on the target function module and the plug-in object, running the application.
7. The method of claim 1, wherein, The method further comprises: If the main program function module and / or the plug-in function module relies on a third-party library, querying the target data table based on information of the third-party library to determine a second proxy object to import the third-party library encapsulated by the second proxy object.
8. An application program generating apparatus characterized by comprising: Comprising: An encoding module for generating a plurality of main program function modules and plug-in function modules in response to an editing operation on a code editing tool; A main program packaging module for running a first code conversion component in the packaging tool in response to a startup operation on the packaging tool to add first code to a target function module in each main program function module to generate a main program packaging file; wherein the target function module is the main program function module relied on by the plug-in function module; the first code is used to store the target function module into a target data table; A plug-in program packaging module for running an external dependency component in the packaging tool to mark the plug-in function module as an externally dependent function module and determine a target access logic of a dependent module access function of the plug-in function module to generate a plug-in program packaging file; wherein the target access logic is used to determine the target function module relied on by the plug-in function module when running; An application generation module for generating an application based on the main program packaging file and the plug-in program packaging file.
9. An application program execution device characterized by comprising: Comprising: A main program running module for loading each main program function module in a main program packaging file and running the main program function module in response to an application startup operation, and generating a target data table by executing first code; wherein the target data table stores a target function module; the target function module is the main program function module relied on by a plug-in function module; the first code is code added to the target function module when the main program packaging file is generated by a packaging tool; The plug-in object generation module is configured to load a plug-in function module in the plug-in program packaging file and call a plug-in entry object of the plug-in function module to generate an instantiated plug-in object. The target function module determination module is configured to call a dependent module access function of the plug-in object to access the target data table with information of a configured dependent function module to determine the target function module on which the plug-in function module depends; wherein the dependent module access function is a function defined when the packaging tool generates the plug-in program packaging file. The application program running module is configured to run the application program based on the target function module and the plug-in object.
10. An electronic device, comprising: The application program generation method comprises the following steps: A processor; A memory for storing executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the application program generation method of any one of claims 1-5 or the application program running method of claim 6 or 7.
11. A computer readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the application program generation method of any one of claims 1-5 or the application program running method of claim 6 or 7.