Working method, device and system for multiple virtual machines in intelligent card

By implementing the working methods and data format conversion of multiple virtual machines in smart cards, the problem that existing smart cards can only support one virtual machine is solved, data sharing and interoperability between multiple virtual machines is realized, application research and development and management costs are reduced, and the compatibility of smart card platform is improved.

CN119883513APending Publication Date: 2025-04-25JIANGSU HENGBAO INTELLIGENT SYST TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411966454.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-28
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing smart cards only support one virtual machine and cannot load and run applications based on other virtual machine technical specifications, resulting in high application development and management costs, inability to upgrade existing applications, and difficult to promote domestic virtual machine technology.

Method used

By implementing the working method of multiple virtual machines in a smart card, including identifying and allocating application instructions to the corresponding virtual machine for processing, and using the virtual machine data conversion module for data format conversion, the data storage format unified and data access sharing between multiple virtual machines is realized.

Benefits of technology

It realizes data sharing and interoperability between multiple virtual machines, reduces application R&D and management costs, improves the compatibility of the smart card platform, simplifies the management of smart card applications by business parties, and supports the upgrade of the smart card platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883513A_ABST
    Figure CN119883513A_ABST
Patent Text Reader

Abstract

The invention provides a working method, device and system for multiple virtual machines in a smart card, and relates to the technical field of computers, the working method comprises the following steps: in response to receiving an APDU instruction sent by a card reading device, a COS system judges whether the instruction is an application instruction, and if yes, the APDU instruction is sent to the card reading device; if yes, the received application instructions are distributed to the corresponding virtual machines to be analyzed and processed; if the instruction is not the application instruction, directly sending the received instruction to a COS system for processing; and responding to the virtual machine to complete instruction processing, returning to the COS system, and waiting for receiving the next instruction. According to the application, the identification of the application instruction is realized, the application instruction is allocated to the corresponding virtual machine for processing, and the virtual machine data conversion module is used for performing data format conversion on the data involved in the process of processing the application instruction by the virtual machine, so that the unification of data storage formats among a plurality of virtual machines is realized; data access and sharing among different virtual machines are realized, and the problem that a plurality of virtual machines cannot interact and communicate with one another is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and system for operating multiple virtual machines in a smart card. Background Art

[0002] A smart card is a card with a microprocessor and memory embedded in it. It combines integrated circuit technology with the traditional card format and is usually composed of three layers: an outer plastic or paper layer as a carrier, a middle circuit layer containing a microprocessor, memory, and antenna (if wireless communication is supported), and an innermost layer that protects the basic electronic components. The microprocessor is responsible for executing instructions and processing data, and the memory is divided into EEPROM (Electrically Erasable Programmable Read-Only Memory) for storing user data and applications, and RAM (Random Access Memory) for temporary calculations.

[0003] Since the 1990s, Java Card, a smart card with a virtual machine, has appeared. It aims to simplify smart card programming and application development through the object-oriented characteristics and cross-platform capabilities of the Java language. Due to the existence of the Java virtual machine, Java Card applications can run on any smart card that supports the Java Card API without the need to develop for specific hardware. In recent years, various fields have begun to develop and promote local virtual machines.

[0004] Currently, the smart cards with virtual machines on the market only support one virtual machine, that is, one runtime environment, a set of bytecodes, and its corresponding series of APIs, and can only download applications that comply with the relevant specifications of this virtual machine technology. The most widely used smart cards currently support Java virtual machines, which can only run applications that comply with Java card standards and their API specifications, and cannot load and run any applications based on other virtual machine technology specifications (such as applications that support smart card virtual machine technology that are currently being promoted); conversely, for smart cards that support domestic virtual machine technology, it is impossible to load and run applications that comply with Java card virtual machine standards.

