A non-contact storage card writing and quality inspection authentication method and system and a storage medium

CN122927331APending Publication Date: 2026-10-16GLOBAL CARD SYSTEMS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611096972.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]针对现有非接触式智能卡制卡系统中,纯唯一标识符身份绑定可靠性低、写卡与质检工序分离易被替换重放,以及状态管控易导致数据库与实体状态不一致的技术问题,提供一种非接触式存储卡写入与质检认证方法、系统及存储介质

Benefits of technology

[0007] As can be seen, by establishing a transmission chain containing associated values ​​between card writing and quality inspection actions, and by atomically updating the task status and authorization status in database transactions, card replacement between processes and replay of historical quality inspection records are prevented, ensuring the consistency between the backend database records and the frontend entity card status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927331A_ABST
    Figure CN122927331A_ABST
Patent Text Reader

Abstract

In view to the problems of low reliability of identity binding, easy to be replaced and replay in the existing card making system, the application discloses a kind of non-contact storage card write and quality inspection authentication method, system and storage medium. The method comprises: the background server generates card making task and distributes; card writing equipment generates structured card identity, writes data and generates write card proof containing abstract after back reading matching, and submits to the background server; the background server issues one-time quality inspection authorization embedded with associated value; quality inspection equipment atomically occupies authorization, re-reads storage card, and submits quality inspection proof in combination with associated value; the background server synchronously checks identity, state, version and associated value in database transaction, and updates state after verification. It can be seen that the application uses transaction atomic operation to ensure data consistency and process irreversibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of contactless smart card technology, and more specifically, to a contactless memory card writing and quality inspection authentication method, system, and storage medium. Background Technology

[0002] In the card issuance process of contactless smart cards, the back-end system typically generates card production tasks, the card writing device writes the business data into the card, and the quality inspection device verifies the writing result. Once the verification is passed, the card is put into use. Existing card production systems generally use the card's unique identifier as its identity. Card writing and quality inspection are two independent processes. Card writing only relies on the instruction return value to determine success, and quality inspection only verifies the plaintext business data. There is no binding relationship between the two.

[0003] Existing card manufacturing technologies that rely solely on unique card identifiers for identity binding have limitations. Because the unique identifiers of low-cost cards are easily tampered with or cloned, it's impossible to correlate physical cards with a single card writing task and the current version of data. Furthermore, the separation of card writing and quality inspection processes allows cards to be swapped between these stages, posing a risk of historical quality inspection records being resubmitted. Additionally, the system backend typically records card manufacturing progress with a single status bit, which can easily lead to data discrepancies between the database status and the actual physical card status during concurrent tasks or rework scenarios.

[0004] Therefore, how to provide a non-contact memory card writing and quality inspection certification method, system, and storage medium has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] To address the technical problems in existing contactless smart card manufacturing systems, such as low reliability of pure unique identifier identity binding, easy replacement and replay of card writing and quality inspection processes being separated, and inconsistencies between database and physical state caused by state control, this paper provides a contactless memory card writing and quality inspection authentication method, system, and storage medium.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A contactless memory card writing and quality inspection authentication method is provided, comprising the following steps: a backend server generates a card production task and distributes it to a card writing device; the card writing device reads the hardware identity information of the memory card to be written, generates a structured card identity, writes business data to the memory card, and generates a card writing certificate after readback matching, which is submitted to the backend server, wherein the card writing certificate includes a post-write readback digest; after verifying the card writing certificate, the backend server issues a quality inspection authorization based on the card writing certificate, the quality inspection authorization embeds the card writing certificate association value; the quality inspection device receives the quality inspection authorization and performs atomic occupancy, rereads the memory card to generate a quality inspection read digest, and generates a quality inspection certificate by combining the card writing certificate association value, which is submitted to the backend server; the backend server synchronously verifies the status of the card production task, the status of the quality inspection authorization, the structured card identity, the card writing certificate association value, and the quality inspection read digest in a database transaction, and synchronously updates the status of the card production task and the status of the quality inspection authorization after the verification is passed.

