Business system of application program, running method and device of application program and medium

Through the system architecture of module management objects and configuration objects, the module life cycle of the application is monitored, the problems of memory management chaos and resource waste are solved, and efficient management of resources and memory is achieved.

CN120407324APending Publication Date: 2025-08-01GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHCO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510362463.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, there are problems of memory management chaos and resource waste in application development, and manual program sorting is often required to avoid memory leakage and process residues.

Method used

Introduce a system architecture of module management objects, module configuration objects and module objects, and monitor the life cycle of module objects, generate monitoring results and feedback program status, reducing manual program sorting.

Benefits of technology

Effectively manage program resources and memory, reduce memory leaks and resource waste, and improve program stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407324A_ABST
    Figure CN120407324A_ABST
Patent Text Reader

Abstract

The invention discloses an application program running method, system and device and a storage medium. The application program comprises a module management object and a module object. The method comprises the steps that the module management object monitors a deployment stage and an operation stage of the module object; in the deployment stage, the module management object monitors the initialization duration and the loading duration of the module object, and when the initialization duration is greater than a first preset duration or the loading duration is greater than a second preset duration, the module management object generates first alarm information; the first alarm information is used for representing module initialization or module loading abnormity in the deployment stage; when the module management object receives a program closing notification in the running stage, the module object is controlled to perform module unloading, the module unloading duration of the module object is monitored, and when the module unloading duration is longer than a third preset duration, the module management object generates second alarm information; the second alarm information is used for representing module unloading abnormity in the operation stage. The method can be applied to the technical field of program design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of program development technology, and in particular to a business system for an application program, a method for running an application program, a device, and a medium. Background Art

[0002] Currently, in application development, memory management is a headache for most programs. During the development process, some programs often have problems with insufficient dependencies and chaotic memory management.

[0003] In the related art, the traditional approach to addressing the aforementioned issues is to have application developers manually and meticulously review the program, requiring this review every few versions. Otherwise, problems such as memory leaks and residual processes are likely to occur. This results in excessive waste of resources during program development. Therefore, there are still technical issues that need to be addressed in the related art. Summary of the Invention

[0004] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0005] To this end, an object of an embodiment of the present invention is to provide a business system for an application, a method for running an application, an apparatus and a medium, which can reduce manual program combing, memory leaks and resource waste.

[0006] In order to achieve the above-mentioned technical objectives, the technical solutions adopted by the embodiments of the present invention include: a business system of an application, including: a module object, which is a functional module of the application; the module object corresponds to a first life cycle; the first life cycle is the life cycle of the running process of the module object; the first life cycle is used to indicate the various stages in which the module object participates in the running process of the application; a module configuration object, which corresponds one-to-one to the module object, and the module configuration object is used to determine the first running condition of the module object based on user configuration; a module management object, which is used to control the operation of the module object and monitor the first life cycle of the module object based on the first running condition to generate a first monitoring result.

[0007] The embodiments of the present invention cover a module management object, a module configuration object, and a module object in the business system of an application. The module management object can monitor the life cycle of the module object according to the first operating condition determined by the module configuration object and generate a monitoring result, so as to visually feedback the state during the program operation through the monitoring result. The system of the present invention can centrally control the life cycle of the module object during its operation through the system architecture of the module management object, the module configuration object, and the module object, effectively manage the resources and memory of the program, reduce manual program sorting, and reduce memory leaks and resource waste.

[0008] In addition, for a business system of an application according to the above embodiments of the present invention, the following additional technical features may also be provided:

[0009] Further, in the embodiments of the present invention, the module object includes: a module sub-object, which is a functional module of the module object; the module sub-object corresponds to a second life cycle; the second life cycle is the life cycle of the running process of the module sub-object; the second life cycle is used to indicate each stage that the module sub-object participates in during the operation of the application; a module configuration sub-object, which corresponds to the module sub-object one by one, and the module configuration object is used to determine the second operating condition of the module sub-object based on user configuration; a module management sub-object, which is used to control the operation of the module sub-object and monitor the second life cycle of the module sub-object based on the second operating condition to generate a second monitoring result.

[0010] On the other hand, the embodiments of the present invention also provide a method for running an application, which is run based on the business system of the application described in any one of the foregoing. The method includes: the module management object monitors the life cycle of the module object; the life cycle includes a deployment stage and a running stage;

[0011] During the deployment stage, the module management object monitors the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object generates a first warning message; the first warning message is used to indicate that the module initialization or the module loading is abnormal during the deployment stage;

[0012] When the module management object receives a program shutdown notification during the running stage, it controls the module object to unload the module and monitors the module unloading duration of the module object. When the module unloading duration is greater than the third preset duration, the module management object generates a second warning message; the second warning message is used to indicate that the module unloading is abnormal during the running stage.

[0013] In addition, according to a method for running an application according to the above embodiments of the present invention, the following additional technical features may also be provided:

[0014] Further, in an embodiment of the present invention, the application further includes a module configuration object, and the running method further includes: during the deployment phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is initialized, the module management object calls the initialization function of the dependency and initializes the module configuration object.

[0015] Further, in an embodiment of the present invention, the application further includes a module configuration object, and the running method includes: when the module management object receives a program shutdown notification during the running phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is uninstalled, the module management object calls the uninstallation function of the dependency and uninstalls the module configuration object.

[0016] Further, in an embodiment of the present invention, the running method further includes: during the running phase, at intervals of a first preset time, the module management object updates the module configuration object and / or the module object;

[0017] When the module management object updates the module configuration object and / or the module object and receives the program shutdown notification, the module management object controls the module configuration object and / or the module object to stop updating.

[0018] Further, in an embodiment of the present invention, the deployment phase includes an initialization phase and a loading phase. During the deployment phase, the module management object monitors the initialization duration and the loading duration of the module object. When the initialization duration is greater than a first preset duration or the loading duration is greater than a second preset duration, the module management object generates a first warning message, including:

[0019] During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is less than or equal to the first preset duration, the module management object controls the module object to complete initialization and enter the loading phase;

[0020] During the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is greater than the second preset duration, the module management object generates a first warning message;

