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

By using an application installer to execute application management methods on resource-constrained devices, extracting parameters, and initiating transactions to perform atomic operations, the problem of securely and efficiently managing WebAssembly applications on resource-constrained devices is solved, ensuring the atomicity and integrity of operations.

CN121635907APending 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 securely, efficiently, and correctly manage WebAssembly applications on resource-constrained devices, especially the deletion of modules and applications.

Method used

The application installer executes application management methods, extracts parameters from application management instructions, and initiates transactions to perform atomic operations once the conditions are met. The management operations are completed within the transaction lifecycle, ensuring the atomicity of the operations, including restoring the management process in case of abnormalities or power outages.

Benefits of technology

It enables secure, efficient, and accurate management of WebAssembly applications on resource-constrained devices, ensuring that the deletion process of modules or applications can be completed even in the event of anomalies or power outages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635907A_ABST
    Figure CN121635907A_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, the application installer comprises an application deletion management component which is used for deleting modules and / or application programs, and the method specifically comprises the steps that application management parameters contained in an application management instruction are extracted; 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 power failure occurs in the deletion process of the module or the application program, the module or application program deletion process can be continuously completed after the exception or the power failure is recovered, and 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 application relates to the technical field of computer, and in particular, to an application management method and device, electronic equipment, terminal, medium and product. BACKGROUND

[0002] WebAssembly (wasm for short) belongs to a virtual instruction set architecture. Based on WebAssembly bytecode technology, an application program can be written using multiple programming languages, and the written application program is converted to generate WebAssembly bytecode, and the WebAssembly bytecode is executed by a virtual machine to make the application program run normally.

[0003] When a WebAssembly application program written based on WebAssembly bytecode needs to be applied to a resource-limited device, the WebAssembly application program needs to be managed accordingly, for example, deletion of modules or application programs. However, how to safely, efficiently and correctly manage the WebAssembly application program in the resource-limited device is an important problem to be solved at present. SUMMARY

[0004] The embodiments of the present application provide an application management method and device, electronic equipment, terminal, medium and product to provide a safe, efficient and correct implementation of managing a WebAssembly application program in a resource-limited device.

[0005] According to an aspect of the embodiments of the present application, an application management method is provided, which is executed by an application installer, the application installer comprising an application deletion management component for implementing a deletion operation on a module and / or an application program, and the method comprising:

[0006] extracting an application management parameter contained in an application management instruction;

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

[0008] performing a management operation matched with the application management instruction within a life cycle of the transaction.

[0009] According to another aspect of the embodiments of the present application, an application management device is also provided, which is configured in an application installer, the application installer comprising an application deletion management component for implementing a deletion operation on a module and / or an application program, and the device comprising:

[0010] a parameter extraction module configured to extract an application management parameter contained in an application management instruction;

[0011] The atomic operation starting module is configured to start a transaction to perform an atomic operation when it is determined that the application management parameter meets an application management condition.

[0012] The management operation performing module is configured to perform a management operation matched with the application management instruction within a life cycle of the transaction.

[0013] According to another aspect of the embodiments of the present application, an electronic device is also provided. The electronic device has an embedded operating system installed thereon, and an application installer is executed in the embedded operating system. The electronic device comprises:

[0014] at least one processor; and

[0015] a memory connected with the at least one processor in communication; wherein

[0016] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the application management method according to any one of the embodiments of the present application.

[0017] According to another aspect of the embodiments of the present application, a terminal is also provided. The terminal comprises the electronic device according to any one of the embodiments of the present application.

[0018] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided. The computer readable storage medium stores computer instructions for causing a processor to perform the application management method according to any one of the embodiments of the present application.

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

[0020] The technical solution of the embodiments of the present application provides an application management method performed by an application installer. The application installer extracts an application management parameter included in an application management instruction. When it is determined that the application management parameter meets an application management condition, a transaction is started to perform an atomic operation. Within a life cycle of the transaction, a management operation matched with the application management instruction is performed. The implementation manner can guarantee the atomicity of application management, i.e., even if an exception or power failure occurs during the deletion of a module or an application program, the deletion process of the module or the application program can be continued after the exception or the power failure is recovered, thereby achieving the technical effect of safely, efficiently and correctly managing a WebAssembly application program in an electronic device, especially in a resource-restricted device.

