CN115904546A - Service processing method, electronic device and computer readable storage medium - Google Patents

Service processing method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN115904546A
CN115904546A CN202211737778.1A CN202211737778A CN115904546A CN 115904546 A CN115904546 A CN 115904546A CN 202211737778 A CN202211737778 A CN 202211737778A CN 115904546 A CN115904546 A CN 115904546A
Authority
CN
China
Prior art keywords
instruction
oriented
instruction set
identifier
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211737778.1A
Other languages
Chinese (zh)
Inventor
莫文盼
李士成
蔡璐
李桂玉
李鑫
杨机孝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Eastcompeace Technology Co Ltd
Original Assignee
Eastcompeace Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Eastcompeace Technology Co Ltd filed Critical Eastcompeace Technology Co Ltd
Priority to CN202211737778.1A priority Critical patent/CN115904546A/en
Publication of CN115904546A publication Critical patent/CN115904546A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a service processing method, an electronic device and a computer readable storage medium, wherein the method is applied to a smart card chip of a smart card device and comprises the following steps: acquiring an object-oriented instruction set which is a register type instruction set from a card reader through an input/output interface, wherein each object-oriented instruction of the object-oriented instruction set comprises an operation code field and a plurality of operand fields, the field length of the operation code field is 1 byte, and the field length of the operand fields is 2 bytes; saving the object-oriented instruction set to a storage device; when receiving the application information of the intelligent card from the card reader, determining an instruction identifier according to the application information of the intelligent card; and controlling the virtual machine to read the target service instruction corresponding to the instruction identifier from the storage device, and performing service processing according to the target service instruction. The method and the device perform service processing through the register type instruction set executed by the virtual machine, and improve service processing efficiency compared with a scheme of realizing service processing based on a stack type instruction sequence.

Description