[0021] Or,

[0022] During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is greater than the first preset duration, the module management object generates a first warning message.

[0023] Further, in an embodiment of the present invention, the method further includes: during the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is less than or equal to the second preset duration, the module management object controls the module object to complete module loading and enter the running phase.

[0024] Further, in an embodiment of the present invention, the method further includes: when the module management object receives a program closing notice during the running phase, it controls the module object to perform module unloading and monitors the module unloading duration of the module object. When the module unloading duration is less than or equal to the third preset duration, the module management object controls the module object to complete module unloading and generates a first prompt message;

[0025] Wherein, the first prompt message is used to indicate that the module object is successfully unloaded.

[0026] Further, in an embodiment of the present invention, when the module management object receives a program closing notice during the running phase and controls the module object to perform module unloading, it includes: when the module management object receives a program closing notice during the running phase, it sequentially calls the prepare-unload function of each module object and the unload function of each module object to control the module object to perform module unloading; or, when the module management object receives a program closing notice during the running phase, it stops updating the module object and calls the unload function of each module object to control the module object to perform module unloading.

[0027] Further, in an embodiment of the present invention, the method further includes: the module management object calls an initialization function and initializes each module configuration object so that the module configuration object is embedded in the module management object.

[0028] On the other hand, the present invention also provides an application program running device, including:

[0029] At least one processor;

[0030] At least one memory for storing at least one program;

[0031] When the at least one program is executed by the at least one processor, the at least one processor implements the running method of the application program as described in any item in the summary of the invention.

[0032] In addition, the present invention also provides a computer-readable storage medium storing instructions executable by a processor, and the instructions executable by the processor, when executed by the processor, are used to execute the running method of the application program as described in any one of the above.

[0033] Advantages and beneficial effects of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present invention:

[0034] The business system of the application program in the present invention includes a module management object, a module configuration object, and a module object. The module management object can monitor the life cycle of the module object according to the first running condition determined by the module configuration object and generate a monitoring result, so as to visually feedback the state during the program running process through the monitoring result. The system of the present invention can centrally control the life cycle of the module object during its running process through the system architecture of the module management object, the module configuration object, and the module object, effectively manage the resources and memory of the program, reduce manual program sorting, and reduce memory leakage and resource waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of the corresponding relationship among the module management object, the module configuration object, and the module object in a specific embodiment of the present invention;

[0036] Figure 2 It is a schematic diagram of the steps of the running method of the application program in a specific embodiment of the present invention;

[0037] Figure 3 It is a schematic diagram of the life cycle of the module object in a specific embodiment of the present invention;

[0038] Figure 4 It is a schematic diagram of the steps of the running method of the application program in another specific embodiment of the present invention;

[0039] Figure 5 It is a schematic diagram of the steps of the running method of the application program in another specific embodiment of the present invention;

[0040] Figure 6 It is a schematic diagram of the steps of the running method of the application program in another specific embodiment of the present invention;

[0041] Figure 7 It is a schematic diagram of the steps of the running method of the application program in another specific embodiment of the present invention;

[0042] Figure 8 It is a schematic diagram of the steps of the running method of the application program in another specific embodiment of the present invention;

[0043] Figure 9Schematic diagram of the correspondence between the module management object, the module configuration object, and the module object in another specific embodiment of the present invention;

[0044] Figure 10 Schematic flowchart of the running method of the application program in a specific embodiment of the present invention;

[0045] Figure 11 Schematic structural diagram of the application program running device in a specific embodiment of the present invention. Specific implementation manners

[0046] The following describes in detail the embodiments of the present invention with reference to the accompanying drawings. The principles and processes of the running method, system, device, and storage medium of the application program in the embodiments of the present invention are described as follows.

[0047] First, the technical problems existing in the related art are described:

[0048] Currently, in application program development, memory management of most programs is a headache. During the development process, some programs often have problems such as insufficient dependencies or chaotic memory management.

[0049] In the related art, in response to the above problems, the traditional method is to arrange for the designers of application program development to manually and carefully sort out the programs, and the programs need to be sorted out every few versions, otherwise problems such as memory leaks or process residues are likely to occur. This leads to excessive resource waste in program development. Therefore, there are still problems to be solved in the related art.

[0050] Then, in view of the defects of the above-mentioned prior art, the present application provides a business system for an application program. The system includes: a module object, a module configuration object, and a module management object.

[0051] The life cycle can indicate each stage that the module object participates in during the running process of the application program. The module management object can control the running of the module object and, based on the first running condition, monitor the first life cycle of the module object and generate a first monitoring result. The first monitoring result can be the result obtained by monitoring whether the module object runs in accordance with the running conditions configured by the user during the life cycle.

[0052] The module management object is mainly used to manage the corresponding module object. The module management object mainly involves the organization, reuse, and interface control of code. The module management object is the actual controller of the life cycle of the module object. It is equivalent to a control center platform. It can be composed of several lines of program code, or it can be a functional plug-in or a functional file. In some embodiments, the module management object may include a header file and a source file, and the module management object can reuse code through the header file. In some embodiments, the module management object can also be an inherent module in the C++20 version. The module object can be a module with specific functions. The module can be composed of several lines of program code, or it can be a functional plug-in or a functional file. The module can have its own life cycle. It can provide corresponding functions for the project. After it has its own life cycle, it achieves the purpose of convenient control. In addition, the module object can have its own sub-modules. That is to say, the module object can also have a module management object to facilitate the management of its own sub-modules. Specifically, the module object can be a translation function module, a search function module, a document sharing function module, a multi-person collaborative creation function module, a document in pdf / image / markdown function module, a text reading function module, a document upload to cloud disk function module, and other function modules.

[0053] In some embodiments of the present invention, the module management object can have a corresponding module configuration object. The module configuration object can correspond one-to-one with the module object. That is to say, there can be one or more module objects in the business system. Correspondingly, there can also be one or more module configuration objects in the business system. The module configuration object can determine the first operating condition of the module object based on user configuration. The first operating condition can include one or more of the maximum initialization duration, the maximum module loading duration, unloading dependent modules, and the maximum module unloading duration. The module configuration object is equivalent to a storage device for function configuration. It can be composed of several lines of program code, or it can be a functional plug-in or a functional file. It can store the management configuration of the module management object for the module object. Specifically, the module configuration object can be set with management configuration items such as initialization dependencies, loading dependencies, or unloading dependencies.