[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 structural diagram of an application management device provided in an embodiment of the present invention;

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

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

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] The application installer is responsible for removing applications. Accordingly, the application installer may contain application removal management components for implementing module and / or application removal operations. Furthermore, the application installer can also be responsible for installing applications, and thus may contain application installation management components for implementing application installation. The application installer can be understood as an application with an application identifier (AID). This application can be selected to open and run within a specified logical 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 called by applications outside the security domain on a logical channel, nor can it be called in the environment of an application without a security domain.

[0035] 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.

[0036] 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.

[0037] 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.

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

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

[0040] As mentioned above, the application installer is used to delete modules and / or applications. Accordingly, the application management instructions may include: application deletion instructions, module deletion instructions, or application module and application deletion instructions.

[0041] Furthermore, this application installer can also be used to install applications. Correspondingly, the application management command can also include an application installation command. Specifically, if the application management command is an application installation command, the application management parameters extracted from that command can include: the application to be installed and the application module to which it belongs. If the application management command is an application deletion command, the application management parameters extracted from that command can include: the application to be deleted.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] 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.

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

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

[0048] 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).

[0049] 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).

[0050] 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.

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

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

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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 deletion instruction.

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

[0058] S210. Extract the first application to be deleted contained in the application deletion instruction.

[0059] When deleting the first application, it's not necessary to consider the application module to which it belongs; only the application registry entry corresponding to the first application needs to be deleted, followed by garbage collection. Therefore, it's only necessary to extract the first application to be deleted from the application deletion command, typically by extracting its AID.

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

[0061] 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:

[0062] The application data owned by the first application is not referenced by other applications, and

[0063] The first application is currently in an inactive state.

[0064] In this context, the application data owned by the first 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 first application.

[0065] Correspondingly, the application data owned by the first 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 first application.

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

[0067] 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 first application.

[0068] S230. During the lifecycle of the transaction, perform a registry deletion operation on the application registry that matches the first application.

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

[0070] S240. After the deletion operation is completed, set a garbage collection identifier that matches the first application.

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

[0072] S250. After the garbage collection identifier matching the first application is set, the transaction is committed.

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

[0074] The above settings ensure that if a system power failure occurs during the deletion of the first 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 first application's data.

[0075] S260. Perform a garbage collection operation for the first application based on the garbage collection identifier that matches the first application.

[0076] In this embodiment, after successfully submitting the transaction, a garbage collection operation can be performed on the first application based on the garbage collection identifier that matches the first application.

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

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

[0079] 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.

[0080] Figure 3This 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.

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

[0082] S310. 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.

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

[0084] S320. 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.

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

[0086] 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.

[0087] 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.

[0088] 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.

[0089] S330. 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.

[0090] 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.

[0091] S340. After the deletion operation is completed, set a garbage collection identifier that matches the target module.

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

[0093] S350. 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.

[0094] 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:

[0095] 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.

[0096] S360. Perform a garbage collection operation for the target module based on the garbage collection identifier that matches the target module.

[0097] 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.

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

[0099] 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.

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

[0101] 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.

[0102] 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.

[0103] 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 instructions are application module and application deletion instructions.

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

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

[0106] 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 target application module can contain one or more applications installed or instantiated.

[0107] S420. When it is determined that the application management parameters meet the application management conditions, after setting a module and application deletion identifier that matches both the target application module and the second application, a transaction is started to perform an atomic operation.

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

[0109] When the target application module is not depended upon by any module, the application data owned by the second application is not referenced by any installed application, and the second application is in an inactive state, the application management parameters are determined to meet the application management conditions.

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

[0111] Similar to the aforementioned scheme, by setting a module and application deletion identifier that matches both the target application module and the second 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 target application module and each second application belonging to the target application module.

[0112] S430. During the lifecycle of the transaction, perform a registry deletion operation on the application registry that matches the second application, and after the deletion operation is completed, set the garbage collection flag that matches the second application, clear the module and application deletion flag, and perform a registry deletion operation on the module registry that matches the target application module.

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

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

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

[0116] S460. 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 target application module and the second application belonging to the target application module.

