Application management method and device, electronic equipment, terminal, medium and product

By using an application installer to extract application management command parameters and execute atomic operations on resource-constrained devices, the integrity issue of WebAssembly application management under abnormal or power outage conditions is resolved, achieving secure and efficient application management.

CN121635906APending Publication Date: 2026-03-10BEIJING CEC HUADA ELECTRONIC DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

How to manage WebAssembly applications securely, efficiently, and correctly on resource-constrained devices, especially how to ensure the integrity of the application installation or removal process in the event of anomalies or power outages.

Method used

The application installer extracts parameters from the application management instructions, initiates transactions to perform atomic operations when conditions are met, and performs management operations within the transaction's lifecycle, ensuring the atomicity of the management process, including restoring the state to before the transaction started after an exception or power outage.

Benefits of technology

It enables secure, efficient, and accurate management of WebAssembly applications on resource-constrained devices, ensuring that the installation or removal process can continue after an anomaly or power outage, thus guaranteeing the integrity and reliability of application management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635906A_ABST
    Figure CN121635906A_ABST
Patent Text Reader

Abstract

The invention discloses an application management method, device and equipment, a terminal, a medium and a product. 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] This invention relates to the field of computer technology, and in particular to an application management method, apparatus, electronic device, terminal, medium, and product. Background Technology

[0002] WebAssembly (WASM) is a virtual instruction set architecture. Based on WebAssembly bytecode technology, applications can be written in various programming languages, and the written applications are converted into WebAssembly bytecode, which is then interpreted and executed by the virtual machine, thus enabling the application to run normally.

[0003] When WebAssembly applications written in WebAssembly bytecode need to be used on resource-constrained devices, appropriate application management is required, such as application installation and deletion. However, how to securely, efficiently, and correctly manage WebAssembly applications on resource-constrained devices remains a significant problem to be solved. Summary of the Invention

[0004] This invention provides an application management method, apparatus, electronic device, terminal, medium, and product to provide a secure, efficient, and correct way to manage WebAssembly applications on resource-constrained devices.

[0005] According to one aspect of the present invention, an application management method is provided, executed by an application installer, the method comprising:

[0006] Extract application management parameters contained in application management commands;

[0007] When it is determined that the application management parameters meet the application management conditions, a transaction is initiated to execute atomic operations.

[0008] During the lifecycle of the transaction, perform management operations that match the application management instructions.

[0009] According to another aspect of the present invention, an application management device is also provided, configured in an application installer, the device comprising:

[0010] The parameter extraction module is used to extract application management parameters contained in application management commands.

[0011] An atomic operation initiation module is used to initiate a transaction to execute an atomic operation when it is determined that the application management parameters meet the application management conditions.

[0012] The management operation execution module is used to execute management operations that match the application management instructions during the lifecycle of the transaction.

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