[0005] In the use of smart cards, the problems caused by the above technical defects are mainly reflected in the following aspects: First, the difficulty of post-download application management and maintenance increases. For the same functional requirement, multiple versions of applications need to be developed and managed according to different virtual machine technologies and corresponding API specifications, which increases the cost of application development and management; second, it is not friendly to existing stock applications. When the smart card platform of the virtual machine is upgraded, there is a risk that the existing applications cannot be used anymore. When the platform is upgraded, the application needs to be redeveloped; finally, it also greatly increases the difficulty of promoting smart cards based on domestic virtual machine technology. Existing applications based on Java virtual machine technology are not compatible with domestic virtual machine technology and cannot be loaded and run on the domestic virtual machine smart card platform, which will greatly reduce the enthusiasm of application parties in using domestic virtual machine smart cards.

[0006] Each virtual machine in the existing smart card has its own independent interpreter and independent operating environment. The virtual machines are incompatible with each other, and data interaction and data sharing between multiple virtual machines cannot be achieved. Summary of the invention

[0007] The purpose of the present application is to provide a working method, device and system for multiple virtual machines in a smart card, which realizes the recognition of application instructions, assigns the application instructions to the corresponding virtual machines for processing, uses the virtual machine data conversion module to convert the data format involved in the process of virtual machine processing application instructions, realizes the unification of data storage formats among multiple virtual machines, realizes data access and sharing among different virtual machines, and solves the problem that multiple virtual machines cannot communicate with each other.

[0008] To achieve the above-mentioned purpose, as the first aspect of the present application, the present application provides a working method of multiple virtual machines in a smart card, and the working method includes: in response to receiving an APDU instruction sent by a card reader, the COS system determines whether the instruction is an application instruction. If it is an application instruction, the received application instruction is distributed to the corresponding virtual machine for parsing and processing; if it is not an application instruction, the received instruction is directly sent to the COS system for processing; in response to the virtual machine completing instruction processing, it returns to the COS system and waits to receive the next instruction.

[0009] As described above, the working method of multiple virtual machines in the smart card, wherein, during the process of the virtual machine processing application instructions, it is determined whether the data involved in the process belongs to the management of this virtual machine. If not, the data needs to be converted into a data format and a data conversion request is made to the virtual machine data conversion module. Otherwise, there is no need to make a data conversion request to the virtual machine data conversion module.

[0010] The working method of multiple virtual machines in a smart card as described above, wherein, after a data conversion request is made to a virtual machine data conversion module, the virtual machine data conversion module responds to the data conversion request, converts the data involved in the process of the first virtual machine processing application instructions into a data format recognizable by the second virtual machine, and sends an access request to the second virtual machine; the data conversion module obtains the data sent by the second virtual machine, then converts the data sent by the second virtual machine into a format recognizable by the first virtual machine, and then returns it to the first virtual machine for processing.

[0011] The working method of multiple virtual machines in a smart card as described above, wherein, if the first virtual machine needs to call data to the second virtual machine during processing of application instructions, the method for the virtual machine data conversion module to convert the data format includes: in response to the first virtual machine calling the data, the virtual machine data conversion module searches for the second virtual machine where the data is located based on its internal data index table, wherein the data index table indicates the mapping relationship between the data and the virtual machine; the virtual machine data conversion module converts the data that the first virtual machine needs to call into a format that can be recognized by the second virtual machine, and sends an access request to the second virtual machine; after the virtual machine data conversion module receives the feedback data sent by the second virtual machine in response to the access request, the feedback data is converted into a format that can be recognized by the first virtual machine, and sent to the first virtual machine.

[0012] As described above, the working method of multiple virtual machines in a smart card, wherein, before the virtual machine processes an application instruction, it is determined whether the application instruction involves an API call. If so, the application instruction is first processed by the corresponding API and then distributed to the virtual machine for processing. If not, the application instruction is directly distributed to the virtual machine for processing.

[0013] As described above, in the working method of multiple virtual machines in a smart card, applications corresponding to different virtual machines are installed in the COS system; the data format of the application complies with the standard specification data format of the corresponding virtual machine.

