Application management method and device, electronic equipment, chip and storage medium

By embedding Native methods to compile the target application data of the file, creating and executing Java Card applications, it solves the high cost and time-consuming application management in Java Card technology, realizes convenient system function updates and modifications, and improves efficiency and security .

CN119292609APending Publication Date: 2025-01-10SHENZHEN GOODIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411397066.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the existing Java Card technology, application management is expensive and time-consuming, making it difficult to update and modify system functions easily, especially when the on-chip operating system is not upgraded.

Method used

By obtaining the application source code compilation files and M Native methods of the target application, embed static resource components, create target applications, and execute corresponding Native methods when business triggers instructions, implement the functional requirements supported by the on-chip operating system and avoid patches Or completely upgrade the operating system.

Benefits of technology

It realizes convenient application management, reduces cost and time-consuming, improves the efficiency of system functions, reduces the impact on the on-chip operating system, and enhances security and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292609A_ABST
    Figure CN119292609A_ABST
Patent Text Reader

Abstract

The invention provides an application management method and device, electronic equipment, a chip and a storage medium, and the method comprises the steps: obtaining target application data of a target application, the target application data comprises an application source code compiling file of the target application and M Native method compiling files, one Native method compiling file is used for realizing functional requirements supported by an on-chip operating system; wherein one or more Native method compiling files in the target application data serve as a static resource component to be embedded into the target application data; creating a target application based on the target application data; and when a service trigger instruction for the target application is detected, using the target application to implement execution of the corresponding Native method through each static resource component corresponding to the target application data. According to the embodiment of the invention, application management can be conveniently carried out, so that the target application can use the system function under the condition of reducing the cost and time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Java cards, and in particular to an application management method, device, electronic device, chip and storage medium. Background Art

[0002] Java (an object-oriented programming language) Card (Java Card) technology is applicable to the Java platform and can be applied to smart cards and other types of electronic devices in highly specialized environments with strict memory and processing constraints. With the help of the JavaCard technology, the system platform of related equipment products can use Java Card applications (such as applets (a small program based on Java Card technology)) running on it to complete card transactions, identification and authentication operations with valuable and sensitive data information (such as electronic cash balances, personal information, etc.) carried in the device. Therefore, the security performance, execution efficiency and support for the development of high-performance Java Card applications of the system platform based on the Java Card technology are very important for the application and promotion of products.

[0003] Correspondingly, COS (Chip Operating System) is actually a native system running on the underlying hardware of the device, which can support different usage scenarios through Java Card applications installed in COS; however, as a native system, after the product is released, related technologies usually add or modify some functional requirements that are highly coupled with the underlying system (also called system functions, i.e., functional requirements that need to be supported by COS) through patches or complete upgrades of COS, which requires continuous testing of COS before product release. Then, the requirements for application business processes (such as adding new algorithms, etc.) will result in high costs and long time consumption. Based on this, there is currently no good solution for how to conveniently manage applications to achieve the use of system functions by target applications while reducing costs and time consumption. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an application management method, device, electronic device, chip and storage medium to solve the problems of high cost and long time consumption of related technologies; that is, the embodiments of the present application can realize the functional requirements that need to be supported by the on-chip operating system through the target application data including M Native method compilation files, without the need to update the user system through patches or completely upgrade the on-chip operating system to add or modify some functional requirements that need to be supported by the on-chip operating system, thereby conveniently performing application management to realize the use of system functions by the target application with reduced cost and time consumption.

[0005] According to one aspect of an embodiment of the present application, there is provided an application management method, the method comprising:

[0006] Obtain target application data of a target application, wherein the target application data includes an application source code compilation file of the target application and M native method compilation files, wherein one native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer;

[0007] Based on the target application data, create the target application;

[0008] When a service trigger instruction for the target application is detected, the target application is used to implement execution of corresponding Native methods through each static resource component corresponding to the target application data.

[0009] According to another aspect of an embodiment of the present application, there is provided an application management device, the device comprising:

[0010] an acquisition unit, configured to acquire target application data of a target application, wherein the target application data includes an application source code compilation file of the target application and M Native method compilation files, wherein one Native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer;

[0011] A processing unit, configured to create the target application based on the target application data;

[0012] The processing unit is further configured to use the target application to execute corresponding Native methods through each static resource component corresponding to the target application data when a service trigger instruction for the target application is detected.

[0013] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a memory for storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to perform the above-mentioned method.

[0014] According to another aspect of an embodiment of the present application, a chip is provided, the chip comprising a processor and a memory, the memory being used to store a computer program, the computer program causing the processor to perform the above-mentioned method when executed by the processor.

[0015] According to another aspect of an embodiment of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.

[0016] The embodiment of the present application can obtain the target application data of the target application, the target application data includes the application source code compilation file of the target application and M Native method compilation files, and a Native method compilation file is used to implement the functional requirements supported by the on-chip operating system; wherein, one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component; and based on the target application data, the target application is created. Based on this, when a business trigger instruction for the target application is detected, the target application can be used to implement the execution of the corresponding Native method by each static resource component corresponding to the target application data. It can be seen that the embodiment of the present application can implement the functional requirements that need to be supported by the on-chip operating system through the target application data including M Native method compilation files, without the need to update the user system to add or modify some functional requirements that need to be supported by the on-chip operating system through a patch or a method of completely upgrading the on-chip operating system; that is, the embodiment of the present application can conveniently perform application management, and can effectively reduce costs and time consumption, so as to realize the use of system functions (i.e., functional requirements that need to be supported by the on-chip operating system) by the target application application under the condition of reducing costs and time consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0018] Figure 1 A flow chart of an application management method according to an exemplary embodiment of the present application is shown;

[0019] Figure 2 A schematic diagram of a CAP package according to an exemplary embodiment of the present application is shown;

[0020] Figure 3 A schematic diagram of another CAP package according to an exemplary embodiment of the present application is shown;

[0021] Figure 4 A schematic diagram of another CAP package according to an exemplary embodiment of the present application is shown;

[0022] Figure 5 A schematic diagram showing a command execution according to an exemplary embodiment of the present application is shown;

[0023] Figure 6 A schematic diagram showing another command execution according to an exemplary embodiment of the present application is shown;

[0024] Figure 7 A flow chart of another application management method according to an exemplary embodiment of the present application is shown;

[0025] Figure 8 A flowchart of another application management method according to an exemplary embodiment of the present application is shown;

[0026] Fig. 9 A flowchart of another application management method according to an exemplary embodiment of the present application is shown;

[0027] Fig.10 A flowchart of another application management method according to an exemplary embodiment of the present application is shown;

[0028] Fig.11 A schematic block diagram of an application management device according to an exemplary embodiment of the present application is shown;

[0029] Fig.12 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application is shown. DETAILED DESCRIPTION

[0030] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.

[0031] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0032] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0035] It should be noted that the execution subject of the application management method provided in the embodiment of the present application can be an electronic device. The electronic device mentioned here refers to an electronic device equipped with a Java Card technology platform system (i.e., an on-chip operating system), that is, the electronic device mentioned here can be an electronic device based on Java Card technology, then correspondingly, the electronic device can support the creation and use of a target application, and the target application can be any application (such as an applet (Java Card application, a small program based on Java Card technology)); optionally, the electronic device may include a chip, and the application management method provided in the embodiment of the present application can be executed by the chip in the electronic device, or by a module other than the chip in the electronic device (such as the target application and / or the on-chip operating system), or by the electronic device and the chip in the electronic device (i.e., the module other than the chip in the electronic device and the chip in the electronic device are executed together), etc., and the embodiment of the present application does not limit this. Among them, Java Card technology is a platform-independent multi-application technology, which allows multiple applications to run on the platform at the same time while ensuring security. Optionally, the target application can be implemented through target application data, and the target application data can be obtained based on a Java Card CAP (a file format) package (also called CAP package, CAP file, CAP file data, etc.); wherein, a CAP file is a formatted file for storing Java Card applications and related information, and software in this format can be deployed and loaded onto a device that implements a Java Card virtual machine (JCVM, JavaCard Virtual Machine); Java Card applications are written using a subset of the Java language, and after compilation, the Java Card Converter (conversion command) tool of JCVM can be used to convert class files into CAP files.