[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 that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the application management method as described in any of the embodiments of the present invention.

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

[0018] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the application management method described in any one of the embodiments of the present invention.

[0019] According to another aspect of the present invention, a computer program product is also provided, the computer program product including a computer program that, when executed by a processor, implements the application management method according to any one of the embodiments of the present invention.

[0020] The technical solution of this invention provides an application management method executed by an application installer. The application installer extracts application management parameters contained in the application management instructions; when it is determined that the application management parameters meet the application management conditions, it starts a transaction to execute atomic operations; within the lifecycle of the transaction, it executes management operations that match the application management instructions. This method can guarantee the atomicity of application management, that is, it can ensure that even if an abnormality or power outage occurs during the installation or deletion of the application, the application installation process can be re-executed or the application deletion process can continue after the abnormality or power outage is recovered. This achieves the technical effect of secure, efficient, and correct management of WebAssembly applications in electronic devices, especially resource-constrained devices.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

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

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

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

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

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

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

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

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

[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort 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, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] Figure 1 This is a flowchart illustrating an application management method provided in an embodiment of the present invention. This embodiment is applicable to the management of 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 hardware and / or software and is generally configured in an electronic device with an operating system installed. The operating system is typically an embedded operating system, and the electronic device is typically a resource-constrained device such as a security element or a smart card.

[0034] In this embodiment, the method is executed by an application installer that runs within the runtime environment of the embedded operating system. A runtime environment (RTE) is a secure runtime environment for executing virtual machines on limited resources such as smart cards or secure elements; it can be considered a lightweight container. Since the application runs within the runtime environment, it can be completely isolated from the native functions of the embedded operating system.

[0035] The application installer is responsible for installing and removing applications. It can contain an application installation management component for installing applications, and an application removal management component for removing modules and / or applications. The application installer can be understood as an application itself, possessing an Application Identifier (AID). This application can be selected and opened within a specified logical channel and runs within that channel. Typically, the application installer is a security domain with content management capabilities as defined in the GP (Global Platform) specification. Therefore, the application installer cannot be invoked by applications outside its security domain on a logical channel, nor can it be invoked by applications without a security domain.

[0036] A 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 the host to establish multiple independent communication channels simultaneously with the resource-constrained device. Each channel has its own command and response stream and is isolated from the others.

[0037] In other words, if an application installer wants to perform application management operations, it needs to first select the application installer within the set logical channel so that the application installer can run within that set logical channel.

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

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

[0040] S110. Extract application management parameters contained in application management instructions.

[0041] As mentioned above, this application installer is used to install and remove applications. Accordingly, the application management commands may include application installation commands or application removal commands.

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

[0043] An application module can be understood as an independent module that implements specific application functions or services and has an application entry function. They are typically divided according to function or business logic, and applications can be created within application modules. In other words, an application is obtained by installing application modules downloaded to the operating system. An application module can be understood as a module containing an entry function; therefore, an application module can create (or install) one or more applications.

[0044] As described above, applications need to be installed based on application modules. Therefore, the application installation instructions need to extract the application to be installed and the application module to which the application belongs.

[0045] Furthermore, the application management instructions may also include module deletion instructions, or instructions for deleting application modules and applications.

[0046] Specifically, if the application management instruction is a module deletion instruction, the application management parameters extracted from it may include the module to be deleted, which may be an application module or a library module. If the application management instruction is an application module and application deletion instruction, the application management parameters extracted from it may include the application module to be deleted, and one or more applications belonging to that application module.

[0047] A library module is an independent module that encapsulates specific functions or services, and can be called and reused by other modules. Library modules do not contain application entry functions and cannot be used to create applications.

[0048] The application management command can be sent from the runtime environment to the application installer.

[0049] S120. When it is determined that the application management parameters meet the application management conditions, a transaction is started to execute atomic operations.

[0050] Application management conditions can be understood as the criteria for responding to application management commands. A transaction can be understood as a series of data operations that update non-volatile storage. These operations are considered an atomic unit; either all operations succeed or all fail, to ensure the consistency and reliability of data in non-volatile storage (NVS).

[0051] When the Real-Time Execution Environment (RTE) stops, malfunctions, or experiences a fatal exception, atomic operations are used to ensure the consistency of updates to one or more persistent application data. If an unexpected power outage occurs during data updates, the updated application data should be guaranteed to be either fully updated or remain unchanged after power is restored to the RTE. Specifically, a transaction is an indivisible process of updating the Non-volatile Persistent Resource (NVR). If a transaction cannot be completed normally, the NVR will revert to its original state before the transaction began. The transaction management mechanism should prevent errors that could lead to data corruption if all steps of a transaction fail to complete normally (e.g., a power outage occurs during transaction processing).

[0052] In this embodiment, to ensure proper management (installation or deletion) of modules or applications, the entire application management process can be restricted to execution within a transaction. This setting allows the system state to be restored to the state before the transaction was started if application management operations fail.

[0053] S130. During the lifecycle of the transaction, execute management operations that match the application management instructions.

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

[0055] After the Real-Time Entity (RTE) starts, the application should call the Start Transaction interface to enter the transaction-enabled state. When the system exits the virtual machine, the transaction should always be in the closed transaction state. Normally, the application enters the closed transaction state by actively calling the Commit Transaction interface or the Abort Transaction interface. If the virtual machine RTE exits due to a fatal exception before actively calling the Abort Transaction interface, the RTE should cancel the ongoing transaction.

[0056] If a power outage, system failure, or fatal exception occurs while a transaction is in progress, the transaction should fail. After the system recovers, the Real-Time Existing (RTE) should restore all data from before the event to its initial state before the transaction began.

[0057] The technical solution of this invention provides an application management method executed by an application installer. The application installer extracts application management parameters contained in the application management instructions; when it is determined that the application management parameters meet the application management conditions, it starts a transaction to execute atomic operations; within the lifecycle of the transaction, it executes management operations that match the application management instructions. This method can guarantee the atomicity of application management, that is, it can ensure that even if an abnormality or power outage occurs during the installation or deletion of the application, the corresponding application installation or deletion process can continue to be completed after the abnormality or power outage is recovered. This achieves the technical effect of securely, efficiently, and correctly managing WebAssembly applications in electronic devices, especially resource-constrained devices.

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

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

[0060] S210. Extract the first application to be installed contained in the application installation instruction, and the first application module to which the first application belongs.

[0061] S220. When it is determined that the application management parameters meet the application management conditions, a transaction is started to execute atomic operations.

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

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

[0064] 2. Among the application modules already 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 first application AID not being resident);