[0007] As can be seen, by establishing a transmission chain containing associated values ​​between card writing and quality inspection actions, and by atomically updating the task status and authorization status in database transactions, card replacement between processes and replay of historical quality inspection records are prevented, ensuring the consistency between the backend database records and the frontend entity card status.

[0008] Furthermore, the step of writing business data to the storage card also includes writing the card-bound authentication mark into the storage card's metadata block; the card-bound authentication mark is generated by combining the task card key with the task identifier truncation value, the digest value of the structured card identity, the digest of the data to be written, and the card writing version number through an encryption authentication algorithm and then truncating it.

[0009] As can be seen, by encrypting and solidifying elements such as tasks, identities, data, and versions into the card's independent metadata block, the reliance on the card's native encryption algorithm is reduced, and the application-level tagging achieves the physical binding of data validity and card entity.

[0010] Furthermore, when the quality inspection equipment rereads the memory card, it reads the card-bound authentication mark stored in the metadata block for local verification. If the local verification does not match, it refuses to generate a quality inspection certificate.

[0011] It is evident that allowing terminal quality inspection equipment to directly determine the legality of cards and intercept abnormal cards without requesting a response from the backend network satisfies the data verification response speed requirements of high-concurrency card production lines.

[0012] Furthermore, the database transactions employ an optimistic locking version number mechanism for concurrency control; the synchronization verification also includes checking whether the optimistic locking version number of the card production task matches. If they match, the optimistic locking version number is incremented when the status of the card production task is updated synchronously.

[0013] It is evident that introducing optimistic locking version control during database transaction state updates solves the problem of duplicate data overwriting caused by multi-device network retransmission or concurrent task retrieval, further ensuring the atomicity of state transitions.

[0014] Furthermore, the structured card identity is composed of a combination of the memory card's unique identifier, card type identifier, layout version, and issuance domain identifier.

[0015] As can be seen, the introduction of issuance business parameters such as card type and storage layout into the basic hardware identifier enables the system to distinguish cards that have the same unique identifier but differ in physical card type and issuance business.

[0016] Furthermore, the card writing certificate includes a task identifier, structured card identity, card writing version number, pre-write data digest, post-write read digest, card writing device identifier, card writing completion timestamp, card writing random number, and card writing device signature; the quality inspection certificate includes an authorization identifier, task identifier, reread card identity, card writing certificate associated value, quality inspection read digest, quality inspection device identifier, quality inspection completion timestamp, quality inspection random number, and quality inspection device signature.

[0017] It is evident that the use of a multi-dimensional data structure with timestamps, a random number anti-replay mechanism, and device signatures to generate certification documents provides an objective data benchmark for the backend server to judge the integrity and compliance of a single card writing and quality inspection operation at the front end.

[0018] Furthermore, if the quality inspection certificate submitted by the quality inspection equipment fails the verification of the backend server and rework is allowed, the backend server will set the card production task status to pending rework, revoke the one-time quality inspection authorization of the current version, and increment the card version number when performing rework rewriting.

[0019] As can be seen, by establishing a version number increment rule triggered by rework, verification credentials containing old version numbers will automatically become invalid in subsequent comparisons, eliminating the need for additional maintenance and querying of the deregistration list in the background.

[0020] Furthermore, the task card key is temporarily generated by combining the device key with the task identifier truncated value, the digest value of the structured card identity, and the card writing version number through a key derivation function.

[0021] As can be seen, by using derived functions containing dynamic parameters of tasks and cards to generate temporary computation keys, the isolation of keys is achieved at the level of a single task and a single card.

[0022] This invention also provides a contactless memory card writing and quality inspection authentication system, comprising: a backend server configured to generate card production tasks and distribute them to card writing devices, verify card writing certificates, issue a one-time quality inspection authorization based on the card writing certificates, and update the status of the card production tasks and the status of the one-time quality inspection authorization after synchronously verifying relevant statuses and summaries in database transactions; a card writing device configured to read the hardware identity information of the memory card to be written, generate a structured card identity, write business data to the memory card, and generate a card writing certificate containing a post-write readback summary after readback matching, and submit it to the backend server; and a quality inspection device configured to receive a one-time quality inspection authorization and perform atomic occupancy, reread the memory card to generate a quality inspection read summary, and generate a quality inspection certificate by combining the card writing certificate association value embedded in the one-time quality inspection authorization, and submit it to the backend server.