[0036] Among them, the electronic device can be a terminal (DH, Device Host) or a server. Accordingly, the terminals mentioned here can include but are not limited to: smart phones, bracelets, tablet computers, laptops, desktop computers, smart watches, intelligent voice interaction devices, smart cards, car keys, smart door locks, etc. The server mentioned here can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc.

[0037] Before introducing the embodiments of the present application, a brief introduction to CAP is first given:

[0038] Optionally, the CAP may include, but is not limited to: a Header Component (containing general information about the corresponding CAP file and the public packages it defines), a Directory Component (listing the size of each component defined in the corresponding CAP file), an Import Component (listing the set of packages imported by the classes in the corresponding CAP file), a Constant Pool Component (containing entries for each class, method, and field referenced by an element in the Method Component of the corresponding CAP file), a Class Component (describing each class and interface defined in the corresponding CAP file), a Descriptor Component (providing sufficient information to parse and verify all elements of the CAP file), a Method Component (describing each method declared in the corresponding CAP file, excluding <clinit>Method and interface method declarations), static field components (StaticField Component, containing all the information required to create and initialize the images of all static fields defined in the corresponding CAP file (called static field images)), reference location components (Reference Location Component, representing the offset list of the information items of the method component to the index of the constant_pool[] array containing the constant pool component), etc.; the embodiments of the present application are not limited to this.

[0039] Among them, the class component does not contain complete access information and content details for each class and interface. The information it contains is limited to the information required to perform operations related to a specific class or interface without performing verification; complete access information about the classes and interfaces defined in the corresponding CAP file is contained in the descriptor component, and the descriptor component references and therefore describes elements in the constant pool component, class component, method component, and static field component. This component will not be referenced by other components in the CAP file.

[0040] Optionally, CAP may also include but is not limited to at least one of the following components: application component (Applet Component, containing an entry for each Java Card application defined in the CAP file), export component (Export Component, listing all static elements in the corresponding CAP package that can be imported by classes in other packages), debug component (Debug Component, containing metadata required for debugging packages in the CAP file on all properly detected JCVMs), static resource component (Static Resources Component, this component needs to be included when the CAP contains static resources), etc., and the embodiments of the present application are not limited to this.

[0041] Optionally, the size of each static resource can be between 0 and 32767 bytes. Configuration data or initialization data can usually be embedded in the CAP file as a static resource so that the application instance can access this resource. In other words, the JavaCard application can embed static resource components in the CAP, and the COS system will parse the resources components contained in the CAP installation package and save them in the user space. The program code of the Java Card application instantiated from the execution module in the current CAP package can access the static resources in the current CAP package.

[0042] Based on the above description, the embodiment of the present application proposes an application management method, which can be executed by the electronic device mentioned above; specifically, the application management method can be executed by a chip in the electronic device, or by a module other than the chip in the electronic device, or by the electronic device and the chip in the electronic device together, etc. For the sake of convenience, the following description will be given by taking the electronic device executing the application management method as an example; Figure 1 As shown, the application management method may include the following steps S101-S103:

[0043] S101, obtaining target application data of a target application, the target application data including an application source code compilation file and M Native method compilation files of the target application, wherein one Native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer.

[0044] Among them, a Native method compilation file can be used to implement a Native method, and a Native method can refer to a method implemented in C language or assembly language. Optionally, a Native method compilation file can be an encrypted file or an unencrypted file; when any Native method compilation file corresponding to the target application data is an encrypted file, the static resource component corresponding to any Native method compilation file needs to be decrypted, and the decryption processing process of the static resource component corresponding to any Native method compilation file is located in the creation stage of the target application or the application personalization stage; that is, the static resource component corresponding to any Native method compilation file can be decrypted in the creation stage of the target application, and the static resource component corresponding to any Native method compilation file can also be decrypted in the personalization stage of the target application, etc., and the embodiments of the present application are not limited to this. Optionally, any Native method compilation file corresponding to the target application data (that is, any Native method compilation file in the Native method compilation file involved in the target application data) can be any Native method compilation file in the target application data, or any Native method compilation file in the static resource library corresponding to the target application, etc.; the embodiments of the present application are not limited to this. Optionally, a static resource library corresponding to an application may include a static resource library that needs to be called (ie, referenced) by the corresponding application.

[0045] In the present application embodiment, COS development stage, Java API interface (i.e. static component initialization interface, also can be expressed as initResourcesCode interface) can be reserved in Java Card Application Programming Interface (Java Card Application Programming Interface, JCAPI) module for initializing Native method in static resource component, and Java API interface (i.e. static component execution interface, also can be expressed as exeResourcesCode interface) for executing Native method in static component. Optionally, in COS system, COS developer can reserve self-defined Java API pile function as the entrance of patch or new function after later product release. After product release, if application developer needs to add functional requirements that need COS bottom layer to support, COS developer can reach the effect of new function without affecting system structure by patching or upgrading this pile function internal code to such Java API pile function, so as to meet the purpose of merging new function and retaining user data in COS; Java Card application developed for new function can use COS new function by calling Java API pile function of patched or replaced content. Based on this, the embodiment of the present application can combine the method of using the Java API to add new functions of COS with the static resource component characteristics of JCVM 3.1, and propose an application management method that carries and uses Native methods in a Java Card CAP package.

[0046] Optionally, a Native method compilation file can be a binary file of the corresponding Native method generated based on the on-chip operating system compilation; and / or, a Native method compilation file includes integrity verification information. It should be noted that the embodiment of the present application does not limit the specific Native function code in a Native method; illustratively, COS developers can write Native methods including but not limited to input parameter checking (such as determining whether the parameter is an array object, whether the offset is within a reasonable range of the array object, etc.), firewall checking (such as checking whether the incoming object is an object created in the current CAP package, etc.), security protection (such as checking whether the parameter has been tampered with, etc.) and function implementation according to the application needs of the application developer, and can be combined with the current COS (i.e., COS with the corresponding Native method) to compile, so as to realize the generation of the binary file of the corresponding Native method through COS compilation, such as generating the binary ciphertext file (i.e., encrypted file) of the corresponding Native method during encryption. Optionally, the integrity verification information in a Native method compilation file may include but is not limited to at least one of the following: a checksum value (a total check code, also known as a checksum, such as an MD5 (Message-DigestAlgorithm 5) value or a SHA-1 (Secure Hash Algorithm) value, etc.), a digital signature, etc., which is not limited to the embodiments of the present application; in other words, the embodiments of the present application do not limit the specific integrity verification method, etc.

[0047] Based on this, application developers can write Java Card application (such as target application) source code according to needs. In the application, the reserved initResourcesCode and exeResourcesCode interfaces in COS can be called for initialization, and the specified static resource component identifier (such as resource number (Resources ID) or resource name, etc.) can be used to initialize or use the functions provided by the Native method; further, the Java Card application source code can be compiled into a binary file in class format (i.e., bin file). Optionally, the target application can be any application, which is not limited in the embodiments of the present application. Optionally, the compilation process of the application source code can be executed by the application developer through any device (such as a device other than the electronic device used to execute the application management method); optionally, the compilation process of the Native method can be executed by the COS developer through any device, which is not limited in the embodiments of the present application.

[0048] Then correspondingly, the target application's application source code compilation file can be a binary file compiled from the target application's application source code into a class format. Optionally, the target application supports calling the static component initialization interface reserved in the on-chip operating system to initialize the Native method, and / or the target application supports calling the static component execution interface reserved in the on-chip operating system to use the Native method; and / or, a static component initialization interface or a static component execution interface supports passing in a specified static resource component identifier, so that the static resource component identifier of the static resource component corresponding to the corresponding static component interface is the corresponding specified static resource component identifier, that is, the static resource component corresponding to the corresponding static component interface can be the static resource component indicated by the corresponding specified static resource component identifier. Optionally, the target application may also support calling a static resource library execution interface and / or a static resource library initialization interface; optionally, a static resource library interface supports passing in a specified static resource library identifier so that the static resource library identifier of the static resource library corresponding to the corresponding static resource library interface is the corresponding specified static resource library identifier, that is, the static resource library corresponding to the corresponding static resource library interface can be the static resource library indicated by the corresponding specified static resource library identifier; based on this, the target application supports calling the static component initialization interface to initialize the Native method by calling the static resource library initialization interface, and / or the target application supports calling the static component execution interface to use the Native method. Optionally, a static resource library can be a Java Card CAP file, which can be called a Java Card CAP library file. In the embodiment of the present application, a static resource library may include at least one Native method compilation file, one or more Native method compilation files in a static resource library are embedded in the corresponding static resource library as a static resource component, and a static resource library may include bytecode for calling the static component execution interface; and / or, a static resource library may include bytecode for calling the static component initialization interface.