[0065] 3. The first application module does not contain any application with the same name as any currently installed application;

[0066] 4. If another application in the first application module is active, then 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. An application being in an active state means that it is being executed within a defined logical channel. A multi-selectable application means that an application can be selected on multiple logical channels, rather than only on one. That is, the same application can be selected by multiple different SELECT commands on multiple logical channels and can be in different states simultaneously.

[0068] S230. Construct a first application registry that matches the first application.

[0069] The application registry is an important database used to store various settings information of applications. When an application is first installed in the operating system, an application registry that matches the application needs to be built.

[0070] Accordingly, in an optional implementation of this embodiment, constructing a first application registry 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 the first application registry; create a data container for the first application to write application data start nodes or root data.

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

[0073] Accordingly, based on the above embodiments, allocating a first application registry space for the first application may include:

[0074] Dynamically allocate a registry space for the first application and link that registry space to the last application registry in a linked list of application registry sets; or

[0075] In the pre-established table structure of the application registry space, a free reserved table space is obtained as the first application registry space.

[0076] Optionally, registry information should include, but is not limited to, information such as application lifecycle, application entry function, application authorization service information, application permissions, and the identifier of the module to which the application belongs; a data container is used to store the starting node (also called data) or root data of 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 runtime domain of the logical channel where the application installer is located from the virtual machine runtime domain of the application installer to the virtual machine runtime domain of the first application.

[0078] A virtual machine runtime domain refers to the virtual memory space that the Real-Time Execution Environment (RTE) constructs for the scope of data accessible to running applications. It records information such as application identifiers and logical channels. Corresponding to each logical channel, there is one and only one running application bound to the virtual machine runtime domain on that logical channel. On each logical channel, an activated application should have a virtual machine runtime domain allocated by the RTE.

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

[0080] S250, Invoke and execute the application installation method that matches the first application within the logical channel.

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

[0082] S260. Upon successful completion of application installation, the transaction is committed, and the current virtual machine runtime domain of the logical channel is switched back to the virtual machine runtime domain of the application installer.

[0083] After successfully installing the first application, the operations of committing and ending the transaction can continue to complete the installation of the first application within the transaction's lifecycle. Then, the current virtual machine runtime domain of the logical channel can be switched back to the virtual machine runtime domain of the application installer to continue executing other logic of the application installer, such as the application installer exiting the installation process for the first application.

[0084] The technical solution of this invention provides a transaction-based atomic installation method for applications. This method extracts the first application to be installed from the application installation instruction, along with the first application module to which the first application belongs. When the application management parameters meet the application management conditions, a transaction is initiated to perform atomic operations. A first application registry matching the first application is constructed. The current virtual machine runtime domain of the logical channel where the application installer resides is switched from the virtual machine runtime domain of the application installer to the virtual machine runtime domain of the first application. An application installation method matching the first application is invoked and executed within the logical channel. Upon successful application installation, the transaction is committed, and the current virtual machine runtime domain of the logical channel is switched back to the virtual machine runtime domain of the application installer. This achieves the technical effect of securely, efficiently, and correctly installing WebAssembly applications on electronic devices, especially resource-constrained devices.

[0085] Based on the above embodiments, executing management operations matching the application management instructions during the lifecycle of the transaction may further include:

[0086] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

[0087] In this process, after the embedded operating system is powered on again, all data generated or updated during the installation of the first application is rolled back, including data in the first application registry.

[0088] Based on the above embodiments, before invoking and executing the application installation method matching the first application within the logical channel where the application installer resides, the method may further include:

[0089] Register the anomaly monitoring interface and begin monitoring the installation process of the first application for anomalies;

[0090] During the lifecycle of the transaction, performing management operations that match the application management instructions also includes:

[0091] If an abnormal installation event is received from the abnormal monitoring interface during the lifecycle of the transaction, the transaction is rolled back according to the preset transaction processing mechanism to restore the system state before the transaction started.

[0092] In other words, if an error or power outage occurs during the application installation process, the system state can be restored to the state before the transaction started after the error or power outage is recovered. At this time, the application installation command can be resent to install the application, so as to ensure that the application can be installed correctly in a reliable environment.

[0093] The exception monitoring interface can be a system API (Application Programming Interface) provided by the embedded operating system. This interface defines exception monitoring code, which, when executed, can monitor various exception events, typically exception installation events.

[0094] Optionally, the abnormal installation events reported 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 the system (i.e., the embedded operating system) can allocate;

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

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

[0098] The first application module references a non-existent module, which can be understood as the first application module importing a function from a non-existent module as an import function.