[0023] It is evident that by configuring independent hardware entities for card writing and quality inspection within the system architecture, and linking them together through server authorization and status verification, a channel is constructed at the physical system level to prevent reverse engineering and data forgery.

[0024] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described contactless memory card writing and quality inspection authentication method.

[0025] It is evident that by encapsulating the state transition and encryption verification algorithm in computer-readable code, the authentication logic can be modularly deployed in various card issuance and management servers, making it feasible for industrial applications. Attached Figure Description

[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.

[0027] Figure 1 This is a diagram of the overall system architecture of the present invention.

[0028] Attached label: 1. Backend server; 2. Database; 3. Security module; 4. Card writing device; 5. Quality inspection equipment; 6. Radio frequency identification reader; 7. Memory card. Detailed Implementation

[0029] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the invention.

[0030] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.

[0031] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.

[0032] In all the examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0033] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0034] Combination Figure 1 As shown, the overall system architecture includes a backend server 1, a database 2, a security module 3, a card writing device 4, a quality inspection device 5, an RFID reader / writer 6, and a memory card 7. The backend server 1 handles task distribution, authorization, and auditing records, while the database 2 stores status data such as tasks, authorizations, versions, and logs. The card writing device 4 and the quality inspection device 5 utilize the RFID reader / writer 6 to perform data acquisition and read / write operations on the memory card 7. The security module 3 provides independent environmental support for key generation and derivation operations. In terms of identity binding logic, the system establishes a three-layer progressive binding relationship: a hardware identity layer, an in-card tagging layer, and a backend verification layer. The hardware identity layer collects the unique identifier of the memory card 7 and combines it with card type, layout version, and issuance domain parameters to create a structured card identity, recording the corresponding digest value on the backend server 1. The in-card tagging layer uses an encryption authentication algorithm to generate an in-card binding authentication tag, storing it in an independent data area of ​​the memory card 7 for local verification by the terminal device. The backend verification layer stores the full verification fields generated by the card writing operation on the backend server 1 as credentials for system authorization migration.

[0035] The task state machine flow throughout the card production lifecycle is as follows: Backend server 1 generates task instructions and business data with a globally unique identifier, and simultaneously assigns an initial card writing version number, changing the card production task status to "pending collection." Card writing device 4 initiates a request to backend server 1 through a conditional update mechanism, locks the task, and obtains execution rights. At this time, backend server 1 changes the card production task status to "card writing in progress"; simultaneously, it issues a task lease with an expiration time to card writing device 4 to prevent permanent task occupation due to device downtime. Card writing device 4 controls the RFID reader 6 to obtain the basic hardware parameters of the memory card 7, assembles the structured card identity, and calculates the corresponding digest value.

[0036] During data writing, the card writing device 4 stores the encrypted business data into the designated business sector or business data page. The memory card 7 contains physically isolated metadata blocks. The card writing device 4 writes dynamic metadata such as the task identifier truncation value, the card writing version number, and the card-bound authentication mark into these metadata blocks. Specifically, when generating the card-bound authentication mark, the card writing device 4 first uses a key derivation function to perform calculations using the device key, the task identifier truncation value, the digest value of the structured card identity, and the card writing version number to temporarily generate a task card key. Subsequently, the card writing device 4 uses this task card key, combined with the task identifier truncation value, the digest value of the structured card identity, the digest of the data to be written, and the card writing version number, to perform calculations and truncation using an encryption authentication algorithm, ultimately generating the card-bound authentication mark. For cards using the first type of card layout, dynamic metadata is only written to ordinary data blocks and not to the sector tail block containing access control bits. For cards using the second type of card layout, the card writing device 4 maintains a one-time programmable page blank during the card writing and rework stages. The isolated write mechanism prevents hardware failure due to irreversible storage area errors. After data is written, the card writing device 4 performs a readback operation on the written area and calculates the post-write readback digest. If the readback plaintext digest matches the pre-write digest, the card writing device 4 packages the task identifier, the structured card identity, the card writing version number, the pre-write data digest, the post-write readback digest, the card writing device identifier, the card writing completion timestamp, the card writing random number, and the card writing device signature to generate a card writing certificate, which is then uploaded to the backend server 1. After receiving and verifying the certificate, the backend server 1 changes the card production task status to pending quality inspection.