[0049] In a specific implementation, when the value of M is greater than 0, the application developer of the target application can use the Converter tool (a conversion tool) to package the application source code compilation file of the target application and the M Native method compilation files into a CAP package (i.e., the initial application data described below), such as Figure 2 As shown; wherein, the Native method compilation file is embedded in the CAP package as a static resource component, and the static resource component identifier of any interface is set to the specified static resource component identifier used by any interface in application coding. Among them, the Native method file *.c refers to the Native method file written in C language, the application source code file *.java refers to the application source code file written in Java language, the Native method compilation file *.bin refers to the Native method compilation file compiled into the bin file format, and the application source code compilation file (i.e., Java language binary file) *.class refers to the binary file compiled into the class format by Java language; wherein, the application source code compilation file can also be called class file data. It can be seen that the Native method must be combined with the COS project in a secure environment to export a valid binary file, which can facilitate the control of the use of related functions and reduce security risks.

[0050] In another specific implementation, the application developer can write the Java Card library (i.e., static resource library) source code according to the requirements, thereby obtaining the Java Card library source code file; further, the Java Card library source code can be compiled into a binary file in class format (i.e., bin file) to obtain a library source code compilation file and a Java export library file (which can be an exp (a file format) file), etc. Optionally, the library source code compilation process can be executed by the application developer through any device. Accordingly, the application developer can use the Converter tool to package any library source code compilation file and at least one Native method compilation file into a CAP file, such as Figure 3 As shown; in this case, the CAP file can be a JavaCard library package (i.e., CAP library package), and the static resource component in the CAP file contains a Native method execution code binary file (i.e., Native method compilation file). In this case, the value of M can be 0, and the application developer can write the code that calls the static resource library interface (such as the static resource library execution interface) when writing the application source code, so as to call the static resource library interface (such as the static resource library execution interface and / or the static resource library initialization interface) to realize the call of the static component interface (such as the static component execution interface and / or the static component initialization interface) through the static resource library.

[0051] Based on this, when the value of M is equal to 0, and the application source code includes code that calls the static resource library interface, the application source code can be compiled by the Java compiler and the Java export library file; then correspondingly, the application developer of the target application can use the Converter tool to package the application source code compilation file of the target application into a CAP package (also called a CAP application file at this time), such as Figure 4 As shown; at this time, the JavaCard application can be compiled in conjunction with the exported library file of the library package, call the Java Card method provided by the library to the outside, and call the Native method in the static resource component of the library package through the Java Card method of the library package. In this case, the CAP package may only include the application source code compilation file. Optionally, the CAP package containing the application source code compilation file may be specifically referred to as a CAP application file or a CAP application package, etc., and the CAP package containing the library source code compilation file may be specifically referred to as a CAP library file or a CAP library package, etc.

[0052] Optionally, methods for acquiring target application data of the target application may include but are not limited to the following:

[0053] The first acquisition method: the electronic device can obtain the initial application data of the target application. The initial application data can be produced by packaging the application source code compilation file and M Native method compilation files of the target application through a target packaging tool (such as a Converter tool). The initial application data can be a CAP package, that is, the initial application data can be produced by a Converter tool; and the target application data of the target application can be obtained based on the initial application data. Optionally, when obtaining the target application data of the target application based on the initial application data, the electronic device can parse and convert the initial application data to obtain the target application data, thereby parsing and converting the application source code compilation file and M Native method compilation files of the target application, so as to parse and convert the initial application data assembled in a standard manner (the data in the CAP package is assembled in a standard manner) into a custom format in the on-chip operating system; optionally, the parsing and conversion of the initial application data can be performed by the electronic device through the Java Card Runtime Environment (JCRE) in the on-chip operating system, and at this time, the initial application data can be parsed and converted by the installation module (Installer) in the JCRE and converted into the target application data.

[0054] Optionally, when acquiring the initial application data, the electronic device can download the initial application data through a download instruction (such as a standard GP (Global Platform, a card technical specification) instruction); or, the initial application data can be stored in the electronic device's own storage space, so that the initial application data can be acquired from its own storage space, etc.; the embodiment of the present application is not limited to this. Optionally, the electronic device can trigger the execution of acquiring the initial application data when detecting the application download operation performed by the user for the target application; Optionally, the initial application data can be downloaded to a chip in the electronic device, such as a SE (Secure Element, a security unit, usually provided in the form of a chip, to prevent external malicious parsing attacks and protect data security, with encryption / decryption logic circuits in the chip) chip. Further, after acquiring the initial application data, the electronic device can also load the initial application data into COS through a load (LOAD) command (such as a standard APDU (Application Protocol Data Unit, application protocol data unit, communication format between a card (such as SE) and an application outside the card) command), so that the initial application data can be parsed and converted by the installation module (Installer) in JCRE. Based on this, the embodiment of the present application can use the execution process that complies with the GP standard to load the initial application data into COS. For example, when the value of M is greater than 0, the execution process such as loading the initial application data can be as follows: Figure 5 As shown; when the value of M is equal to 0, the execution process of loading the initial application data can be as follows Figure 6 As shown, at this time, the target application can call the javacardapi method in the corresponding CAP library file, and the Javacard method in the library (i.e., the static resource library) can trigger the call of the Native method in the static resource component, etc. Optionally, when the value of M is greater than 0, the static resource library corresponding to the target application can be empty or not empty, and this embodiment of the application does not limit this.

[0055] Optionally, the electronic device can also parse out the static resource component directory of the target application, such as the static resource component directory of the package to which the target application data belongs; optionally, the static resource component directory of the package to which the target application data belongs may include but is not limited to the static resource component identifier and storage location of each static resource component in the target application data (i.e., each static resource component in the initial application data), etc., which is not limited to the embodiments of the present application.

[0056] Further, the target application data can be saved in the package structure of the memory (i.e., Package entity, also referred to as Package application entity) so that the target application data is stored in the user space; wherein, the memory can be a non-volatile memory, that is, the target application data is stored in the corresponding Package entity created in the non-volatile memory, one application can correspond to one Package entity, and the application data of one application can be an application package stored in the corresponding Package entity (can be simply referred to as a package as the content of the corresponding Package entity); optionally, application packages of different applications can be stored in different Package entities, or in the same Package entity, which is not limited in the embodiments of the present application. It should be understood that since the static resource component is located in the target application data, the static resource component can also be stored in the user space. Based on this, the embodiments of the present application can effectively avoid problems such as limited hardware resources of the on-chip operating system, and can effectively reduce system resource consumption. Among them, the Package entity can be a structure that stores CAP-parsed data in COS. In an embodiment of the present application, the Package entity used to store application data may be specifically referred to as a Package application entity (i.e., an application package structure), the Package entity used to store a static resource library may be specifically referred to as a Package library entity (i.e., a library package structure), and so on.

[0057] Optionally, when the value of M is greater than 0, the electronic device may also generate a static resource component directory of the package to which the target application data belongs when storing the target application data, and so on; this embodiment of the present application does not limit this. Then correspondingly, after obtaining the static resource component directory of the package to which the target application data belongs, the static resource component directory of the package to which the target application data belongs can be stored in the Package entity corresponding to the target application (here, the Package application entity); optionally, the storage location of a static resource component can be the offset of the corresponding static resource component in the component embedded in the corresponding package, or it can be the storage address of the corresponding static resource component in the memory, etc., and this embodiment of the present application does not limit this. It should be noted that the embodiment of the present application does not limit the specific method for determining the storage location of any static resource component.

[0058] Optionally, when the target application needs to call a static resource library, the electronic device can also obtain at least one static resource library data corresponding to the target application (i.e., a Java CardCAP library file), thereby loading at least one static resource library data corresponding to the target application into the COS, so as to obtain at least one static resource library corresponding to the target application. At this time, the COS may include a Package library entity, a static resource library may be a library package stored in a corresponding Package library entity, and a Package library entity may include at least one static resource component in the corresponding static resource library, and a Java CardCAP library file corresponds to a Package library entity. Optionally, the electronic device can also parse out the static resource component directory of any static resource library package, and / or generate a static resource component directory of any static resource library package, thereby saving the corresponding static resource component directory to the corresponding Package library entity, and so on.

