Communication card and electronic certificate interaction method and system
Patent Information
- Application Number
- CN202410945188.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-07-15
AI Technical Summary
[0028] This invention provides a method and system for interaction between a communication card and an electronic certificate, applicable to electronic certificates. The electronic certificate includes an SDK, comprising: the SDK receiving APDU instructions sent by an electronic certificate management platform; the SDK sending the APDU instructions to the communication card, enabling the communication card to perform operations according to the APDU instructions and return execution results and response data to the SDK; and the SDK transparently transmitting the received execution results and response data from the communication card to the electronic certificate management platform. The electronic certificate does not require its own self-developed card-machine channel; instead, the SDK is integrated into the electronic certificate, and card-machine instruction interaction is achieved through the SDK and the communication card. In some embodiments, this invention also implements a real-time data reporting function, increasing the security of data transmission.
Smart Images

Figure CN118898060B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method and system for the interaction of communication cards and electronic certificates. Background Technology
[0002] Electronic ID cards can be electronic student ID cards, senior citizen ID cards, or ID cards for the blind, etc. Taking electronic student ID cards as an example, an electronic student ID card is based on a regular student ID card and has a high-tech chip installed. This chip can store the student's personal information and can be used on campus, such as swiping to enter the campus and library. It plays a crucial role in ensuring student safety, strengthening home-school cooperation, and facilitating students' reasonable use of electronic payments. With the popularization of electronic payments, electronic ID cards that support electronic payment functions have also become a necessity. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method and system for interaction between a communication card and an electronic certificate. The electronic certificate does not require the development of its own card-machine interface; instead, an SDK is integrated into the electronic certificate, and the card-machine interface is used for instruction interaction with the communication card via the SDK. In some embodiments, this invention also implements a real-time data reporting function, increasing the security of data transmission.
[0004] In a first aspect, embodiments of the present invention provide an interaction method between a communication card and an electronic certificate, applied to an electronic certificate, wherein the electronic certificate includes an SDK, and the method includes:
[0005] The SDK receives APDU commands sent by the electronic certificate management platform;
[0006] The SDK sends the APDU instruction to the communication card, so that the communication card performs the operation according to the APDU instruction and returns the execution result and response data to the SDK;
[0007] The SDK transmits the execution results and response data received from the communication card to the electronic certificate management platform.
[0008] Furthermore, the electronic certificate also includes a main control chip. Before the SDK receives the APDU instruction sent by the electronic certificate management platform, the method further includes:
[0009] The electronic certificate receiving service request;
[0010] The main control chip calls the SDK to send the service request to the electronic certificate management platform, so that the electronic certificate management platform can generate the APDU instruction according to the service request.
[0011] Furthermore, the communication card is equipped with a card application, and the method further includes:
[0012] When the communication card receives the departure signal sent by the electronic card, the communication card records the operations performed during the entry process before departure using the application's identifier and stores them in the communication card's random access memory.
[0013] Furthermore, the SDK sends the APDU instructions to the communication card, so that the communication card performs an operation according to the APDU instructions and returns the execution result and response data to the SDK, including:
[0014] The main control chip in the electronic certificate calls the card swipe information reporting interface of the SDK to send the APDU instruction to the card application through the SDK. The card application uses the record information stored in the random access memory as the response data of the APDU instruction and returns the response data of the APDU instruction to the SDK.
[0015] Furthermore, after the communication card returns the response data of the APDU command to the SDK, the method further includes:
[0016] The SDK sends the response data of the APDU command to the electronic certificate management platform;
[0017] The SDK receives the response result sent by the electronic certificate management platform and sends the response result to the card application, wherein the response result is used to indicate the electronic certificate management platform's reception result of the response data.
[0018] Furthermore, the method also includes:
[0019] After completing all group APDU instructions for the current service request, the SDK receives a notification from the electronic certificate management platform that the current service request is complete, and closes the current logical channel between the communication card and the SDK.
[0020] Furthermore, the method also includes:
[0021] When the SDK receives the reporting request of the electronic certificate, the SDK will actively report the card swipe data.
[0022] Secondly, embodiments of the present invention provide an interaction system between a communication card and an electronic certificate, applied to an electronic certificate, wherein the electronic certificate includes an SDK, and the system includes a first receiving module, a sending module, and a second receiving module:
[0023] The first receiving module is used for the SDK to receive APDU instructions sent by the electronic certificate management platform;
[0024] The sending module is used by the SDK to send the APDU instruction to the communication card, so that the communication card performs an operation according to the APDU instruction and returns the execution result and response data to the SDK;
[0025] The second receiving module is used by the SDK to transmit the execution result and response data received from the communication card to the electronic certificate management platform.
[0026] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described above.
[0027] Fourthly, embodiments of the present invention provide a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the method described above.
[0028] This invention provides a method and system for interaction between a communication card and an electronic certificate, applicable to electronic certificates. The electronic certificate includes an SDK, comprising: the SDK receiving APDU instructions sent by an electronic certificate management platform; the SDK sending the APDU instructions to the communication card, enabling the communication card to perform operations according to the APDU instructions and return execution results and response data to the SDK; and the SDK transparently transmitting the received execution results and response data from the communication card to the electronic certificate management platform. The electronic certificate does not require its own self-developed card-machine channel; instead, the SDK is integrated into the electronic certificate, and card-machine instruction interaction is achieved through the SDK and the communication card. In some embodiments, this invention also implements a real-time data reporting function, increasing the security of data transmission.
[0029] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0031] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0032] Figure 1 This is a flowchart of the interaction method between a communication card and an electronic certificate provided in Embodiment 1 of the present invention;
[0033] Figure 2 This is a signaling diagram of the interaction method between the communication card and the electronic certificate provided in Embodiment 2 of the present invention;
[0034] Figure 3 This is a schematic diagram of the interaction system between the communication card and the electronic certificate provided in Embodiment 3 of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] The inventors of this application noticed during their research that after obtaining APDU instructions from an electronic certificate, it is impossible to directly interact with a communication card (such as a SIM card) based on the card-to-machine interaction method.
[0037] To facilitate understanding of this embodiment, the embodiments of the present invention will be described in detail below.
[0038] Example 1:
[0039] Figure 1 This is a flowchart of the interaction method between a communication card and an electronic certificate provided in Embodiment 1 of the present invention.
[0040] Reference Figure 1 This method, applied to electronic certificates, which include an SDK, comprises the following steps:
[0041] Step S101: The SDK receives the APDU instruction sent by the electronic certificate management platform;
[0042] In step S102, the SDK sends the APDU instruction to the communication card, so that the communication card performs the operation according to the APDU instruction and returns the execution result and response data to the SDK;
[0043] In step S103, the SDK transmits the execution results and response data received from the communication card to the electronic certificate management platform.
[0044] Most electronic student ID cards currently on the market do not have the function of directly interacting with the communication card in the device via APDU commands. Device manufacturers need to consider using a communication card channel chip or developing a custom communication module to solve this problem. The former requires additional hardware investment, while the latter requires more R&D investment, including in-depth development and debugging of communication protocols and hardware.
[0045] In this application, the electronic certificate includes an SDK. The SDK receives APDU commands sent by the electronic certificate management platform and sends the APDU commands to the communication card. After receiving the APDU commands, the communication card executes the operation according to the APDU commands and returns the execution result and response data to the SDK. After receiving the execution result and response data sent by the communication card, the SDK transparently transmits the execution result and response data to the electronic certificate management platform. The electronic certificate does not require the development of its own machine-card channel; instead, the SDK is integrated into the electronic certificate, enabling machine-card command interaction with the communication card. In some embodiments, this invention implements real-time data reporting and increases the security of data transmission.
[0046] Furthermore, the electronic certificate also includes a main control chip. Before the SDK receives the APDU instructions sent by the electronic certificate management platform, the method further includes the following steps:
[0047] Step S201: Electronic certificate receives service request;
[0048] In step S202, the main control chip calls the SDK to send the business request to the electronic certificate management platform, so that the electronic certificate management platform can generate APDU instructions based on the business request.
[0049] Specifically, the above process applies to the application scenario of loading a public transport application into a communication card, specifically: the electronic card receives a service request; the main control chip calls the SDK to send the service request to the electronic card management platform; the electronic card management platform generates multiple sets of APDU instructions based on the service request, and sends the first set of APDU instructions to the SDK via data stream; the SDK sends the APDU instructions to the communication card.
[0050] The communication card executes operations according to APDU instructions and returns the execution results and response data to the SDK; the SDK sends the response data received from the communication card to the electronic certificate management platform; the electronic certificate management platform generates the next set of APDU instructions based on the response data and then sends it to the SDK, which then sends the APDU instructions to the communication card; the communication card executes the APDU instructions again until the service request to load the public transportation application onto the communication card is completed.
[0051] In some embodiments, the above process can also be used for card swipe data reporting or other application scenarios. Accordingly, the business request can also be card swipe data reporting or other business requests. Integrating the SDK into the electronic certificate and enabling command interaction between the SDK and the communication card achieves real-time data reporting or other functions, while also increasing the security of data transmission.
[0052] Furthermore, the communication card has a card application set up, and the method also includes the following steps:
[0053] Step S301: After the communication card receives the departure signal sent by the electronic card, the communication card records the operations performed during the entry process before departure using the application's identifier and stores them in the communication card's random access memory.
[0054] Furthermore, step S102 includes the following steps:
[0055] The main control chip in the electronic certificate calls the card swipe information reporting interface of the SDK to send APDU commands to the card application through the SDK. The card application uses the record information stored in the random access memory as the response data of the APDU command and returns the response data of the APDU command to the SDK.
[0056] In this step, the card swipe information reporting interface is an interface provided by the SDK to the main control chip for use, and the SDK directly sends APDU commands to the communication card.
[0057] Furthermore, after the communication card returns the response data of the APDU command to the SDK, the method also includes the following steps:
[0058] Step S401: The SDK sends the response data of the APDU instruction to the electronic certificate management platform;
[0059] In step S402, the SDK receives the response result sent by the electronic certificate management platform and sends the response result to the card application. The response result is used to indicate the electronic certificate management platform's receipt result of the response data.
[0060] Specifically, the above process applies to application scenarios involving card swipe data reporting. When the communication card receives the departure signal sent by the SDK, it records the operations performed during the entry process before departure using the application's identifier and stores them in random access memory (RAM). For example, if the communication card selects application A after entering the field, application A's AID will be recorded, and the card swipe record will be stored in RAM. The card swipe reporting application will retrieve the card swipe record from the communication card every N statuses (N≥1) via the getrecord interface. Simultaneously, the communication card will clear the record and wait for the next record to be generated.
[0061] The specific implementation process is as follows: When the communication card receives the departure signal sent by the electronic card, the communication card records the operations performed during the entry process before departure using the application's identifier and stores them in the communication card's random access memory; where the identifier includes AID and UID;
[0062] The main control chip in the electronic certificate calls the card swiping information reporting interface of the SDK to send APDU instructions to the card application through the SDK. After receiving the APDU instructions, the card application uses the record information stored in the random access memory as the response data of the APDU instructions and returns it to the SDK.
[0063] The SDK sends the response data of the APDU instruction to the electronic certificate management platform. The SDK receives the response result sent by the electronic certificate management platform and sends the response result to the card application in the form of APDU.
[0064] This application enables electronic certificates to achieve APDU command interaction with communication cards without the need for developing their own machine-card channel capabilities. Instead, it integrates an RTOS-SDK with the ability to interact with communication cards, thereby solving the problem of the inability of electronic certificates to interact with communication cards via machine-card APDU commands.
[0065] Furthermore, the method also includes the following steps:
[0066] Step S501: When the SDK receives a report request for the electronic certificate, the SDK will actively report the card swipe data.
[0067] Furthermore, the method also includes the following steps:
[0068] Step S601: After completing all group APDU instructions for the current service request, the SDK receives the current service request completion notification sent by the electronic certificate management platform and closes the current logical channel between the communication card and the SDK.
[0069] Specifically, the current business request can be a business request in the application scenario where the public transportation application loads into the communication card, or a business request in the application scenario where card swipe data is reported.
[0070] The current logical channel can be a logical channel used to process the current business request.
[0071] Among them, multiple sets of APDU instructions means that one service request corresponds to n sets of APDU instructions, and each set of APDU instructions has m APDU instructions, where n and m are both ≥ 1.
[0072] Example 2:
[0073] Figure 2This is a signaling diagram of the interaction method between the communication card and the electronic certificate provided in Embodiment 2 of the present invention.
[0074] Reference Figure 2 The SDK, as a lib library, is linked to the main control chip of the electronic certificate. The method includes the following steps:
[0075] Step S701: Electronic certificate receives service request;
[0076] Step S702: The main control chip calls the SDK to send the service request to the electronic certificate management platform;
[0077] Step S703: The electronic certificate management platform generates APDU (Application Protocol Data Unit) instructions based on the business request, and divides the APDU instructions into m APDU instructions and sends them to the SDK in sequence (the next set of instructions will only be sent if each set of instructions returns correctly; otherwise, the process will fail).
[0078] Step S704: The SDK sends the APDU instruction to the communication card through the current logical channel;
[0079] In step S705, the communication card executes the operation according to the APDU instruction and returns the execution result and response data to the SDK through the current logical channel;
[0080] In step S706, the SDK transmits the execution results and response data received from the communication card to the electronic certificate management platform.
[0081] In this application, the SDK version is implemented based on the standard C library functions of the RTOS system, which can adapt to various RTOS chip platforms and differences in underlying communication, ensuring standard universality. Therefore, different manufacturers can integrate the same SDK version to meet their business needs.
[0082] This application enables electronic certificates to achieve APDU command interaction with communication cards without the need for developing their own machine-card channel capabilities. Instead, it integrates an RTOS-SDK with the ability to interact with communication cards, thereby solving the problem of the inability of electronic certificates to interact with communication cards via machine-card APDU commands.
[0083] Example 3:
[0084] Figure 3 This is a schematic diagram of the interaction system between the communication card and the electronic certificate provided in Embodiment 3 of the present invention.
[0085] Reference Figure 3 This system is used for electronic certificates, which include an SDK. The system comprises a first receiving module, a sending module, and a second receiving module.
[0086] The first receiving module is used by the SDK to receive APDU instructions sent by the electronic certificate management platform;
[0087] The sending module is used by the SDK to send APDU instructions to the communication card, so that the communication card can perform operations according to the APDU instructions and return the execution results and response data to the SDK;
[0088] The second receiving module is used by the SDK to transmit the execution results and response data sent by the communication card to the electronic certificate management platform.
[0089] This invention provides a method and system for interaction between a communication card and an electronic certificate, applied to electronic certificates. The electronic certificate includes an SDK, comprising: the SDK receiving APDU instructions sent by an electronic certificate management platform; the SDK sending the APDU instructions to the communication card, enabling the communication card to perform operations according to the APDU instructions and return execution results and response data to the SDK; and the SDK transparently transmitting the received execution results and response data from the communication card to the electronic certificate management platform. The electronic certificate does not require its own self-developed card-machine channel; instead, the SDK is integrated into the electronic certificate, enabling card-machine instruction interaction with the communication card through the SDK. In some embodiments, real-time data reporting is implemented, increasing the security of data transmission.
[0090] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the interaction method between the communication card and the electronic certificate provided in the above embodiments.
[0091] This invention also provides a computer-readable medium having processor-executable non-volatile program code, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the communication card and electronic certificate interaction method described above.
[0092] The computer program product provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0093] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0094] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0095] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0096] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0097] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for interaction between a communication card and an electronic certificate, characterized in that, Applied to the electronic certificate, which includes an SDK, the method comprises: The SDK receives APDU commands sent by the electronic certificate management platform; The SDK sends the APDU instruction to the communication card, so that the communication card performs the operation according to the APDU instruction and returns the execution result and response data to the SDK; The SDK will transmit the execution result and response data received from the communication card to the electronic certificate management platform. The electronic certificate also includes a main control chip, and the SDK is linked to the main control chip of the electronic certificate as a lib library. Before the SDK receives APDU instructions sent by the electronic certificate management platform, the method further includes: The electronic certificate receiving service request; The main control chip calls the SDK to send the service request to the electronic certificate management platform, so that the electronic certificate management platform can generate the APDU instruction according to the service request and divide the APDU instruction into m APDU instructions and send them to the SDK in sequence. In the process of multiple sets of instruction interaction, each service request corresponds to n sets of APDU instructions, and each set of APDU instructions has m APDU instructions, where n and m are both ≥ 1.
2. The interaction method between the communication card and the electronic certificate according to claim 1, characterized in that, After the SDK receives the APDU instruction sent by the electronic certificate management platform, it includes: The SDK sends the APDU command to the communication card through the current logical channel; The communication card executes operations according to the APDU instructions and returns the execution results and response data to the SDK through the current logical channel; The SDK transmits the execution results and response data received from the communication card to the electronic certificate management platform.
3. The interaction method between the communication card and the electronic certificate according to claim 1 or 2, characterized in that, The communication card is equipped with a card application, and the method further includes: When the communication card receives the departure signal sent by the electronic card, the communication card records the operations performed during the entry process before departure using the application's identifier and stores them in the communication card's random access memory.
4. The interaction method between the communication card and the electronic certificate according to claim 3, characterized in that, The SDK sends the APDU instructions to the communication card, so that the communication card performs an operation according to the APDU instructions and returns the execution result and response data to the SDK, including: The main control chip in the electronic certificate calls the card swipe information reporting interface of the SDK to send the APDU instruction to the card application through the SDK. The card application uses the record information stored in the random access memory as the response data of the APDU instruction and returns the response data of the APDU instruction to the SDK.
5. The interaction method between the communication card and the electronic certificate according to claim 4, characterized in that, After the communication card returns the response data of the APDU instruction to the SDK, the method further includes: The SDK sends the response data of the APDU command to the electronic certificate management platform; The SDK receives the response result sent by the electronic certificate management platform and sends the response result to the card application, wherein the response result is used to indicate the electronic certificate management platform's reception result of the response data.
6. The method for interaction between a communication card and an electronic certificate according to claim 1 or 2, characterized in that, The next set of APDU instructions will only be issued if each set of APDU instructions returns correctly; the method also includes: After completing all group APDU instructions for the current service request, the SDK receives a notification from the electronic certificate management platform that the current service request is complete, and closes the current logical channel between the communication card and the SDK.
7. The method for interaction between a communication card and an electronic certificate according to claim 1 or 2, characterized in that, The method further includes: When the SDK receives the reporting request of the electronic certificate, the SDK will actively report the card swipe data.
8. An interactive system for communication cards and electronic certificates, characterized in that, The system implements the interaction method between the communication card and the electronic certificate as described in any one of claims 1 to 7, and is applied to the electronic certificate, wherein the electronic certificate is equipped with an SDK, and the system includes a first receiving module, a sending module, and a second receiving module. The first receiving module is used for the SDK to receive APDU instructions sent by the electronic certificate management platform; The sending module is used by the SDK to send the APDU instruction to the communication card, so that the communication card performs an operation according to the APDU instruction and returns the execution result and response data to the SDK; The second receiving module is used for the SDK to transmit the execution result and response data received from the communication card to the electronic certificate management platform; The electronic certificate also includes a main control chip, and the SDK is linked to the main control chip of the electronic certificate as a lib library.
9. The communication card and electronic certificate interaction system according to claim 8, characterized in that, After the SDK receives the APDU instruction sent by the electronic certificate management platform, it includes: The SDK sends the APDU command to the communication card through the current logical channel; The communication card executes operations according to the APDU instructions and returns the execution results and response data to the SDK through the current logical channel; The SDK transmits the execution results and response data received from the communication card to the electronic certificate management platform.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1 to 7.
11. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for multi-application management of intelligent cards
CN102521626A
Method and apparatus for utilizing card application in chip security domain, and application terminal
CN105743651A