[0054] In some other embodiments of the present invention, the module configuration object can be set with management configuration items such as the maximum initialization duration, the maximum module loading duration, or the maximum module unloading duration. The module object can be a functional module of an application program; the module object can include a first life cycle. The first life cycle is the life cycle corresponding to the module object.

[0055] Further, in some feasible embodiments of the present invention, refer to Figure 1, the module object includes module sub-objects. The module sub-objects can be functional modules of the module object. The module sub-objects can include a second lifecycle. The second lifecycle can be the lifecycle corresponding to the module sub-objects. The module configuration sub-objects can correspond one-to-one with the module sub-objects. The module configuration object is used to determine the second operating conditions of the module sub-objects based on user configurations. The second operating conditions can include one or more of a maximum initialization duration, a maximum module loading duration, unloading dependent modules, and a maximum module unloading duration. The module management sub-object can be used to control the operation of the module sub-objects and monitor the second lifecycle of the module sub-objects based on the second operating conditions and generate a second monitoring result.

[0056] Further, the specific operating method of the present invention can refer to Figure 2 , Figure 2 is a schematic diagram of the steps of the operating method of an application provided by an embodiment of the present invention. In Figure 2 , the operating method of the application can include but is not limited to steps S101 - S103.

[0057] S101. The module management object monitors the lifecycle of the module object; the lifecycle includes a deployment phase and an operation phase.

[0058] It can be understood that the lifecycle of the module object can include a deployment phase and an operation phase. Referring to Figure 3 , the deployment phase can include: preInit phase: also known as the pre-initialization phase, the timing of this phase is before module initialization. When the program runs in this phase, the management module in the program can perform checks on the operating environment and checks on the initialization dependencies in the program. init phase: also known as the initialization phase, when the program is in this phase, the module object undergoes the initialization phase.

[0059] The operation phase can include: preLoad phase: also known as the pre-loading phase or the pre-loading stage. This phase mainly checks the dependencies related to the module object in the program and checks the operating environment of the module object, etc., to prepare for the module object loading phase. Load phase: also known as the loading phase, this phase loads the resources corresponding to each module object in the program. Update phase: also known as the update phase. In this phase, each module in the program can independently update its own state, such as functions like application check for updates. preUn Load phase: also known as the preparation for unloading phase. When the program is about to close, it enters the preparation for unloading phase. This phase is mainly used to check whether the dependencies have been unloaded completely, thereby preventing situations such as infinite loop dependencies or wild pointers. Unload phase: also known as the unloading phase, this phase mainly unloads all the resources of the module object.

[0060] In some feasible embodiments of the present application, since the module management object is provided with a life management base class of the module object, during the program operation, the module management object can monitor all the life cycles of the module object. The life cycle of the module object can at least include a deployment stage and a running stage.

[0061] S102. During the deployment stage, the module management object monitors the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object generates a first warning message.

[0062] It can be understood that the module configuration object corresponding to the module management object can be configured with management configuration items or management attributes of the maximum initialization duration and the maximum loading duration, so that the module management object can monitor the initialization duration and the loading duration of the module object. The deployment stage of the module object is specifically the initialization stage and the loading stage of the module object. The first preset duration can be the maximum initialization duration, and its specific value can be determined according to the user's setting, which is not limited here. And the second preset duration can be the maximum loading duration. Similarly, the specific value of the maximum loading duration can be determined according to the user's setting, which is not limited here either. And the first warning message can indicate that there is an abnormality in the module initialization or module loading during the deployment stage.

[0063] In some feasible embodiments of the present application, the module management object can monitor the life cycle of the module object. When the life cycle of the module object enters the deployment stage, the module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object can generate a first warning message. The first warning message is used to indicate that there is an abnormality in the module initialization or module loading during the deployment stage.

[0064] It should be noted that the first warning message can be presented on the user device in the form of a page pop-up window. According to the pop-up window on the device, the user can modify the module management object, the module object or other parameters in the program so that the program can run normally. In other embodiments, if there is a user ID or user email on the user device, the first warning message can also be notified to the user in the form of an email or a message. According to the email or the message, the user can also modify the module management object, the module object or other parameters in the program so that the program can run normally. Specifically, the first warning message can be a pop-up window containing the content of "abnormal module initialization during the deployment stage" or "abnormal module loading during the deployment stage", or an email containing the content of "abnormal module initialization during the deployment stage" or "abnormal module loading during the deployment stage".

[0065] The module management object in this step can monitor the initialization duration and loading duration of the module object during the deployment phase of the module object, and promptly feedback any abnormal conditions to the user through methods such as pop-up windows or messages, and notify the user to modify the program in a timely manner, thereby reducing memory leakage and resource waste.

[0066] S103. When the module management object receives a program shutdown notice during the running phase, it controls the module object to perform module uninstallation and monitors the module uninstallation duration of the module object. When the module uninstallation duration is greater than the third preset duration, the module management object generates a second warning message; the second warning message is used to indicate abnormal module uninstallation during the running phase.

[0067] It can be understood that the module configuration object corresponding to the module management object can be configured with a management configuration item or management attribute of the maximum module uninstallation duration, so that the module management object can monitor the module uninstallation duration of the module object during the running phase. The third preset duration can be the maximum initialization duration, and its specific value can be determined according to the user's settings and is not limited here. And the second warning message can indicate that there is an abnormality in the uninstallation of the module during the running phase.

[0068] In some feasible embodiments of the present application, the module management object can monitor the life cycle of the module object. When the life cycle of the module object enters the running phase and the module management object receives a program shutdown notice during the running phase, the control module object can uninstall the module object and monitor the module uninstallation duration of the module object. When the module uninstallation duration is greater than the third preset duration, the module management object can generate a second warning message. The second warning message is used to indicate abnormal module uninstallation during the running phase.

[0069] It should be noted that the second warning message can be presented on the user device in the form of a page pop-up window. Based on the pop-up window on the device, the user can modify the module management object, module object, or other parameters in the program to enable the program to run normally. In other embodiments, if there is a user ID or user email on the user device, the second warning message can also be notified to the user in the form of an email or message. Based on the email or message, the user can also modify the module management object, module object, or other parameters in the program to enable the program to run normally. Specifically, the second warning message can be a pop-up window containing the content of "abnormal module initialization during the running phase" or "abnormal module loading during the running phase", or an email containing the content of "abnormal module initialization during the running phase" or "abnormal module loading during the running phase".

[0070] The module management object in this step can, during the running stage of the module object and when receiving a program shutdown notice, control the module object to perform module unloading, monitor the unloading duration, and promptly feedback abnormal situations to the user through methods such as pop-up windows or messages, and notify the user to modify the program in a timely manner, thereby further reducing memory leakage and resource waste.

[0071] In summary, in this embodiment, by adding a module management object to the application program, the module management object detects the module loading duration of the module object during the deployment stage and the running stage, and detects the module unloading duration during the running stage, and generates different abnormal information according to the detection results and notifies the user, thereby reminding the user to adjust the program. The method of the present invention can centrally control the deployment and running stages of the module object, effectively manage the resources and memory of the program, reduce manual program sorting, and reduce memory leakage and resource waste.

[0072] Further, referring to Figure 4 , Figure 4 is a schematic diagram of the steps of the running method of the application program in another embodiment of the present invention. In Figure 4 , the running method of the application program may further include, but is not limited to, step S111.

[0073] S111. During the deployment stage, the module management object detects whether the module configuration object has dependencies; if so, before the module object is initialized, the module management object calls the initialization function of the dependency and initializes the module configuration object.

[0074] It can be understood that in the application program, dependencies may include code dependencies, library dependencies, and resource dependencies. Among them, code dependencies may include class dependencies, function dependencies, and module dependencies. A class dependency may be that one class depends on the definition or implementation of another class. A function dependency may be that one function depends on the implementation of another function. A module dependency may be that one module depends on the function of another module. Library dependencies may include static libraries (.lib or.a) and dynamic libraries (.dll or.so). Static libraries (.lib or.a) are linked to the program during compilation. Dynamic libraries (.dll or.so) can be loaded during runtime. Resource dependencies may include configuration files, data files, images, and audio, etc. System dependencies may include operating system APIs and hardware drivers, etc.

[0075] In some feasible embodiments of the present invention, the module management object monitors the life cycle of the module object. During the deployment phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is initialized, the module management object calls the initialization function of the dependencies and initializes the module configuration object. Then the module object enters the initialization phase and the module loading phase. The module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object can generate a first warning message indicating an abnormality in module initialization or module loading during the deployment phase. When the module management object receives a program shutdown notice during the running phase, it controls the module object to unload the module and monitors the module unloading duration of the module object. When the module unloading duration is greater than the third preset duration, the module management object generates a second warning message indicating an abnormality in module unloading during the running phase. Specifically, the dependencies in this embodiment can be library dependencies and resource dependencies.

[0076] In summary, in this embodiment, by detecting the dependencies of the module configuration object by the module management object before initializing the module object and initializing the dependencies, the management of the dependency relationship between modules before the initialization of the module object can be realized, and the program errors and resource conflict defects caused by improper dependencies of the module object during the program running phase can be improved.

[0077] Further, referring to Figure 5 , Figure 5 is a schematic diagram of the steps of the running method of the application program in another embodiment of the present invention. In Figure 5 , the running method of the application program may further include step S112.

[0078] S112. When the module management object receives a program shutdown notice during the running phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is unloaded, the module management object calls the unloading function of the dependencies and unloads the module configuration object.

[0079] It can be understood that the dependencies in the module configuration object can include code dependencies, library dependencies, and resource dependencies. Among them, code dependencies can include class dependencies, function dependencies, and module dependencies. A class dependency can be that one class depends on the definition or implementation of another class. A function dependency can be that one function depends on the implementation of another function. A module dependency can be that one module depends on the function of another module. Library dependencies can include static libraries (.lib or.a) and dynamic libraries (.dll or.so). Static libraries (.lib or.a) are linked into the program during compilation. Dynamic libraries (.dll or.so) can be loaded during runtime. Resource dependencies can include configuration files, data files, images, and audio, etc. System dependencies can include operating system APIs and hardware drivers, etc.

[0080] In some feasible embodiments of the present invention, the module management object monitors the life cycle of the module object. During the deployment phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is initialized, the module management object calls the initialization function of the dependencies and initializes the module configuration object. Then the module object enters the initialization phase and the module loading phase. The module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object can generate a first warning message indicating that the module initialization or the module loading is abnormal during the deployment phase. When the module management object receives a program shutdown notification during the running phase, the module object enters the pre-unloading phase. During this phase, the module management object detects whether the module configuration object has dependencies; if so, before the module object is unloaded, the module management object calls the unloading function of the dependencies and unloads the module configuration object. After the module configuration object is unloaded, the control module object performs module unloading and monitors the module unloading duration of the module object. When the module unloading duration is greater than the third preset duration, the module management object generates a second warning message indicating that the module unloading is abnormal during the running phase.

[0081] In summary, in this embodiment, before the module object is unloaded, the module management object detects the program shutdown notification and the dependencies of the module configuration object, and unloads the dependencies when the program shutdown notification is received during the running phase and before the module object is unloaded. This embodiment can realize the management of the dependency relationship between modules before the module object is unloaded, and improve the program errors and resource conflict defects caused by improper dependencies of the module object during the program running phase.

[0082] Further, referring to Figure 6 , Figure 6 is a schematic diagram of the steps of the running method of the application program in another embodiment of the present invention. In Figure 6 , the running method of the application program further includes step S122.

[0083] S122. During the running phase, at every first preset time interval, the module management object updates the module configuration object and / or the module object; when the module management object updates the module configuration object and / or the module object and receives a program shutdown notification, the module management object controls the module configuration object and / or the module object to stop updating.

[0084] In some feasible embodiments of the present invention, since the module management object is provided with a life management base class for module objects, during program operation, the module management object can monitor all the life cycles of module objects. The life cycle of a module object can at least include a deployment phase and a running phase. When the life cycle of the module object enters the deployment phase, the module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than a first preset duration or the loading duration is greater than a second preset duration, the module management object can generate a first warning message. The first warning message is used to indicate that there is an abnormality in module initialization or module loading during the deployment phase. During the running phase, at every first preset time interval, the module management object can periodically update the module configuration object and / or the module object, and this update continues during the running phase. When the module management object is updating the module configuration object and / or the module object, if the module management object receives a program shutdown notice, the module management object can control the module configuration object and / or the module object to stop updating and control the module object to unload the module object and monitor the module unloading duration of the module object. When the module unloading duration is greater than a third preset duration, the module management object can generate a second warning message. The second warning message is used to indicate that there is an abnormality in module unloading during the running phase.

[0085] In summary, in this embodiment, during the running phase, the module management object can update the module configuration object and / or the module object at fixed time intervals and receive a program shutdown notice during this period. The module management object controls the module configuration object and / or the module object to stop updating. This embodiment can achieve dynamic update and status control of the module, enabling the module object to self-update and adjust its status according to application requirements.

[0086] Further, the deployment phase can include an initialization phase and a module loading phase. During the deployment phase, when the module management object monitors the initialization duration and the loading duration of the module object, and when the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the step of the module management object generating the first warning message can include step S201 and S202 or step S203.

[0087] S201. During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is less than or equal to the first preset duration, the module management object controls the module object to complete initialization and enter the loading phase.

[0088] S202. During the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is greater than the second preset duration, the module management object generates the first warning message.

[0089] Or,

[0090] S203. During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is greater than the first preset duration, the module management object generates a first warning message.

[0091] In some feasible embodiments of the present invention, during the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is less than or equal to the first preset duration, this may indicate that the initialization time is relatively short. At this time, the module management object can control the module object to complete the initialization and enter the loading phase. Then, during the module loading phase, the module management object can continue to monitor the loading duration of the module object. When the initialization duration is greater than the second preset duration, the module management object generates a first warning message.

[0092] In some other feasible embodiments of the present invention, during the initialization phase, the module management object can monitor the initialization duration of the module object. When the initialization duration is greater than the first preset duration, at this time, the module management object can also generate a first warning message.

[0093] It can be understood that the purpose of the module management object generating the first warning message is to notify the user or the designer, avoiding the defect that during the initialization phase and the module loading phase of the traditional program running process, the program is abnormal but the user or the designer cannot perceive it, and further improving the security of the program.

[0094] In summary, in this embodiment, the module management object detects the initialization duration during the initialization phase of the module object, and detects the module loading duration during the module loading phase of the module object. When the initialization duration is greater than the first preset duration or the module loading duration is greater than the second preset duration, the module management object timely generates a warning message to notify the user or the program designer of the abnormality of the program running, thereby improving the security and stability of the program running.

[0095] Furthermore, the deployment phase may include an initialization phase and a module loading phase, and the method for running the application program further includes step S204.

[0096] S204. During the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is less than or equal to the second preset duration, the module management object controls the module object to complete the module loading and enter the running phase.

[0097] In some feasible embodiments of the present invention, during the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is less than or equal to the second preset duration, the module management object can determine that there is no abnormality in the loading process of the module object. At this time, the module management object controls the module object to complete the module loading and enter the running phase.

[0098] Further, referring to Figure 7 , Figure 7 which is a schematic diagram of the steps of the running method of the application program in another embodiment of the present invention. In Figure 7 , the running method of the application program further includes step S104.

[0099] S104. When the module management object receives a program closing notice during the running stage, it controls the module object to unload the module and monitors the module unloading duration of the module object. When the module unloading duration is less than or equal to the third preset duration, the module management object controls the module object to complete the module unloading and generates a first prompt message.

[0100] In some feasible embodiments of the present invention, at the beginning of the program, the module management object can first call the initialization function and initialize each module configuration object so that the module configuration object is embedded in the module management object, and then start running the program. Since the module management object is provided with a life management base class of the module object, during the program running, the module management object can monitor all the life cycles of the module object. The life cycle of the module object can at least include the deployment stage and the running stage. When the life cycle of the module object enters the deployment stage, the module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object can generate a first warning message. The first warning message is used to indicate that there is an abnormality in module initialization or module loading during the deployment stage. During the running stage, at every first preset time interval, the module management object can periodically update the module configuration object and / or the module object, and this update continues during the running stage; when the module management object is updating the module configuration object and / or the module object, if the module management object receives a program closing notice, the module management object can control the module configuration object and / or the module object to stop updating and control the module object to unload the module object and monitor the module unloading duration of the module object. When the module unloading duration is greater than the third preset duration, the module management object can generate a second warning message. The second warning message is used to indicate that there is an abnormality in module unloading during the running stage. When the module unloading duration is less than or equal to the third preset duration, the module management object controls the module object to complete the module unloading and generates a first prompt message.

[0101] In summary, when the module management object in this embodiment receives a program shutdown notification during operation, it can control the module object to perform module uninstallation and monitor the module uninstallation duration of the module object. When the module uninstallation duration is less than or equal to the third preset duration, the module management object controls the module object to complete the module uninstallation and generates a first prompt message. The module management object in this embodiment monitors the duration of the module uninstallation process and generates a prompt message in a timely manner after the module object is uninstalled to prompt the user or the program designer, thus realizing the perceptible management of the module uninstallation process.

[0102] Further, when the module management object receives a program shutdown notification during the running phase, the step of controlling the module object to perform module uninstallation may specifically include step S301 or step S302.

[0103] When the module management object receives a program shutdown notification during the running phase, it sequentially calls the prepare-uninstall function of each module object and the uninstall function of each module object to control the module object to perform module uninstallation;

[0104] Or,

[0105] When the module management object receives a program shutdown notification during the running phase, it stops updating the module object and calls the uninstall function of each module object to control the module object to perform module uninstallation.

[0106] Further, referring to Figure 8 , Figure 8 is a schematic diagram of the steps of the running method of the application program in another embodiment of the present invention. In Figure 8 , the running method of the application program further includes step S100.

[0107] S100. The module management object calls the initialization function and initializes each module configuration object so that the module configuration object is embedded in the module management object.

[0108] In some feasible embodiments of the present invention, at the beginning of the program, the module management object can first call the initialization function and initialize each module configuration object so that the module configuration object is embedded in the module management object, and then start running the program. Since the module management object is provided with the life management base class of the module object, when the program runs, the module management object can monitor all the life cycles of the module object. The life cycle of the module object can at least include the deployment stage and the running stage. When the life cycle of the module object enters the deployment stage, the module management object can monitor the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object can generate a first warning message. The first warning message is used to indicate that the module initialization or the module loading is abnormal during the deployment stage. During the running stage, at every first preset time interval, the module management object can periodically update the module configuration object and / or the module object, and this update continues during the running stage; when the module management object updates the module configuration object and / or the module object, if the module management object receives a program shutdown notice, the module management object can control the module configuration object and / or the module object to stop updating and control the module object to unload the module object and monitor the module unloading duration of the module object. When the module unloading duration is greater than the third preset duration, the module management object can generate a second warning message. The second warning message is used to indicate that the module unloading is abnormal during the running stage.

[0109] The following describes the specific calculation principle of the present invention with reference to the accompanying drawings:

[0110] The application program of this embodiment can be a C++ program. It can be understood that the application program of the present application can also be a program written in other computer languages. The specific process of this embodiment includes S1 - S2.

[0111] S1: Design the three elements of the present invention. The three elements can include a module management object, a module configuration object, and a module object. Specifically, as shown in the accompanying drawings, there can be multiple corresponding module configuration objects for one module management object. In this embodiment, there are 3 corresponding module configuration objects for one module management object, and each module configuration object can correspond to one module object. The specific design process of the three elements of the present invention specifically includes S11 - S13. Figure 9 As shown, there can be multiple corresponding module configuration objects for one module management object. In this embodiment, there are 3 corresponding module configuration objects for one module management object, and each module configuration object can correspond to one module object. The specific design process of the three elements of the present invention specifically includes S11 - S13.

[0112] S11. Design module objects. Each module object has its own lifecycle, provides corresponding functions for the project, and has its own lifecycle to achieve the purpose of convenient control. A module object can have its own sub-modules. That is to say, a module object can have a module management object of its own to facilitate the management of its sub-modules. A module object does not refer to a single one only. A module object can also have sub-modules, so it also needs to be managed using a module management object. Such a module management object can be called a sub-module management object.

[0113] S12. Design the life management base class of module objects. This life management base class can include 7 main stages such as pre-initialization (preInit) of module objects, initialization (Init) of module objects, pre-loading (preLoad) of module objects, loading (Load) of module objects, updating (Update) of module objects, pre-unloading (preUnLoad) of module objects, and unloading (UnLoad) of module objects.

[0114] S13. Design module configuration objects. Module configuration objects can be used to manage how to manage module objects according to the attributes configured by users and the management project. The main function of module configuration objects is to tell the module management object how to manage the lifecycle of module objects, that is, mainly to configure the running conditions of module objects, such as initialization dependencies, loading dependencies, or maximum unloading duration when the module object is running. Therefore, the attributes configured by users and the management project are generally running conditions such as whether there are modules with initialization dependencies, maximum initialization duration, maximum module loading duration, unloading dependent modules, and maximum module unloading duration.

[0115] Modules with initialization dependencies: When programmers write code, they often need to rely on resources initialized by other modules, such as local configurations or remote configurations. The conventional design method is for programmers to initialize from top to bottom according to the code logic. When a new module object is inserted, the method is to conduct a business inventory check of the code and then insert it into a safe place. This method often takes a lot of time and requires the business staff to be very familiar with the code rules. However, when this method involves asynchronous problems, it is very easy to make mistakes. Therefore, design initialization dependencies in the program. When a module object needs to be initialized, if there are modules with dependencies configured in the program, then the module object will definitely be initialized only after the modules with dependencies are initialized. When a new module object is added, it is also possible to directly add the new module object behind the code and then configure the dependencies. This method completely does not need to consider business issues, only needs to consider whether it depends on other module resources, so as to achieve the purpose of decoupling.

[0116] Maximum initialization duration: During the module loading process, it is often necessary to wait for resource loading, and the conventional approach is to wait indefinitely. However, in such cases, when there are issues with the business code or the user device environment, preventing resource loading or causing extremely slow resource loading, users or program designers are unable to perceive such situations. The program cannot prompt users or program designers, and users or program designers cannot collect corresponding program logs either. Therefore, the maximum initialization duration is highly necessary. When the module object exceeds the maximum initialization duration during the module object initialization task, the module management object will receive a message. At the same time, the module management object will issue a notification to collect logs and handle the business for such situations.

[0117] Maximum module loading duration: During the module object loading process, time-consuming operations such as resource loading may occur. Therefore, the maximum module loading duration is similar to the "maximum initialization duration" and is mainly used to monitor whether there is a timeout during the loading process of any module object. When a timeout occurs, the module management object can generate corresponding alarm information.

[0118] Unloading dependent modules: There is a function of data intercommunication and mutual function calls between any module object and another module object. Before the current module object is unloaded, it is necessary to wait for the dependent module to be unloaded. After the dependent item is unloaded and released, the module object can be unloaded and released. Only in this way can the program task exit safely, reducing the flashback bug caused by the premature release of the program's property variables and improving the program's stability.

[0119] Maximum module unloading duration: Similar to the "maximum initialization duration", when a module object or task needs to be released, during the module object unloading and release process, there may be situations such as thread waiting in a dead loop and release failure. Such situations may lead to program flashbacks or process residues. Therefore, designing the maximum module unloading duration in the module configuration object can effectively monitor the module object unloading and release process.