[0117] The technical solution of this invention provides a transaction-based atomic deletion method for application modules and applications. This method extracts the target application module to be deleted and at least one second application belonging to the target 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 target application module and the second application is set, and a transaction is initiated to perform atomic operations. After setting the garbage collection identifier matching the second application, clearing the module and application deletion identifier, and performing a registry deletion operation on the module registry matching the target 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 target application module and the second application belonging to the target 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.

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

[0119] 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.

[0120] Figure 5 This is a schematic diagram of an application management device provided in an embodiment of the present invention. The device is configured in an application installer, which includes an application deletion management component for implementing deletion operations on modules and / or applications, such as... Figure 5 As shown, the device includes: a parameter extraction module 510, an atomic operation activation module 520, and a management operation execution module 530, wherein:

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

[0122] The atomic operation initiation module 520 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.

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

[0124] 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; and within the lifecycle of the transaction, it executes management operations that match the application management instructions. This implementation method can guarantee the atomicity of application management. That is, it can ensure that even if an anomaly or power outage occurs during the deletion of a module or application, the deletion process can continue after the anomaly 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.

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

[0126] Extract the first application to be deleted from the application deletion instructions.

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

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

[0129] The application data owned by the first application is not referenced by other applications, and

[0130] The first application is currently in an inactive state.

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

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

[0133] Once the garbage collection identifier matching the first application is set, the transaction is committed.

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

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

[0136] Based on the above embodiments, the management operation execution module 530 further includes:

[0137] 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.

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

[0139] 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.

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

[0141] 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.

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

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

[0144] Accordingly, the management operation execution module 530 may specifically include:

[0145] 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;

[0146] 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.

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

[0148] 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;

[0149] Accordingly, the management operation execution module 530 can be further used for:

[0150] 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.

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

[0152] 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.

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

[0154] 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.

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

[0156] 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.

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

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

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

[0160] When the target application module is not depended upon by any module, the application data owned by the second application is not referenced by any installed application, and the second application is in an inactive state, the application management parameters are determined to meet the application management conditions.

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

[0162] Before initiating a transaction to perform atomic operations, a module and application deletion identifier that matches both the target application module and the second application is set.

[0163] Accordingly, the management operation execution module 530 can be specifically used for:

[0164] During the lifecycle of the transaction, a registry deletion operation is performed on the application registry that matches the second application. After the deletion operation is completed, a garbage collection flag matching the second 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 target application module.

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

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

[0167] After the transaction is committed, a garbage collection operation is performed on the second application based on the garbage collection identifier that matches the second application.

[0168] Based on the above embodiments, the management operation execution module 530 can be further used for:

[0169] 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.

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

[0171] 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 target application module and the second application belonging to the target application module.

[0172] 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.

[0173] 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.

[0174] Figure 6 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.

[0175] like Figure 6As 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.

[0176] 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 6 (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.

[0177] 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.

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

[0179] 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:

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

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

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

[0183] 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).

[0184] 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.

[0185] 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.

[0186] 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.

[0187] Figure 7 This is a structural diagram of a terminal provided according to an embodiment of the present invention. Figure 7 The terminal includes the electronic device 710 as described in any embodiment of the present invention.

[0188] 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, the application installer comprising an application deletion management component for implementing a deletion operation on a module and / or an application program, 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 satisfies 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, The extracting of the application management parameter contained in the application management instruction comprises: extracting a first application program to be deleted contained in an application program deletion instruction.

3. The method of claim 2, wherein, The determining of whether the application management parameter satisfies the application management condition comprises at least one of the following: application data possessed by the first application program is not referenced by other application programs, and the first application program is currently processing an inactive state.

4. The method of claim 2, wherein, The performing of the management operation matched with the application management instruction within the life cycle of the transaction comprises: performing a registry deletion operation on an application program registry matched with the first application program within the life cycle of the transaction, and setting a garbage collection identifier matched with the first application program after the deletion operation is completed; committing the transaction after the setting of the garbage collection identifier matched with the first application program is completed.

5. The method of claim 4, wherein, After the transaction is committed, the method further comprises: performing a garbage collection operation on the first application program according to the garbage collection identifier matched with the first application program.