[0037] The quality inspection process proceeds to the following state nodes: After verifying a valid card write certificate, the backend server 1 issues a one-time quality inspection authorization based on the card write certificate, which includes an independent authorization identifier and an expiration time. The one-time quality inspection authorization data structure internally contains a digest value of the card write certificate as an association value. The quality inspection device 5 receives the one-time quality inspection authorization and atomically occupies it; that is, the backend server 1 synchronously changes the authorization status from unused to used in the database to prevent concurrent consumption of the same authorization. The quality inspection device 5 drives the RFID reader 6 to reread the memory card 7 to be inspected, extracts the card-bound authentication mark from the metadata block for local comparison, and blocks abnormal cards with verification mismatches. After local verification and matching, the quality inspection device 5 extracts information from the business area and metadata area to calculate a quality inspection read digest, and assembles it with the received card write certificate association value to form a quality inspection certificate. The complete quality inspection certificate includes: authorization identifier, task identifier, reread card identity, card write certificate association value, quality inspection read digest, quality inspection device identifier, quality inspection completion timestamp, quality inspection random number, and quality inspection device signature. The quality inspection equipment 5 transmits the generated quality inspection certificate to the backend server 1.

[0038] When performing atomic verification and status archiving, backend server 1 initiates a database transaction and compares the following conditions in parallel: the card production task status remains under quality inspection and has a matching optimistic lock version number; the first-stage quality inspection authorization status remains in use; the reread card identity matches the identity recorded during the card writing stage; the card writing version number matches; the embedded association value in the quality inspection certificate matches the association value inherited in the first-stage quality inspection authorization; and the quality inspection read digest matches the post-write readback digest. When all conditions are met, backend server 1 synchronously executes a condition update operation within the same database transaction, changing the card production task status to "quality inspection passed" and the first-stage quality inspection authorization to "used," while simultaneously incrementing the optimistic lock version number of the card production task to close the transaction.

[0039] For memory card 7 that passed quality inspection, the system puts it into a sealed state, configures read-only sectors for cards with the first type of card layout, and sets one-time programmable pages for cards with the second type of card layout. If any transaction verification condition is not met, the entire database transaction is rolled back. For card production tasks judged as failing quality inspection but meeting rework conditions, the backend server 1 revokes the one-time quality inspection authorization for the current version, returns the task status to pending rework, and increments the card production task's write version number. After the version number is incremented, the old version write certificate, the card-bound authentication mark, and authorization credentials become invalid in subsequent derived verifications. For memory card 7 that cannot be reworked, the system marks it as obsolete. When the obsolete card re-enters the system, the front-end device intercepts it through the local verification logic of the card-bound authentication mark. Furthermore, throughout the entire network interaction process, device requests carry idempotent request identifiers. The backend server 1 identifies and filters duplicate data submissions caused by network timeouts based on these request identifiers.

[0040] In summary, this invention provides a specific implementation scheme for a contactless memory card writing and quality inspection authentication method, system, and storage medium. Through three-layer identity binding, proof chain transmission, and synchronous database transaction updates, it prevents card swapping and record replay, and maintains the consistency of hardware and software status.