Service processing method, electronic device and computer readable storage medium
Technical Field
The present application relates to, but not limited to, the field of smart card technologies, and in particular, to a service processing method, an electronic device, and a computer-readable storage medium.
Background
After receiving the service instruction sent by other terminal equipment, the existing intelligent card equipment interprets and executes the service instruction through the intelligent card virtual machine, thereby realizing the application function corresponding to the service instruction and completing the service interaction between the intelligent card equipment and the terminal equipment. The service instruction received by the smart card virtual machine is usually based on a stack type instruction sequence, the number of byte code file instructions generated by the smart card virtual machine is large in the process of executing the stack type instruction by the smart card virtual machine, and complicated data operations such as stacking and unstacking are required to be performed when data operation is performed based on the stack type instruction, so that the execution time of a CPU (central processing unit) of the smart card virtual machine is inevitably and greatly increased, the instruction processing efficiency of the smart card virtual machine is low, and the service processing efficiency of the smart card equipment is influenced.
Disclosure of Invention
The embodiment of the application provides a service processing method, an electronic device and a computer readable storage medium, which can effectively improve the instruction processing efficiency of a virtual machine of a smart card, thereby improving the service processing efficiency of the smart card device.
In a first aspect, an embodiment of the present application provides a service processing method, which is applied to a smart card chip in a smart card device, where the smart card device is in communication connection with a card reader, the card reader is in communication connection with a client device, the smart card device further includes an input/output interface, a virtual machine, and a storage device, the input/output interface is in communication connection with the virtual machine and the smart card chip, respectively, and the storage device is in communication connection with the virtual machine and the smart card chip, respectively, and the method includes:
acquiring an object-oriented instruction set from the card reader through the input/output interface, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
saving the object-oriented instruction set to the storage device;
when a service request from the card reader is received, the service request comprises intelligent card application information, and a target instruction identifier is determined according to the intelligent card application information;
and controlling the virtual machine to read a target service instruction corresponding to the target instruction identifier from the storage device, and performing service processing according to the target service instruction.
In a second aspect, an embodiment of the present application provides a service processing method, which is applied to a client device, where the client device is in communication connection with a card reader, and the card reader is in communication connection with a smart card device, where the method includes:
encoding an initial instruction set according to a preset encoding rule to obtain an object-oriented instruction set, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents the instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent the instruction operation content of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
and sending the object-oriented instruction set to the intelligent card equipment through the card reader so that the intelligent card equipment performs service processing according to the object-oriented instruction set.
In a third aspect, an embodiment of the present application provides a service processing method, which is applied to a card reader, where the card reader is in communication connection with a smart card device and a client device, respectively, and the method includes:
receiving an object-oriented instruction set sent by the client device, wherein the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
and sending the object-oriented instruction set to the intelligent card equipment so that the intelligent card equipment carries out service processing according to the object-oriented instruction set.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the service processing method according to the first aspect, or implementing the service processing method according to the second aspect, or implementing the service processing method according to the third aspect when executing the computer program.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, where the computer-executable instructions are used to execute the service processing method according to the first aspect, or execute the service processing method according to the second aspect, or execute the service processing method according to the third aspect.
The embodiment of the application provides a service processing method, electronic equipment and a computer readable storage medium, wherein the service processing method applied to an intelligent card chip of the intelligent card equipment comprises the following steps: acquiring an object-oriented instruction set from the card reader through the input/output interface, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes; saving the object-oriented instruction set to the storage device; when a service request from the card reader is received, the service request comprises intelligent card application information, and a target instruction identifier is determined according to the intelligent card application information; and controlling the virtual machine to read a target service instruction corresponding to the target instruction identifier from the storage device, and performing service processing according to the target service instruction. According to the scheme provided by the embodiment of the application, the intelligent card equipment performs service processing through the register type instruction set executed by the virtual machine, and compared with the scheme of realizing service processing based on a stack type instruction sequence of the existing intelligent card equipment, the method and the system can effectively improve the instruction processing efficiency of the intelligent card virtual machine, thereby improving the service processing efficiency of the intelligent card equipment.
Drawings
Fig. 1 is a flowchart illustrating steps of a service processing method applied to a smart card chip of a smart card device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of performing business processing according to a target business instruction according to another embodiment of the present application;
FIG. 3 is a flowchart of steps of a method for providing service processing for a smart card chip of a client device according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating steps provided by another embodiment of the present application for sending an object-oriented instruction set to a smart card device via a card reader;
FIG. 5 is a flowchart illustrating steps of a method for processing services of a smart card chip applied to a card reader according to another embodiment of the present application;
FIG. 6 is a block diagram of an electronic device provided in another embodiment of the present application;
FIG. 7 is a schematic diagram of object-oriented instructions provided by another embodiment of the present application;
fig. 8 is a schematic block diagram of a method for performing service processing according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be appreciated that, although functional block divisions are performed in apparatus schematics, with logical sequences shown in flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the apparatus, or in the flowcharts. The terms "first," "second," and the like in the description, in the claims, or in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The application provides a service processing method, electronic equipment and a computer readable storage medium, wherein the service processing method applied to an intelligent card chip of the intelligent card equipment comprises the following steps: the method comprises the steps that an object-oriented instruction set from a card reader is obtained through an input/output interface, wherein the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents the instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent the instruction operation content of the object-oriented instruction, and the field length of the operand fields is 2 bytes; saving the object-oriented instruction set to a storage device; when a service request from a card reader is received, the service request comprises intelligent card application information, and a target instruction identifier is determined according to the intelligent card application information; and controlling the virtual machine to read the target service instruction corresponding to the target instruction identifier from the storage device and perform service processing according to the target service instruction. According to the scheme provided by the embodiment of the application, the smart card device performs service processing through the register type instruction set executed by the virtual machine, and compared with the scheme of realizing service processing based on a stack type instruction sequence in the existing smart card device, the method and the device can effectively improve the instruction processing efficiency of the smart card virtual machine, thereby improving the service processing efficiency of the smart card device.
The embodiments of the present application will be further explained with reference to the drawings.
As shown in fig. 1, fig. 1 is a flowchart illustrating a service processing method applied to a smart card chip 110 of a smart card device 100 according to an embodiment of the present application, where the method is applied to a smart card chip 110 of a smart card device 100, as shown in fig. 8, the smart card device 100 is communicatively connected to a card reader 200, the card reader 200 is communicatively connected to a client device 300, the smart card device 100 further includes an input/output interface 120, a virtual machine 130, and a storage device 140, the input/output interface 120 is communicatively connected to the virtual machine 130 and the smart card chip 110 respectively, the storage device 140 is communicatively connected to the virtual machine 130 and the smart card chip 110 respectively, and the method includes, but is not limited to, the following steps:
step S110, an object-oriented instruction set from the card reader 200 is obtained through the input/output interface 120, the object-oriented instruction set is a register type instruction set, the object-oriented instruction set includes a plurality of object-oriented instructions, each object-oriented instruction includes an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
step S120, saving the object-oriented instruction set to the storage device 140;
step S130, when a service request from the card reader 200 is received, the service request comprises the application information of the intelligent card, and a target instruction identification is determined according to the application information of the intelligent card;
step S140, controlling the virtual machine 130 to read the target service instruction corresponding to the target instruction identifier from the storage device 140, and performing service processing according to the target service instruction.
It can be understood that, after receiving a service instruction sent by another terminal device, the existing smart card device 100 interprets the service instruction through the smart card virtual machine 130 and executes the service instruction, thereby implementing an application function corresponding to the service instruction, and completing service interaction between the smart card device 100 and the terminal device. The service instruction received by the smart card virtual machine 130 is usually based on a stack type instruction sequence, and in the process of executing the stack type instruction by the smart card virtual machine 130, the number of byte code file instructions generated by the smart card virtual machine is large, and complicated data operations such as stacking and unstacking must be performed when data operation is performed based on the stack type instruction, so that the execution time of the CPU of the smart card virtual machine 130 is inevitably greatly increased, the instruction processing efficiency of the smart card virtual machine 130 is low, and the service processing efficiency of the smart card device 100 is affected. Based on this, the smart card device 100 of the present application executes the register type instruction set to perform the service processing through the virtual machine 130, and the specific steps of the service processing method executed based on the smart card chip 110 of the smart card device 100 may include: an object-oriented instruction set from the card reader 200 is obtained through the input/output interface 120, where the object-oriented instruction set is a register-type instruction set, where the object-oriented instruction set includes a plurality of object-oriented instructions, referring to fig. 7, each object-oriented instruction includes an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the operand field represents an instruction operation content of the object-oriented instruction, a field length of the operation code field is 1 byte, and a field length of the operand field is 2 bytes; saving the object-oriented instruction set to the storage device 140; when a service request from the card reader 200 is received, the service request comprises the application information of the smart card, and a target instruction identifier is determined according to the application information of the smart card; the virtual machine 130 is controlled to read the target service instruction corresponding to the target instruction identifier from the storage device 140, and perform service processing according to the target service instruction, and it can be understood that the object-oriented instruction set received by the smart card device 100 is sent by the client device 300 through the card reader 200, embodiments of the present application do not limit the number of object-oriented instructions specifically included in the object-oriented instruction set, and different object-oriented instructions correspond to different service processing steps, and subsequently, in the case of receiving a service request sent by the card reader 200, an application function corresponding to the service request can be implemented based on the object-oriented instruction set stored in the storage device 140, and compared with a scheme of implementing service processing based on a stack-type instruction sequence in the existing smart card device 100, the instruction processing efficiency of the smart card virtual machine 130 can be effectively improved, thereby improving the service processing efficiency of the smart card device 100
It can be understood that the instruction set provided by the embodiment of the present application is mainly applied to resource-limited devices, such as the smart card device 100, the memory unit and the memory of the smart card device 100 are limited, and the storage of a small-capacity card generally does not exceed 64KB, the specific content of the link of the class, the method, the domain, and the like, which is directly stored by the object-oriented instruction in the prior art, results in a lot of memory space being wasted, and the number of instructions that can be stored by the smart card device 100 is small, based on which the embodiment of the present application represents the link of the class, the method, the domain, and the like by using an unsigned unique identifier of two bytes of 16 bits, that is, an operand field with a field length of 2 bytes is only used for storing an identifier corresponding to the link of the class, the method, the domain, and the like, that is, that an operand field is at least used for storing one of the following identifiers: a class identifier; a domain identifier; the method identifier does not need to store specific contents of links such as storage classes, methods, domains and the like, and when the object-oriented instruction is triggered, the identifier based on the operand field calls a method corresponding to a preset identifier reference pool, so that the field length of the object-oriented instruction can be reduced, the storage space of the smart card device 100 can be effectively saved, and the number of storage items of the object-oriented instruction can be increased.
It should be noted that the embodiment of the present application does not limit the specific way in which the object-oriented instruction stores the related data types, because the object-oriented instruction is composed of an opcode field having a field length of 1 byte and an operand field having a field length of 2 bytes, and 1 operand field can be regarded as a register unit, and can be used to store the basic data types such as byte, char, short, and refresh, and 2 consecutive operand fields can be occupied for the int data type.
It should be noted that, the specific type of the storage device 140 according to the embodiment of the present application may be, as shown in fig. 8, at least one of the ROM143, the RAM141, and the EEPROM142143, which is electrically erasable and programmable.
It should be noted that, in the embodiment of the present application, specific content of the opcode field is not limited, and the opcode field represents an instruction type of an object-oriented instruction, and different instruction types correspond to different opcode field contents, and the instruction types corresponding to the embodiment of the present application may include a register operation type, a constant assignment type, a return instruction type, an exception type, an array operation type, a conditional jump statement type, a no-component jump statement type, an object operation type, a static domain operation type, a static method access type, a unary operation type, a binary operation type, and the like, which is not limited herein. In the storage device 140 of the smart card device 100, if the move instruction belongs to a register operation type instruction, the content of the operation code stored in the storage device 140 is 0x1, and the content of the operation code stored in the storage device 140 in the return instruction type is 0x14, which can be customized by a person skilled in the art according to actual requirements, and is not limited herein.
In addition, referring to fig. 2, in an embodiment, the step S140 in the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:
step S210, controlling the virtual machine 130 to determine a target service instruction from the object-oriented instruction set stored in the storage device 140, wherein the target service instruction corresponds to the target instruction identifier;
step S220, obtaining a target class identifier, a target domain identifier and a target method identifier from the operand field of the target service instruction;
step S230, determining a target method link file from a preset identifier reference pool according to the target class identifier, the target domain identifier and the target method identifier;
step S240, controlling the virtual machine 130 to perform service processing according to the target method link file.
It can be understood that, when receiving a service request including the smart card application information from the card reader 200, determining a target instruction identification according to the smart card application information, since a target service instruction corresponding to the target instruction identification belongs to an object-oriented instruction set stored in the storage device 140, determining the target service instruction from the object-oriented instruction set stored in the storage device 140 by controlling the virtual machine 130, obtaining a target class identifier, a target domain identifier and a target method identifier from an operand field of the target service instruction, determining a target method link file from a preset identifier reference pool according to the target class identifier, the target domain identifier and the target method identifier, and controlling the virtual machine 130 to perform service processing according to the target method link file, thereby implementing an application function corresponding to the service request.
It can be understood that the instruction set provided by the embodiment of the present application is mainly applied to resource-limited devices, such as the smart card device 100, the storage unit and the memory of the smart card device 100 are both limited, the storage capacity of a general small-capacity card does not exceed 64KB, the specific content of the class, method, domain, and the like, which is directly stored by an object-oriented instruction in the prior art, results in a lot of storage space being wasted, the number of instructions that can be stored by the smart card device 100 is small, based on this, the embodiment of the present application represents the link to the class, method, domain, and the like by using an unsigned unique identifier of two bytes with 16 bits, that is, an operand field with a field length of 2 bytes is only used for storing an identifier corresponding to the link to the class, method, domain, and the like, that is, an operand field is at least used for storing one of the following identifiers: a class identifier; a domain identifier; the method identifier does not need to store specific contents of links such as classes, methods, domains and the like, and when the object-oriented instruction is triggered, the identifier based on the operand field calls a method corresponding to a preset identifier reference pool, so that the field length of the object-oriented instruction can be reduced, the storage space of the smart card device 100 is effectively saved, and the number of storage items of the object-oriented instruction is increased.
In addition, as shown in fig. 3, fig. 3 is a flowchart of steps of a service processing method applied to a client device 300 according to an embodiment of the present application, where the present application provides a service processing method applied to a client device 300, the client device 300 is communicatively connected to a card reader 200, and the card reader 200 is communicatively connected to a smart card device 100, where the method includes, but is not limited to, the following steps:
step S310, an initial instruction set is encoded according to a preset encoding rule to obtain an object-oriented instruction set, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents the instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent the instruction operation content of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
step S320, sending the object-oriented instruction set to the smart card device 100 through the card reader 200, so that the smart card device 100 performs service processing according to the object-oriented instruction set.
It can be understood that, the client device 300 performs encoding processing on the initial instruction set according to a preset encoding rule to obtain an object-oriented instruction set, where the object-oriented instruction set is a register-type instruction set, and sends the object-oriented instruction set to the smart card device 100 through the card reader 200, so that the smart card device 100 performs service processing according to the object-oriented instruction set, where the object-oriented instruction set includes a plurality of object-oriented instructions, each object-oriented instruction includes an opcode field and a plurality of operand fields, the opcode field represents an instruction type of the object-oriented instruction, a field length of the opcode field is 1 byte, the operand field represents an instruction operation content of the object-oriented instruction, and a field length of the operand field is 2 bytes. In the embodiment of the application, the initial instruction set is encoded to obtain the register type object-oriented instruction set, and the object-oriented instruction of the virtual machine 130 that can run on the smart card device 100 is transmitted to the smart card device 100 through the card reader 200, so that the service interaction between the client and the smart card device 100 is realized.
It should be noted that, in the process of encoding the initial instruction set, if the initial instruction set has a reference requirement for other library modules, the initial instruction set may also help the compilation process to perform linking by importing a link-assisted LF file, so as to generate an object-oriented instruction set, that is, an EF file.
It should be noted that, in the embodiment of the present application, specific instruction content of each initial instruction in the initial instruction set is not limited, when the initial instruction is a move instruction, that is, an instruction type of the instruction is a register operation type, and an operand register number is represented by 4 bits, the instruction content may be "move vA, vB", where vA represents an identifier corresponding to a destination register, and vB represents an identifier corresponding to a source register; when the operand register number is expressed by 8 bits, the instruction is 'move/8vAA, vBB', wherein vAA represents the identification corresponding to the destination register, and vBB represents the identification corresponding to the source register. Each initial instruction in the initial instruction set may be encoded according to an encoding rule preset in the compiler 310 of the client device 300 as shown in fig. 8, so as to obtain an object-oriented instruction set that can be run on the virtual machine 130 of the smart card device 100, thereby providing an effective data basis for implementing service interaction between the smart card device 100 and the client device 300 based on an APDU instruction sequence corresponding to the object-oriented instruction set.
The embodiment of the present application does not limit the specific number of registers, and is determined by the hardware condition of the virtual machine 130 of the smart card device 100, and the maximum number of registers of the virtual machine 130 of the present embodiment may be 256.
It should be noted that, in the embodiment of the present application, a specific method for implementing service interaction between the client device 300 and the smart card device 100 may refer to description of the embodiment in fig. 1, and is not described herein again, and a difference between this embodiment and the embodiment in fig. 1 is that the client device 300 is used as an execution main body in this embodiment for description.
In addition, referring to fig. 4, step S320 in the embodiment shown in fig. 3 further includes, but is not limited to, the following steps:
step S410, converting the object-oriented instruction set into an APDU instruction sequence according to a preset rule;
in step S420, the APDU command sequence is transmitted to the smart card device 100 through the card reader 200.
It can be understood that, referring to fig. 8, the object-oriented instruction set may be converted into the APDU instruction sequence according to the preset rule in the installation tool 320 by the installation tool 320 (specifically, the installation tool may be a program script for converting the EF file into the APDU instruction sequence), and the APDU instruction sequence is sent to the smart card device 100 through the card reader 200, so as to provide an effective data base for the smart card device 100 to implement service interaction with the client device 300 based on the APDU instruction sequence corresponding to the object-oriented instruction set.
It should be noted that, the embodiment of the present application does not limit the specific content of the preset rule, and the conversion of the object-oriented instruction set into the APDU instruction sequence is a technique familiar to those skilled in the art, and is not limited herein.
In addition, as shown in fig. 5, fig. 5 is a flowchart of steps of a service processing method applied to the card reader 200 according to an embodiment of the present application, and the embodiment of the present application provides a service processing method applied to the card reader 200, where the card reader 200 is in communication connection with the smart card device 100 and the client device 300, respectively, and the method includes, but is not limited to, the following steps:
step S510, receiving an object-oriented instruction set sent from the client device 300, where the object-oriented instruction set includes a plurality of object-oriented instructions, each object-oriented instruction includes an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, a field length of the operation code field is 1 byte, the operand field represents an instruction operation content of the object-oriented instruction, and a field length of the operand field is 2 bytes;
step S520, sending the object-oriented instruction set to the smart card device 100, so that the smart card device 100 performs service processing according to the object-oriented instruction set.
It should be noted that, in the embodiment of the present application, a specific method for implementing service interaction between the client device 300 and the smart card device 100 through the card reader 200 may refer to description of the embodiment in fig. 1, and is not described herein again, and a difference between this embodiment and the embodiment in fig. 1 is that the card reader 200 is used as an execution main body in this embodiment for description.
In addition, an embodiment of the present application further provides an electronic device 600, where the terminal includes: memory 610, processor 620, and computer programs stored on memory 610 and executable on processor 620.
The processor 620 and the memory 610 may be connected by a bus or other means.
Non-transitory software programs and instructions required to implement the service processing method of the above-described embodiment are stored in the memory 610, and when executed by the processor 620, perform the service processing method applied to the smart card device 100 in the above-described embodiment, for example, perform the method steps S110 to S140 in fig. 1 and the method steps S210 to S240 in fig. 2 described above, or perform the service processing method applied to the client device 300 in the above-described embodiment, for example, perform the method steps S310 to S320 in fig. 3 and the method steps S410 to S420 in fig. 4 described above, or perform the service processing method applied to the card reader 200 in the above-described embodiment, for example, perform the method steps S510 to S520 in fig. 5 described above.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Furthermore, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, which are executed by a processor 620 or a controller, for example, by a processor 620 in the embodiment of the electronic device 600, and can cause the processor to perform the method steps S110 to S140 in fig. 1 and the method steps S210 to S240 in fig. 2 described above, or perform the method steps S310 to S320 in fig. 3 and the method steps S410 to S420 in fig. 4 in the embodiment described above, or perform the method steps S510 to S520 in fig. 5 in the embodiment described above. One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A service processing method is characterized in that the service processing method is applied to a smart card chip in a smart card device, the smart card device is in communication connection with a card reader, the card reader is in communication connection with a client device, the smart card device further comprises an input/output interface, a virtual machine and a storage device, the input/output interface is in communication connection with the virtual machine and the smart card chip respectively, the storage device is in communication connection with the virtual machine and the smart card chip respectively, and the method comprises the following steps:
acquiring an object-oriented instruction set from the card reader through the input/output interface, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
saving the object-oriented instruction set to the storage device;
when a service request from the card reader is received, the service request comprises intelligent card application information, and a target instruction identifier is determined according to the intelligent card application information;
and controlling the virtual machine to read a target service instruction corresponding to the target instruction identifier from the storage device, and performing service processing according to the target service instruction.
2. The traffic processing method according to claim 1, wherein the operand field comprises at least one of:
a class identifier;
a domain identifier;
a method identifier.
3. The service processing method according to claim 1, wherein the controlling the virtual machine to read the target service instruction corresponding to the target instruction identifier from the storage device and perform service processing according to the target service instruction includes:
controlling the virtual machine to determine a target service instruction from the object-oriented instruction set stored in the storage device, wherein the target service instruction corresponds to the target instruction identifier;
acquiring a target class identifier, a target domain identifier and a target method identifier from an operand field of the target service instruction;
determining a target method link file from a preset identifier reference pool according to the target class identifier, the target domain identifier and the target method identifier;
and controlling the virtual machine to perform service processing according to the target method link file.
4. A service processing method, applied to a client device, where the client device is in communication connection with a card reader, and the card reader is in communication connection with a smart card device, the method including:
encoding an initial instruction set according to a preset encoding rule to obtain an object-oriented instruction set, wherein the object-oriented instruction set is a register type instruction set, the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents the instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent the instruction operation content of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
and sending the object-oriented instruction set to the intelligent card equipment through the card reader so that the intelligent card equipment performs service processing according to the object-oriented instruction set.
5. The traffic processing method according to claim 4, wherein the operand field comprises at least one of:
a class identifier;
a domain identifier;
a method identifier.
6. The transaction processing method of claim 4, wherein sending the object-oriented instruction set to the smart card device via the card reader comprises:
converting the object-oriented instruction set into an APDU instruction sequence according to a preset rule;
and sending the APDU command sequence to the intelligent card equipment through the card reader.
7. A service processing method is applied to a card reader, wherein the card reader is respectively in communication connection with a smart card device and a client device, and the method comprises the following steps:
receiving an object-oriented instruction set sent by the client device, wherein the object-oriented instruction set comprises a plurality of object-oriented instructions, each object-oriented instruction comprises an operation code field and a plurality of operand fields, the operation code field represents an instruction type of the object-oriented instruction, the field length of the operation code field is 1 byte, the operand fields represent instruction operation contents of the object-oriented instruction, and the field length of the operand fields is 2 bytes;
and sending the object-oriented instruction set to the intelligent card equipment so that the intelligent card equipment carries out service processing according to the object-oriented instruction set.
8. The traffic processing method according to claim 7, wherein the operand field includes at least one of:
a class identifier;
a domain identifier;
a method identifier.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the service processing method according to any of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium storing computer-executable instructions for performing the business process method of any one of claims 1 to 8.
CN202211737778.1A 2022-12-30 2022-12-30 Service processing method, electronic device and computer readable storage medium Pending CN115904546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211737778.1A CN115904546A (en) 2022-12-30 2022-12-30 Service processing method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211737778.1A CN115904546A (en) 2022-12-30 2022-12-30 Service processing method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115904546A true CN115904546A (en) 2023-04-04