[0120] In addition to the above properties, the module configuration object can also configure more properties, such as update trigger duration, module task pause status, etc. Specific properties can be configured and designed according to the business to achieve the purpose of effectively controlling the memory management of the object.

[0121] S13. Design the module management object. The module management object can be used to manage module objects. The module management object can be the actual controller of the module object lifecycle. The module management object is equivalent to a control center platform. The module management object is the control center for managing module objects. It has all the functions of module object loading, module object update, control of various module states, and timeout perception of various states during the module's lifecycle.

[0122] S2. Run the program composed of the above three elements, with reference to Figure 10 and the running steps may specifically include steps S001 - S010.

[0123] Step S001: When the program is initialized, initialize the object management class. In a C++ program, the process of initializing an object management class (or any object) involves multiple steps, from the declaration of the object to the invocation of the constructor. The specific process is as follows: First, declare an object in the code. Then, when the object is declared, the compiler allocates memory for the object on the stack or the heap. Memory allocation reserves storage space for the object, but at this time the module object is not yet initialized. Next, the compiler calls the constructor of the module object to initialize the module object. If no explicit parameters are provided in the program, the default constructor will be called. If parameters are provided in the program, the corresponding constructor with parameters will be called. Then, member variable initialization is performed. Specifically, within the constructor body, member variables can also be initialized.

[0124] Step S002: Initialize each module configuration object to unify all the operations of the program.

[0125] Step S003: Add the module configuration object to the module management object.

[0126] Step S004: Call the preInit method of each module object and perform pre - initialization to prepare for the subsequent initialization.

[0127] Step S005: Call the initialization function of each module object and perform initialization. During the initialization phase, when there is any configuration object with dependencies, the module management object can preferentially call the dependency initialization method. During this period, start monitoring the duration of the initialization of the module object. When the initialization of the module object is completed, return the result and stop the monitoring. When the initialization of the module object exceeds the preset maximum initialization duration, the module management object triggers the timeout service mechanism and generates an alarm message.

[0128] Step S006: Call the loading function of each module object and perform the loading of the module object. When there is a configuration object with dependencies, preferentially call the dependency loading function and start monitoring the duration of the loading of the module object during this period. When the loading of the module object is completed, return the result and stop the monitoring. When the initialization of the module object exceeds the preset maximum loading duration, the module management object triggers the timeout service mechanism and generates an alarm message.

[0129] Step S007: Implement cyclic execution to update the module objects according to the configured time interval. Before the program ends, the module management object triggers the update method of each module object at regular intervals and updates the module objects. During the update of the module objects, when any module object needs to be unloaded and released, the module management object can check the module status and stop the update of this module object.

[0130] Step S008: When the module management object receives a program shutdown notification, it calls the prepare-unload function of each module object, detects the program running environment to be prepared for unloading, then calls the unload method to unload the module object, or stops the task of updating the module object and then unloads the module object, preventing the module object from taking a long time to release during the unloading phase.

[0131] Step S009: Call the unload function of each module and start the process of unloading the module object, stop the program task and release the memory space. When any configuration object has dependencies, the module management object preferentially calls the dependency unload function. During this period, the module management object starts monitoring the unloading duration. When the module object unloading is completed, it returns the result of unloading completion and stops monitoring. When the unloading duration exceeds the maximum unloading duration, it triggers the timeout service mechanism, and at this time, the module management object can generate corresponding alarm information.

[0132] Step S010: When the module management object successfully unloads the module object, it generates a status notification of successful unloading of the module object and the program is safely released.

[0133] It can be understood that the sub-module objects and sub-module management objects of the module object also have the same program running process.

[0134] In summary, the present invention has the following beneficial effects.

[0135] 1. Through the design of the module management object, module configuration object and module object, the present invention realizes high cohesion and low coupling of C++ program code, making the modular management of C++ program projects clearer and more orderly.

[0136] 2. The life management base class of the module object of the present invention covers all stages from initialization to unloading in the life cycle of the module object. The present invention can provide comprehensive life cycle management, enabling the module object to run orderly and the correct release of program resources, and improving the security of program execution.

[0137] 3. Through the design of initialization dependencies, loading dependencies and unloading dependencies in the module configuration object, the present invention can realize the management of dependency relationships between module objects, and can reduce program errors and resource conflicts caused by improper dependencies.

[0138] 4. The present invention introduces management configurations for module objects such as the maximum initialization duration, the maximum module loading duration, and the maximum module unloading duration, which can effectively monitor and handle possible timeout problems during the loading process of module objects, and can improve the stability of the program and the user experience.

[0139] 5. In the case of module object initialization timeout, loading timeout, unloading timeout, or other exceptions, the module management object of the present invention can promptly detect and trigger a business mechanism, which helps to quickly locate and resolve abnormal situations.

[0140] 6. The present invention can achieve dynamic update and status control of modules by regularly updating module objects, enabling module objects to self-update and adjust their status according to application requirements.

[0141] 7. The present invention centrally controls the loading, updating, and unloading of module objects through the module management object, which can effectively manage the resources and memory of the program and reduce memory leakage and resource waste.

[0142] 8. The module configuration object of the present invention can configure more attributes according to business requirements, such as the update trigger duration and module task suspension, making the system more flexible, easy to expand, and maintain.

[0143] 9. The module object of the present invention can have its own corresponding sub-module objects and sub-module management objects, and use the sub-module management object to manage the sub-module objects. The design of the present invention makes the modular management of complex systems more meticulous and efficient. The present invention can improve the robustness of the entire program operation, better handle various abnormal situations, and reduce the risk of program crashes and resource leaks.

[0144] corresponding to Figure 1 the method of, the embodiment of the present invention also provides an application program running device. The specific structure of the application program running device can refer to Figure 11 . The device may include:

[0145] at least one processor 1011;

[0146] at least one memory 1012 for storing at least one program;

[0147] When at least one program is executed by at least one processor, an application program running method implemented by the at least one processor.

[0148] The content in the above method embodiments is applicable to the device embodiments of the present invention. The functions specifically implemented by the device embodiments of the present invention are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0149] corresponding toFigure 2 Corresponding to the method, an embodiment of the present invention also provides a computer-readable storage medium storing instructions executable by a processor, and the instructions executable by the processor are used to execute the running method of an application program when executed by the processor.

[0150] The content in the embodiment of the running method of the above application program is applicable to the embodiment of this storage medium. The functions specifically implemented by the embodiment of this storage medium are the same as those of the embodiment of the running method of the above application program, and the beneficial effects achieved are also the same as those of the embodiment of the running method of the above application program.

[0151] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order mentioned in the operation diagrams. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously or the blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present invention are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and the sub-operations described as part of a larger operation are executed independently.

[0152] In addition, although the present invention is described in the context of functional modules, it should be understood that unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It can also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. Rather, considering the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the modules will be understood within the ordinary skills of an engineer. Therefore, those skilled in the art can implement the present invention as set forth in the claims without undue experimentation. It can also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0153] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several programs for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes of various kinds.

[0154] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as an ordered list of executable programs for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by a program execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can retrieve programs from the program execution system, apparatus, or device and execute the programs), or in combination with these program execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with a program execution system, apparatus, or device.

[0155] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0156] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0157] In the foregoing description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0158] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the claims and their equivalents.

[0159] The above is a specific description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A business system for an application program, characterized in that, Including: A module object, which is a functional module of the application program; the module object corresponds to a first life cycle; the first life cycle is the life cycle of the running process of the module object; the first life cycle is used to indicate each stage that the module object participates in during the running process of the application program; A module configuration object, which corresponds to the module object one by one, and the module configuration object is used to determine the first running condition of the module object based on user configuration; A module management object, which is used to control the running of the module object and monitor the first life cycle of the module object based on the first running condition to generate a first monitoring result.

2. The business system of the application program according to claim 1, characterized in that, The module object includes: A module sub-object, which is a functional module of the module object; the module sub-object corresponds to a second life cycle; the second life cycle is the life cycle of the running process of the module sub-object; the second life cycle is used to indicate each stage that the module sub-object participates in during the running process of the application program; A module configuration sub-object, which corresponds to the module sub-object one by one, and the module configuration object is used to determine the second running condition of the module sub-object based on user configuration; A module management sub-object, which is used to control the running of the module sub-object and monitor the second life cycle of the module sub-object based on the second running condition to generate a second monitoring result.

3. A method for running an application, characterized in that, Running based on the business system of the application program according to any one of claims 1 or 2, the method includes: The module management object monitors the life cycle of the module object; the life cycle includes a deployment stage and a running stage; In the deployment stage, the module management object monitors the initialization duration and the loading duration of the module object. When the initialization duration is greater than a first preset duration or the loading duration is greater than a second preset duration, the module management object generates a first warning message; the first warning message is used to characterize that there is an abnormality in module initialization or module loading in the deployment stage; When the module management object receives a program shutdown notice in the running stage, it controls the module object to perform module unloading and monitors the module unloading duration of the module object. When the module unloading duration is greater than a third preset duration, the module management object generates a second warning message; the second warning message is used to characterize that there is an abnormality in module unloading in the running stage.

4. The method for running an application according to claim 3, wherein The application program further includes a module configuration object, and the running method further includes: In the deployment stage, the module management object detects whether the module configuration object has dependencies; If the module configuration object has the dependencies, before the module object is initialized, the module management object calls the initialization function of the dependencies to initialize the module configuration object.

5. The method for running an application according to claim 3, wherein The application program further includes a module configuration object, and the running method includes: When the module management object receives a program shutdown notice in the running stage, the module management object detects whether the module configuration object has dependencies; If the module configuration object has the dependency, before the module object is unloaded, the module management object calls the unloading function of the dependency to unload the module configuration object.

6. The method for running an application program according to claim 4, wherein The running method further includes: During the running phase, at every first preset time interval, the module management object updates the module configuration object and / or the module object; When receiving the shutdown program notification while the module management object updates the module configuration object and / or the module object, the module management object controls the module configuration object and / or the module object to stop updating.

7. The method for running an application according to claim 3, wherein The deployment phase includes an initialization phase and a module loading phase. During the deployment phase, the module management object monitors the initialization duration and the loading duration of the module object. When the initialization duration is greater than the first preset duration or the loading duration is greater than the second preset duration, the module management object generates a first warning message, including: During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is less than or equal to the first preset duration, the module management object controls the module object to complete initialization and enter the loading phase; During the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is greater than the second preset duration, the module management object generates a first warning message; Or, During the initialization phase, the module management object monitors the initialization duration of the module object. When the initialization duration is greater than the first preset duration, the module management object generates a first warning message.

8. The method for running an application according to claim 7, characterized in that, The method further includes: During the module loading phase, the module management object monitors the loading duration of the module object. When the loading duration is less than or equal to the second preset duration, the module management object controls the module object to complete module loading and enter the running phase.

9. The method for running an application according to claim 3, wherein The method further includes: When receiving the shutdown program notification during the running phase, the module management object controls the module object to perform module unloading and monitors the module unloading duration of the module object. When the module unloading duration is less than or equal to the third preset duration, the module management object controls the module object to complete module unloading and generates a first prompt message; Wherein, the first prompt message is used to indicate that the module object is successfully unloaded.

10. The method for running an application according to claim 3, wherein When receiving the shutdown program notification during the running phase, the module management object controls the module object to perform module unloading, including: When receiving the shutdown program notification during the running phase, the module management object sequentially calls the prepare-unloading function and the unloading function of each module object to control the module object to perform module unloading; Or, When receiving the shutdown program notification during the running phase, the module management object stops updating the module object and calls the unloading function of each module object to control the module object to perform module unloading.

11. The method for running an application according to claim 3, wherein The method further includes: The module management object calls an initialization function and initializes each module configuration object so that the module configuration object is embedded in the module management object.

12. An application running device, characterized in that It includes: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the running method of the application program according to any one of claims 3-11.

13. A computer-readable storage medium storing instructions executable by a processor, characterized in that, The instructions executable by the processor, when executed by the processor, are used to execute the running method of the application program according to any one of claims 3-11.