Application management method

By extracting application management instruction parameters in the application installer and enabling transactions to perform atomic operations, the security, efficiency and correctness of WebAssembly application management in resource-constrained devices is solved, and the recovery ability is achieved in the event of abnormal or power outage is achieved. .

CN119127234APending Publication Date: 2024-12-13BEIJING CEC HUADA ELECTRONIC DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411199019.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

How to safely, efficiently and correctly manage WebAssembly applications in resource-constrained devices, especially when handling exceptions or power outages during installation and removal.

Method used

Extract the parameters in the application management instructions through the application installer, determine that the application management conditions are met, and the transaction is enabled to perform atomic operations. The matching management operations are performed during the transaction life cycle to ensure the atomicity of application management, so that after an abnormality or power outage is performed, it can be used to ensure that the application management is atomic. Ability to recover and complete the installation or deletion process.

Benefits of technology

It enables safe, efficient and correct management of WebAssembly applications in resource-constrained devices, ensuring the atomicity of the installation or removal process, and being able to recover and complete operations in abnormal or power outages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127234A_ABST
    Figure CN119127234A_ABST
Patent Text Reader

Abstract

The invention discloses an application management method. The method is executed by an application installer, and specifically comprises the following steps: extracting application management parameters contained in an application management instruction; when it is determined that the application management parameters meet application management conditions, a transaction is started to execute atomic operation; and in the life cycle of the transaction, executing a management operation matched with the application management instruction. According to the technical scheme of the embodiment of the invention, the atomicity of application management can be ensured, that is, even if an exception or a power failure occurs in the installation or deletion process of the application, the application installation process can be re-executed or the application deletion process can be continuously completed after the exception or the power failure is recovered, so that the user experience is improved. According to the method and the device, the technical effect of safely, efficiently and correctly managing the WebAssessment application program in the resource-constrained equipment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an application management method. Background Art

[0002] WebAssembly (wasm for short) belongs to the virtual instruction set architecture. Based on WebAssembly bytecode technology, applications can be written in a variety of programming languages, and the written applications are converted to generate WebAssembly bytecode, which is interpreted and executed by the virtual machine, so that the application can run normally.

[0003] When a WebAssembly application written based on WebAssembly bytecode needs to be applied to a resource-constrained device, it is necessary to perform corresponding application management on the WebAssembly application, such as application installation and application deletion. However, how to perform safe, efficient, and correct application management on WebAssembly applications in resource-constrained devices is an important issue that needs to be solved. Summary of the invention

[0004] The embodiment of the present invention provides an application management method to provide a safe, efficient and correct implementation mode for managing WebAssembly application programs in resource-constrained devices.

[0005] According to one aspect of an embodiment of the present invention, there is provided an application management method, which is executed by an application installer, and the method includes:

[0006] Extracting application management parameters contained in the application management instruction;

[0007] When it is determined that the application management parameter satisfies the application management condition, starting a transaction to perform an atomic operation;

[0008] During the life cycle of the transaction, a management operation matching the application management instruction is executed.

[0009] According to another aspect of an embodiment of the present invention, there is also provided an application management device, which is configured in an application installer, and the device includes:

[0010] A parameter extraction module, used to extract application management parameters contained in the application management instruction;

[0011] An atomic operation start module, used to start a transaction to perform an atomic operation when it is determined that the application management parameter meets the application management condition;

[0012] A management operation execution module is used to execute a management operation matching the application management instruction within the life cycle of the transaction.

[0013] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, wherein an embedded operating system is installed on the electronic device, an application installer is executed in the embedded operating system, and the electronic device comprises:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application management method as described in any one of the embodiments of the present invention.

[0017] According to another aspect of the embodiments of the present invention, a terminal is provided, comprising the electronic device as described in any one of the embodiments of the present invention.

[0018] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the application management methods in the embodiments of the present invention when executed.

[0019] According to another aspect of the embodiments of the present invention, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the application management method according to any one of the embodiments of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention provides an application management method executed by an application installer, wherein the application installer extracts application management parameters contained in application management instructions; when it is determined that the application management parameters meet application management conditions, a transaction is started to perform atomic operations; within the life cycle of the transaction, an implementation method of executing management operations that match the application management instructions can ensure the atomicity of application management, that is, it can ensure that even if an abnormality or power failure occurs during the installation or deletion of the application, the application installation process can be re-executed or the application deletion process can be continued after the abnormality or power failure is restored, thereby achieving the technical effect of safely, efficiently and correctly managing WebAssembly applications in electronic devices, especially resource-constrained devices.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flow chart of an application management method provided according to an embodiment of the present invention;

[0024] Figure 2 is a flow chart of another application management method provided according to an embodiment of the present invention;

[0025] Figure 3 is a flow chart of another application management method provided according to an embodiment of the present invention;

[0026] Figure 4 is a flow chart of another application management method provided according to an embodiment of the present invention;

[0027] Figure 5 is a flow chart of another application management method provided according to an embodiment of the present invention;

[0028] Figure 6 is a structural diagram of an application management device provided by an embodiment of the present invention;

[0029] Figure 7 is a structural diagram of an electronic device provided according to an embodiment of the present invention;

[0030] Figure 8 is a structural diagram of a terminal provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] Figure 1 This is a flow chart of an application management method provided by an embodiment of the present invention. This embodiment is applicable to the case of managing WebAssembly applications configured in electronic devices (typically, resource-constrained devices). The method can be executed by an application management device, which can be implemented in the form of hardware and / or software and can generally be configured in an electronic device with an operating system installed. Among them, the operating system can generally be an embedded operating system, and the electronic device can generally be a resource-constrained device such as various security elements or smart cards.