[0099] With 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 will be terminated and the transaction will be rolled back according to the preset transaction processing mechanism to restore the system state before the transaction started, thereby ensuring the security and reliability of the entire installation process.

[0100] Figure 3 This is a flowchart of another application management method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above embodiments. In this embodiment, the entire application management process is specifically specified when the application management instruction is an application deletion instruction.

[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's unnecessary to consider the application module to which it belongs. Only the application registry entry corresponding to the second application needs to be deleted, followed by garbage collection. Therefore, only the second application to be deleted needs to be extracted from the application deletion command; typically, this involves extracting its AID.

[0104] S320. When it is determined that the application management parameters meet the application management conditions, a transaction is started to execute atomic operations.

[0105] In an optional implementation of this embodiment, determining that the application management parameters meet the application management conditions 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 in an inactive state.

[0108] In this context, the application data owned by the second application is referenced by other applications. This can be understood as the application data (or variables) of other applications storing the storage address of the application data owned by the second application.

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

[0110] Furthermore, the second application is inactive, which can be understood as the second application not being executed in any of the logical channels opened in the runtime environment.

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

[0112] S330. During the lifecycle of the transaction, perform a registry deletion operation on the application registry that matches the second application.

[0113] Specifically, the application registry that matches the second application can be located based on the application identifier of the second application.

[0114] S340. After the deletion operation is completed, set a garbage collection flag that matches the second application.

[0115] The waste recycling icon is used to indicate whether a waste recycling operation can be performed for the second application.

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

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

[0118] The above settings ensure that if a system power failure occurs during the deletion of the second application's application registry entries, the transaction mechanism can be used to roll back to the state before deletion, as the garbage collection flag was not successfully set, thus eliminating the need for garbage collection. However, if a system power failure occurs after the transaction has been committed, the application registry entries have been deleted, and the garbage collection flag has been successfully set. Upon system power-up, garbage collection can be initiated directly to delete the second application's data.

[0119] S360. Perform a garbage collection operation for the second application based on the garbage collection identifier that matches the second application.

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

[0121] The technical solution of this invention provides a transaction-based atomic deletion method for applications by extracting the second application to be deleted from the application deletion instruction; executing a registry deletion operation on the application registry matching the second application within the lifecycle of the transaction, and setting a garbage collection flag matching the second application after the deletion operation is completed; committing the transaction after the garbage collection flag matching the second application is set; and executing a garbage collection operation on the second application according to the garbage collection flag matching the second application. This achieves the technical effect of safely, efficiently, and correctly deleting WebAssembly applications in electronic devices, especially resource-constrained devices.

[0122] Based on the above embodiments, executing management operations matching the application management instructions during the lifecycle of the transaction may further include:

[0123] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

[0124] Figure 4 This is a flowchart of another application management method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above embodiments. In this embodiment, the entire application management process is specifically specified when the application management instruction is a module deletion instruction.

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

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

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

[0128] S420. When it is determined that the application management parameters meet the application management conditions, after setting a module deletion flag that matches the target module, a transaction is started to execute atomic operations.

[0129] In an optional implementation of this embodiment, determining that the application management parameters meet the application management conditions may include:

[0130] If there is currently no accessible application instance belonging to the target module, and there are currently no other modules that depend on the target module, then the application management parameters are determined to meet the application management conditions.

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

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

[0133] S430. During the lifecycle 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, there is no restriction on the execution order of clearing the module deletion identifier and deleting the module registry that matches the target module.

[0135] S440. After the deletion operation is completed, set a garbage collection flag that matches the target module.

[0136] As mentioned above, the waste recycling icon is used to indicate the execution of a waste recycling operation on the target module.

[0137] S450. After completing the clearing of the module deletion identifier and performing the registry deletion operation on the module registry that matches the target module, the transaction is committed.

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

[0139] After setting the garbage collection identifier that matches the target module, clearing the module deletion identifier, and performing a registry deletion operation on the module registry that matches the target module, the transaction is committed.

[0140] S460. Perform a garbage collection operation on the target module based on the garbage collection identifier that matches the target module.

[0141] The technical solution of this invention provides a transaction-based atomic module deletion method by extracting the target module to be deleted from the module deletion instruction; setting a module deletion identifier matching the target module; starting a transaction to perform atomic operations; clearing the module deletion identifier and performing a registry deletion operation on the module registry matching the target module within the lifecycle of the transaction; and committing the transaction after clearing the module deletion identifier and performing the registry deletion operation on the module registry matching the target module. This achieves 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 management operations matching the application management instructions during the lifecycle of the transaction may further include:

[0143] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction 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 perform the module deletion operation on the target module.

[0146] With the above settings, if the deletion of the target module fails, a new transaction can be started to perform the module deletion operation on the target module, avoiding the need to send the module deletion command again for the target module.

[0147] Figure 5 This is a flowchart of another application management method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above embodiments. In this embodiment, the entire application management process is specifically specified when the application management instructions are application module and application deletion instructions.

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

[0149] S510, 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.

[0150] The "application module and application deletion command" refers to an application management command used to delete a specific application module and simultaneously delete all applications installed or instantiated through that application module. Specifically, the applications installed or instantiated based on the second application module can be one or more.

[0151] S520. When it is determined that the application management parameters meet the application management conditions, after setting the module and application deletion identifier that matches both the second application module and the third application, a transaction is started to perform atomic operations.

[0152] In an optional implementation of this embodiment, determining that the application management parameters meet the application management conditions may include:

[0153] When the second application module is not depended upon by 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, the application management parameters are determined to meet the application management conditions.

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

[0155] Similar to the aforementioned scheme, by setting a module and application deletion identifier that matches both the second application module and the third application before starting a transaction, and clearing the module and application deletion identifier during the lifecycle of the transaction, it can be ensured that when a transaction is rolled back for various reasons, a new transaction can be started based on the module deletion identifier to re-execute the deletion operation on the second application module and each of the third applications belonging to the second application module.

[0156] S530. During the lifecycle of the transaction, perform a registry deletion operation on the application registry that matches the third application. After the deletion operation is completed, set the garbage collection flag that matches the third application, clear the module and application deletion flag, and perform a registry deletion operation on the module registry that matches the second application module.

[0157] In this embodiment, the execution order of the three operations—deleting the registry entry for the application registry matching the third application, setting the garbage collection flag matching the third application after the deletion is completed, clearing the module and application deletion flag, and deleting the registry entry for the module registry matching the second application module—is not restricted in any way.

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

[0159] S550. Perform a garbage collection operation for the third application based on the garbage collection identifier that matches the third application.

[0160] S560. After the embedded operating system is powered on again, if the deletion identifier of the module and application is detected, a new transaction is started to perform the deletion operation on the second application module and the third application belonging to the second application module.

[0161] The technical solution of this invention provides a transaction-based atomic deletion method for application modules and applications. This method extracts the second application module to be deleted and at least one third application belonging to the second application module from the application module and application deletion instructions. When the application management parameters meet the application management conditions, a module and application deletion identifier matching both the second and third application modules is set, and a transaction is initiated to perform atomic operations. After setting the garbage collection identifier matching the third application, clearing the module and application deletion identifier, and performing a registry deletion operation on the module registry matching the second application module, the transaction is committed. After the embedded operating system is powered on again, if the module and application deletion identifier is detected, a new transaction is initiated to perform the deletion operation on the second application module and the third application belonging to the second application module. This achieves the technical effect of securely, efficiently, and correctly deleting application modules and WebAssembly applications in electronic devices, especially resource-constrained devices.

[0162] Based on the above embodiments, executing management operations matching the application management instructions during the lifecycle of the transaction may further include:

[0163] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

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

[0165] The parameter extraction module 610 is used to extract application management parameters contained in application management instructions.

[0166] The atomic operation initiation module 620 is used to initiate a transaction to execute an atomic operation when it is determined that the application management parameters meet the application management conditions.

[0167] The management operation execution module 630 is used to execute management operations that match the application management instructions during the lifecycle of the transaction.

[0168] The technical solution of this invention provides an application management device executed by an application installer. The application installer extracts application management parameters contained in the application management instructions; when it is determined that the application management parameters meet the application management conditions, it starts a transaction to execute atomic operations; within the lifecycle of the transaction, it executes management operations matching the application management instructions. This implementation method can guarantee the atomicity of application management. That is, it can ensure that even if an abnormality or power outage occurs during the installation or deletion of the application, the application installation process can be re-executed or the application deletion process can continue after the abnormality or power outage is recovered. This achieves the technical effect of securely, 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 for:

[0170] Extract the first application to be installed contained in the application installation instruction, as well as the first application module to which the first application belongs.

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

[0172] The application management parameters are determined to meet the application management conditions when all of the following conditions are met:

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

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

[0175] The first application module does not contain any application with the same name as any currently installed application;

[0176] If another application in the first application module is active, then that 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 is used to build a first application registry that matches the first application.

[0179] The runtime domain switching unit is used to switch the current virtual machine runtime domain of the logical channel where the application installer is located from the virtual machine runtime domain of the application installer to the virtual machine runtime domain of the first application.

[0180] The installation method execution unit is used to call and execute an application installation method matching the first application within the logical channel.

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

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

[0183] Allocate registry space for the first application;

[0184] Write registry information matching the first application into the registry space of the first application to obtain the registry of the first application;

[0185] Create a data container for the first application to write application data start node or root data.

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

[0187] Dynamically allocate a registry space for the first application and link that registry space to the last application registry in a linked list of application registry sets; or

[0188] In the pre-established table structure of the application registry space, a free reserved table space is obtained as the first application registry space.

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

[0190] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

[0191] Based on the above embodiments, it may also include an anomaly monitoring interface registration module, which is used to register an anomaly monitoring interface and start anomaly monitoring of 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] Correspondingly, the management operation execution module 630 may also include:

[0193] If an abnormal installation event is received from the abnormal monitoring interface during the lifecycle of the transaction, the transaction is rolled back according to the preset transaction processing mechanism to restore the system state before the transaction started.

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

[0195] The first application module requested more memory than the system can allocate.

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

[0197] The module version 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 for:

[0199] Extract the second application to be deleted contained in the application deletion instruction.

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

[0201] The application management parameters are determined to meet application management conditions when at least one of the following conditions is met:

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

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

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

[0205] During the lifecycle of the transaction, a registry deletion operation is performed on the application registry that matches the second application, and after the deletion operation is completed, a garbage collection flag that matches the second application is set.

[0206] Once the garbage collection identifier matching the second application is set, submit the transaction.

[0207] Based on the above embodiments, a first waste recycling module may also be included:

[0208] This is used to perform a garbage collection operation for the second application after the transaction is committed, based on the garbage collection identifier that matches the second application.

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

[0210] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

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

[0212] The extraction module delete instruction contains the target module to be deleted, wherein the type of the target module includes: application module or library module.

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

[0214] If there is currently no accessible application instance belonging to the target module, and there are currently no other modules that depend on the target module, then the application management parameters are determined to meet the application management conditions.

[0215] Based on the above embodiments, it may further include: a module deletion identifier setting module, used for:

[0216] Before initiating a transaction to perform atomic operations, set a module deletion flag that matches the target module;

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

[0218] During the lifecycle of the transaction, the module deletion flag is cleared, and a registry deletion operation is performed on the module registry that matches the target module;

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

[0220] Based on the above embodiments, it may further include: a first waste recycling label setting module, used for:

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

[0222] Accordingly, the management operation execution module 630 can be further used for:

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

[0224] Based on the above embodiments, a second waste collection module may also be included, used for:

[0225] After the transaction is submitted, a garbage collection operation is performed on the target module based on 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] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

[0228] Based on the above embodiments, a target module deletion module may also be included, used for:

[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 perform the module deletion operation on the target module.

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

[0231] Extract the second application module to be deleted contained in the application module and the application deletion instruction, as well as at least one third application belonging to the second application module.

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

[0233] When the second application module is not depended upon by 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, the application management parameters are determined to meet the application management conditions.

[0234] Based on the above embodiments, a module and an application deletion identifier setting module may also be included, for:

[0235] Before initiating a transaction to perform an atomic operation, set 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 can be specifically used for:

[0237] During the lifecycle 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 flag matching the third application is set, the module and application deletion flags 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 waste collection module may also be included, used for:

[0240] After the transaction is submitted, a garbage collection operation is performed on the third application based on 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 for:

[0242] If the embedded operating system experiences a reset or power failure during the lifecycle of the transaction, the transaction will be rolled back according to the preset transaction processing mechanism after power is restored to the system state before the transaction started.

[0243] Based on the above embodiments, it may further include a module and an application deletion module, used for:

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

[0245] The application management device provided in the embodiments 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] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0247] Figure 7 A schematic diagram of the structure 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, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0249] This electronic device can be a resource-constrained device. A resource-constrained device can be understood as an electronic device with limited storage capacity, typically a few KB to tens of KB of RAM resources, and limited NVM (non-volatile memory) resources. Figure 7 (Taking ROM as an example) The size ranges from tens of KB to hundreds of KB, with a maximum of MB. The electronic device is equipped with an embedded operating system, which runs an application installer.

[0250] The resource-constrained device can typically be: a smart card, USB key, ESAM (Embedded Secure Access Module), IoT device, or SE (Secure Element). Among these, the smart card is usually 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] Processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, for example, performing an application management method as described in various embodiments of the present invention, executed by an application installer, the method comprising:

[0253] Extract application management parameters contained in application management commands;

[0254] When it is determined that the application management parameters meet the application management conditions, a transaction is initiated to execute atomic operations.

[0255] During the lifecycle of the transaction, perform management operations that match the application management instructions.

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

[0257] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0258] Computer programs used to implement 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, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0259] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0260] Figure 8 This is a structural diagram of a terminal provided according to an embodiment of the present invention. Figure 8 The terminal includes 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, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