[0014] As described above, the working method of multiple virtual machines in the smart card, wherein the method of installing applications corresponding to different virtual machines in the COS system includes: loading the application: confirming the application type and the corresponding virtual machine ID; installing the application: adding the application type, virtual machine ID and application ID registered when loading the application to the application registration table of the COS system.

[0015] As described above, the working method of multiple virtual machines in the smart card, wherein the method for the virtual machine to process application instructions is as follows: running the application: querying the application registration information, confirming its corresponding virtual machine ID, and setting the current running environment to the virtual machine RE; processing the application instructions: according to the currently set RE environment, directly distributing the application instructions to the corresponding virtual machine for processing.

[0016] As a second aspect of the present application, the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; when the at least one processor executes the computer execution instructions stored in the memory, it implements the working method of multiple virtual machines in a smart card as described above.

[0017] As the third aspect of the present application, the present application provides a working system of multiple virtual machines in a smart card, which executes the working method of multiple virtual machines in a smart card as described above, and the system includes: a COS system, which is used to respond to the APDU instruction sent by the card reader and determine whether the instruction is an application instruction; a multi-virtual machine distribution management module, if the COS system determines that the instruction it receives is an application instruction, the multi-virtual machine distribution management module is used to distribute the received application instruction to the corresponding virtual machine for parsing and processing; a virtual machine data conversion module, which is used to convert the data during the execution of the application instruction into a data format recognizable by other virtual machines.

[0018] The beneficial effects achieved by this application are as follows:

[0019] (1) This application uses a virtual machine data format conversion module to convert the data involved in the application instruction processing process into a format that can be recognized by different virtual machines, thereby achieving the unification of data storage formats among multiple virtual machines and realizing data access or data sharing of data objects, algorithms and related functional modules among multiple virtual machines during application operation.

[0020] (2) In the present application, each virtual machine has an independent interpreter and API, and each virtual machine has its own independent data structure and data management. Each virtual machine can work independently without interfering with each other.

[0021] (3) In the present application, each virtual machine has an independent interpreter. The interpreters of multiple virtual machines can enable a single COS platform to interpret multiple sets of bytecodes at the same time and run multiple types of applications that comply with the specifications of different virtual machines.

[0022] (4) This application can load, install and run applications that comply with different virtual machine standards and specifications on a single smart card, significantly improving the compatibility of the smart card COS platform with applications and simplifying the management of smart card applications by the business side. One card can be used for multiple virtual machines, which not only eliminates the need to replace existing applications, but also allows compatibility with new applications, which is conducive to future smart card COS platform upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For those skilled in the art, other drawings can also be obtained based on these drawings.

[0024] Figure 1 This is a flowchart of a method for operating multiple virtual machines in a smart card according to an embodiment of the present application.

[0025] Figure 2This is a structural diagram of multiple virtual machines in a smart card according to an embodiment of the present application.

[0026] Figure 3 This is a complete COS workflow diagram in the smart card of the embodiment of the present application.

[0027] Figure 4 This is a workflow diagram of the multi-virtual machine distribution management module according to an embodiment of the present application.

[0028] Figure 5 This is a flow chart of the data decryption method according to an embodiment of the present application.

[0029] Figure 6 A flow chart of a method for accessing digital identity authentication information of a virtual machine according to an embodiment of the present application.

[0030] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application.

[0031] Figure 8 This is a schematic diagram of the structure of a multi-virtual machine working system in a smart card according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0033] Embodiment 1

[0034] like Figure 1 As shown, the present application provides a working method of multiple virtual machines in a smart card, and the working method includes: in response to receiving an APDU instruction sent by a card reader, the COS system (on-chip operating system) determines whether the instruction is an application instruction. If it is an application instruction, the received application instruction is distributed to the corresponding virtual machine for parsing and processing; if it is not an application instruction, the received instruction is directly sent to the COS system for processing; in response to the virtual machine completing the instruction processing, it returns to the COS system and waits for the next instruction to be received. The present application determines whether the instruction it receives is an application instruction through the COS system, thereby identifying the application instruction, and assigning the application instruction to the corresponding virtual machine for processing. For non-application instructions, they are directly processed by the COS system. The COS system can complete the processing of various commands in the smart card.

[0035] As a specific embodiment of the present invention, during the process of the virtual machine processing application instructions, it is determined whether the data involved in the process belongs to the management of this virtual machine. If not, the data needs to be converted into a data format and a data conversion request is made to the virtual machine data conversion module. Otherwise, there is no need to make a data conversion request to the virtual machine data conversion module.

[0036] As a specific embodiment of the present invention, after a data conversion request is made to a virtual machine data conversion module, the virtual machine data conversion module responds to the data conversion request, converts the data involved in the process of processing application instructions by the first virtual machine into a data format recognizable by the second virtual machine, and sends an access request to the second virtual machine; the data conversion module obtains the data sent by the second virtual machine, then converts the data sent by the second virtual machine into a format recognizable by the first virtual machine, and then returns it to the first virtual machine for processing.

[0037] As a specific embodiment of the present invention, if the first virtual machine needs to call data from the second virtual machine during the process of processing application instructions, the method for the virtual machine data conversion module to convert the data format includes: in response to the first virtual machine calling the data, the virtual machine data conversion module searches for the second virtual machine where the data is located based on its internal data index table, wherein the data index table indicates the mapping relationship between the data and the virtual machine, and the virtual machine to which the data belongs can be confirmed through the data index table; the virtual machine data conversion module converts the data that the first virtual machine needs to call into a format that can be recognized by the second virtual machine, and sends an access request to the second virtual machine; after the virtual machine data conversion module receives the feedback data sent by the second virtual machine in response to the access request, the feedback data is converted into a format that can be recognized by the first virtual machine, and sent to the first virtual machine.

[0038] As a specific embodiment of the present invention, when virtual machine A needs to call data, the virtual machine data conversion module finds the virtual machine (for example, virtual machine B) where the data is located based on the data index table, and sends an access request to the virtual machine B. At the same time, the data conversion module converts the data to be called into a format recognizable by the virtual machine B. After the virtual machine data conversion module obtains the data, it converts the data into a format recognizable by virtual machine A. Through the virtual machine data conversion module, multiple virtual machines can achieve data access and sharing between different virtual machines.

[0039] As a specific embodiment of the present invention, before the virtual machine processes the application instruction, it determines whether the application instruction involves an API call. If so, the application instruction is first processed by the corresponding API and then distributed to the virtual machine for processing. If not, the application instruction is directly distributed to the virtual machine for processing.

[0040] As a specific embodiment of the present invention, applications corresponding to different virtual machines are installed in the COS system; the data format of the application complies with the standard specification data format of the corresponding virtual machine. The COS system provides users with an operation interface and interaction mode, supports the installation and operation of multiple applications, and meets user needs. The application framework of the COS system provides an operating environment for applications.

[0041] like Figure 2 As shown, the applications corresponding to the first virtual machine are application A and application B, the applications corresponding to the second virtual machine are application C and application D, and the application corresponding to the third virtual machine is application E.

[0042] like Figure 2 As shown, the virtual machine operating environment includes a multi-virtual machine distribution management module, multiple virtual machine APIs (application programming interfaces), multiple virtual machines, and a virtual machine data conversion module. The multi-virtual machine distribution management module realizes the identification of different application types and the distribution of virtual machine processing. Virtual machine 1 applications A and B are converted into data formats that comply with the specifications of virtual machine 1 through external tools, and the applications are installed on the COS platform by loading and installing instructions; similarly, virtual machine 2 applications C and D are converted into data formats that comply with the standard specifications of virtual machine 2 through external tools, and are downloaded and installed on the COS platform by corresponding loading and installing instructions. Among them, the COS platform is the operating platform provided by the COS system.

[0043] As a specific embodiment of the present invention, multiple virtual machines are implemented according to the technical specifications of different virtual machines, each of which has its own independent interpreter, API (application programming interface) and operating environment; data access and sharing can be achieved between virtual machines.

[0044] like Figure 3 As shown, the complete COS workflow in the smart card includes the following steps:

[0045] Step S100, power on.

[0046] Step S110: Each virtual machine completes RE initialization.

[0047] Specifically, after power-on, each virtual machine operating environment completes initialization and starts a virtual machine distribution processing mechanism.

[0048] Among them, RE initialization refers to the operation of restoring a device or system to its initial state. This operation can clear the data, settings or configurations stored in the device or system and return it to the default state at the factory.

[0049] Step S120, receiving an APDU command.

[0050] Among them, the APDU (Application Protocol Data Unit) command is a command format used to communicate with a smart card.

[0051] Step S130, determining whether the received APDU command is an application instruction, if so, executing step P5, otherwise, sending the received command to the COS system for processing.

[0052] Specifically, when receiving an APDU command, the COS system first confirms whether the APDU command is an application instruction based on the current context. If it is not an application instruction, it is directly processed by the COS system. If it is an application instruction, the application ID maintained by the multi-virtual machine distribution / management module and its registered virtual machine type information are queried to confirm its application type and the corresponding virtual machine to be processed.

[0053] Step S140, determining the application type and the corresponding virtual machine to be processed.

[0054] Specifically, the application type and the corresponding virtual machine to be processed are confirmed by querying the application ID maintained by the multi-virtual machine distribution / management module and the registered virtual machine type information.

[0055] Step S150, determining whether the application instruction involves an API call, if so, the corresponding virtual machine performs API processing.

[0056] Specifically, the bytecodes related to the execution of the application instructions are directly distributed to the corresponding virtual machines for parsing and processing.

[0057] Step S160, determine whether data format conversion is required, if so, perform virtual machine data format conversion, and send the converted data to the corresponding virtual machine for processing, otherwise, directly send it to the corresponding virtual machine for processing.

[0058] Specifically, before or after the data is processed by the virtual machine, there is data access or storage. It is necessary to confirm whether the data format needs to be converted through the multi-virtual machine data conversion module according to the actual situation.

[0059] As a specific embodiment of the present invention, if the processing of application A needs to call a certain system data Data1, and the data cannot be obtained in the virtual machine corresponding to application A, a data request must first be made to the multi-virtual machine data conversion module. The multi-virtual data conversion module first converts the data into a data format recognizable by other virtual machines, and sends an access request to other virtual machines. After obtaining the data, the data conversion module converts the data into a format recognizable by the virtual machine of application A, and then uniformly hands it over to its virtual machine for processing.

[0060] It should be explained that when application A of virtual machine 1 needs to access data or methods stored and managed by virtual machine 2 during operation, the data access can be achieved by the virtual machine data format conversion module.

[0061] Step S170: The corresponding virtual machine processes the application instruction.

[0062] Step S180, determine whether data format conversion is required, if so, perform virtual machine data format conversion and then return to the COS system for processing, otherwise, directly return to the COS system for processing.

[0063] Specifically, after the virtual machine completes processing, it returns to the COS system for processing and enters the COS processing loop, waiting for the next instruction.

[0064] Step S190, end the process.

[0065] As a specific embodiment of the present invention, a method for installing applications corresponding to different virtual machines in a COS system includes: loading the application: confirming the application type and the corresponding virtual machine ID; installing the application: adding the application type, virtual machine ID and application ID registered when loading the application to the application registration table of the COS system.

[0066] As a specific embodiment of the present invention, the method for a virtual machine to process application instructions is as follows: running the application: querying the application registration information, confirming its corresponding virtual machine ID, and setting the current running environment to the virtual machine RE; processing the application instructions: directly distributing the application instructions to the corresponding virtual machine for processing according to the currently set RE environment.

[0067] As a specific embodiment of the present invention, the multi-virtual machine distribution management module includes a multi-virtual machine distribution module and a distribution data management module.