[0034] The method in this embodiment is executed by an application installer, which runs in a runtime environment in an embedded operating system. A runtime environment (RTE) is a secure runtime environment for executing virtual machines on restricted resources such as smart cards or secure elements, and can be considered an ultra-lightweight container. Applications run in a runtime environment and can be completely isolated from native functions of the embedded operating system.

[0035] The application installer is responsible for the installation and deletion of applications. The application installer may include an application installation management component for implementing application installation, and an application deletion management component for implementing module and / or application deletion operations. Among them, the application installer can be understood as an application with an application identifier (AID). The application can be selected to be opened in a specified logical channel and run inside the logical channel. Normally, the application installer is a security domain with content management capabilities defined in the GP (GlobalPlatform) specification. Furthermore, the application installer cannot be called by non-security domain applications on the logical channel, nor can it be called in an application environment without a security domain.

[0036] Logical channel can be understood as a concept used to establish a communication connection between a host and an electronic device (typically, a resource-constrained device). The operating system allows multiple independent communication channels to be established between the host and the resource-constrained device at the same time, each channel has its own command and response flow, and is isolated from each other.

[0037] That is, if the application installer wants to implement application management operations, it is necessary to first select the application installer in the set logical channel to run the application installer in the set logical channel.

[0038] In an optional implementation of this embodiment, the runtime environment supports multiple logical channels, and the application can use the multiple logical channel function. Different applications can be selected on different logical channels at the same time, and an application that supports multiple selections can be selected multiple times on different logical channels at the same time.

[0039] Correspondingly, such as Figure 1 As shown, the method includes:

[0040] S110: Extract application management parameters contained in the application management instruction.

[0041] As mentioned above, the application installer is used to implement the installation and deletion of the application. Accordingly, the application management instruction may include: an application installation instruction or an application deletion instruction.

[0042] If the application management instruction is an application installation instruction, the application management parameters extracted from the application installation instruction may include: the application to be installed and the application module to which the application belongs. If the application management instruction is an application deletion instruction, the application management parameters extracted from the application installation instruction may include: the application to be deleted.

[0043] Among them, the application module can be understood as an independent module that implements specific application functions or services and has an application entry function. It is usually divided according to functions or business logic. Applications can be created in the application module. In other words, the application is obtained after installing the application module downloaded to the operating system. The application module can be understood as a module containing an entry function, and then the application module can create (or install) one or more applications.

[0044] It can be seen from the above description that the application needs to be installed based on the application module. Therefore, the application to be installed and the application module to which the application belongs need to be extracted in the application installation instruction.

[0045] Furthermore, the application management instruction may also include a module deletion instruction, or an application module and application program deletion instruction.

[0046] Wherein, if the application management instruction is a module deletion instruction, the application management parameters extracted from the module deletion instruction may include a module to be deleted, and the type of the module includes an application module or a library module. If the application management instruction is an application module and application program deletion instruction, the application management parameters extracted from the application module and application program deletion instruction may include: an application module to be deleted, and one or more application programs belonging to the application module.

[0047] A library module is an independent module used to encapsulate specific functions or services. It is a code library that can be called and reused by other modules. A library module does not contain an application entry function and cannot create an application.

[0048] The application management instruction may be sent from the runtime environment to the application installer.

[0049] S120: When it is determined that the application management parameter satisfies the application management condition, start a transaction to perform an atomic operation.

[0050] The application management condition can be understood as the judgment condition that can respond to the application management instruction. A transaction can be understood as a series of data operations that update the non-volatile storage area. These operations are regarded as an atomic unit, and either all of them are executed successfully or all of them fail to ensure the consistency and reliability of the data in the non-volatile storage area (NVS).

[0051] When the RTE stops, fails, or has a fatal exception, atomic operations are used to ensure the consistency of updating one or more persistent application data. If an unexpected power outage occurs during the data update process, after the RTE restores power, the updated application data should be guaranteed to be completely updated or keep the original data unchanged. Specifically, a transaction is an integral process of updating NVR (non-volatile persistent resource). If the transaction cannot be completed normally, the NVR will be restored to its original state before the transaction was started. The transaction management mechanism should prevent errors that may cause data corruption when all steps of the transaction are not completed normally (for example, a power outage occurs during the transaction processing process).

[0052] In this embodiment, in order to achieve the correct management (installation or deletion) of modules or applications, the entire application management process can be restricted to be executed in a transaction. Through the above settings, when the application management operation fails, the system state can be restored to the state before the open transaction.

[0053] S130: Execute a management operation matching the application management instruction within the life cycle of the transaction.

[0054] RTE manages the life cycle of a transaction, which includes starting a transaction, committing a transaction, and ending a transaction.

[0055] After the RTE is started, the application should call the start transaction interface to enter the open transaction state when running. When the system exits the virtual machine, the transaction should always be in the end transaction state. Under normal circumstances, the application enters the end transaction state by actively calling the submit transaction interface or the abort transaction interface. Before actively calling the abort transaction interface, if the virtual machine RTE exits due to a fatal exception, the RTE should cancel the ongoing transaction.

[0056] When a transaction is in progress, a power outage, system failure, or fatal exception event should cause the transaction to fail. After the system returns to normal, RTE should restore all data before the event to the initial data before the transaction started.

[0057] The technical solution of the embodiment of the present invention provides an application management method executed by an application installer, wherein the application installer extracts application management parameters contained in application management instructions; when it is determined that the application management parameters meet application management conditions, a transaction is started to perform atomic operations; within the life cycle of the transaction, an implementation method of executing management operations that match the application management instructions can ensure the atomicity of application management, that is, it can ensure that even if an abnormality or power failure occurs during the installation or deletion of the application, the corresponding application installation or deletion process can be continued after the abnormality or power failure is restored, thereby achieving the technical effect of safely, efficiently and correctly managing WebAssembly applications in electronic devices, especially resource-constrained devices.