6. The method according to any one of claims 2-5, characterized in that, The performing of the management operation matched with the application management instruction within the life cycle of the transaction further comprises: if a reset or power-off fault occurs in an embedded operating system within the life cycle of the transaction, rolling back the transaction according to a preset transaction processing mechanism after a power-on to restore a system state before the transaction is started.

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

8. The method of claim 7, wherein, The determining of whether the application management parameter satisfies the application management condition comprises: when there is no accessible application instance belonging to the target module and there is no other module depending on the target module, it is determined that the application management parameter satisfies the application management condition.

9. The method of claim 7, wherein, Before the starting of the transaction to perform the atomic operation, the method further comprises: setting a module deletion identifier matched with the target module; The performing of the management operation matched with the application management instruction within the life cycle of the transaction comprises: clearing the module deletion identifier and performing a registry deletion operation on a module registry matched with the target module within the life cycle of the transaction; committing the transaction after the clearing of the module deletion identifier and the performing of the registry deletion operation on the module registry matched with the target module are completed.

10. The method of claim 9, wherein, After the performing of the registry deletion operation on the module registry matched with the target module, the method further comprises: setting a garbage collection identifier matched with the target module after the deletion operation is completed; After completing the setting of the garbage collection identifier matching the target module, the clearing of the module deletion identifier, and the performing of the registry deletion operation on the module registry matching the target module, the transaction is committed, further comprising: After completing the setting of the garbage collection identifier matching the target module, the clearing of the module deletion identifier, and the performing of the registry deletion operation on the module registry matching the target module, the transaction is committed.

11. The method of claim 10, wherein, After the transaction is committed, further comprising: According to the garbage collection identifier matching the target module, performing a garbage collection operation on the target module.

12. The method according to any one of claims 7-11, characterized in that, During the life cycle of the transaction, performing a management operation matching the application management instruction, further comprising: During the life cycle of the transaction, if the embedded operating system is reset or loses power, 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.

13. The method of claim 9, 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.

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

15. The method of claim 14, wherein, Determining that the application management parameters meet the application management condition, comprising: When the target application module is not dependent on any module, the application data owned by the second application program is not referenced by any installed application program, and the second application program is in an inactive state, it is determined that the application management parameters meet the application management condition.

16. The method of claim 14, wherein, Before starting the transaction to perform the atomic operation, further comprising: Setting a module and application program deletion identifier matching the target application module and the second application program together; During the life cycle of the transaction, performing a management operation matching the application management instruction, comprising: During the life cycle of the transaction, performing a registry deletion operation on the application program registry matching the second application program, and after the deletion operation is completed, setting a garbage collection identifier matching the second application program, clearing the module and application program deletion identifier, and performing a registry deletion operation on the module registry matching the target application module; After completing the setting of the garbage collection identifier matching the second application program, the clearing of the module and application program deletion identifier, and the performing of the registry deletion operation on the module registry matching the target module, the transaction is committed.

17. The method of claim 16, wherein, After the transaction is committed, further comprising: According to the garbage collection identifier matching the second application program, performing a garbage collection operation on the second application program.

18. The method according to any one of claims 14-17, characterized by, During the life cycle of the transaction, performing a management operation matching the application management instruction, further comprising: During the life cycle of the transaction, if the embedded operating system is reset or loses power, 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.

19. The method of claim 16, wherein, The method further comprises: After the embedded operating system is re-powered, if the module and application deletion identification is detected, a new transaction is started to perform a deletion operation on the target application module and a second application affiliated to the target application module.

20. An application management apparatus characterized by comprising: The application installation apparatus includes an application deletion management component for implementing a deletion operation on a module and / or an application, and the apparatus includes: 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 a life cycle of the transaction.

21. An electronic device, comprising: The electronic device includes an embedded operating system installed thereon, and an application installation apparatus executed in the embedded operating system, and the electronic device includes: 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 perform the method of any one of claims 1-19.

22. The electronic device of claim 21, wherein, The electronic device is a resource-constrained device.

23. The electronic device of claim 22, wherein, The resource-constrained device includes a smart card, a USBKEY, an embedded security control module, and a secure element.

24. A terminal, characterized by The electronic device includes any one of claims 21-23.

25. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a processor to perform the method of any one of claims 1-18.

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