[0041] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A non-contact memory card writing and quality inspection authentication method, characterized in that, Includes the following steps: The backend server (1) generates card production tasks and distributes them to the card writing device (4); The card writing device (4) reads the hardware identity information of the memory card (7) to be written, generates a structured card identity, writes the business data into the memory card (7), and generates a card writing certificate after readback matching and submits it to the backend server (1). The card writing certificate includes a write readback digest. After verifying the card writing certificate, the backend server (1) issues a quality inspection authorization based on the card writing certificate, and the quality inspection authorization embeds the card writing certificate association value. The quality inspection equipment (5) receives the one-time quality inspection authorization and performs atomic occupancy, rereads the memory card (7) to generate a quality inspection read digest, and generates a quality inspection certificate by combining the write card certificate association value and submits it to the backend server (1). The backend server (1) synchronously verifies the status of the card production task, the status of the first quality inspection authorization, the structured card identity, the card writing proof association value, and the quality inspection reading digest in the database transaction. After the verification is passed, the status of the card production task and the status of the first quality inspection authorization are synchronously updated.

2. The non-contact memory card writing and quality inspection authentication method according to claim 1, characterized in that, The step of writing the business data into the storage card (7) also includes writing the authentication mark bound to the card into the metadata block of the storage card (7); The card-bound authentication mark is generated by combining the task card key with the task identifier truncated value, the digest value of the structured card identity, the digest of the data to be written, and the card writing version number through an encryption authentication algorithm and then truncating the data.

3. The non-contact memory card writing and quality inspection authentication method according to claim 2, characterized in that, When the quality inspection device (5) rereads the storage card (7), it reads the authentication mark bound to the card stored in the metadata block for local verification. If the local verification does not match, it refuses to generate the quality inspection certificate.

4. The non-contact memory card writing and quality inspection authentication method according to claim 1, characterized in that, The database transactions employ an optimistic locking version number mechanism for concurrency control. The synchronization verification also includes verifying whether the optimistic lock version number of the card production task matches. If they match, the optimistic lock version number is incremented when the status of the card production task is updated synchronously.

5. The non-contact memory card writing and quality inspection authentication method according to claim 1, characterized in that, The structured card identity is composed of the unique identifier of the memory card (7), the card type identifier, the layout version, and the issuance domain identifier.

6. The non-contact memory card writing and quality inspection authentication method according to claim 1, characterized in that, The card writing proof includes a task identifier, the structured card identity, the card writing version number, the data digest before writing, the data digest after writing and reading back, the card writing device identifier, the card writing completion timestamp, the card writing random number, and the card writing device signature. The quality inspection certificate includes an authorization identifier, a task identifier, a reread card identity, a write card certificate association value, a quality inspection read summary, a quality inspection device identifier, a quality inspection completion timestamp, a quality inspection random number, and a quality inspection device signature.

7. The non-contact memory card writing and quality inspection authentication method according to claim 6, characterized in that, If the quality inspection certificate submitted by the quality inspection equipment (5) fails the verification of the back-end server (1) and is allowed to be reworked, the back-end server (1) sets the status of the card production task to the pending rework status, revokes the current version of the first quality inspection authorization, and increments the card writing version number when performing rework rewriting.

8. The non-contact memory card writing and quality inspection authentication method according to claim 2, characterized in that, The task card key is temporarily generated by combining the device key with the task identifier truncated value, the digest value of the structured card identity, and the card writing version number through a key derivation function.

9. A contactless memory card writing and quality inspection authentication system, characterized in that, Include: The backend server (1) is configured to generate card production tasks and distribute them to card writing devices (4). After verifying the card writing certificate, it issues a quality inspection authorization based on the card writing certificate. After synchronously verifying the relevant status and summary in the database transaction, it updates the status of the card production task and the status of the quality inspection authorization. The card writing device (4) is configured to read the hardware identity information of the memory card (7) to be written, generate a structured card identity, write business data into the memory card (7), and generate the card writing certificate containing the write read summary after readback matching and submit it to the backend server (1). The quality inspection equipment (5) is configured to receive the one-time quality inspection authorization and perform atomic occupancy, reread the storage card (7) to generate a quality inspection read digest, and combine the write card proof associated value embedded in the one-time quality inspection authorization to generate a quality inspection certificate and submit it to the backend server (1).

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the contactless memory card writing and quality inspection authentication method as described in any one of claims 1 to 8.