[0059] The second acquisition method: the target application data may be stored in the memory of the electronic device through the Package entity. In this case, the target application data may be acquired from its own memory, and so on.

[0060] S102: Create a target application based on the target application data.

[0061] In the embodiment of the present application, the electronic device can use the Install command (such as a standard APDU command) to instantiate the executable module (i.e., the class of the application itself) in the application package, thereby creating the target application, that is, generating the Java Card application entity of the target application; that is, the module (module) that implements the JavaCard.framework.Applet interface (an interface template) in the CAP can be instantiated through the specified APDU command. Optionally, when the electronic device detects the installation operation performed by the user on the target application, it can trigger the execution of sending the installation command to the on-chip operating system, so that the on-chip operating system can install the target application. Optionally, after instantiation, the application management table can also be refreshed, such as refreshing the logical address or actual address of the application, etc., which is not limited in the embodiment of the present application. Among them, the Java Card application entity can be an application structure generated by instantiating the executable module in the Package entity in COS, and the object created by instantiation is the application that can be run on COS.

[0062] It should be understood that since the Native method for adding or modifying functions exists in the static resource component of the current CAP package (such as the initial application data), it is protected by the Java Card firewall and can only be accessed by the application instantiated by this CAP (such as the target application). To modify or add functions to it, that is, only the application instantiated by the current CAP package can access the static resource component of the current CAP package, which can prevent applications of other application developers from accessing this function to reduce security risks. At this time, the code in the CAP guarantees the privacy of the data or provides functions to the outside world, which is flexible to use and easy to control; accordingly, when it is necessary to modify or add functions, only the current CAP package needs to be upgraded, and the scope of impact is limited. In other words, the embodiment of the present application can effectively reduce the scope of impact. In addition, the implementation function is written by the Native method, which can use system resources more flexibly to achieve efficient, safe and convenient effects.

[0063] S103, when a service trigger instruction for a target application is detected, the target application is used to implement execution of a corresponding Native method through each static resource component corresponding to the target application data.

[0064] Among them, each static resource component corresponding to the target application data may include each static resource component in at least one static resource component corresponding to the target application data (i.e., at least one static resource component corresponding to the target application). Optionally, the at least one static resource component corresponding to the target application data may include all static resource components in the target application data and / or all static resource components in the static resource library required to be referenced by the target application, and so on; this is not limited in the embodiments of the present application. Optionally, the static resource library required to be referenced by the target application may also be referred to as the static resource library corresponding to the target application or the static resource library corresponding to the target application data, and so on.

[0065] In one embodiment, the electronic device may select a target application and send a service trigger instruction (for an application private instruction) for the target application, thereby detecting the service trigger instruction for the target application to trigger the service process of the target application; exemplarily, the electronic device may send a service trigger instruction for the target application to the on-chip operating system, so that the on-chip operating system detects the service trigger instruction for the target application, thereby using the target application. Optionally, the electronic device may trigger the execution of the above-selected target application when an application selection instruction (i.e., Select command) is detected; exemplarily, when a card swipe request is detected, it may be determined that an application selection instruction is detected, thereby using the selected application as the target application to select the target application. Optionally, the electronic device may select the target application through JCRE, in which case the electronic device may receive the application selection instruction through JCRE, such as when the electronic device detects the application selection instruction, it may send the application selection instruction to JCRE. Optionally, when selecting the target application, the corresponding application instance may be found in the memory through the application management table according to the AID information (such as application identification) carried in the command, as the target application selected by the current COS on this logical channel, and an application identification may be used to indicate an application.

[0066] In another embodiment, the user may perform an application selection operation for the target application, and the electronic device may respond to the application selection operation for the target application, thereby detecting the application selection instruction to select the target application (in this case, the application identifier carried by the application selection instruction may be the application identifier of the application on which the application selection operation acts, that is, the application on which the application selection operation acts may be the target application), and so on.

[0067] Optionally, after receiving a service trigger instruction for a target application, the on-chip operating system may send the service trigger instruction to the target application through JCRE, and make the VMPC (JCVM Program Counter, JCVM instruction counter, also called program counter, can be referred to as system PC or PC, etc.) pointer of JCVM point to the application method bytecode of the target application, read the bytecodes one by one, to find and execute the corresponding COS Native method. In other words, after COS receives the service trigger instruction, JCRE may call the process method (Applet method, called by JCRE to process external input commands) of the target application selected on the current logical channel to execute the command; based on this, JCRE may find the storage location of the bytecode corresponding to the process method in the memory according to the data of the selected application instance and load it into the JCVM execution stack, and the VMPC pointer may point to the starting address of the application process method bytecode (i.e., application method bytecode) in the memory, and then execute the application method bytecode.

[0068] The embodiment of the present application can obtain the target application data of the target application, the target application data includes the application source code compilation file of the target application and M Native method compilation files, and a Native method compilation file is used to implement the functional requirements supported by the on-chip operating system; wherein, one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component; and based on the target application data, the target application is created. Based on this, when a business trigger instruction for the target application is detected, the target application can be used to implement the execution of the corresponding Native method by each static resource component corresponding to the target application data. It can be seen that the embodiment of the present application can implement the functional requirements that need to be supported by the on-chip operating system through the target application data including M Native method compilation files, without the need to update the user system to add or modify some functional requirements that need to be supported by the on-chip operating system through a patch or a method of completely upgrading the on-chip operating system; that is, the embodiment of the present application can conveniently perform application management, and can effectively reduce costs and time consumption, so as to realize the use of system functions (i.e., functional requirements that need to be supported by the on-chip operating system) by the target application application under the condition of reducing costs and time consumption.

[0069] Based on the above description, the embodiment of the present application also proposes a more specific application management method. Accordingly, the application management method can be executed by the electronic device mentioned above; specifically, the application management method can be executed by a chip in the electronic device, or by a module other than the chip in the electronic device, or by the electronic device and the chip in the electronic device together, etc. For the sake of convenience, the following description will be based on an example of an electronic device executing the application management method; see Figure 7 , the application management method may include the following steps S701-S705:

[0070] S701, obtaining target application data of a target application, where the target application data includes an application source code compilation file and M Native method compilation files of the target application, where one Native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component.

[0071] S702: Create a target application based on the target application data.

[0072] In one embodiment, any Native method compiled file is an encrypted file, and the decryption processing process of the static resource component corresponding to any Native method compiled file is in the creation stage of the target application. The electronic device can instantiate the target application based on the target application data to obtain the instantiation object of the target application, that is, the executable module in the application package of the target application can be instantiated to obtain the instantiation object of the target application; based on this, the install method of the target application can be executed (that is, the electronic device can call the install method of the target application through the on-chip operating system), and each time the static component initialization interface is called in the install method of the target application, the target static resource component involved in the current call to the static component initialization interface is decrypted; after the install method of the target application is executed, the target application is created, that is, the target application can be created at this time. In the embodiment of the present application, the static resource component identifier passed in the static component initialization interface can be called to find the storage location of the target static resource component involved in the current call to the static component initialization interface, so as to use the preset key to decrypt the target static resource component involved in the current call to the static component initialization interface; optionally, the preset key can be set according to actual needs, and the embodiment of the present application is not limited to this. Optionally, the electronic device may also verify the target static resource component involved in the current call to the static component initialization interface (such as integrity verification, etc.), and the specific implementation method of the verification is not limited in the present application embodiment. Among them, decrypting the target static resource component may refer to decrypting the Native method compilation file in the target static resource component. Optionally, the static component initialization interface called in the install method of the target application may include the static component initialization interface directly called by the install method of the target application, in which case the decryption processing of the target static resource component involved in the current call to the static component initialization interface may be directly triggered; and / or, the static component initialization interface called in the install method of the target application may include the static component initialization interface in the target static resource library involved in the static resource library initialization interface called in the install method of the target application, such as the static component initialization interface currently called may be the static component initialization interface in the target static resource library involved in the current call to the static resource library initialization interface, in which case the static resource component in the target static resource library involved in the current call to the static resource library initialization interface may be used as the target static resource component, that is, each time the static resource library initialization interface in the install method of the target application is executed, the static resource component in the target static resource library involved in the current call to the static resource library initialization interface may be decrypted.

