[0037] Example 1:
[0038] This embodiment provides a processor, such as figure 1 As shown, a processing card 1 is included, which is used to provide an operating platform for a variety of application services 3, and a micro-control card 2 is also included, which is used to assist the application service 3 to access the processing card 1.
[0039] Among them, processing card 1 is a smart chip SC (Smart card), processing card 1 can run various smart applications, that is, application service 3 can run on processing card 1, processing card 1 can provide more secure application service 3 Operating platform. The micro control card 2 is a micro control chip integrated in the processor, and the micro control card 2 can provide a unified standard application programming interface API (Appl ication Programming Interface) for the application service 3 to access the processing card 1.
[0040] By setting the micro-control card 2 in the processor equipped with the processing card 1, it can be realized that the application service 3 can still be accessed and processed accurately, quickly, and easily without being equipped with professional and technical personnel who understand the processing card 1. Card 1, so that the operation of the application service 3 on the processing card 1 becomes simpler and faster, realizes its safe operation on the processing card 1, and further promotes the integration of different application services 3 to a large extent.
[0041] In this embodiment, the micro-control card 2 includes an instruction conversion unit 21 and a transmission unit 22, the instruction conversion unit 21 is connected to the transmission unit 22, and the transmission unit 22 is connected to the processing card 1. The instruction conversion unit 21 is used to access the service instruction of the application service 3 and determine whether the service instruction is an application protocol data instruction (ie APDU instruction, Application Protocol Data Unit); it is also used to convert a service instruction that is not an application protocol data instruction into an application Protocol data instructions, and transmit application protocol data instructions corresponding to the service instructions to the transmission unit 22. The transmitting unit 22 is used to transmit the application protocol data instruction to the processing card 1. The processing card 1 is used to execute service instructions according to application protocol data instructions.
[0042] Among them, because the processing card 1 can only recognize application protocol data instructions, when the service instruction of the application service 3 is not an application protocol data instruction, the instruction conversion unit 21 converts the service instruction into an application protocol data instruction, so that the application service 3 can It is easy to access the processing card 1, so that its service instructions can run on the processing card 1 more safely. Here, the instruction conversion unit 21 is equivalent to a software interface SW, which enables application services to quickly access the processing card 1.
[0043] It should be noted that the service instruction includes the communication method between the application service 3 and the processing card 1 and the implementation method of the application service 3 service instruction, that is, the instruction conversion unit 21 here provides a unified application for the application service 3 to access the processing card 1. Program programming interface API ((Application Programming Interface)), so that the application service 3 can be quickly connected to the processing card 1.
[0044] In this embodiment, the processing card 1 is also used to return processing result response data (ie, APDU response data) to the instruction conversion unit 21 through the transmission unit 22. The instruction conversion unit 21 is also used to receive the processing result data customized by the application service 3, and return the processing result data customized by the application service 3 to the application service 3 according to the processing result response data.
[0045] Among them, the processing result data customized by the application service 3 refers to the data that the application service 3 requires the processing card 1 to return after running its service instruction. After the processing card 1 runs the service instruction of the application service 3, the processing result response data returned to the instruction conversion unit 21 includes multiple, but the instruction conversion unit 21 only returns the required data according to the requirements of the application service 3. In addition, it should be noted that the instruction conversion unit 21 follows the customized communication protocol and data return protocol between the two in the process of returning the requested data to the application service 3.
[0046] The following examples illustrate the working principle and process of the instruction conversion unit 21 and the transmission unit 22 of the micro-control card 2 in the processor: if the application service 3 is an identity authentication service, the identity authentication service requires an identity authentication service to be run on the processing card 1; The identity authentication service sends an identity authentication instruction to the instruction conversion unit 21; after the instruction conversion unit 21 receives it, it first determines whether the identity authentication instruction is an APDU instruction. If not, the instruction conversion unit 21 converts the identity authentication instruction to an APDU instruction. Then the APDU instruction is transparently transmitted to the processing card 1 through its transmission unit 22; the processing card 1 receives the APDU instruction, runs the APDU instruction, and then returns the processing result response data of the identity authentication to the instruction conversion unit 21; at the same time, identity authentication The service also customizes the processing result response data to the instruction conversion unit 21. Therefore, after receiving the processing result response data, the instruction conversion unit 21 returns the result data to the identity authentication service in accordance with the customized agreement with the identity authentication service. .
[0047] In this embodiment, the micro control card 2 further includes a control unit 23, which is used to connect to the sensor element 4, and the control unit 23 is used to receive control instructions customized by the application service 3, and control the sensor element 4 to work according to the control instructions .
[0048] Among them, the control unit 23 is equivalent to the hardware interface HW of the micro control card 2. The control commands customized by the application service 3 include the communication protocol between the application service 3 and the control unit 23 and the control protocol for the application service 3 to control the sensor element 4. For example, based on the example of the identity authentication service above, when the identity authentication service receives the result data of the identity authentication, it sends a control instruction to control the sensor element 4 such as a display sensor to the control unit 23; the control unit 23 receives the control instruction Then, the display sensor is controlled accordingly to display the result data, such as displaying a picture or subtitle information after the authentication.
[0049] It should be noted that the sensor element 4 in this embodiment is the sensor element 4 on the device installed by the processor. The above example is only illustrative of the work of the sensor element 4, and the actual sensor element 4 is based on the specific implementation. For example, the sensor element 4 can also be an element that induces sound or an element that performs other operations after sensing.
[0050] Based on the foregoing structure of the processor in this embodiment, this embodiment also provides a processing method for the processor, including: figure 2 As shown,
[0051] Step S1: The micro control card assists the application service to access the processing card.
[0052] To achieve step S2: the processing card provides an operating platform for multiple application services.
[0053] Among them, step S1: the micro-control card assists the application service access processing card including: image 3 As shown,
[0054] Step S11: A service instruction for the micro control card to access the application service.
[0055] Step S12: Determine whether the service command is an application protocol data command. If yes, perform step S13: transmit the application protocol data instruction corresponding to the service instruction to the processing card. If not, perform step S14: convert the service instruction into an application protocol data instruction, and then transmit the application protocol data instruction corresponding to the service instruction to the processing card.
[0056] In this embodiment, the processing method of the processor further includes:
[0057] Step S3: The micro control card receives the processing result response data returned by the processing card.
[0058] Step S4: The micro control card receives the processing result data customized by the application service, and returns the processing result data customized by the application service to the application service according to the processing result response data.
[0059] In this embodiment, the processing method of the processor further includes:
[0060] Step S5: The micro control card receives the control instruction customized by the application service, and controls the sensor element to work according to the control instruction.