[0058] Figure 2 This is a flow chart of another application management method provided by an embodiment of the present invention, and this embodiment is optimized based on the above embodiments. In this embodiment, when the application management instruction is an application installation instruction, the entire application management process is concretized.

[0059] Correspondingly, such as Figure 2 As shown, the method includes:

[0060] S210: Extracting a first application to be installed contained in the application installation instruction and a first application module to which the first application belongs.

[0061] S220: When it is determined that the application management parameter satisfies the application management condition, start a transaction to perform an atomic operation.

[0062] In an optional implementation of this embodiment, determining that the application management parameter satisfies the application management condition may include: determining that the application management parameter satisfies the application management condition when the following conditions are all met:

[0063] 1. The first application program is not installed in the embedded operating system, and the first application module exists in the embedded operating system;

[0064] 2. Among the application modules downloaded in the embedded operating system, there is no application module with the same name as the first application (equivalent to the application module with the same name as the AID of the first application not being resident);

[0065] 3. There is no application in the first application module with the same name as any currently installed application, and;

[0066] 4. If another application in the first application module is active, the other application must be a multi-selectable application.

[0067] In this optional implementation, one or more applications can be installed (or instantiated) in an application module, wherein an application being in an active state means that the application is in a state of being executed in a set logical channel. A multi-selectable application means that an application can be selected on multiple logical channels, rather than only on one logical channel. That is, the same application can be selected by multiple different select (SELECT) commands on multiple logical channels and can be in different states at the same time.

[0068] S230: Construct a first application registration table that matches the first application.

[0069] Among them, the application registry is an important database used to store various setting information of the application. When an application is installed in the operating system for the first time, it is necessary to build an application registry that matches the application.

[0070] Accordingly, in an optional implementation of this embodiment, constructing a first application registration table matching the first application may include:

[0071] Allocate a first application registry space for the first application; write registry information matching the first application into the first application registry space to obtain a first application registry; create a data container for writing an application data start node or root data for the first application.

[0072] In this optional implementation, the registry can be in a linked list format, in which case the space required for a registry entry can be dynamically applied for and linked to the previous registry entry; the registry can also be in a table format, in which case only a free reserved space in the table needs to be obtained.

[0073] Accordingly, based on the above embodiments, allocating a first application registration table space to the first application may include:

[0074] Dynamically apply for a first application registration table space, and link the first application registration table space with the last application registration table in the application registration table set in a linked list form; or

[0075] In the pre-established application registration table space in the form of a table structure, an idle reserved table space is obtained as the first application registration table space.

[0076] Optionally, the registry information should include, but is not limited to, the application life cycle, application entry function, application authorization service information, application permissions, and the identification of the module to which the application belongs; data container, used to store the starting node (also called data) or root data of the application data. For example, reference data can be created for the application, and the reference or address of the reference data can be recorded in the application registry.

[0077] S240: Switch the current virtual machine execution domain of the logical channel where the application installer is located from the virtual machine execution domain of the application installer to the virtual machine execution domain of the first application.

[0078] The virtual machine running domain refers to the virtual memory space built by RTE for the accessible data range of application running. It records information such as application identification and logical channels. Corresponding to the logical channel, there is one and only one running application on each logical channel that is bound to the virtual machine running domain on the logical channel. On each logical channel, the activated application should have a virtual machine running domain allocated by RTE.

[0079] In this embodiment, in order to ensure the security of data access, it is necessary to switch the current virtual machine running domain of the logical channel where the application installer is located, that is, the virtual machine running domain that matches the application installer, to the virtual machine running domain that matches the first application to be installed.

[0080] S250. Call and execute an application installation method matching the first application program within the logical channel.

[0081] In an optional implementation of this embodiment, the module registry of the first application module to which the first application belongs can be located according to the module identifier of the first application module, and in the module registry, the application installation method (*installFunc) of the first application can be obtained and executed, and the first application program can create its own application data.

[0082] S260. When it is determined that the application installation is successfully completed, the transaction is committed, and the current virtual machine execution domain of the logical channel is switched back to the virtual machine execution domain of the application installer.

[0083] After successfully completing the installation of the first application, the transaction commit and transaction end operations may continue to be performed to complete the installation of the first application within the life cycle of the transaction. Furthermore, the current virtual machine execution domain of the logical channel may be switched back to the virtual machine execution domain of the application installer to continue executing other logics of the application installer, for example, the application installer exits the installation process of the first application.

[0084] The technical solution of the embodiment of the present invention is to extract the first application to be installed contained in the application installation instruction, and the first application module to which the first application belongs; when it is determined that the application management parameter meets the application management condition, start a transaction to perform atomic operations; build a first application registry matching the first application; switch the current virtual machine running domain of the logical channel where the application installer is located from the virtual machine running domain of the application installer to the virtual machine running domain of the first application; call and execute the application installation method matching the first application in the logical channel; when it is determined that the application installation is successfully completed, commit the transaction, and switch the current virtual machine running domain of the logical channel back to the virtual machine running domain of the application installer. The implementation method provides a transaction-based application atomic installation method, which achieves the technical effect of safely, efficiently and correctly installing WebAssembly applications in electronic devices, especially resource-constrained devices.

[0085] Based on the above embodiments, executing the management operation matching the application management instruction within the life cycle of the transaction may further include:

[0086] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0087] After the embedded operating system is powered on again, all data generated or updated during the installation of the first application program is rolled back, including the data in the first application registration table.

[0088] Based on the above embodiments, before calling and executing the application installation method matching the first application program in the logical channel where the application installer is located, the following method may also be included:

[0089] Register an exception monitoring interface and start to monitor the installation process of the first application for exceptions;

[0090] During the life cycle of the transaction, executing a management operation matching the application management instruction further includes:

[0091] During the life cycle of the transaction, if an abnormal installation event fed back by the abnormal monitoring interface is received, the transaction is rolled back according to a preset transaction processing mechanism to restore the system to the state before the transaction was started.

[0092] That is, when an exception or power outage occurs during the installation of an application, the system state can be restored to the state before the transaction was started after the exception or power outage is restored. At this time, the application installation instruction can be resent to install the application to ensure that the application can be correctly installed in a reliable environment.

[0093] The abnormal monitoring interface may be a system API (Application Programming Interface) provided by an embedded operating system. In the abnormal monitoring interface, an abnormal monitoring code is defined, and by executing the abnormal monitoring code, various abnormal events, typically abnormal installation events, may be monitored.

[0094] Optionally, the abnormal installation event fed back by the abnormal monitoring interface may include at least one of the following:

[0095] The memory requested by the first application module exceeds the memory that can be allocated by the system (i.e., the embedded operating system);

[0096] The first application module references a non-existent module, and;

[0097] The module version of the module referenced by the first application module is incompatible with the module version required by the first application module.

[0098] The first application module refers to a non-existent module, which can be understood as introducing a function in a non-existent module as an imported function in the first application module.

[0099] Through the above settings, various possible abnormal installation events can be monitored during the installation of the first application. When an abnormal installation event is detected, the installation of the first application can be terminated and the transaction can be rolled back according to the preset transaction processing mechanism to restore the system to the state before the transaction was started, thereby ensuring the security and reliability of the entire installation process.

[0100] Figure 3 1 is a flow chart of another application management method provided by an embodiment of the present invention, and this embodiment is optimized based on the above embodiments. In this embodiment, when the application management instruction is an application program deletion instruction, the entire application management process is concretized.

[0101] Correspondingly, such as Figure 3 As shown, the method includes:

[0102] S310: Extract the second application to be deleted contained in the application deletion instruction.

[0103] When deleting the second application, it is not necessary to pay attention to the application module to which the second application belongs. It is only necessary to delete the application registration table corresponding to the second application and perform the corresponding garbage collection operation. Therefore, it is only necessary to extract the second application to be deleted in the application deletion instruction, typically, extract the AID of the second application.

[0104] S320: When it is determined that the application management parameter satisfies the application management condition, start a transaction to perform an atomic operation.

[0105] In an optional implementation of this embodiment, determining that the application management parameter satisfies the application management condition may include at least one of the following:

[0106] The application data owned by the second application is not referenced by other applications, and

[0107] The second application is currently processing an inactive state.

[0108] The application data owned by the second application is referenced by other applications, which can be understood as the storage address of the application data owned by the second application is stored in the application data (or variable) of other applications.

[0109] Correspondingly, the application data owned by the second application is not referenced by other applications, which can be understood as the storage address of the application data owned by the second application is not stored in the application data (or variables) of other applications.

[0110] In addition, the second application is in an inactive state, which can be understood as the second application is not executed in any logical channel opened in the runtime environment.

[0111] In a specific example, when both of the above two conditions are met, it is determined that the application management parameter meets the application management condition, that is, an application deletion operation can be performed on the second application.

[0112] S330: Within the life cycle of the transaction, execute a registry deletion operation on an application registry matching the second application.

[0113] Specifically, the application registration table matching the second application may be located according to the application identifier of the second application.

[0114] S340: After the deletion operation is completed, a garbage collection identifier matching the second application is set.

[0115] The garbage collection identifier is used to identify whether a garbage collection operation can be performed on the second application.

[0116] S350: After the garbage collection identifier matching the second application is set, the transaction is committed.

[0117] In this embodiment, it is necessary to first perform a deletion operation on the application registration table of the second application, and after determining that the deletion operation is completed, set a garbage collection identifier that matches the second application.

[0118] Through the above settings, it can be ensured that when the system power fails during the process of deleting the application registry of the second application, it can be rolled back to the state before deletion through the transaction mechanism, because the garbage collection flag is not successfully set, and there is no need to perform garbage collection operation at this time. When the system power fails after the transaction is submitted, the application registry table entry has been deleted, and the garbage collection flag is successfully set. When the system is powered on, garbage collection can be directly started to delete the application data of the second application.

[0119] S360: Execute a garbage collection operation for the second application according to the garbage collection identifier that matches the second application.

[0120] In this embodiment, after the transaction is successfully submitted, a garbage collection operation for the second application may be performed based on the garbage collection identifier that matches the second application.

[0121] The technical solution of the embodiment of the present invention provides a transaction-based application atomic deletion method by extracting the second application to be deleted contained in the application deletion instruction; performing a registry deletion operation on the application registry matching the second application within the life cycle of the transaction, and setting a garbage collection identifier matching the second application after the deletion operation is completed; after the garbage collection identifier matching the second application is set, the transaction is committed; and according to the garbage collection identifier matching the second application, a garbage collection operation is performed on the second application, thereby achieving a technical effect of safely, efficiently and correctly deleting WebAssembly applications in electronic devices, especially resource-constrained devices.

[0122] Based on the above embodiments, executing the management operation matching the application management instruction within the life cycle of the transaction may further include:

[0123] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0124] Figure 4 1 is a flow chart of another application management method provided by an embodiment of the present invention, and this embodiment is optimized based on the above embodiments. In this embodiment, when the application management instruction is a module deletion instruction, the entire application management process is concretized.

[0125] Correspondingly, such as Figure 4 As shown, the method includes:

[0126] S410 , extracting a target module to be deleted contained in a module deletion instruction, wherein the type of the target module includes: an application module or a library module.

[0127] In this embodiment, the module deleted by the module deletion instruction can be either an application module or a library module.

[0128] S420: When it is determined that the application management parameter satisfies the application management condition, after setting a module deletion flag matching the target module, a transaction is started to perform an atomic operation.

[0129] In an optional implementation of this embodiment, determining that the application management parameter satisfies the application management condition may include:

[0130] When there is no accessible application instance belonging to the target module and there is no other module currently dependent on the target module, it is determined that the application management parameter satisfies the application management condition.

[0131] Among them, the application instance can be understood as an application program, and the accessible application instance can be understood as an active application program currently running in the logical channel. Other modules that depend on the target module can be understood as application modules or library modules that use functions in the target module as imported functions.

[0132] In this embodiment, a module deletion flag matching the target module can be set before opening a transaction, and the module deletion flag can be cleared during the life cycle of the transaction. The advantage of this operation is that if the transaction is rolled back for various reasons, it means that the target module has failed to be deleted, and the module deletion flag will inevitably be retained. After that, a new transaction can be reopened based on the module deletion flag to re-execute the module deletion operation on the target module.

[0133] S430: within the life cycle of the transaction, clear the module deletion flag, and perform a registry deletion operation on the module registry that matches the target module.

[0134] In this embodiment, the execution order of clearing the module deletion flag and deleting the module registration table matching the target module is not limited.

[0135] S440: After the deletion operation is completed, a garbage collection identifier matching the target module is set.

[0136] As mentioned above, the garbage collection flag is used to indicate the execution of a garbage collection operation on a target module.

[0137] S450: After clearing the module deletion flag and performing a registry deletion operation on the module registry that matches the target module, commit the transaction.

[0138] Optionally, after clearing the module deletion flag and performing a registry deletion operation on a module registry matching the target module, committing the transaction further includes:

[0139] After completing the setting of the garbage collection mark matching the target module, clearing the module deletion mark, and performing the registry deletion operation on the module registry matching the target module, the transaction is committed.

[0140] S460: Execute a garbage collection operation on the target module according to the garbage collection identifier that matches the target module.

[0141] The technical solution of the embodiment of the present invention is to extract the target module to be deleted contained in the module deletion instruction; after setting the module deletion mark matching the target module, start the transaction to perform the atomic operation; within the life cycle of the transaction, clear the module deletion mark, and perform the registry deletion operation on the module registry matching the target module; after completing the clearing of the module deletion mark and performing the registry deletion operation on the module registry matching the target module, submit the implementation method of the transaction, provide a transaction-based module atomic deletion method, and achieve the technical effect of safely, efficiently and correctly deleting modules in resource-constrained devices, especially resource-constrained devices.

[0142] Based on the above embodiments, executing the management operation matching the application management instruction within the life cycle of the transaction may further include:

[0143] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0144] Based on the above embodiments, the method may further include:

[0145] After the embedded operating system is powered on again, if a module deletion identifier matching the target module is detected, a new transaction is started to execute a module deletion operation on the target module.

[0146] Through the above settings, after the target module fails to be deleted, a new transaction can be reopened to execute the module deletion operation on the target module, thereby avoiding sending a module deletion instruction to the target module again.

[0147] Figure 5 1 is a flow chart of another application management method provided by an embodiment of the present invention, and this embodiment is optimized based on the above embodiments. In this embodiment, when the application management instruction is an application module and application program deletion instruction, the entire application management process is concretized.

[0148] Correspondingly, such as Figure 5 As shown, the method includes:

[0149] S510: Extract an application module and a second application module to be deleted contained in an application program deletion instruction, and at least one third application program subordinate to the second application module.

[0150] The application module and application program deletion instruction refers to an application management instruction for deleting a certain application module and simultaneously deleting all application programs installed or instantiated by the application module. Specifically, the application programs installed or instantiated based on the second application module may be one or more.

[0151] S520: When it is determined that the application management parameter satisfies the application management condition, after setting the module and application deletion identifiers that match the second application module and the third application, a transaction is started to perform an atomic operation.

[0152] In an optional implementation of this embodiment, determining that the application management parameter satisfies the application management condition may include:

[0153] When the second application module is not dependent on any module, the application data owned by the third application is not referenced by any installed application, and the third application is in an inactive state, it is determined that the application management parameter meets the application management condition.

[0154] The fact that the third application is in an inactive state can be understood as that the third application is not running in any of the logical channels currently opened by the runtime environment.

[0155] Similar to the aforementioned scheme, by setting module and application deletion flags that match the second application module and the third application before opening a transaction, and clearing the module and application deletion flags during the life cycle of the transaction, it can be ensured that when a transaction is rolled back due to various reasons, a new transaction can be reopened based on the module deletion flag to re-execute the deletion operation on the second application module and the third applications belonging to the second application module.

[0156] S530. During the life cycle of the transaction, a registry deletion operation is performed on the application registry that matches the third application. After the deletion operation is completed, a garbage collection identifier that matches the third application is set, the module and application deletion identifiers are cleared, and a registry deletion operation is performed on the module registry that matches the second application module.

[0157] In this embodiment, there is no restriction on the execution order of the three operations of performing a registry deletion operation on the application registry matching the third application, and after the deletion operation is completed, setting a garbage collection identifier matching the third application, clearing the module and application deletion identifiers, and deleting the module registry matching the second application module.

[0158] S540: After completing the setting of the garbage collection identifier matching the third application, clearing the module and application deletion identifiers, and performing a registry deletion operation on the module registry matching the second application module, committing the transaction.

[0159] S550: Execute a garbage collection operation for the third application according to the garbage collection identifier that matches the third application.

[0160] S560: After the embedded operating system is powered on again, if the module and application deletion flags are detected, a new transaction is started to execute a deletion operation on the second application module and a third application subordinate to the second application module.

[0161] The technical solution of the embodiment of the present invention is to extract the second application module to be deleted contained in the application module and application deletion instruction, and at least one third application belonging to the second application module; when it is determined that the application management parameter meets the application management condition, after setting the module and application deletion identifier that matches the second application module and the third application, start a transaction to perform atomic operations; after completing the setting of the garbage collection identifier that matches the third application, clearing the module and application deletion identifier and performing the registry deletion operation on the module registry that matches the second application module, commit the transaction; after the embedded operating system is powered on again, if the module and application deletion identifier is detected, start a new transaction to perform the deletion operation on the second application module and the third application belonging to the second application module, and provide a transaction-based atomic deletion method for application modules and applications, which realizes the technical effect of safely, efficiently and correctly deleting application modules and WebAssembly applications in electronic devices, especially resource-constrained devices.

[0162] Based on the above embodiments, executing the management operation matching the application management instruction within the life cycle of the transaction may further include:

[0163] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0164] Figure 6 Schematic diagram of the structure of an application management device provided by an embodiment of the present invention. The device is configured in an application installer, such as Figure 6 As shown, the device includes: a parameter extraction module 610, an atomic operation start module 620 and a management operation execution module 630, wherein:

[0165] The parameter extraction module 610 is used to extract the application management parameters contained in the application management instruction;

[0166] An atomic operation start module 620, configured to start a transaction to perform an atomic operation when it is determined that the application management parameter satisfies the application management condition;

[0167] The management operation execution module 630 is used to execute the management operation matching the application management instruction within the life cycle of the transaction.

[0168] The technical solution of the embodiment of the present invention provides an application management device executed by an application installer, wherein the application installer extracts application management parameters contained in application management instructions; when it is determined that the application management parameters meet application management conditions, a transaction is started to perform atomic operations; within the life cycle of the transaction, the implementation method of executing management operations matching the application management instructions can ensure the atomicity of application management, that is, it can ensure that even if an abnormality or power failure occurs during the installation or deletion of the application, the application installation process can be re-executed or the application deletion process can be continued after the abnormality or power failure is restored, thereby achieving the technical effect of safely, efficiently and correctly managing WebAssembly applications in electronic devices, especially resource-constrained devices.

[0169] Based on the above embodiments, the parameter extraction module 610 can be used to:

[0170] A first application to be installed contained in the application installation instruction and a first application module to which the first application belongs are extracted.

[0171] Based on the above embodiments, the atomic operation start module 620 can be used to:

[0172] When the following conditions are all met, it is determined that the application management parameter meets the application management condition:

[0173] The first application program is not installed in the embedded operating system, and the first application module exists in the embedded operating system;

[0174] Among the application modules downloaded in the embedded operating system, there is no application module with the same name as the first application program;

[0175] There is no application program in the first application module having the same name as any currently installed application program, and;

[0176] If another application in the first application module is active, the other application must be a multi-selectable application.

[0177] Based on the above embodiments, the management operation execution module 630 may specifically include:

[0178] A registry building unit, used to build a first application registry matching the first application;

[0179] An operation domain switching unit, used to switch the current virtual machine operation domain of the logical channel where the application installer is located from the virtual machine operation domain of the application installer to the virtual machine operation domain of the first application;

[0180] An installation method execution unit, configured to call and execute an application installation method matching the first application program in the logical channel;

[0181] The transaction committing unit is used to commit the transaction when it is determined that the application installation is successfully completed, and switch the current virtual machine running domain of the logical channel back to the virtual machine running domain of the application installer.

[0182] Based on the above embodiments, the registry construction unit can be specifically used for:

[0183] Allocating a first application registry space for the first application;

[0184] Writing registry information matching the first application into the first application registry space to obtain a first application registry;

[0185] A data container for writing application data start node or root data is created for the first application program.

[0186] Based on the above embodiments, the registry construction unit can be further specifically used for:

[0187] Dynamically apply for a first application registration table space, and link the first application registration table space with the last application registration table in the application registration table set in a linked list form; or

[0188] In the pre-established application registration table space in the form of a table structure, an idle reserved table space is obtained as the first application registration table space.

[0189] Based on the above embodiments, the management operation execution module 630 further includes:

[0190] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0191] On the basis of the above embodiments, the present invention may further include an exception monitoring interface registration module, which is used to register an exception monitoring interface and start to perform exception monitoring on the installation process of the first application before calling and executing the application installation method matching the first application in the logical channel where the application installer is located;

[0192] Accordingly, the management operation execution module 630 may further include:

[0193] During the life cycle of the transaction, if an abnormal installation event fed back by the abnormal monitoring interface is received, the transaction is rolled back according to a preset transaction processing mechanism to restore the system to the state before the transaction was started.

[0194] Based on the above embodiments, the abnormal installation event fed back by the abnormal monitoring interface may include at least one of the following:

[0195] The memory requested by the first application module exceeds the memory that can be allocated by the system;

[0196] The first application module references a non-existent module, and;

[0197] The module version of the module referenced by the first application module is incompatible with the module version required by the first application module.

[0198] Based on the above embodiments, the parameter extraction module 610 can be used to:

[0199] The second application to be deleted contained in the application deletion instruction is extracted.

[0200] Based on the above embodiments, the atomic operation start module 620 can be specifically used for:

[0201] When it is determined that at least one of the following conditions is met, it is determined that the application management parameter meets the application management condition:

[0202] The application data owned by the second application is not referenced by other applications, and

[0203] The second application is currently processing an inactive state.

[0204] Based on the above embodiments, the management operation execution module 630 can be specifically used for:

[0205] During the life cycle of the transaction, a registry deletion operation is performed on an application registry that matches the second application, and after the deletion operation is completed, a garbage collection identifier that matches the second application is set;

[0206] After the garbage collection identifier matching the second application is set, the transaction is committed.

[0207] On the basis of the above embodiments, the first garbage collection module may also be included:

[0208] Used to perform a garbage collection operation on the second application program according to a garbage collection identifier that matches the second application program after the transaction is submitted.

[0209] Based on the above embodiments, the management operation execution module 630 further includes:

[0210] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0211] Based on the above embodiments, the parameter extraction module 610 can be used to:

[0212] The target module to be deleted contained in the module deletion instruction is extracted, wherein the type of the target module includes: an application module or a library module.

[0213] Based on the above embodiments, the atomic operation start module 620 can be specifically used for:

[0214] When there is no accessible application instance belonging to the target module and there is no other module currently dependent on the target module, it is determined that the application management parameter satisfies the application management condition.

[0215] On the basis of the above embodiments, the method may further include: a module deletion flag setting module, which is used to:

[0216] Before opening a transaction to perform an atomic operation, setting a module deletion flag that matches the target module;

[0217] Accordingly, the management operation execution module 630 may specifically include:

[0218] During the life cycle of the transaction, the module deletion flag is cleared, and a registry deletion operation is performed on a module registry matching the target module;

[0219] After clearing the module deletion flag and performing a registry deletion operation on the module registry matching the target module, the transaction is committed.

[0220] On the basis of the above embodiments, the present invention may further include: a first garbage collection mark setting module, which is used to:

[0221] After performing a registry deletion operation on a module registry that matches the target module, after the deletion operation is completed, setting a garbage collection identifier that matches the target module;

[0222] Accordingly, the management operation execution module 630 may be further used to:

[0223] After completing the setting of the garbage collection identifier matching the target module, clearing the module deletion identifier, and performing a registry deletion operation on the module registry matching the target module, the transaction is committed.

[0224] Based on the above embodiments, a second garbage collection module may be further included, which is used to:

[0225] After the transaction is committed, a garbage collection operation is performed on the target module according to the garbage collection identifier that matches the target module.

[0226] Based on the above embodiments, the management operation execution module 630 may further include:

[0227] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0228] On the basis of the above embodiments, a target module deletion module may also be included, which is used to:

[0229] After the embedded operating system is powered on again, if a module deletion identifier matching the target module is detected, a new transaction is started to execute a module deletion operation on the target module.

[0230] Based on the above embodiments, the parameter extraction module 610 can be specifically used for:

[0231] The application module and the second application module to be deleted contained in the application program deletion instruction and at least one third application program subordinate to the second application module are extracted.

[0232] Based on the above embodiments, the atomic operation start module 620 can be specifically used for:

[0233] When the second application module is not dependent on any module, the application data owned by the third application is not referenced by any installed application, and the third application is in an inactive state, it is determined that the application management parameter meets the application management condition.

[0234] On the basis of the above embodiments, a module and an application deletion flag setting module may also be included, which are used to:

[0235] Before opening a transaction to perform an atomic operation, setting a module and application deletion identifier that matches both the second application module and the third application;

[0236] Accordingly, the management operation execution module 630 may be specifically used for:

[0237] During the life cycle of the transaction, a registry deletion operation is performed on the application registry that matches the third application, and after the deletion operation is completed, a garbage collection identifier that matches the third application is set, the module and application deletion identifiers are cleared, and a registry deletion operation is performed on the module registry that matches the second application module;

[0238] After completing the setting of the garbage collection identifier matching the third application, clearing the module and application deletion identifiers, and performing a registry deletion operation on the module registry matching the second application module, the transaction is committed.

[0239] Based on the above embodiments, a second garbage collection module may be further included, which is used to:

[0240] After the transaction is committed, a garbage collection operation is performed on the third application according to the garbage collection identifier that matches the third application.

[0241] Based on the above embodiments, the management operation execution module 630 can be further used to:

[0242] During the life cycle of the transaction, if the embedded operating system is reset or loses power, after power is restored, the transaction is rolled back according to the preset transaction processing mechanism to restore to the system state before the transaction was started.

[0243] On the basis of the above embodiments, a module and application deletion module may also be included, which is used to:

[0244] After the embedded operating system is powered on again, if the module and application deletion flags are detected, a new transaction is started to execute a deletion operation on the second application module and a third application subordinate to the second application module.

[0245] The application management device provided in the embodiment of the present invention can execute the application management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0246] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0247] Figure 7 A schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown.

[0248] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0249] The electronic device may be a resource-constrained device. A resource-constrained device may be understood as an electronic device with limited storage capacity, and its RAM resources are limited, generally a few KB to tens of KB, and its NVM (non-volatile memory) resources are limited. Figure 7 The ROM is used as an example in the figure) is in the range of tens of KB to hundreds of KB, and the maximum is in the MB level. The electronic device is installed with an embedded operating system, and an application installer is executed in the embedded operating system.

[0250] The resource-constrained device may generally be: a smart card, a USBKEY, an ESAM (Embedded Secure Access Module), an IoT device or an SE (Secure Element), etc. The smart card may generally be a multi-application smart card.

[0251] The I / O interface 15 in the electronic device 10 may include: eSPI (Enhanced Serial Peripheral Interface) and SPI (Serial Peripheral Interface), etc.

[0252] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, for example, executing an application management method as described in various embodiments of the present invention, which is executed by an application installer, and the method includes:

[0253] Extracting application management parameters contained in the application management instruction;

[0254] When it is determined that the application management parameter satisfies the application management condition, starting a transaction to perform an atomic operation;

[0255] During the life cycle of the transaction, a management operation matching the application management instruction is executed.

[0256] In some embodiments, an application management method as described in various embodiments of the present invention may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 16. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of an application management method as described in various embodiments of the present invention described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute an application management method as described in various embodiments of the present invention in any other appropriate manner (e.g., by means of firmware).

[0257] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0258] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0259] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0260] Figure 8 is a structural diagram of a terminal provided according to an embodiment of the present invention. Figure 8 Said terminal comprises the electronic device 810 as described in any embodiment of the present invention.

[0261] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

Claims

1. An application management method, characterized in that: The method is executed by an application installer, where the application installer is an application program running in a specified logical channel, and includes: Extracting application management parameters contained in the application management instruction; When it is determined that the application management parameter satisfies the application management condition, starting a transaction to perform an atomic operation; During the life cycle of the transaction, a management operation matching the application management instruction is executed.

2. The method according to claim 1, characterized in that Extract the application management parameters contained in the application management instruction, including: Extracting a first application to be installed contained in the application installation instruction and a first application module to which the first application belongs; Determining that the application management parameter satisfies the application management condition includes: When the following conditions are all met, it is determined that the application management parameter meets the application management condition: The first application program is not installed in the embedded operating system, and the first application module exists in the embedded operating system; Among the application modules downloaded in the embedded operating system, there is no application module with the same name as the first application program; There is no application program in the first application module having the same name as any currently installed application program, and; If another application in the first application module is active, the other application must be a multi-selectable application.

3. The method according to claim 2, characterized in that During the life cycle of the transaction, executing a management operation matching the application management instruction includes: Constructing a first application registry matching the first application; Switching the current virtual machine execution domain of the logical channel where the application installer is located from the virtual machine execution domain of the application installer to the virtual machine execution domain of the first application; Calling and executing an application installation method matching the first application program in the logical channel; When it is determined that the application installation is successfully completed, the transaction is committed, and the current virtual machine execution domain of the logical channel is switched back to the virtual machine execution domain of the application installer.

4. The method according to claim 3, characterized in that: Constructing a first application registration table matching the first application, including: Allocating a first application registry space for the first application; Writing registry information matching the first application into the first application registry space to obtain a first application registry; A data container for writing application data start node or root data is created for the first application program.

5. The method according to claim 3, characterized in that: Before calling and executing the application installation method matching the first application program in the logical channel where the application installer is located, the method further includes: Register an exception monitoring interface and start to monitor the installation process of the first application for exceptions; During the life cycle of the transaction, executing a management operation matching the application management instruction further includes: During the life cycle of the transaction, if an abnormal installation event fed back by the abnormal monitoring interface is received, the transaction is rolled back according to a preset transaction processing mechanism to restore the system state before the transaction is started; The abnormal installation event fed back by the abnormal monitoring interface includes at least one of the following: The memory requested by the first application module exceeds the memory that can be allocated by the system; The first application module references a non-existent module, and; The module version of the module referenced by the first application module is incompatible with the module version required by the first application module.

6. The method according to claim 1, characterized in that Extract the application management parameters contained in the application management instruction, including: Extracting the second application to be deleted contained in the application deletion instruction; Determining that the application management parameter satisfies the application management condition includes at least one of the following: The application data owned by the second application is not referenced by other applications, and The second application is currently processing an inactive state.

7. The method according to claim 6, characterized in that During the life cycle of the transaction, executing a management operation matching the application management instruction includes: During the life cycle of the transaction, a registry deletion operation is performed on an application registry that matches the second application, and after the deletion operation is completed, a garbage collection identifier that matches the second application is set; After the garbage collection identifier matching the second application is set, committing the transaction; After the transaction is committed, a garbage collection operation is performed on the second application according to the garbage collection identifier that matches the second application.

8. The method according to claim 1, characterized in that Extract the application management parameters contained in the application management instruction, including: Extracting a target module to be deleted contained in the module deletion instruction, wherein the type of the target module includes: an application module or a library module; Determining that the application management parameter satisfies the application management condition includes: When there is no accessible application instance belonging to the target module and there is no other module currently dependent on the target module, it is determined that the application management parameter satisfies the application management condition.

9. The method according to claim 8, characterized in that Before opening a transaction to perform atomic operations, also include: Set a module deletion flag that matches the target module; During the life cycle of the transaction, executing a management operation matching the application management instruction includes: During the life cycle of the transaction, the module deletion flag is cleared, and a registry deletion operation is performed on a module registry matching the target module; After clearing the module deletion flag and performing a registry deletion operation on the module registry matching the target module, the transaction is committed.

10. The method according to claim 1, characterized in that Extract the application management parameters contained in the application management instruction, including: Extracting the application module and the second application module to be deleted contained in the application program deletion instruction, and at least one third application program subordinate to the second application module; Determining that the application management parameter satisfies the application management condition includes: When the second application module is not dependent on any module, the application data owned by the third application is not referenced by any installed application, and the third application is in an inactive state, it is determined that the application management parameter meets the application management condition.