Claims

1. An application management method characterized by comprising: The method is executed by an application installer, and the method comprises: extracting an application management parameter contained in an application management instruction; starting a transaction to perform an atomic operation when it is determined that the application management parameter meets an application management condition; performing a management operation matched with the application management instruction within a life cycle of the transaction.

2. The method of claim 1, wherein, extracting an application management parameter contained in an application management instruction, comprising: extracting a first application program to be installed and a first application module to which the first application program belongs, which are contained in an application program installation instruction.

3. The method of claim 2, wherein, determining that the application management parameter meets an application management condition, comprising: determining that the application management parameter meets an application management condition when the following conditions are both met: the first application program is not installed in the embedded operating system, and the first application module exists in the embedded operating system; there is no application module with the same name as the first application program in each application module that has been downloaded in the embedded operating system; there is no application program with the same name as any currently installed application program in the first application module; and if another application program in the first application module is in an active state, the other application program must be a multi-selectable application program.

4. The method of claim 2, wherein, performing a management operation matched with the application management instruction within a life cycle of the transaction, comprising: constructing a first application program registry matched with the first application program; switching a current virtual machine running domain of a logical channel in which the application installer is located from a virtual machine running domain of the application installer to a virtual machine running domain of the first application program; calling an application installation method matched with the first application program in the logical channel; committing the transaction and switching the current virtual machine running domain of the logical channel back to the virtual machine running domain of the application installer when it is determined that the application installation is successfully completed.

5. The method of claim 4, wherein, constructing a first application program registry matched with the first application program, comprising: allocating a first application program registry space for the first application program; writing registry information matched with the first application program in the first application program registry space to obtain a first application program registry; and creating a data container for writing an application data starting node or root data for the first application program.

6. The method of claim 5, wherein, allocating a first application program registry space for the first application program, comprising: dynamically applying a first application program registry space and linking the first application program registry space with a last application registry in an application registry set in a linked list form; or obtaining an idle reserved table space as the first application program registry space in a table structure form of a pre-established application program registry space.

7. The method according to any one of claims 2-6, characterized in that, performing a management operation matched with the application management instruction within a life cycle of the transaction, further comprising: if the embedded operating system is reset or fails due to power loss within the life cycle of the transaction, rolling back the transaction according to a preset transaction processing mechanism after being powered on again to restore a system state before the transaction is started.

8. The method of claim 4, wherein, before calling an application installation method matched with the first application program in the logical channel in which the application installer is located, further comprising: An abnormality monitoring interface is registered to start abnormality monitoring on the installation process of the first application program; In the life cycle of the transaction, the management operation matched with the application management instruction is executed, and the method further comprises: In the life cycle of the transaction, if an abnormal installation event fed back by the abnormality 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.

9. The method of claim 8, wherein, The abnormal installation event fed back by the abnormality monitoring interface comprises at least one of the following: The memory applied by the first application module exceeds the system allocatable memory; The first application module references a non-existent module, and The module version of the referenced module of the first application module is incompatible with the required module version of the first application module.

10. The method of claim 1, wherein, The application management parameter contained in the application management instruction is extracted, comprising: The second application program to be deleted contained in the application program deletion instruction is extracted.

11. The method of claim 10, wherein, It is determined that the application management parameter satisfies the application management condition, comprising at least one of the following: The application data possessed by the second application program is not referenced by other application programs, and The second application program currently processes an inactive state.

12. The method of claim 10, wherein, In the life cycle of the transaction, the management operation matched with the application management instruction is executed, comprising: In the life cycle of the transaction, a registry deletion operation on the application program registry matched with the second application program is executed, and after the deletion operation is completed, a garbage collection identifier matched with the second application program is set; After the garbage collection identifier matched with the second application program is set, the transaction is committed.

13. The method of claim 12, wherein, After the transaction is committed, the method further comprises: According to the garbage collection identifier matched with the second application program, a garbage collection operation for the second application program is executed.

14. The method according to any one of claims 10 to 13, characterized in that, In the life cycle of the transaction, the management operation matched with the application management instruction is executed, and the method further comprises: In the life cycle of the transaction, if the embedded operating system is reset or fails due to power failure, after being powered on again, the transaction is rolled back according to a preset transaction processing mechanism to restore the system state before the transaction is started.

15. The method of claim 1, wherein, The application management parameter contained in the application management instruction is extracted, comprising: The target module to be deleted contained in the module deletion instruction is extracted, wherein the type of the target module comprises an application module or a library module.

16. The method of claim 15, wherein, It is determined that the application management parameter satisfies the application management condition, comprising: When there is no accessible application instance belonging to the target module at present, and there is no other module dependent on the target module at present, it is determined that the application management parameter satisfies the application management condition.

17. The method of claim 15, wherein, Before starting the transaction to execute the atomic operation, the method further comprises: A module deletion identifier matched with the target module is set; In the life cycle of the transaction, the management operation matched with the application management instruction is executed, comprising: In the life cycle of the transaction, the module deletion identifier is cleared, and a registry deletion operation on the module registry matched with the target module is executed; After the module deletion identifier is cleared and the registry deletion operation on the module registry matched with the target module is executed, the transaction is committed.

18. The method of claim 17, wherein, comprising: setting a garbage collection identifier matching the target module after the deletion operation is completed; completing the deletion of the module deletion identifier and performing the registry deletion operation on the module registry matching the target module, the transaction is further submitted, comprising: completing the setting of the garbage collection identifier matching the target module, the deletion of the module deletion identifier and the performing of the registry deletion operation on the module registry matching the target module, the transaction is submitted.

19. The method of claim 18, wherein, after the transaction is submitted, further comprising: performing a garbage collection operation on the target module according to the garbage collection identifier matching the target module.

20. The method according to any one of claims 15-19, characterized by, performing a management operation matching the application management instruction within the life cycle of the transaction, further comprising: if the embedded operating system is reset or loses power during the life cycle of the transaction, the transaction is rolled back according to the preset transaction processing mechanism after power-on to restore the system state before the transaction is started.

21. The method of claim 17, wherein, The method further comprises: after the embedded operating system is powered on again, if the module deletion identifier matching the target module is detected, a new transaction is started to perform a module deletion operation on the target module.

22. The method of claim 1, wherein, extracting the application management parameters contained in the application management instruction, comprising: extracting the second application module to be deleted and at least one third application program belonging to the second application module contained in the application module and application program deletion instruction.

23. The method of claim 22, wherein, determining that the application management parameters meet the application management condition, comprising: when the second application module is not dependent on any module, the application data owned by the third application program is not referenced by any installed application program, and the third application program is in an inactive state, it is determined that the application management parameters meet the application management condition.

24. The method of claim 22, wherein, before starting the transaction to perform the atomic operation, further comprising: setting a module and application program deletion identifier matching the second application module and the third application program together; performing a management operation matching the application management instruction within the life cycle of the transaction, comprising: performing a registry deletion operation on the application program registry matching the third application program within the life cycle of the transaction, and after the deletion operation is completed, setting a garbage collection identifier matching the third application program, deleting the module and application program deletion identifier, and performing a registry deletion operation on the module registry matching the second application module; after completing the setting of the garbage collection identifier matching the third application program, the deletion of the module and application program deletion identifier and the performing of the registry deletion operation on the module registry matching the second application module, the transaction is submitted.

25. The method of claim 24, wherein, after the transaction is submitted, further comprising: performing a garbage collection operation on the third application program according to the garbage collection identifier matching the third application program.

26. The method of any one of claims 22-25, wherein, performing a management operation matching the application management instruction within the life cycle of the transaction, further comprising: If the embedded operating system is reset or suffers from power-off failure during the life cycle of the transaction, the transaction is rolled back according to a preset transaction processing mechanism after being powered on again, so as to restore the system state before the transaction is started.

27. The method of claim 24, wherein, The method further comprises: After the embedded operating system is powered on again, if the module and application deletion identifier are detected, a new transaction is started to perform a deletion operation on the second application module and a third application program affiliated to the second application module.

28. An application management apparatus characterized by comprising: The device is configured in an application installer, and the device comprises: a parameter extraction module configured to extract an application management parameter included in the application management instruction; an atomic operation starting module configured to start a transaction to perform an atomic operation when it is determined that the application management parameter satisfies an application management condition; a management operation performing module configured to perform a management operation matched with the application management instruction within the life cycle of the transaction.

29. An electronic device, comprising: The electronic device is installed with an embedded operating system, and the embedded operating system executes an application installer, and the electronic device comprises: at least one processor; and a memory in communication connection with the at least one processor; wherein 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 to enable the at least one processor to execute the method in any one of claims 1-27.

30. The electronic device of claim 29, wherein, The electronic device is a resource-constrained device.

31. The electronic device of claim 30, wherein, The resource-constrained device comprises a smart card, a USBKEY, an embedded security control module, and a secure element.

32. A terminal, characterized by The electronic device comprises any one of claims 29-31.

33. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to execute the method in any one of claims 1-27.

34. A computer program product, characterised in that, The computer program product comprises a computer program for implementing the method in any one of claims 1-27 when executed by the processor. The computer program product comprises a computer program for implementing the method in any one of claims 1-27 when executed by the processor.