Family

ID=86495621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211737778.1A Pending CN115904546A (en) 2022-12-30 2022-12-30 Service processing method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115904546A (en)

Similar Documents

Publication Publication Date Title
CN110297689B (en) Intelligent contract execution method, device, equipment and medium
WO2020000720A1 (en) Server, packet processing method, program, and computer-readable storage medium
CN111274045A (en) Multi-platform docking method and device, computer equipment and readable storage medium
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN109146095A (en) The treating method and apparatus of multiservice system problem
CN111078279B (en) Method, device, equipment and storage medium for processing byte code file
CN106033551A (en) Data parsing method, apparatus and system thereof
CN111240772A (en) Data processing method and device based on block chain and storage medium
CN111383106A (en) Credit processing method, device, equipment and system
CN112529711B (en) Transaction processing method and device based on block chain virtual machine multiplexing
EP2793201A1 (en) Safety information transfer system, device and method based on extended parameter set
CN113641354A (en) Service data processing method and device, electronic equipment and storage medium
CN111324645B (en) Block chain data processing method and device
CN115904546A (en) Service processing method, electronic device and computer readable storage medium
CN112286968A (en) Service identification method, equipment, medium and electronic equipment
CN113010115B (en) Data processing method in block chain node and related equipment
CN114942781A (en) Data format adaptation method and device for data reading
CN115168205A (en) Automatic testing method and device
CN112527460A (en) Method and system for controlling consistency of data state of bottom assets of block chain
CN109460230B (en) Method and system for multiplexing transmission value and service logic between pages
CN115878254A (en) Memory allocation method, memory allocation device, computer equipment, storage medium and program product
CN116841564B (en) Data processing method, device, equipment and computer readable storage medium
JP2002279371A (en) Application start control system of ic card
CN111949683A (en) Bill generation method and device, electronic equipment and readable storage medium
CN112199209A (en) Terminal data parallel sequence processing method, system and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination