A personalized hairpin method based on dynamic library, storage medium and system

By encapsulating card issuance interfaces, parsing, encryption, and device-related methods in a dynamic library, the problem of high workload in smart card personalization development is solved, enabling rapid and low-threshold card personalization and reducing maintenance and development difficulties.

CN115438052BActive Publication Date: 2026-06-02BEIJING WATCH DATA SYSTEM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING WATCH DATA SYSTEM CO LTD
Filing Date
2022-08-01
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, dynamic libraries need to be written by professional developers during the smart card personalization process, resulting in a large workload. Furthermore, different dynamic libraries need to be generated for each type of card, which increases the difficulty of development and maintenance.

Method used

By encapsulating card issuance interfaces, personalized file parsing, encryption methods, decryption algorithms, and device-related methods in a dynamic library, a personalized card issuance method and system based on a dynamic library is provided, supporting rapid personalized development of various smart card products.

Benefits of technology

It reduces the technical requirements for personalization personnel, decreases the maintenance workload of dynamic libraries, improves development efficiency, enables rapid response to time-sensitive projects, and reduces the need to understand device and encryption machine access methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438052B_ABST
    Figure CN115438052B_ABST
Patent Text Reader

Abstract

This invention relates to a personalized card issuance method based on a dynamic library, comprising the following steps: obtaining formatted personalized data through a card issuance interface encapsulated by the dynamic library; obtaining and parsing a local personalized file, and integrating the personalized file with the personalized data; generating encryption machine instructions by calling corresponding encryption methods to obtain keys; obtaining encryption and decryption results by calling decryption algorithms, and generating card writing instructions based on the encryption and decryption results; and sending the card writing instructions to the card issuance device by calling corresponding device-related methods. This invention also provides a storage medium and a personalized card issuance system based on a dynamic library. Using the personalized card issuance method, storage medium, and system based on a dynamic library described in this invention reduces the requirements for personalization personnel, speeds up programming, reduces the maintenance workload of the dynamic library, and lowers the development difficulty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart card technology, specifically relating to a personalized card issuance method, storage medium, and system based on a dynamic library. Background Technology

[0002] In the process of card personalization, in addition to establishing the card structure, it also involves writing personalized data and writing a personalized key based on the data. Because personalized data types are diverse, a dedicated data processing system is typically used to process the data into a fixed format.

[0003] Current technology involves the card-issuing software on a PC acquiring formatted personalized data, then passing the data to a dynamic library (DLL) via a dynamic library interface. The DLL processes the personalized data, generates an issuance command, and sends it to the card. The DLL is generated in the development environment, and different smart card products require different DLLs.

[0004] However, dynamic libraries are written and generated in a professional development environment, which requires people with professional development skills to write them. This places high demands on personalization personnel. Furthermore, since the content written to the personalized cards varies greatly, a dynamic library must be generated for each type of card, which increases the workload of development. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a personalized card issuance method, storage medium, and system based on dynamic libraries, which supports rapid personalization development of various smart card products using a dynamic library approach.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a personalized card issuance method based on a dynamic library, comprising the following steps: obtaining formatted personalized data through the card issuance interface encapsulated by the dynamic library; obtaining and parsing a local personalized file, and integrating the personalized file with the personalized data; calling the corresponding encryption methods to generate encryption machine instructions and obtaining the key; calling the decryption algorithm to obtain the encryption and decryption results, and forming a card writing instruction based on the encryption and decryption results; and calling the corresponding device-related methods to send the card writing instruction to the card issuance device.

[0007] Furthermore, the personalized file includes card structure establishment, card key loading, and card data loading.

[0008] Furthermore, a personalized parsing method is encapsulated within the dynamic library to parse personalized files.

[0009] Furthermore, the dynamic library encapsulates multiple encryption methods to correspond to encryption machines of different brands and different models of the same brand.

[0010] Furthermore, the encryption instructions include connecting to the encryption machine, disconnecting from the encryption machine, sending and receiving encryption machine instructions, distributing keys, and encryption / decryption.

[0011] Furthermore, the decryption algorithm includes DES / 3DES encryption and decryption, SM4 encryption and decryption, MAC calculation, SHA algorithm, and MD5.

[0012] Furthermore, the device-related methods respectively support serial port, USB port and Ethernet port communication.

[0013] Furthermore, the instructions generated by the device-related methods include device connection, device disconnection, sending instructions, and receiving instructions.

[0014] The present invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the personalized card issuance method based on dynamic libraries at runtime.

[0015] This invention also provides a personalized card issuing system based on a dynamic library, comprising: an interface module for externally encapsulating a card issuing interface to obtain formatted personalized data; a parsing module for parsing personalized files to integrate personalized files and personalized data; an encryption module for encapsulating encryption methods to generate encryption machine instructions and obtain keys by calling corresponding encryption methods; a decryption module for encapsulating decryption methods to obtain encryption and decryption results by calling decryption algorithms and generating card writing instructions based on the encryption and decryption results; and a device-related module for encapsulating device-related methods to send card writing instructions to the card issuing device by calling corresponding device-related methods.

[0016] The advantages of this invention are: when personalizing, you only need to write the personalization file according to the personalization writing rules and the personalization data specifications. You do not need to write programs in the development environment. Therefore, you only need to understand the personalization process to complete the writing of the personalization file. It is quick to learn and greatly reduces the requirements for personalization personnel.

[0017] To address the differences in personalized content for each card, it is no longer necessary to generate a new dynamic library for each type of card. Instead, the same dynamic library can be used to load different personalized files.

[0018] It can be written quickly, which is sufficient for projects with tight deadlines.

[0019] Since there is only one version of the dynamic library, it is sufficient to ensure that the dynamic library can be used stably. There is no need to maintain many versions of the dynamic library, which greatly reduces the maintenance workload of the dynamic library.

[0020] When the personalization requirements of a smart card product change, the changes may be minor. In such cases, only the personalization file needs to be modified to address the changes, which greatly reduces the maintenance workload of the dynamic library.

[0021] Because the dynamic library encapsulates access to different card-issuing devices, developers of personalized files do not need to know the actual access methods of the devices, which greatly reduces the development difficulty.

[0022] Because the dynamic library encapsulates access to different encryption machines, personnel who personalize files do not need to understand the access methods and commands of the encryption machines, which greatly reduces the development difficulty.

[0023] Because the cryptographic algorithms are encapsulated in the dynamic library, developers do not need to understand the algorithm process, which greatly reduces the difficulty of development. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the steps of a personalized card issuance method based on a dynamic library according to the present invention.

[0025] Figure 2 This is a schematic diagram of a module for a personalized card issuance method based on a dynamic library according to the present invention. Detailed Implementation

[0026] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.

[0027] like Figure 1-2 As shown, the present invention provides a personalized card issuance method based on dynamic libraries, which includes the following steps:

[0028] S1 obtains formatted personalized data through the card issuance interface encapsulated by the dynamic library;

[0029] Specifically, due to the large variety of personalized data types, it is necessary to process the data into a fixed format. This can be achieved through a data processing system, which processes the raw personalized data into a uniform format, such as data separated by vertical lines. After processing the formatted personalized data, the card-issuing interface encapsulated by the dynamic library is called, passing the data as parameters to the dynamic library.

[0030] S2, retrieves and parses local personalized files, and integrates the personalized files with personalized data;

[0031] Specifically, after acquiring personalized data, a local personalized file is created and then integrated with the personalized data.

[0032] It should be noted that personalized files require dynamic libraries for parsing, so the rules for writing personalized files must be agreed upon, including: variable definition, variable assignment, and variable usage; usage methods for individual data items in personalized data; function definition, parameter input methods, parameter output methods, and return value assignment; device shutdown, startup, and command sending methods; encryption machine connection, disconnection, encryption machine type definition, and encryption machine command sending and receiving methods; common calculation types, data, keys, and calculation results definitions; APDU command definition, correct command response codes, and command return value retrieval; and other string manipulation techniques such as string truncation and comparison. Personalization developers write personalized files according to the card production requirements and the personalized file writing rules.

[0033] Furthermore, the personalized files include card structure creation, card key loading, and card data loading.

[0034] Furthermore, a personalized parsing method is encapsulated within the dynamic library to parse personalized files.

[0035] It's understandable that dynamic libraries can encapsulate various personalized parsing methods. After writing a local personalized file, the corresponding personalized parsing method can be directly called to parse the file, thus avoiding the need for developing the dynamic library itself. Under the premise of agreed-upon rules for writing personalized files, directly calling the corresponding personalized parsing method can improve development efficiency.

[0036] S3, respectively call the corresponding encryption method to generate encryption machine instructions and obtain the key;

[0037] Specifically, after parsing the personalized file and integrating it with the personalized data, the encryption method encapsulated in the dynamic library is called to generate encryption instructions, thereby obtaining the key.

[0038] Furthermore, the dynamic library encapsulates multiple encryption methods to correspond to different brands and different models of encryption machines from the same brand. For example, it includes encryption methods for models such as Jiangnan Keyou, Gemeng, Weishitong, and Geer encryption machines.

[0039] Furthermore, encryption instructions include connecting and disconnecting the encryption machine, sending and receiving encryption machine instructions, key distribution, encryption and decryption, etc.

[0040] By encapsulating multiple encryption methods within a dynamic library, the corresponding encryption method can be called for different encryption machines, thus avoiding the need to develop a dynamic library every time a new encryption machine model is used.

[0041] S4, call the decryption algorithm to obtain the encryption and decryption results, and generate a write card instruction based on the encryption and decryption results;

[0042] Specifically, the decryption algorithm is encapsulated in a dynamic library. By calling the decryption algorithm, the encryption and decryption results are obtained, thereby forming the card writing command.

[0043] Furthermore, the decryption algorithms include DES / 3DES encryption and decryption, SM4 encryption and decryption, MAC calculation, SHA algorithm, MD5, etc.

[0044] S5, call the corresponding device-related method to send the card writing command to the card issuing device;

[0045] Specifically, after the card writing instruction is generated, the relevant methods of the corresponding card issuing device are called to send the card writing instruction to the card issuing device. The card issuing device then sends the instruction to the card, thereby completing the card issuance.

[0046] It's understandable that card issuing devices come in various models, such as large and small devices that support simultaneous card issuance from multiple card slots, with each slot issuing one card at a time; and desktop card issuing devices that support card issuance from a single port. Therefore, different device-related methods are encapsulated in the dynamic library according to different card issuing device models, so that different device-related methods are called according to different types of card issuing devices, thus avoiding the need for dynamic library development.

[0047] Furthermore, the device-related methods support serial port, USB port, and Ethernet port communication respectively.

[0048] Furthermore, the instructions generated by the equipment-related methods include equipment connection, equipment disconnection, sending instructions, receiving instructions, etc.

[0049] In this embodiment, by encapsulating external interface methods, humanized parsing methods, encryption methods, decryption methods, and device-related methods within the dynamic library, when adapting to different card models, only the methods need to be called, without the need to develop the dynamic library.

[0050] The present invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the above-described method steps during runtime. The storage medium may include, for example, a floppy disk, optical disk, DVD, hard disk, flash memory, USB flash drive, CF card, SD card, MMC card, SM card, Memory Stick, XD card, etc.

[0051] The computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computer devices, servers or other network devices, etc.) to execute all or part of the steps of the method of the present invention.

[0052] This invention also provides a personalized card issuing system based on dynamic libraries, comprising:

[0053] The interface module is used for the externally encapsulated card issuing interface to obtain formatted personalized data;

[0054] The parsing module is used to parse personalized files in order to integrate personalized files with personalized data;

[0055] The encryption module is used to encapsulate encryption methods so that the corresponding encryption methods can be called to generate encryption machine instructions and obtain keys.

[0056] The decryption module encapsulates the decryption method to call the decryption algorithm to obtain the encryption and decryption results, and generates a write instruction based on the encryption and decryption results;

[0057] The device-related module is used to encapsulate device-related methods to enable the invocation of corresponding device-related methods and send the card writing command to the card issuing device.

[0058] Furthermore, a personalized card issuance system based on a dynamic library also includes a data processing module for processing the original personalized data into personalized data in a unified format.

[0059] As can be seen from the above embodiments, when personalizing, the present invention only requires writing a personalization file according to the personalization writing rules and the personalization data specifications. There is no need to write programs in the development environment. Therefore, only those who understand the personalization process are required to complete the writing of personalization files. It is quick to learn and greatly reduces the requirements for personalization personnel.

[0060] To address the differences in personalized content for each card, it is no longer necessary to generate a new dynamic library for each type of card. Instead, the same dynamic library can be used to load different personalized files.

[0061] It can be written quickly, which is sufficient for projects with tight deadlines.

[0062] Since there is only one version of the dynamic library, it is sufficient to ensure that the dynamic library can be used stably. There is no need to maintain many versions of the dynamic library, which greatly reduces the maintenance workload of the dynamic library.

[0063] When the personalization requirements of a smart card product change, the changes may be minor. In such cases, only the personalization file needs to be modified to address the changes, which greatly reduces the maintenance workload of the dynamic library.

[0064] Because the dynamic library encapsulates access to different card-issuing devices, developers of personalized files do not need to know the actual access methods of the devices, which greatly reduces the development difficulty.

[0065] Because the dynamic library encapsulates access to different encryption machines, personnel who personalize files do not need to understand the access methods and commands of the encryption machines, which greatly reduces the development difficulty.

[0066] Because the cryptographic algorithms are encapsulated in the dynamic library, developers do not need to understand the algorithm process, which greatly reduces the difficulty of development.

[0067] The methods and systems described in this invention are not limited to the embodiments described in the specific implementation. Other implementation methods derived by those skilled in the art based on the technical solutions of this invention also fall within the scope of technical innovation of this invention.

Claims

1. A method of personalizing hair clips based on dynamic libraries, characterized by, include: Formatted personalized data is obtained through the card issuance interface encapsulated by the dynamic library. Obtain a local personalized file, parse the local personalized file using the personalized parsing method encapsulated in the dynamic library, and integrate the personalized file with personalized data; The encryption methods encapsulated in the dynamic library are called to generate encryption machine instructions and obtain keys. The multiple encryption methods correspond to encryption machines of different brands and different models of the same brand. The decryption algorithm is invoked to obtain the encryption and decryption results, and a write instruction is generated based on the encryption and decryption results; The corresponding device-related methods encapsulated in the dynamic library are invoked to send the card writing command to the card issuing device.

2. The personalized card issuance method based on dynamic libraries as described in claim 1, characterized in that: The personalized file includes card structure creation, card key loading, and card data loading.

3. The personalized card issuance method based on dynamic libraries as described in claim 1, characterized in that: The encryption instructions include connecting to the encryption machine, disconnecting from the encryption machine, sending and receiving encryption machine instructions, key distribution, and encryption / decryption.

4. The method of claim 1, wherein the dynamic library is a shared library. , The decryption algorithms include DES / 3DES encryption and decryption, SM4 encryption and decryption, MAC calculation, SHA algorithm, and MD5.

5. The personalized card issuance method based on dynamic libraries as described in claim 1, characterized in that... : The device-related methods respectively support serial port, USB port and Ethernet port communication.

6. The personalized card issuance method based on dynamic libraries as described in claim 1, characterized in that... : The instructions generated by the device-related methods include device connection, device disconnection, sending instructions, and receiving instructions.

7. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the personalized card issuance method based on a dynamic library as described in any one of claims 1-6 when it is run.

8. A personalized card issuance system based on dynamic libraries, characterized in that, include: The interface module is used for the externally encapsulated card issuing interface to obtain formatted personalized data; The parsing module is used to obtain local personalized files, parse the local personalized files using the personalized parsing method encapsulated in the dynamic library, and integrate the personalized files with personalized data. The encryption module is used to call multiple encryption methods encapsulated in the dynamic library to generate encryption machine instructions and obtain keys, wherein the multiple encryption methods correspond to encryption machines of different brands and different models of the same brand. The decryption module encapsulates the decryption method to call the decryption algorithm to obtain the encryption and decryption results, and generates a write instruction based on the encryption and decryption results; The device-related module is used to call the corresponding device-related methods encapsulated in the dynamic library to send the card writing command to the card issuing device.