Card number traceability anti-counterfeiting generation method and system of exchange card
By generating 16-bit plaintext data and combining it with encrypted hashes and verification codes, the problem of long generation time and high duplication rate of redemption card numbers has been solved, achieving fast, secure and traceable card number generation, and reducing database load and storage costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- E-BUY INFORMATION TECH (SHANGHAI) CO LTD
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for generating redemption card numbers rely on database records, which increases generation time, increases the probability of duplication, and increases database load, making it impossible to quickly generate unique card numbers with good security and traceability.
The system employs 16-bit plaintext data encryption hashing and byte truncation to generate a 7-digit decimal short code. Combined with a 1-digit check code, it generates a 24-digit card number through offline verification. Merkle trees and blockchain are used for traceability and anti-counterfeiting, enabling rapid generation and verification of card numbers.
It enables the rapid generation of 24-digit card numbers, possesses good security and traceability, reduces database query pressure, supports offline second-level authenticity determination, reduces storage and transmission costs, and is compatible with existing financial infrastructure.
Smart Images

Figure CN121836795A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data anti-counterfeiting, and particularly relates to a card number traceability anti-counterfeiting generation method and system of exchange cards. BACKGROUND
[0002] Online exchange cards such as electronic exchange cards and offline exchange cards such as physical cards are widely used in commodity exchange scenarios and can meet different consumer needs. In order to ensure the security and uniqueness of the use of exchange cards, the exchange cards need to have traceability and anti-counterfeiting functions. In the exchange card system, in order to facilitate user use, a card number (generally not more than 25 digits) is usually given as a voucher for consumption and exchange, and the generation of the above card number needs to meet the following conditions: a batch number is marked for convenient management, it cannot be repeated, and the generation of the card number takes a short time. The existing card number generation method usually sets a database for storing used data and configuring a unique constraint. Each time, according to the card number definition rule, 18-20 digits are generated by a pseudo-random number generator except that the first 4-6 digits are manually entered as batch numbers, and then the generated 18-20 digits are compared with the database storage numbers. If there is a repetition, the pseudo-random generated number is discarded, and another pseudo-random number is generated until there is no repetition. The generation time of the existing card number generation method is uncontrollable. When there are hundreds of millions of records in the database, the probability of repetition between the generated pseudo-random data and the inventory records is getting higher and higher, resulting in more and more retries. At the same time, using the database to insert errors repeatedly will consume the performance of the database and increase the load pressure of the database. Therefore, how to quickly generate a non-repeated card number with good security and traceability is of great significance to improve the privacy of exchange cards. SUMMARY
[0003] Considering that the existing exchange card number generation method seriously depends on database records to generate used card numbers, the probability of repetition of the generated card numbers is higher and higher, the card number generation time is increased, the database load pressure is increased, and the availability of the card number is reduced, and a non-repeated card number with good security and traceability cannot be quickly generated. In view of the above problems, the present application is proposed to provide an exchange card number traceability anti-counterfeiting generation method to overcome the above problems or at least partially solve the above problems, comprising: generating 16-bit plaintext data; wherein the 16-bit plaintext data includes three plaintext subparts; performing encryption hash processing and byte interception processing on the 16-bit plaintext data to obtain a 7-digit decimal short code; connecting the 7-digit decimal short code to the 16-bit plaintext data to obtain 23-bit data, generating a 1-bit check code according to the 23-bit data, and connecting the 1-bit check code to the 23-bit data to obtain a 24-bit card number; offline verifying the 24-bit card number to determine whether the 24-bit card number is qualified.
[0004] Optionally, the 16-bit plaintext data is generated, comprising: generating a 4-bit batch number according to production batch information; wherein the production batch information comprises a production place and a production time; generating an 8-bit sequential serial number about a product; generating a 4-bit exchange initial point number; connecting the 4-bit batch number, the 8-bit sequential serial number and the 4-bit exchange initial point number in sequence to form the 16-bit plaintext data; wherein the 4-bit batch number, the 8-bit sequential serial number and the 4-bit exchange initial point number are all decimal numbers.
[0005] Optionally, the 16-bit plaintext data is subjected to encryption hash processing and byte interception processing to obtain a 7-digit decimal short code, comprising: processing the 16-bit plaintext data by a 256-bit encryption hash algorithm to obtain a hash signature; processing the hash signature by a private key to obtain a 64-byte signature (r, s); wherein r and s are both 32-bit bytes; taking the first 4 bytes of the 32-bit byte r, and processing the first 4 bytes by a modulo calculation to obtain a 7-digit decimal short code.
[0006] Optionally, a 1-bit check code is generated according to the 23-bit data, comprising: processing the 23-bit data by a Luhn algorithm to generate a 1-bit check code.
[0007] Optionally, the 24-bit card number is subjected to offline verification to determine whether the 24-bit card number is qualified, comprising: subjecting the 24-bit card number to two-step verification of preset public key verification and elliptic curve digital signature algorithm verification in sequence; when the two-step verification is successful, it is determined that the 24-bit card number is qualified; when the two-step verification is unsuccessful, it is determined that the 24-bit card number is unqualified; establishing a Merkle tree and writing into a block chain according to the 24-bit card number determined to be qualified.
[0008] As an aspect of the present application, the present application also provides a card number traceability anti-fake generation system of an exchange card, comprising: a plaintext data generation module for generating 16-bit plaintext data; wherein the 16-bit plaintext data comprises three plaintext subparts; a short code generation module for processing the 16-bit plaintext data by encryption hash processing and byte interception processing to obtain a 7-digit decimal short code; A check code generation module is configured to connect the 7-digit decimal short code to the 16-digit plaintext data to obtain 23-digit data, and generate a 1-digit check code according to the 23-digit data. A 24-digit card number generation module is configured to connect the 1-digit check code to the 23-digit data to obtain a 24-digit card number. A card number verification module is configured to perform offline verification on the 24-digit card number to determine whether the 24-digit card number is qualified.
[0009] Optionally, the plaintext data generation module is configured to generate 16-digit plaintext data, including: generating a 4-digit batch number according to production batch information, wherein the production batch information includes production location and production time; generating an 8-digit sequential serial number about the product; generating a 4-digit exchange initial point number; connecting the 4-digit batch number, the 8-digit sequential serial number and the 4-digit exchange initial point number in sequence to form 16-digit plaintext data, wherein the 4-digit batch number, the 8-digit sequential serial number and the 4-digit exchange initial point number are all decimal numbers.
[0010] Optionally, the short code generation module is configured to perform encryption hash processing and byte interception processing on the 16-digit plaintext data to obtain a 7-digit decimal short code, including: performing 256-bit encryption hash algorithm processing on the 16-digit plaintext data to obtain a hash signature; processing the hash signature by using a private key to obtain a 64-byte signature (r, s), wherein r and s are both 32-bit bytes; taking the first 4 bytes of the 32-bit byte r, and performing modulo calculation processing on the first 4 bytes to obtain a 7-digit decimal short code.
[0011] Optionally, the check code generation module is configured to generate a 1-digit check code according to the 23-digit data, including: performing Luhn algorithm processing on the 23-digit data to generate a 1-digit check code.
[0012] Optionally, the card number verification module is configured to perform offline verification on the 24-digit card number to determine whether the 24-digit card number is qualified, including: performing two-step verification of preset public key verification and elliptic curve digital signature algorithm verification on the 24-digit card number in sequence; when the two-step verification is successful, determining that the 24-digit card number is qualified; and when the two-step verification is unsuccessful, determining that the 24-digit card number is unqualified; establishing a Merkle tree and writing into a block chain according to the 24-digit card number determined to be qualified.
[0013] The beneficial effects of the above-mentioned technical solutions provided in the embodiments of the present invention include at least the following: This invention provides a method and system for generating 16-bit plaintext data for card number traceability and anti-counterfeiting of redemption cards. The 16-bit plaintext data includes three plaintext sub-parts. The 16-bit plaintext data undergoes encryption hashing and byte truncation to obtain a 7-digit decimal short code. This 7-digit decimal short code is then appended to the 16-bit plaintext data to obtain 23-bit data. A 1-digit verification code is generated based on the 23-bit data. This 1-digit verification code is then appended to the 23-bit data to obtain a 24-bit card number. The 24-bit card number is then verified offline to determine its validity. By constructing an offline verifiable signature code within a 24-bit pure digital space using 16-bit plaintext + 7-bit ECDSA signature + 1-digit Luhn verification code, and taking the signature value from a cryptographically random number derived from a standard elliptic curve private key, a Merkle tree is constructed in one step, and the root hash is written to an immutable medium. Then, events such as logistics, sales, and redemption are appended level by level to form a chain log, achieving dual anchoring of closed batches and appended events.
[0014] The card number traceability and anti-counterfeiting generation method and system of the present invention for redemption cards have the following advantages: First, the card number is fixed and short, consisting of 24 pure numbers. The scanning area is only 4cm long, and the voice can be read in 6*4 sections, enabling older POS devices / SMS to be fully recorded. The user experience is superior to 30-40 digit mixed codes. Secondly, it can achieve offline, second-level authenticity determination. It has a built-in 7-bit ECDSA short signature + Luhn verification code, which can complete cryptographic-level verification within 1 second even in offline scenarios. Traditional methods require sending back to the central database for comparison or exposing the long signature. Third, it can achieve "zero query" pressure on the central database. Anti-counterfeiting verification relies on public key algorithms, and 99% of fake cards can be filtered locally. Only the verification stage is connected to the system, and the database query rate (QPS) is reduced by 1-2 orders of magnitude. Fourth, it can achieve batch-level "one-click auditing". It can lock all data of 100,000 cards with only 32 bytes of Merkle Root. If the Root of one card is changed, the other cards will also be changed. The traditional method requires comparison or export of the entire database one by one, reducing the time taken from hours to seconds. Fifth, it supports event chain anti-rollback. Hashes are appended and anchored twice in events such as logistics, sales, and redemption. Deleting records by internal personnel will cause the latest Root to be inconsistent. Sixth, the existence proof does not leak privacy. When it is necessary to prove that a card belongs to a batch, only log2N sibling hashes are needed, without disclosing the other 99,999 card numbers. The traditional method requires all card numbers, which poses a risk of leakage. Seventh, it features low storage and transmission costs and compatibility with existing financial infrastructure, effectively saving storage space. SMS and voice printing are billed per message, directly reducing operating costs. It can also be seamlessly integrated with POS, IVR, and SMS gateways without the need to modify hardware or protocols.
[0015] Other features and advantages of the invention will be set forth in the following description, 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 may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating the card number traceability and anti-counterfeiting generation method for redemption cards provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the card number traceability and anti-counterfeiting generation system for redemption cards provided in this embodiment of the invention. Detailed Implementation
[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0019] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," "far," "near," "front," and "rear," etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the accompanying drawings and are only for the convenience of describing this invention and 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, and therefore should not be construed as a limitation of this 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.
[0020] In the description of this invention, it should be noted that, 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 this invention based on the specific circumstances.
[0021] Please see Figure 1 As shown, an embodiment of this application provides a method for generating a card number for traceability and anti-counterfeiting of a redemption card. This method includes: Generate 16-bit plaintext data; the 16-bit plaintext data consists of three plaintext sub-parts; The 16-bit plaintext data is encrypted and hashed, and byte-truncation is performed to obtain a 7-bit decimal short code. After inserting the 7-digit decimal short code into the 16-digit plaintext data, we get 23 bits of data; based on the 23 bits of data, we generate a 1-digit check code; after inserting the 1-digit check code into the 23 bits of data, we get a 24-digit card number. The 24-digit card number is verified offline to determine whether it is valid.
[0022] The beneficial effects of the above embodiments are that the card number traceability and anti-counterfeiting generation method of the redemption card forms an offline verifiable signature code in a 24-bit pure digital space by using 16 bits of plaintext + 7 bits of ECDSA signature + 1 bit of Luhn verification code, and the signature value is taken from the cryptographic random number of the standard elliptic curve private key. A Merkle tree is constructed at once and the root hash is written into an immutable medium. Then, events such as logistics, sales, and redemption are added level by level to form a chain log, realizing dual anchoring of closed batches and added events.
[0023] In another embodiment, generating 16-bit plaintext data includes: Generate a 4-digit batch number based on the production batch information, which includes the production location and production time. Generate an 8-digit sequential serial number for the product; Generate a 4-digit initial exchange point value; The 4-digit batch number, 8-digit sequential serial number, and 4-digit initial exchange points are concatenated to form 16-digit plaintext data; among them, the 4-digit batch number, 8-digit sequential serial number, and 4-digit initial exchange points are all decimal numbers.
[0024] The beneficial effects of the above embodiments include a key system comprising a card issuer and a verification end. The card issuer includes a SECP256R1 private key, which is locked in the encryption machine HSM and only requires exposing the PKCS#11 interface. The verification end includes a public key, which is built into an APP, mini-program, server, or POS machine, supporting offline signature verification. In the actual card number generation process, a 4-digit batch number PPPP is generated based on the production batch information, along with an 8-digit sequential serial number RRRRRRRR and a 4-digit initial redemption point number DDDD, thus forming 16-digit plaintext data PPPPRRRRRRRRDDDD. Through this process, 16-digit decimal plaintext data is formed, providing reliable data for the subsequent generation of signature short codes and check codes.
[0025] In another embodiment, the 16-bit plaintext data undergoes cryptographic hashing and byte truncation to obtain a 7-digit decimal short code, including: A hash signature is obtained by processing 16-bit plaintext data using a 256-bit cryptographic hash algorithm. The hash signature is processed using the private key to obtain a 64-byte signature (r, s); where r and s are both 32-bit bytes. Take the first 4 bits of the 32-bit byte r, perform modulo operation on the first 4 bits to obtain a 7-bit decimal short code.
[0026] The beneficial effects of the above embodiments are that the 16-bit plaintext data is processed by a 256-bit cryptographic hash algorithm (SHA-256) to obtain a hash signature; and the hash signature is processed by the SECP256R1 private key at the card issuing end to obtain a 64-byte signature (r, s), and the first 4 bytes of the 32-byte r are taken, and a 7-digit decimal (signature) short code SSSSSSS is obtained through modulo calculation and zero-padding, ensuring the correlation between the short code and the 16-bit plaintext data.
[0027] In another embodiment, generating a 1-bit checksum based on 23 bits of data includes: The 23-bit data is processed using the Luhn algorithm to generate a 1-bit checksum.
[0028] The beneficial effect of the above embodiment is that after inserting the 7-digit decimal short code SSSSSSS into the 16-digit plaintext data PPPPRRRRRRRRDDDD, a 23-digit data PPPPRRRRRRRRDDDDSSSSSSS is obtained. The 23-digit data PPPPRRRRRRRRDDDDSSSSSSS is then processed using the Luhn algorithm (i.e., the "modulo-10 algorithm") to generate a 1-digit checksum C, where the 1-digit checksum C is an integer ranging from 0 to 9. This 1-digit checksum generated in this way has a strong correlation with the preceding 23 digits of data, ensuring the validity and security of the 24-digit card number.
[0029] In another embodiment, offline verification of the 24-digit card number is performed to determine whether the 24-digit card number is valid, including: The 24-digit card number undergoes a two-step verification process: verification using a preset public key and verification using an elliptic curve digital signature algorithm. If both verification steps are successful, the 24-digit card number is deemed valid; if both verification steps fail, the 24-digit card number is deemed invalid. Based on the 24-digit card number that has been deemed qualified, a Merkle tree is built and written into the blockchain.
[0030] The beneficial effects of the above embodiments are that the 24-digit card number PPPPRRRRRRRRDDDDSSSSSSSC generated in the above manner requires a two-step offline verification. Only 24-digit card numbers that pass offline verification can be officially used. Specifically, at the verification end, a preset public key Q is used for signature verification. The first four digits SSSS are converted into an integer s_val, and then the elliptic curve points R = s_val × G are reconstructed, where G is the base point of the SECP256R1 private key. Finally, it is determined whether the Elliptic Curve Digital Signature Algorithm (ECDSA) verification equation Rx mod n == s_val holds. If it holds, the 24-digit card number is considered valid; otherwise, it is considered invalid. This method ensures the security strength of the 24-digit card number. Furthermore, by constructing a Merkle tree in one go and writing the root hash into an immutable medium, events such as logistics, sales, and redemption are appended level by level to form a chain log, achieving dual anchoring of closed batches and appended events.
[0031] Please see Figure 2 As shown, an embodiment of this application provides a card number traceability and anti-counterfeiting generation system for redemption cards. This card number traceability and anti-counterfeiting generation system includes: The plaintext data generation module is used to generate 16-bit plaintext data; the 16-bit plaintext data includes three plaintext sub-parts. The short code generation module is used to perform encrypted hashing and byte truncation on 16-bit plaintext data to obtain a 7-bit decimal short code. The check code generation module is used to input a 7-digit decimal short code into 16-bit plaintext data to obtain 23-bit data; and generate a 1-bit check code based on the 23-bit data. The 24-digit card number generation module is used to insert a 1-digit check code into 23-digit data to obtain a 24-digit card number. The card number verification module is used to perform offline verification of 24-digit card numbers to determine whether the 24-digit card number is valid.
[0032] The beneficial effects of the above embodiments are that the card number traceability and anti-counterfeiting generation system of the redemption card forms an offline verifiable signature code in a 24-bit pure digital space using 16 bits of plaintext + 7 bits of ECDSA signature + 1 bit of Luhn verification code, and the signature value is taken from the cryptographic random number of the standard elliptic curve private key. It constructs a Merkle tree at once and writes the root hash into an immutable medium. Then, it appends logistics, sales, redemption and other events level by level to form a chain log, realizing dual anchoring of closed batches and appended events.
[0033] In another embodiment, the plaintext data generation module is used to generate 16-bit plaintext data, including: Generate a 4-digit batch number based on the production batch information, which includes the production location and production time. Generate an 8-digit sequential serial number for the product; Generate a 4-digit initial exchange point value; The 4-digit batch number, 8-digit sequential serial number, and 4-digit initial exchange points are concatenated to form 16-digit plaintext data; among them, the 4-digit batch number, 8-digit sequential serial number, and 4-digit initial exchange points are all decimal numbers.
[0034] In another embodiment, the short code generation module is used to perform cryptographic hashing and byte truncation on 16-bit plaintext data to obtain a 7-digit decimal short code, including: A hash signature is obtained by processing 16-bit plaintext data using a 256-bit cryptographic hash algorithm. The hash signature is processed using the private key to obtain a 64-byte signature (r, s); where r and s are both 32-bit bytes. Take the first 4 bits of the 32-bit byte r, perform modulo operation on the first 4 bits to obtain a 7-bit decimal short code.
[0035] In another embodiment, the checksum generation module is used to generate a 1-bit checksum based on 23-bit data, including: The 23-bit data is processed using the Luhn algorithm to generate a 1-bit checksum.
[0036] In another embodiment, the card number verification module is used to perform offline verification of the 24-digit card number to determine whether the 24-digit card number is valid, including: The 24-digit card number undergoes a two-step verification process: verification using a preset public key and verification using an elliptic curve digital signature algorithm. If both verification steps are successful, the 24-digit card number is deemed valid; if both verification steps fail, the 24-digit card number is deemed invalid. Based on the 24-digit card number that has been deemed qualified, a Merkle tree is built and written into the blockchain.
[0037] The card number traceability and anti-counterfeiting generation system of the present invention corresponds to and has the same operation and effect as the card number traceability and anti-counterfeiting generation method of the above-mentioned card. Therefore, the card number traceability and anti-counterfeiting generation system of the present invention will not be described again here.
[0038] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. This disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims. Thus, if these modifications and variations of the invention fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.
Claims
1. A method for generating a card number traceable anti-forgery of a redemption card, characterized in that, The method comprises the following steps: 16-bit plaintext data is generated; wherein the 16-bit plaintext data comprises three plaintext subparts; The 16-bit plaintext data is subjected to encryption hashing and byte interception processing to obtain a 7-digit decimal short code; The 7-digit decimal short code is connected to the 16-bit plaintext data to obtain 23-bit data; a 1-bit check code is generated according to the 23-bit data; and a 24-bit card number is obtained after the 1-bit check code is connected to the 23-bit data; The 24-bit card number is subjected to offline verification to determine whether the 24-bit card number is qualified.
2. The card number traceability anti-fake generation method of the exchange card according to claim 1, wherein: 16-bit plaintext data is generated, comprising: A 4-digit batch number is generated according to production batch information; wherein the production batch information comprises production location and production time; An 8-digit sequential serial number about the product is generated; A 4-digit exchange initial point number is generated; The 4-digit batch number, the 8-digit sequential serial number and the 4-digit exchange initial point number are sequentially connected to form the 16-bit plaintext data; wherein the 4-digit batch number, the 8-digit sequential serial number and the 4-digit exchange initial point number are all decimal numbers.
3. The card number traceability anti-fake generation method of the exchange card according to claim 1, wherein: The 16-bit plaintext data is subjected to encryption hashing and byte interception processing to obtain a 7-digit decimal short code, comprising: The 16-bit plaintext data is subjected to 256-bit encryption hashing algorithm processing to obtain a hash signature; The hash signature is processed by using a private key to obtain a 64-byte signature (r, s); wherein r and s are both 32-bit bytes; The first 4 bytes of the 32-bit byte r are taken, and the first 4 bytes are subjected to modulo calculation processing to obtain a 7-digit decimal short code.
4. The card number traceability anti-fake generation method of the exchange card according to claim 1, wherein: A 1-bit check code is generated according to the 23-bit data, comprising: The 23-bit data is subjected to Luhn algorithm processing to generate a 1-bit check code.
5. The card number traceability anti-fake generation method of the exchange card according to claim 1, wherein: The 24-bit card number is subjected to offline verification to determine whether the 24-bit card number is qualified, comprising: The 24-bit card number is subjected to two-step verification of preset public key verification and elliptic curve digital signature algorithm verification; When the two-step verification is successful, it is determined that the 24-bit card number is qualified; when the two-step verification is unsuccessful, it is determined that the 24-bit card number is unqualified; A Merkle tree is established according to the 24-bit card number determined to be qualified, and is written into a block chain.
6. A card number traceable anti-forgery generation system of a redemption card, characterized by, The method comprises the following steps: A plaintext data generation module is used to generate 16-bit plaintext data; The 16-bit plaintext data comprises three plaintext subparts; A short code generation module is used to subject the 16-bit plaintext data to encryption hashing and byte interception processing to obtain a 7-digit decimal short code; A check code generation module is used to connect the 7-digit decimal short code to the 16-bit plaintext data to obtain 23-bit data; a 1-bit check code is generated according to the 23-bit data; and a 24-bit card number is obtained after the 1-bit check code is connected to the 23-bit data; 24-bit card number generation module, configured to connect the 1-bit check code to the 23-bit data to obtain a 24-bit card number; a card number verification module, configured to perform offline verification on the 24-bit card number to determine whether the 24-bit card number is qualified.
7. The card number traceability anti-fake generation system of the exchange card according to claim 6, wherein: the plaintext data generation module is configured to generate 16-bit plaintext data, including: generating a 4-bit batch number according to production batch information, wherein the production batch information includes a production location and a production time; generating an 8-bit sequential serial number about the product; generating a 4-bit exchange initial point number; connecting the 4-bit batch number, the 8-bit sequential serial number and the 4-bit exchange initial point number in sequence to form the 16-bit plaintext data; and wherein the 4-bit batch number, the 8-bit sequential serial number and the 4-bit exchange initial point number are all decimal numbers.
8. The card number traceability anti-fake generation system of the exchange card according to claim 6, wherein: the short code generation module is configured to perform encryption hash processing and byte interception processing on the 16-bit plaintext data to obtain a 7-bit decimal short code, including: performing 256-bit encryption hash algorithm processing on the 16-bit plaintext data to obtain a hash signature; processing the hash signature by using a private key to obtain a 64-byte signature (r, s); wherein r and s are both 32-bit bytes; taking the first 4 bytes of the 32-bit byte r, and performing modulo calculation processing on the first 4 bytes to obtain the 7-bit decimal short code.
9. The card number traceability anti-fake generation system of the exchange card according to claim 6, wherein: the check code generation module is configured to generate a 1-bit check code according to the 23-bit data, including: performing Luhn algorithm processing on the 23-bit data to generate a 1-bit check code.
10. The card number traceability anti-fake generation system of the exchange card according to claim 6, wherein: the card number verification module is configured to perform offline verification on the 24-bit card number to determine whether the 24-bit card number is qualified, including: performing two-step verification of preset public key verification and elliptic curve digital signature algorithm verification on the 24-bit card number in sequence; when the two-step verification is successful, it is determined that the 24-bit card number is qualified; and when the two-step verification is unsuccessful, it is determined that the 24-bit card number is unqualified; establishing a Merkle tree and writing into a block chain according to the 24-bit card number that is determined to be qualified.