[0073] Based on this, the target application initialization can be achieved. Optionally, when executing the call to the static component initialization interface, the corresponding Package entity (such as Package application entity or Package library entity) can also be searched to obtain the static resource component directory of the target application, and then the static resource components can be traversed through the static resource component directory to find the target static resource component indicated by the target static resource component identifier (such as Resource_ID) passed into the currently called static component initialization interface, and then the target static resource component content (that is, the Native method compilation file in the target static resource component) can be decrypted, and the decrypted data can be verified, such as Figure 8 As shown. It can be seen that Java Card applications can use the Java methods provided by COS to access the specified Resources of the package. Optionally, the static resource component directory of the target application may include at least one of the following: a static resource component directory in the Package application entity corresponding to the target application (i.e., the static resource component directory of the package to which the target application data belongs), a static resource component directory in the Package library entity corresponding to the target application (i.e., the static resource component directory of the package to which each static resource library in at least one static resource library corresponding to the target application belongs), etc. Optionally, the Package library entity corresponding to the target application may be the Package library entity corresponding to the Package application entity corresponding to the target application (i.e., the Package library entity corresponding to the target application may be determined by the Package application entity corresponding to the target application); wherein, the Package library entity corresponding to the target application may include the Package library entity where the static resource library corresponding to the target application is located. It should be understood that, Figure 8 The application initialization process in the application management method is only represented by way of example, and the embodiments of the present application do not limit this. By way of example, the static resource library initialization interface can be executed first, and then the static component initialization interface called in the corresponding static resource library can be executed through the static resource library initialization interface, and so on.

[0074] Optionally, the electronic device can also determine whether it is necessary to decrypt the target static resource component, such as the electronic device can determine whether it is necessary to decrypt the target static resource component through the on-chip operating system; that is, it can detect whether the Native method compiled file in the target static resource component is an encrypted file (such as a static resource component can carry an encryption mark to detect whether it is encrypted). If it is detected that the Native method compiled file in the target static resource component is an encrypted file, it is determined that the target static resource component needs to be decrypted. If it is detected that the Native method compiled file in the target static resource component is not an encrypted file, it is determined that the target static resource component does not need to be decrypted. Then accordingly, if it is determined that the target static resource component needs to be decrypted, the decryption of the target static resource component involved in the current call to the static component initialization interface is triggered; if it is determined that the target static resource component does not need to be decrypted, the decryption of the target static resource component involved in the current call to the static component initialization interface is not triggered, and the decryption operation can not be performed in the static component initialization interface currently called. Optionally, an encryption identifier can be an encryption identifier or an unencrypted identifier (i.e., a plain text identifier); optionally, both the encryption identifier and the unencrypted identifier can be set according to experience or according to actual needs, and the embodiments of the present application do not limit this.

[0075] In another implementation, any Native method compilation file is an encrypted file, and when the decryption process of the static resource component corresponding to any Native method compilation file is in the application personalization stage of the target application, the electronic device can execute the processData method of the target application (a GP specification interface), and each time the static component initialization interface is called in the processData method of the target application, the target static resource component involved in the current call to the static component initialization interface is decrypted. After the processData method of the target application is executed, the application personalization of the target application can be achieved, which can also be called application personalization. Accordingly, the static component initialization interface currently called can be an interface directly called in the processData method of the target application, or it can be a static component initialization interface called by calling the static resource library initialization interface in the processData method of the target application, and so on; the embodiments of the present application do not limit this.

[0076] In another implementation, any Native method compiled file is an unencrypted file. In this case, the static component initialization interface may not be called, that is, there is no need to decrypt the static resource component, and so on.

[0077] S703, when a business trigger instruction for a target application is detected and when the bytecode that calls a static resource execution interface is executed, a Native method corresponding to the current static resource component is obtained. The current static resource component is a static resource component corresponding to the static resource execution interface called in the currently executed bytecode. A Native method corresponding to a static resource component includes a Native method compilation code in a Native method compilation file corresponding to the corresponding static resource component.

[0078] Among them, a static resource execution interface is a static component execution interface or a static resource library execution interface, a static resource component corresponding to a static resource library execution interface is a static resource component in the static resource library corresponding to the corresponding static resource library execution interface, a static resource library includes at least one Native method compilation file, one or more Native method compilation files in a static resource library are embedded in the corresponding static resource library as a static resource component, and a static resource library includes bytecode for calling the static component execution interface.

[0079] The bytecode can be a machine-independent code generated by a compiler and executed by a Java virtual machine. Optionally, the electronic device can read the bytecode stored at the address pointed to by VMPC through COS, and hand it over to the JCVM interpreter for parsing to find its corresponding Native method; based on this, by executing the bytecode corresponding to the Native method, COS can complete tasks such as executing application methods, controlling storage allocation and object management.

[0080] In an embodiment of the present application, the electronic device can determine the package to which the bytecode of the static component execution interface currently called belongs, and determine the static resource component directory of the package to which the bytecode of the static component execution interface currently called belongs (which can be the static resource component directory of the target application). The static component execution interface currently called can be the static resource execution interface called in the bytecode currently executed (in this case, the static resource execution interface can be a static component execution interface, that is, the static component execution interface currently called can be the static component execution interface called in the bytecode currently executed) or the static component execution interface called in the static resource library corresponding to the static resource execution interface called in the bytecode currently executed (in this case, the static resource execution interface can be a static resource library execution interface). In other words, the static component execution interface currently called can be directly called by the bytecode currently executed, or can be called by the static resource library execution interface called by the bytecode currently executed. Based on this, the storage address of the current static resource component can be found from the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs according to the current static resource component identifier corresponding to the currently called static component execution interface. The current static resource component identifier is used to indicate the current static resource component; and based on the storage location of the current static resource component, the Native method corresponding to the current static resource component is obtained.

[0081] In one embodiment, the static resource execution interface called in the currently executed bytecode is a static component execution interface. In this case, the static component execution interface currently called is the static resource execution interface called in the currently executed bytecode. Based on this, the bytecode of the currently called static component execution interface can be the above-mentioned currently executed bytecode (i.e., the currently executed application method bytecode), and the package to which the bytecode of the currently called static component execution interface belongs can be the package to which the currently executed bytecode belongs, that is, the electronic device can determine the package to which the currently executed bytecode belongs (i.e., the current context can be parsed in the static component execution interface called in the currently executed bytecode to read and find the application execution identifier of the binary file of the currently executed Java code, thereby determining the package to which the currently executed bytecode belongs). Correspondingly, when determining the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, the electronic device can determine the static resource component directory of the package to which the bytecode currently executed belongs from the corresponding package structure (i.e., the application package structure corresponding to the target application), thereby using the static resource component directory of the package to which the bytecode currently executed belongs as the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, so as to determine the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs; based on this, the storage location of the current static resource component can be found from the static resource component directory of the package to which the bytecode currently executed belongs according to the current static resource component identifier corresponding to the static component execution interface called in the currently executed bytecode (i.e., the currently called static component execution interface), that is, the corresponding package structure can be parsed to obtain the storage location of the current static resource component. In this case, the current static resource component identifier is a parameter passed into the static component execution interface called in the currently executed bytecode.

[0082] Optionally, a static resource component directory may also include resource size information of the static resource component; based on this, the resource size information of the current static resource component can be found from the corresponding static resource component directory according to the current static resource component identifier, thereby obtaining the Native method corresponding to the current static resource component based on the storage location and resource size information of the current static resource component.

[0083] Optionally, a call to a static component execution interface corresponds to a call to javacard.framework.Resources (an interface of JCAPI 3.1); in this case, javacard.framework.Resources can be called before the currently executed bytecode to obtain the current static resource component indicated by the current static resource component identifier, that is, the current static resource component identifier is the parameter passed into javacard.framework.Resources to use javacard.framework.Resources to obtain the current static resource component. Based on this, the current static resource component can be passed into the static component execution interface called in the currently executed bytecode (that is, the Native method corresponding to the current static resource component can be passed into the static component execution interface called in the currently executed bytecode) to achieve the acquisition of the Native method corresponding to the current static resource component when the bytecode that calls the static component execution interface is executed, and so on.

[0084] Optionally, the electronic device can also determine whether the corresponding package structure contains a static resource component, and when it is determined that it contains a static resource component, determine whether the current static resource component indicated by the current static resource component identifier (such as Resource_ID) exists, so that when it is determined that the current static resource component exists, the Native method corresponding to the current static resource component can be obtained.

[0085] In another embodiment, the static resource execution interface called in the currently executed bytecode is a static resource library execution interface. In this case, the static component execution interface currently called is the static component execution interface called in the static resource library corresponding to the static resource execution interface called in the currently executed bytecode, and the bytecode of the static component execution interface currently called is the bytecode that calls the static component execution interface in the static resource library corresponding to the static resource execution interface called in the currently executed bytecode. Based on this, the static resource component directory of the package to which the bytecode of the static component execution interface currently called belongs can be determined from the corresponding package structure (here, the library package structure corresponding to the target application), and so on. Optionally, the static resource library corresponding to the static resource execution interface called in the currently executed bytecode can be first determined from the application package structure corresponding to the target application (i.e., the library package structure where the static resource library corresponding to the static resource execution interface called in the currently executed bytecode is located is determined), so as to determine the package to which the bytecode of the currently called static component execution interface belongs through the library package structure (e.g., the current context can be parsed within the currently called static component execution interface to read and find the library execution identifier of the binary file of the currently executed Java code, thereby determining the package to which the bytecode of the currently called static component execution interface belongs), and then determine the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs from the library package structure. Among them, the static resource library corresponding to the static resource execution interface called in the currently executed bytecode can be determined by passing in the parameters of the static resource execution interface called in the currently executed bytecode. In this case, the current static resource component identifier is the parameter of the static component execution interface called in the static resource library corresponding to the static resource execution interface called in the currently executed bytecode, that is, the current static resource component identifier is the parameter of the static component execution interface passed in the currently called one.

[0086] Optionally, the data corresponding to an interface (such as a static resource component or a static resource library) can be data indicated by a parameter passed into the corresponding interface, such as a static resource library indicated by a static resource library identifier passed into a static resource library execution interface, etc. Optionally, a static resource library identifier can be used to indicate a static resource library.

[0087] S704, execute the Native method corresponding to the current static resource component, and after the execution process of the static resource execution interface called in the currently executed bytecode is completed, exit the execution process of the static resource execution interface called in the currently executed bytecode to complete the execution of the currently executed bytecode.

[0088] Optionally, the above-mentioned obtaining the Native method corresponding to the current static resource component may refer to obtaining the method address of the Native method corresponding to the current static resource component, so that when the Native method corresponding to the current static resource component is executed, the system PC (Program Counter) can be pointed to the method address of the Native method corresponding to the current static resource component, that is, the system PC can be pointed to the Native method corresponding to the current static resource component, and then the Native method corresponding to the current static resource component is executed, that is, the code in the Native method corresponding to the current static resource component is executed.

[0089] Optionally, the electronic device may also perform data verification on the Native method corresponding to the current static resource component within the currently called static component execution interface, such as integrity verification and / or security verification, etc. The embodiment of the present application does not limit the specific method of data verification; after the Native method corresponding to the current static resource component passes the data verification, the above-mentioned execution of the Native method corresponding to the current static resource component may be triggered; when the Native method corresponding to the current static resource component fails to pass the data verification, the above-mentioned execution of the Native method corresponding to the current static resource component may not be triggered.

[0090] Optionally, the electronic device may also switch chip permissions according to the chip permissions corresponding to the current static resource component within the currently called static component execution interface; and / or, set the memory management unit (MMU) range according to the memory management unit range corresponding to the current static resource component; after the Native method corresponding to the current static resource component is executed, the chip permissions and / or the memory management unit range can be switched through the currently called static component execution interface. Reset, that is, the setting of chip permissions and / or memory management unit range can be turned off, such as restoring chip permissions and / or memory management unit range. Optionally, the chip permissions and memory management unit ranges corresponding to the current static resource component can be set according to experience or according to actual needs, and the present application embodiment does not limit this. Optionally, the chip permission switching and / or memory management unit range setting can be located in the Native method corresponding to the current static resource component, or it can be located outside the Native method corresponding to the current static resource component, and the present application embodiment does not limit this.

[0091] For example, Fig. 9 As shown, after obtaining the Native method corresponding to the current static resource component, the data of the Native method corresponding to the current static resource component can be verified; then, the chip permissions and / or memory management unit range settings are switched, and the Native method corresponding to the current static resource component is executed, such as the PC points to the method address of the Native method corresponding to the current static resource component to execute the Native method corresponding to the current static resource component; further, the chip permissions can be switched and / or the memory management unit range can be reset, and the subsequent code can continue to be executed, such as the PC points to the exeResourcesCode subsequent code, thereby finally exiting exeResourcesCode (that is, exiting the execution process of the currently called static component execution interface). Correspondingly, after the execution process of the static resource execution interface called in the currently executed bytecode is completed, the execution process of the static resource execution interface called in the currently executed bytecode can be exited; that is, when the static resource execution interface called in the currently executed bytecode is a static component execution interface (that is, the static component execution interface currently called), the execution process of the static resource execution interface called in the currently executed bytecode can be completed after the execution of the Native method corresponding to the current static resource component is completed; when the static resource execution interface called in the currently executed bytecode is a static resource library execution interface, the execution process of the static resource library execution interface called in the currently executed bytecode can be completed after the execution process of the static resource library execution interface called in the currently executed bytecode is completed.

[0092] Optionally, after exiting the execution process of the static resource execution interface called in the currently executed bytecode (ie, exiting the current Java API execution process), the mobile VMPC continues to read, parse, and execute the application method bytecode until the application method bytecode is executed.

[0093] S705, after executing the application method bytecode, the target application is used to execute the corresponding Native method through each static resource component corresponding to the target application data.

[0094] In summary, the target application data includes all Native method compilation files required to be executed by the target application (that is, each static resource component corresponding to the target application data is a static resource component in the target application data) as an example for explanation. Fig.10 As shown, in the embodiment of the present application, after completing the Native function coding, generating the Native method compilation file in combination with the specified version of COS (such as the current COS mentioned above), and completing the Java Card application coding, the Java source code uses the resources of the specified static resource component identifier (i.e., the indicated resources) to generate the application source code compilation file of the application source code, the application source code compilation file and the Native method compilation file can be used to create a CAP, and the static resource component identifier of the Native method compilation file is the same as that used in Java coding; then, the CAP can be loaded, and the data is stored in the package structure in the memory; the application is initialized (i.e., the application is created), and the static resource component of the specified static resource component identifier (i.e., the static resource component indicated by the specified static resource component identifier) ​​is initialized using the preset Java API; further, the Java Card application can be used to execute the APDU command to use the preset Java API to find the static resource component of the specified static resource component identifier, thereby using the Native method therein; based on this, the Native call can be completed and the bytecode of the Java Card application (i.e., the application method bytecode) can continue to be executed.

[0095] It can be seen that the embodiments of the present application can use the static resource components defined by the standard Java Card virtual machine specification to ensure the compliance of the COS system and CAP files and reduce security risks; and when the Native method compiled file is an encrypted file, it needs to be compiled and encrypted in a secure environment that has been certified in combination with the COS project, which can effectively ensure security and does not add new security risks. In addition, the Native method binary file is embedded in the CAP package, and the user needs can be met by downloading and installing the application through standard GP instructions, with a small impact (only the corresponding application can be affected), fast output speed of new functions, strong fault tolerance and low error risk.

[0096] The embodiment of the present application can obtain target application data of the target application, the target application data includes an application source code compilation file and M Native method compilation files of the target application, and one Native method compilation file is used to implement the functional requirements supported by the on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component; and based on the target application data, a target application is created. Accordingly, when a business trigger instruction for a target application is detected, the application method bytecodes required to be executed when using the target application can be executed in sequence, and when the bytecode that calls the static resource execution interface is executed, the Native method corresponding to the current static resource component is obtained. The current static resource component is the static resource component corresponding to the static resource execution interface called in the currently executed bytecode. The Native method corresponding to a static resource component includes the Native method compiled code in the Native method compiled file corresponding to the corresponding static resource component; a static resource execution interface is a static component execution interface or a static resource library execution interface. The static resource component corresponding to a static resource library execution interface is a static resource component in the static resource library corresponding to the corresponding static resource library execution interface. A static resource library includes at least one Native method compiled file. One or more Native method compiled files in a static resource library are embedded in the corresponding static resource library as a static resource component. A static resource library includes the bytecode that calls the static component execution interface. Further, the Native method corresponding to the current static resource component can be executed, and after the execution process of the static resource execution interface called in the currently executed bytecode is completed, the execution process of the static resource execution interface called in the currently executed bytecode is exited to complete the execution of the currently executed bytecode; after the application method bytecode is executed, the target application can be used to implement the corresponding Native method through each static resource component corresponding to the target application data. It can be seen that the embodiment of the present application can conveniently manage applications to achieve the use of system functions by the target application while reducing costs and time consumption, and can effectively avoid the increase in product release costs, increased risks, and more uncontrollable factors caused by the method of patching or completely upgrading the on-chip operating system, which is not conducive to product development, promotion, maintenance, etc. This is because there is no standardized download method for patches and other methods, and the uncertainty is large. The Java API patch interface used by the Java Card application is not easy to restrict the caller, there is a security risk, and the system update is easy to affect the user experience; based on this, the Native method of the customized function can be released together with the specified Java Card application, and the relevant functions are transparent to the user, which is conducive to COS version maintenance or patch version maintenance.

[0097] Based on the description of the relevant embodiments of the above-mentioned application management method, the embodiment of the present application also proposes an application management device, which can be a computer program (including program code) running in an electronic device; Fig.11 As shown, the application management device may include an acquisition unit 1101 and a processing unit 1102. The application management device may execute Figure 1 or Figure 7 The application management method shown, that is, the application management device can run the above-mentioned units:

[0098] The acquisition unit 1101 is used to acquire target application data of a target application, wherein the target application data includes an application source code compilation file and M Native method compilation files of the target application, wherein one Native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer;

[0099] The processing unit 1102 is configured to create the target application based on the target application data;

[0100] The processing unit 1102 is further configured to use the target application to execute corresponding Native methods through each static resource component corresponding to the target application data when a service trigger instruction for the target application is detected.

[0101] In one implementation, when using the target application, the processing unit 1102 may be specifically configured to:

[0102] Execute the application method bytecodes required to be executed when using the target application in sequence, and when executing the bytecode that calls the static resource execution interface, obtain the Native method corresponding to the current static resource component, the current static resource component is the static resource component corresponding to the static resource execution interface called in the currently executed bytecode, and the Native method corresponding to a static resource component includes the Native method compiled code in the Native method compiled file corresponding to the corresponding static resource component; a static resource execution interface is a static component execution interface or a static resource library execution interface, a static resource component corresponding to a static resource library execution interface is a static resource component in the static resource library corresponding to the corresponding static resource library execution interface, a static resource library includes at least one Native method compiled file, one or more Native method compiled files in a static resource library are embedded in the corresponding static resource library as a static resource component, and a static resource library includes the bytecode that calls the static component execution interface;

[0103] Execute the Native method corresponding to the current static resource component, and after the execution process of the static resource execution interface called in the currently executed bytecode is completed, exit the execution process of the static resource execution interface called in the currently executed bytecode to complete the execution of the currently executed bytecode;

[0104] After executing the application method bytecode, the use of the target application is implemented.

[0105] In another implementation manner, when the processing unit 1102 obtains the Native method corresponding to the current static resource component, it can be specifically used to:

[0106] Determine the package to which the bytecode of the currently called static component execution interface belongs, and determine the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, wherein the currently called static component execution interface is the static resource execution interface called in the currently executed bytecode or the static component execution interface called in the static resource library corresponding to the static resource execution interface called in the currently executed bytecode;

[0107] According to the current static resource component identifier corresponding to the currently called static component execution interface, searching for the storage address of the current static resource component from the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, the current static resource component identifier being used to indicate the current static resource component;

[0108] Based on the storage location of the current static resource component, a Native method corresponding to the current static resource component is obtained.

[0109] In another implementation, the processing unit 1102 may also be used to:

[0110] In the currently called static component execution interface, the chip authority is switched according to the chip authority corresponding to the current static resource component; and / or, the memory management unit range is set according to the memory management unit range corresponding to the current static resource component;

[0111] After the Native method corresponding to the current static resource component is executed, the chip permissions are switched and / or the memory management unit range is reset through the currently called static component execution interface.

[0112] In another implementation, the processing unit 1102 may also be used to:

[0113] In the currently called static component execution interface, data verification is performed on the Native method corresponding to the current static resource component;

[0114] After the Native method corresponding to the current static resource component passes the data verification, triggering the execution of the Native method corresponding to the current static resource component;

[0115] When the Native method corresponding to the current static resource component fails to pass the data verification, the execution of the Native method corresponding to the current static resource component is not triggered.

[0116] In another embodiment, a Native method compiled file is an encrypted file or an unencrypted file; when any Native method compiled file corresponding to the target application data is an encrypted file, the static resource component corresponding to any Native method compiled file needs to be decrypted, and the decryption processing process of the static resource component corresponding to any Native method compiled file is located in the creation stage or the application personalization stage of the target application.

[0117] In another implementation manner, when the decryption processing process of the static resource component corresponding to any Native method compilation file is in the creation stage of the target application, the processing unit 1102, when creating the target application based on the target application data, can be specifically used to:

[0118] Based on the target application data, instantiate the target application to obtain an instantiated object of the target application;

[0119] Execute the install method of the target application, and each time the static component initialization interface is called in the install method of the target application, decrypt the target static resource component involved in the current call to the static component initialization interface;

[0120] After the install method of the target application is executed, the creation of the target application is achieved.

[0121] In another implementation, the processing unit 1102 may also be used to:

[0122] Determine whether the target static resource component needs to be decrypted;

[0123] If it is determined that the target static resource component needs to be decrypted, triggering the execution of the decryption process of the target static resource component involved in the current call of the static component initialization interface;

[0124] If it is determined that the target static resource component does not need to be decrypted, the decryption process of the target static resource component involved in the current call to the static component initialization interface is not triggered.

[0125] In another implementation manner, the target application data is saved in a package structure of a memory so that the target application data is stored in a user space; when acquiring the target application data of the target application, the acquisition unit 1101 may be specifically used to:

[0126] Acquire initial application data of the target application, wherein the initial application data is produced by packaging an application source code compilation file and M native method compilation files of the target application through a target packaging tool, and the initial application data is a CAP package;

[0127] Based on the initial application data, target application data of the target application is acquired.

[0128] In another embodiment, the application source code compilation file of the target application is a binary file compiled into a class format by compiling the application source code of the target application, and the target application supports calling the static component initialization interface reserved in the on-chip operating system to initialize the Native method, and / or the target application supports calling the static component execution interface reserved in the on-chip operating system to use the Native method; and / or, an interface supports passing in a specified static resource component identifier so that the static resource component identifier of the static resource component corresponding to the corresponding interface is the corresponding specified static resource component identifier.

[0129] In another implementation manner, a Native method compilation file is a binary file of a corresponding Native method generated based on the on-chip operating system compilation; and / or, a Native method compilation file includes integrity verification information.

[0130] According to one embodiment of the present application, Fig.11 Each unit in the application management device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, any application management device may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0131] According to another embodiment of the present application, the program can be executed by running on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 7 A computer program (including program code) for each step involved in the corresponding method shown in Fig.11 The application management device shown in and the application management method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer storage medium, and loaded into the above-mentioned electronic device through the computer storage medium and run therein.

[0132] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present application further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present application when executed by the at least one processor.

[0133] An exemplary embodiment of the present application further provides a chip, comprising: a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the processor executes the method according to the embodiment of the present application.

[0134] The exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present application.

[0135] The exemplary embodiments of the present application further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to execute the method according to the embodiment of the present application.

[0136] refer to Fig.12 , a block diagram of an electronic device 1200 that can be used as a server or client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. Fig.12 As shown, the electronic device 1200 may include but is not limited to: underlying hardware 1210, an on-chip operating system 1220 and an application (Java Card application) 1230; wherein the on-chip operating system 1220 may include but is not limited to: a kernel (Kernel) 1221, a Java Card virtual machine 1222, a Java Card application programming interface 1223 and a Java Card operating environment 1224; optionally, JCVM, JCRE and JCAPI with high performance requirements are usually implemented by Native methods written in C language.

[0137] Optionally, in the electronic device 1200, the underlying hardware 1210 may be a chip. The configuration of the underlying hardware 1210 is mainly to ensure the needs of the software running environment in the electronic device 1200. The underlying hardware 1210 may be configured with a memory 1211 and a processor 1212; Optionally, the memory 1211 may include two types of volatile memory and non-volatile memory; Exemplarily, the volatile memory may be a random access memory (which can be used to store stacks, temporary data, and buffers for data input and output during program execution); the non-volatile memory may include a read-only memory (ROM), EEPROM or Flash, etc. The ROM, EEPROM or flash can be used to store key program codes such as on-chip operating systems and applications; the processor 1212 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. In some high-performance demand scenarios, the electronic device 1200 is configured with a high-performance processor 1212 to implement functions such as secure data storage and encryption and decryption operations; in this scenario, the underlying hardware 1210 can specifically be a security chip, and the electronic device 1200 where the security chip 1210 is located can be implemented as a security module (Secure Element, SE) product.

[0138] On top of the underlying hardware 1210, Fig.12 The in-chip operating system 1220 and application 1230 shown are the software architecture of the electronic device 1200; in this software framework, the in-chip operating system 1220 can be a customized in-chip operating system for the electronic device 1200. In the in-chip operating system 1220, the in-chip operating system 1220 mainly interacts with the underlying hardware 1210 through the interface of the kernel 1221. The Java Card virtual machine 1222 is located above the kernel 1221, and the Java Card virtual machine 1222 has a corresponding JCVM specification, which defines a subset of the Java programming language and a Java-compatible virtual machine for smart cards, including binary data representation and file formats, and a JCVM instruction set; the Java Card application program interface 1223 is located above the Java Card virtual machine 1222, and the Java Card application program interface 1223 also has a corresponding JCAPI specification, which defines the core framework, extended Java software packages and classes used by the application 1230; in addition, as Fig.12 As shown, in the on-chip operating system 1220, the Java Card runtime environment 1224 may include a Java Card virtual machine 1222 and classes and supported services of a Java Card application program interface 1223. The JCRE specification corresponding to the Java Card runtime environment 1224 defines the runtime behaviors required to implement Java Card technology, including storage management, application management, and other runtime features; the application 1230 is located on the on-chip operating system 1220. Fig.12 As shown, the electronic device 1200 can be used to execute multiple applications 1230, and each application 1230 can be loaded into the on-chip operating system 1220 to execute different methods to achieve different functions.

[0139] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0140] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0144] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0145] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.< / clinit>

Claims

1. An application management method, characterized in that: include: Obtain target application data of a target application, wherein the target application data includes an application source code compilation file of the target application and M native method compilation files, wherein one native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer; Based on the target application data, create the target application; When a service trigger instruction for the target application is detected, the target application is used to implement execution of corresponding Native methods through each static resource component corresponding to the target application data.

2. The method according to claim 1, characterized in that The using the target application comprises: Execute the application method bytecodes required to be executed when using the target application in sequence, and when executing the bytecode that calls the static resource execution interface, obtain the Native method corresponding to the current static resource component, the current static resource component is the static resource component corresponding to the static resource execution interface called in the currently executed bytecode, and the Native method corresponding to a static resource component includes the Native method compiled code in the Native method compiled file corresponding to the corresponding static resource component; a static resource execution interface is a static component execution interface or a static resource library execution interface, a static resource component corresponding to a static resource library execution interface is a static resource component in the static resource library corresponding to the corresponding static resource library execution interface, a static resource library includes at least one Native method compiled file, one or more Native method compiled files in a static resource library are embedded in the corresponding static resource library as a static resource component, and a static resource library includes the bytecode that calls the static component execution interface; Execute the Native method corresponding to the current static resource component, and after the execution process of the static resource execution interface called in the currently executed bytecode is completed, exit the execution process of the static resource execution interface called in the currently executed bytecode to complete the execution of the currently executed bytecode; After executing the application method bytecode, the use of the target application is implemented.

3. The method according to claim 2, characterized in that The Native method for obtaining the current static resource component includes: Determine the package to which the bytecode of the currently called static component execution interface belongs, and determine the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, wherein the currently called static component execution interface is the static resource execution interface called in the currently executed bytecode or the static component execution interface called in the static resource library corresponding to the static resource execution interface called in the currently executed bytecode; According to the current static resource component identifier corresponding to the currently called static component execution interface, searching for the storage address of the current static resource component from the static resource component directory of the package to which the bytecode of the currently called static component execution interface belongs, the current static resource component identifier being used to indicate the current static resource component; Based on the storage location of the current static resource component, a Native method corresponding to the current static resource component is obtained.

4. The method according to claim 2, characterized in that: The method further comprises: In the currently called static component execution interface, the chip authority is switched according to the chip authority corresponding to the current static resource component; and / or, the memory management unit range is set according to the memory management unit range corresponding to the current static resource component; After the Native method corresponding to the current static resource component is executed, the chip permissions are switched and / or the memory management unit range is reset through the currently called static component execution interface.

5. The method according to claim 2, characterized in that: The method further comprises: In the currently called static component execution interface, data verification is performed on the Native method corresponding to the current static resource component; After the Native method corresponding to the current static resource component passes the data verification, triggering the execution of the Native method corresponding to the current static resource component; When the Native method corresponding to the current static resource component fails to pass the data verification, the execution of the Native method corresponding to the current static resource component is not triggered.

6. The method according to any one of claims 1 to 5, characterized in that: A Native method compilation file is an encrypted file or an unencrypted file; when any Native method compilation file corresponding to the target application data is an encrypted file, the static resource component corresponding to any Native method compilation file needs to be decrypted, and the decryption processing process of the static resource component corresponding to any Native method compilation file is located in the creation stage or application personalization stage of the target application.

7. The method according to claim 6, characterized in that When the decryption processing process of the static resource component corresponding to any Native method compilation file is in the creation stage of the target application, the creating of the target application based on the target application data includes: Based on the target application data, instantiate the target application to obtain an instantiated object of the target application; Execute the install method of the target application, and each time the static component initialization interface is called in the install method of the target application, decrypt the target static resource component involved in the current call to the static component initialization interface; After the install method of the target application is executed, the creation of the target application is achieved.

8. The method according to claim 7, characterized in that The method further comprises: Determine whether the target static resource component needs to be decrypted; If it is determined that the target static resource component needs to be decrypted, triggering the execution of the decryption process of the target static resource component involved in the current call of the static component initialization interface; If it is determined that the target static resource component does not need to be decrypted, the decryption process of the target static resource component involved in the current call to the static component initialization interface is not triggered.

9. The method according to any one of claims 1 to 5, characterized in that: The target application data is saved in a package structure of a memory so that the target application data is stored in a user space; The step of obtaining target application data of a target application includes: Acquire initial application data of the target application, wherein the initial application data is produced by packaging an application source code compilation file and M native method compilation files of the target application through a target packaging tool, and the initial application data is a CAP package; Based on the initial application data, target application data of the target application is acquired.

10. The method according to any one of claims 1 to 5, characterized in that: The application source code compilation file of the target application is a binary file compiled into a class format by compiling the application source code of the target application. The target application supports calling the static component initialization interface reserved in the on-chip operating system to initialize the Native method, and / or the target application supports calling the static component execution interface reserved in the on-chip operating system to use the Native method; and / or, an interface supports passing in a specified static resource component identifier so that the static resource component identifier of the static resource component corresponding to the corresponding interface is the corresponding specified static resource component identifier.

11. The method according to any one of claims 1 to 5, characterized in that: A Native method compilation file is a binary file of a corresponding Native method generated based on the on-chip operating system compilation; and / or, a Native method compilation file includes integrity verification information.

12. An application management device, characterized in that: The device comprises: an acquisition unit, configured to acquire target application data of a target application, wherein the target application data includes an application source code compilation file of the target application and M Native method compilation files, wherein one Native method compilation file is used to implement functional requirements supported by an on-chip operating system; wherein one or more Native method compilation files in the target application data are embedded in the target application data as a static resource component, and M is a non-negative integer; A processing unit, configured to create the target application based on the target application data; The processing unit is further configured to use the target application to execute corresponding Native methods through each static resource component corresponding to the target application data when a service trigger instruction for the target application is detected.

13. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program comprises instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 11.

14. A chip, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the computer program, when executed by the processor, causing the processor to perform the method according to any one of claims 1-11.

15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-11.