[0068] like Figure 4 As shown, the workflow of the multi-virtual machine distribution management module includes the following steps:

[0069] Step S200: The multi-virtual machine distribution module loads the application, identifies the reference package ID type and sends it to the distribution data management module.

[0070] Step S210: the distribution data management module confirms the application type according to the reference package ID, and feeds back the application type to the multi-virtual machine distribution module.

[0071] Step S220: the multi-virtual machine distribution module installs the application.

[0072] Specifically, installing the application includes: adding the application to the COS platform application registry. Specifically, the application type, virtual machine ID, and application ID registered during loading are added to the COS platform application registry.

[0073] Step S230: the distribution data management module registers the application and sends the application ID and the virtual machine ID to the multi-virtual machine distribution module.

[0074] Step S240: the multi-virtual machine distribution module feeds back a response of successful installation to the application.

[0075] Step S250: the multi-virtual machine distribution module selects an application and sends an instruction to the distribution data management module to search for application registration information.

[0076] Specifically, after selecting an application, the distribution data management module queries the application registration information according to the application, confirms its corresponding virtual machine ID, and sets the current operating environment as the virtual machine RE (runtime Environment) operating environment.

[0077] Step S260: the distribution data management module feeds back the virtual machine ID to the multi-virtual machine distribution module.

[0078] Step S270: the multi-virtual machine distribution module obtains the application instruction and distributes the application instruction to the corresponding virtual machine for processing.

[0079] Specifically, the corresponding virtual machine processing is directly distributed according to the currently set RE environment.

[0080] Step S280: The virtual machine feeds back the processing result of the application instruction to the multi-virtual machine distribution module.

[0081] Step S290: the multi-virtual machine distribution module feeds back the application processing result to the application.

[0082] From the above, it can be seen that the multi-virtual machine distribution management module realizes the installation and registration of applications, as well as the distribution of application instructions, thereby improving the processing efficiency of application instructions.

[0083] Embodiment 2

[0084] In this embodiment, a certain decryption method needs to be called during the operation of application A of virtual machine 1, and the decryption method in the card is implemented by application C, and the relevant data is stored and managed by virtual machine 2 in the format of application B. Since the methods and relevant data involved in the decryption method are implemented by different applications respectively, the data formats between different applications are incompatible and cannot be unified, resulting in the decryption method being unable to perform data exchange between applications of different virtual machines.

[0085] In order to solve the above problems, Figure 5 As shown, the present application provides a data decryption method, which is a decryption method in which application A calls virtual machine 1, and the method includes the following steps:

[0086] Step S300: In response to the data decryption request sent by application A, the first virtual machine finds that relevant data is missing when processing the data decryption request, and then initiates a decryption request in format A to the data format conversion module.

[0087] Step S310: The data format conversion module converts the decryption request in the A format of the first virtual machine into the B format recognizable by the second virtual machine, and then sends the decryption request to the second virtual machine.

[0088] Step S320: After receiving the decryption request, the second virtual machine sends the data in the B format to the application C, which decrypts the data and returns the decryption result.

[0089] Step S330: The virtual machine returns the decryption result to the data conversion module in the B format.

[0090] Step S340: After acquiring the data in the B format, the data conversion module converts the data in the B format into data in the A format recognizable by the first virtual machine, and returns the data to the first virtual machine.

[0091] Step S350: The first virtual machine responds the decryption result to application A.

[0092] It should be explained that during the above data decryption method, data format conversion is achieved through a data format conversion module to ensure that the data format conforms to the format recognizable by different virtual machines, thereby achieving data interaction or data sharing between different virtual machines.

[0093] Embodiment 3

[0094] In this embodiment, when using the digital RMB application on virtual machine 1 to conduct transactions, it is necessary to access the digital identity authentication information in the digital identity authentication application on virtual machine 2. Due to obstacles such as incompatible data formats between different virtual machines, this application is to solve the above problems. Figure 6 As shown, the present application provides a data access method using a virtual machine data conversion module, the method comprising the following steps:

[0095] Step S410, in response to the identity confirmation request of the digital RMB application, virtual machine 1 submits an authentication information request to the data format conversion module in format A.

[0096] Step S420 , after receiving the authentication information request, the data format conversion module converts the authentication information A format request into an authentication information B format request, and sends the authentication information B format request to virtual machine 2 .

[0097] Step S430, after receiving the authentication information B format request, virtual machine 2 responds the stored identity authentication information in B format to the data format conversion module.

[0098] Step S440 , the data format conversion module converts the identity authentication information of the B-format response into the identity authentication information of the A-format response recognizable by the virtual machine 1 , and sends the identity authentication information to the virtual machine 1 .

[0099] Step S450, after virtual machine 1 obtains the identity authentication information, it responds to the digital RMB application.

[0100] Step S460: After the digital RMB application obtains the identity authentication information, it proceeds to the next transaction.

[0101] The above method solves the problem of incompatible data formats between different virtual machines by using a data format conversion module, and realizes data interaction or data sharing between different virtual machines.

[0102] Embodiment 4

[0103] like Figure 7 As shown, the present application provides an electronic device 100, including: at least one processor 10 and a memory 20; the memory 20 stores computer execution instructions; when at least one processor 10 executes the computer execution instructions stored in the memory, the working method of multiple virtual machines in the smart card as described above is implemented.

[0104] Embodiment 5

[0105] like Figure 8 As shown, the present application provides a working system 200 of multiple virtual machines in a smart card, which executes the working method of multiple virtual machines in a smart card as described above, and the system includes: a COS system 201, which is used to respond to the APDU instruction sent by the card reader and determine whether the instruction is an application instruction; a multi-virtual machine distribution management module 202, if the COS system 201 determines that the instruction it receives is an application instruction, the multi-virtual machine distribution management module is used to distribute the received application instruction to the corresponding virtual machine for parsing and processing; a virtual machine data conversion module 203, which is used to convert the data in the execution process of the application instruction into a data format recognizable by other virtual machines.

[0106] The present application also provides a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the address mapping method of the large-capacity solid-state hard disk. The computer storage medium contains one or more program instructions, and the one or more program instructions are used by the processor to execute a method for operating multiple virtual machines in a smart card.

[0107] The embodiment disclosed in the present invention provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed on a computer, the computer executes the above-mentioned method for operating multiple virtual machines in a smart card.

[0108] An embodiment of the present invention provides a processor for processing the above-mentioned working method of multiple virtual machines in a smart card.

[0109] In the embodiment of the present invention, the processor may be an integrated circuit chip having the ability to process signals. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0110] The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware.

[0111] The storage medium may be a memory, which may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.

[0112] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM).

[0113] The beneficial effects achieved by this application are as follows:

[0114] (1) This application uses a virtual machine data format conversion module to convert the data involved in the application instruction processing process into a format that can be recognized by different virtual machines, thereby achieving the unification of data storage formats among multiple virtual machines and realizing data access or data sharing of data objects, algorithms and related functional modules among multiple virtual machines during application operation.

[0115] (2) In the present application, each virtual machine has an independent interpreter and API, and each virtual machine has its own independent data structure and data management. Each virtual machine can work independently without interfering with each other.

[0116] (3) In the present application, each virtual machine has an independent interpreter. The interpreters of multiple virtual machines can enable a single COS platform to interpret multiple sets of bytecodes at the same time and run multiple types of applications that comply with the specifications of different virtual machines.

[0117] (4) This application can load, install and run applications that comply with different virtual machine standards and specifications on a single smart card, significantly improving the compatibility of the smart card COS platform with applications and simplifying the management of smart card applications by the business side. One card can be used for multiple virtual machines, which not only eliminates the need to replace existing applications, but also allows compatibility with new applications, which is conducive to future smart card COS platform upgrades.

[0118] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0119] In the description of the present application, the word "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0120] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for operating multiple virtual machines in a smart card, characterized in that: The working method includes: In response to receiving the APDU instruction sent by the card reader, the COS system determines whether the instruction is an application instruction. If it is an application instruction, the received application instruction is distributed to the corresponding virtual machine for parsing and processing; if it is not an application instruction, the received instruction is directly sent to the COS system for processing; In response to the virtual machine completing instruction processing, it returns to the COS system and waits to receive the next instruction.

2. The method for operating multiple virtual machines in a smart card according to claim 1, characterized in that: During the process of the virtual machine processing application instructions, it is determined whether the data involved in the process belongs to the management of this virtual machine. If not, the data needs to be converted into a data format and a data conversion request is made to the virtual machine data conversion module. Otherwise, there is no need to make a data conversion request to the virtual machine data conversion module.

3. The method for operating multiple virtual machines in a smart card according to claim 2, characterized in that: After submitting a data conversion request to the virtual machine data conversion module, The virtual machine data conversion module, in response to the data conversion request, converts the data involved in the process of the first virtual machine processing the application instruction into a data format recognizable by the second virtual machine, and issues an access request to the second virtual machine; The data conversion module obtains the data sent by the second virtual machine, converts the data sent by the second virtual machine into a format recognizable by the first virtual machine, and then returns the data to the first virtual machine for processing.

4. The method for operating multiple virtual machines in a smart card according to claim 2, characterized in that: If the first virtual machine needs to call data from the second virtual machine during processing of the application instruction, the method for the virtual machine data conversion module to convert the data format includes: In response to the first virtual machine calling the data, the virtual machine data conversion module searches for the second virtual machine where the data is located based on its internal data index table, wherein the data index table indicates a mapping relationship between the data and the virtual machine; The virtual machine data conversion module converts the data to be called by the first virtual machine into a format recognizable by the second virtual machine, and sends an access request to the second virtual machine; After receiving the feedback data sent by the second virtual machine in response to the access request, the virtual machine data conversion module converts the feedback data into a format recognizable by the first virtual machine and sends the feedback data to the first virtual machine.

5. The method for operating multiple virtual machines in a smart card according to claim 2, characterized in that: Before the virtual machine processes the application instruction, it determines whether the application instruction involves an API call. If so, the application instruction is first processed by the corresponding API and then distributed to the virtual machine for processing. If not, the application instruction is directly distributed to the virtual machine for processing.

6. The method for operating multiple virtual machines in a smart card according to claim 1, characterized in that: Applications corresponding to different virtual machines are installed in the COS system; The data format of the application complies with the standard specification data format of the corresponding virtual machine.

7. The method for operating multiple virtual machines in a smart card according to claim 2, characterized in that: Methods for installing applications corresponding to different virtual machines in a COS system include: Load application: confirm the application type and the corresponding virtual machine ID; Install the application: Add the application type, virtual machine ID, and application ID registered when loading the application to the application registry of the COS system.

8. The method for operating multiple virtual machines in a smart card according to claim 7, characterized in that: The method by which the virtual machine processes application instructions is: Run the application: query the application registration information, confirm its corresponding virtual machine ID, and set the current running environment to the virtual machine RE; Process application instructions: According to the currently set RE environment, the application instructions are directly distributed to the corresponding virtual machine for processing.

9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; When the at least one processor executes the computer-executable instructions stored in the memory, the method according to any one of claims 1 to 8 is implemented.

10. A multi-virtual machine working system in a smart card, characterized in that: The working system executes the method described in any one of claims 1 to 8, and the system comprises: The COS system is used to determine whether the APDU instruction sent by the card reader is an application instruction in response to receiving the APDU instruction; A multi-virtual machine distribution management module, if the COS system determines that the received instruction is an application instruction, the multi-virtual machine distribution management module is used to distribute the received application instruction to the corresponding virtual machine for parsing and processing; The virtual machine data conversion module is used to convert the data in the process of executing application instructions into a data format that can be recognized by other virtual machines.