Complex Chinese-sensible code verification method and system based on code transformation mechanism
Through the compound Han letter verification method based on the encoding transformation mechanism, the composite Han sign code is generated and verified, and the problem of verification and generation of composite Han letter code in the existing technology has been solved. Guarantee authenticity and reliability.
Patent Information
- Application Number
- CN202411481383.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-12
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-21
AI Technical Summary
The existing technology is difficult to effectively verify and generate composite Hanxin codes, resulting in authenticity and reliability problems in applications in the fields of product anti-counterfeiting and process management.
The composite Hanseatic code verification method based on the coding transformation mechanism is used to generate the first code and the second code, and insert filler characters during the coding process to form the composite Hansein code. The method includes a code generation system, a Hanseatic code generation system and a verification server. Through the collaborative work of the code scanning device and the verification server, the verification and verification of the composite Hansein code is realized.
The effective verification and generation of composite Han code is realized, and the reliability of the authenticity of the product and the process management process is suitable for the fields of commodity anti -counterfeiting and process management.
Abstract
Description
Technical Field
[0001] The invention relates to two-dimensional code technology. Background Art
[0002] "Hanxin Code" is a Chinese national standard (GB / T21049-2022) implemented on October 1, 2022. The standard specifies the symbol characteristics and symbol structure, data encoding and symbol representation, symbol printing, symbol quality, decoding process, reference decoding algorithm, data transmission and other technical contents of Hanxin Code; Summary of the invention
[0003] The purpose of the present invention is to provide a composite Hanxin code verification method and system based on a coding conversion mechanism, which is characterized by comprising a coding generation system, a Hanxin code generation system, and a verification server;
[0004] The code generation system generates the composite Chinese Xin code by the following steps:
[0005] 1) Generate a first code and a second code;
[0006] The first code includes a character sequence K and a character sequence A, and the character sequence A is a first signature of the character sequence K; the second code includes a character sequence K and a character sequence B, and the character sequence A is a second signature of the character sequence K; the character sequence A and the character sequence B have the same length and format;
[0007] 2) Performing a transformation on the first code: inserting a fill character between the character sequence K and the character sequence A constituting the first code; performing a transformation on the second code: inserting a fill character between the character sequence K and the character sequence B constituting all the character sequences of the second code;
[0008] 3) According to the Hanxin code encoding process, the transformed first code and the second code are used as input data to generate a first data codeword sequence and a second data codeword sequence;
[0009] The Hanxin code generation system converts the first data codeword sequence and the second data codeword sequence into a codeword sequence to be arranged according to the Hanxin code generation rule, and then arranges the first Hanxin code symbol and the second Hanxin code symbol;
[0010] When printing the symbol, the second Chinese Xin code symbol is printed on the surface of the substrate, and then the second Chinese Xin code symbol is covered with a fragile material; after the fragile material is covered, only the second Chinese Xin code symbol and the first Chinese Xin code symbol have a partial or complete information encoding area with the same pattern exposed; finally, the pattern is continued to be printed on the fragile material to form a complete first Chinese Xin code symbol;
[0011] During verification, the code scanning device can transmit the read information to the verification server by scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified respectively;
[0012] After receiving the information, the verification server performs verification on the first code to be verified in the following situations:
[0013] I) verifying the first code to be verified to determine that it is the correct first code, and if the second code has not been received, the first code to be verified is verified;
[0014] II) verifying the first code to be verified to determine that it is the correct first code; if the second code has been received before, the first code to be verified is not verified;
[0015] After receiving the information, the verification server verifies the second code to be verified; after verifying the second code to be verified, if it is the first time to determine that the correct second code has been received, save a verification record of receiving the correct second code;
[0016] Further, after the first data codeword sequence and the second data codeword sequence are generated, the first data codeword sequence and the second data codeword sequence are transformed according to the same rule, so that the nominal modules corresponding to the character sequence A of the first data codeword sequence are concentrated in the continuous graphic part of the code diagram of the first Hanxin code symbol, and the nominal modules corresponding to the character sequence B of the second data codeword sequence are concentrated in the continuous graphic part of the code diagram of the second Hanxin code symbol;
[0017] After the code scanning device scans the first Chinese Xin code symbol and the second Chinese Xin code symbol, the code read needs to be subjected to an inverse transformation corresponding to the transformation to obtain the correct first code and second code;
[0018] Furthermore, when the Hanxin code generation system converts the first data codeword sequence into the codeword sequence to be arranged, the data codewords corresponding to the character sequence A are arranged in a concentrated manner in the codeword sequence to be arranged;
[0019] Furthermore, when the Hanxin code generation system converts the second data codeword sequence into the codeword sequence to be arranged, the rule adopted is the same as the rule of "converting the first data codeword sequence into the codeword sequence to be arranged", so that the data codewords corresponding to the character sequence B are centrally arranged in the codeword sequence to be arranged;
[0020] Further, in step 1), at least one padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence A are not allocated to the same group; in step 2), at least one padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence B are not allocated to the same group;
[0021] Furthermore, the character sequence A and the character sequence B have the same length, and the number of padding characters inserted in step 1) and step 2) is the same;
[0022] Further, the first Hanxin code symbol and the second Hanxin code symbol have the same version, error correction level and masking scheme;
[0023] Further, for the first code, padding characters are inserted before and after all character sequences constituting the first code, and between character sequence K and character sequence A; for the second code, padding characters are inserted before and after all character sequences constituting the second code, and between character sequence K and character sequence B;
[0024] Furthermore, when the first data codeword sequence and the second data codeword sequence are transformed according to the same rule, the nominal module corresponding to the character sequence A of the first data codeword sequence is concentrated at the tail of the code diagram of the first Hanxin code symbol, and the nominal module corresponding to the character sequence B of the second data codeword sequence is concentrated at the tail of the code diagram of the second Hanxin code symbol;
[0025] Furthermore, during verification, after scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified, the code scanning device needs to perform an inverse transformation corresponding to the entire transformation process on the collected information to obtain information corresponding to the first code and the second code;
[0026] Further, a mode indicator is inserted before and / or after the character sequence A and the character sequence B;
[0027] The technical effect of the present invention is unquestionable. A composite Hanxin code that meets the verification rules can be generated and verified. The composite Hanxin code can be applied to the fields of commodity anti-counterfeiting, process management, etc. to ensure the authenticity of the commodity assigned with the composite Hanxin code or the reliability of the process management process. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments; without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the field, which should be included in the protection scope of the present invention;
[0029] Embodiment 1:
[0030] A composite Hanxin code verification method and system based on a coding transformation mechanism, characterized by comprising a coding generation system, a Hanxin code generation system, and a verification server;
[0031] The code generation system generates the composite Chinese Xin code by the following steps:
[0032] 1) Generate a first code and a second code;
[0033] The first code includes a character sequence K and a character sequence A, and the character sequence A is a first signature of the character sequence K; the second code includes a character sequence K and a character sequence B, and the character sequence A is a second signature of the character sequence K; the character sequence A and the character sequence B have the same length and format;
[0034] 2) Transform the first code: insert a padding character between the character sequence K and the character sequence A constituting the first code; Transform the second code: insert a padding character between the character sequence K and the character sequence B constituting the entire character sequence of the second code; in this embodiment, the character sequence K is www.xxx.cn, the character sequence A is 12345, and one padding character may be padded. In this embodiment, the padding character is #. After padding, the first code is www.xxx.cn#12345; in this embodiment, the character sequence B is 56789, and one padding character may be padded. In this embodiment, the padding character is #. Thirteen padding characters are padded. After padding, the second code is www.xxx.cn#56789;
[0035] 3) According to the Hanxin code encoding process (the process recorded in the standard GB / T 21049-2022, such as part 5.7 symbol construction, etc.), the transformed first code and the second code are used as input data to generate a first data codeword sequence and a second data codeword sequence;
[0036] The Hanxin code generation system converts the first data codeword sequence and the second data codeword sequence into a codeword sequence to be arranged according to the Hanxin code generation rule, and then arranges the first Hanxin code symbol and the second Hanxin code symbol;
[0037] When printing the symbol, the second Chinese Xin code symbol is printed on the surface of the substrate, and then the second Chinese Xin code symbol is covered with a fragile material; after the fragile material is covered, only the entire information encoding area of the second Chinese Xin code symbol and the first Chinese Xin code symbol having the same pattern is exposed, or only the partial information encoding area of the second Chinese Xin code symbol and the first Chinese Xin code symbol having the same pattern is exposed; finally, the pattern is continued to be printed on the fragile material to form a complete first Chinese Xin code symbol;
[0038] During verification, the code scanning device can transmit the read information to the verification server by scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified respectively;
[0039] After receiving the information, the verification server performs verification on the first code to be verified (i.e., the suspected first code is obtained through a series of inverse decoding processes) in the following situations:
[0040] I) verifying the first code to be verified to determine that it is the correct first code, and if the second code has not been received, the first code to be verified is verified;
[0041] II) verifying the first code to be verified to determine that it is the correct first code; if the second code has been received before, the first code to be verified is not verified;
[0042] After receiving the information, the verification server verifies the second code to be verified (i.e., obtains the suspected second code through a series of inverse decoding processes); after verifying the second code to be verified, if it is the first time to determine that the correct second code has been received, save the verification record of receiving the correct second code;
[0043] Embodiment 2:
[0044] The main technical scheme of this embodiment is the same as that of Embodiment 1. Further, after generating the first data codeword sequence and the second data codeword sequence, the first data codeword sequence and the second data codeword sequence are transformed according to the same rule, so that the nominal module corresponding to the character sequence A of the first data codeword sequence is concentrated on the continuous graphic part in the code diagram of the first Hanxin code symbol, and the nominal module corresponding to the character sequence B of the second data codeword sequence is concentrated on the continuous graphic part in the code diagram of the second Hanxin code symbol.
[0045] After the code scanning device scans the first Chinese Xin code symbol and the second Chinese Xin code symbol, the code read needs to be subjected to an inverse transformation corresponding to the transformation to obtain the correct first code and second code;
[0046] Embodiment 3:
[0047] The main technical scheme of this embodiment is the same as that of Embodiment 1. Furthermore, when the Hanxin code generation system converts the first data codeword sequence into the codeword sequence to be arranged, the data codewords corresponding to the character sequence A are arranged in a concentrated manner in the codeword sequence to be arranged (for example, concentrated in the first half, the second half or the middle of the codeword sequence to be arranged);
[0048] When the Hanxin code generation system converts the second data codeword sequence into the codeword sequence to be arranged, the rule adopted is the same as the rule of "converting the first data codeword sequence into the codeword sequence to be arranged", so that the data codewords corresponding to the character sequence B are concentrated in the codeword sequence to be arranged (for example, concentrated in the first half or the second half or the middle of the codeword sequence to be arranged); Embodiment 4:
[0049] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 3. In step 1), at least one padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence A are not allocated to the same group; in step 2), at least one padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence B are not allocated to the same group;
[0050] In step 2), the number of padding characters inserted at each location (three locations) is at least 3 (preferably 13, 20, 26, 30, 39, 50, 52, 67, 70, 100), so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence B are not assigned to the same group; Example 5:
[0051] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 4. Further, the character sequence A and the character sequence B have the same length, and the number of padding characters inserted in step 1) and step 2) is the same; the version, error correction level and masking scheme of the first Hanxin code symbol and the second Hanxin code symbol are the same;
[0052] Embodiment 6:
[0053] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 5. Further, for the first code, padding characters are inserted before and after all the character sequences constituting the first code, and between the character sequence K and the character sequence A; for the second code, padding characters are inserted before and after all the character sequences constituting the second code, and between the character sequence K and the character sequence B; in this embodiment, the character sequence K is www.xxx.cn, the character sequence A is 12345, and the padding characters at positions 1 to 30 can be filled. The padding character in this embodiment is #, which is filled with 13 digits. After padding, the first code is #############www.xxx.cn#12345##############; in this embodiment, the character sequence B is 56789, and the padding characters at positions 1 to 30 can be filled. The padding character in this embodiment is #, which is filled with 13 digits. After padding, the second code is ##############www.xxx.cn#56789##############;
[0054] Embodiment 7:
[0055] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 6. Further, when the first data codeword sequence and the second data codeword sequence are transformed by the same rule, the nominal module corresponding to the character sequence A of the first data codeword sequence is concentrated at the tail of the code diagram of the first Hanxin code symbol, and the nominal module corresponding to the character sequence B of the second data codeword sequence is concentrated at the tail of the code diagram of the second Hanxin code symbol.
[0056] Embodiment 8:
[0057] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 7. After scanning the first Hanxin code symbol to be verified, in the decoding process, the data codeword sequence needs to be permuted to obtain the first data codeword sequence; the permutation method is the inverse process of "converting the first data codeword sequence into the codeword sequence to be arranged so that the data codewords corresponding to the character sequence A are concentrated in the first half or the second half of the codeword sequence to be arranged";
[0058] After scanning the second Hanxin code symbol to be verified, in the decoding process, the data codeword sequence needs to be permuted to obtain the second data codeword sequence; the permutation method is the inverse process of "converting the second data codeword sequence into the codeword sequence to be arranged so that the data codewords corresponding to the character sequence B are concentrated in the first half or the second half of the codeword sequence to be arranged";
[0059] Embodiment 9:
[0060] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 7. After scanning the first Hanxin code symbol to be verified, in the decoding process, it is necessary to perform an inverse transformation on the data codeword sequence to obtain information corresponding to the first data codeword sequence; the inverse transformation method is the inverse process of the transformation method;
[0061] After scanning the second Hanxin code symbol to be verified, in the decoding process, the data codeword sequence needs to be inversely transformed to obtain information corresponding to the second data codeword sequence; the inverse transformation method is the inverse process of the transformation method;
[0062] Embodiment 10:
[0063] The main technical scheme of this embodiment is the same as any one of Embodiments 1 to 9. Further, during verification, after scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified, the code scanning device needs to perform an inverse transformation corresponding to the entire transformation process on the collected information to obtain information corresponding to the first code and the second code; for example, for Embodiment 1, after scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified, the padding characters need to be deleted during the decoding process to obtain information corresponding to the first code and the second code;
[0064] Embodiment 11:
[0065] The main technical solution of this embodiment is the same as any one of Embodiments 1 to 10. Furthermore, a mode indicator is inserted before and / or after the character sequence A and the character sequence B; the mode indicator may be a reserved mode indicator recorded in Section 5.3.1 of standard GB / T 21049-2022.
Claims
1. A composite Chinese Xin code verification method and system based on a coding conversion mechanism, characterized in that: It includes the coding generation system, the Hanxin code generation system and the verification server; The code generation system generates the composite Chinese Xin code by the following steps: 1) Generate a first code and a second code; The first code includes a character sequence K and a character sequence A, and the character sequence A is a first signature of the character sequence K; the second code includes a character sequence K and a character sequence B, and the character sequence A is a second signature of the character sequence K; the character sequence A and the character sequence B have the same length and format; 2) Performing a transformation on the first code: inserting a fill character between the character sequence K and the character sequence A constituting the first code; performing a transformation on the second code: inserting a fill character between the character sequence K and the character sequence B constituting all the character sequences of the second code; 3) According to the Hanxin code encoding process, the transformed first code and the second code are used as input data to generate a first data codeword sequence and a second data codeword sequence; The Hanxin code generation system converts the first data codeword sequence and the second data codeword sequence into a codeword sequence to be arranged according to the Hanxin code generation rule, and then arranges the first Hanxin code symbol and the second Hanxin code symbol; When printing the symbol, the second Chinese Xin code symbol is printed on the surface of the substrate, and then the second Chinese Xin code symbol is covered with a fragile material; After the fragile material is covered, only the entire information encoding area of the second Chinese Xin code symbol and the first Chinese Xin code symbol having the same pattern is exposed, or only a portion of the information encoding area of the second Chinese Xin code symbol and the first Chinese Xin code symbol having the same pattern is exposed; Finally, the pattern is printed on the fragile material to form the complete first Hanxin code symbol; During verification, the code scanning device can transmit the read information to the verification server by scanning the first Chinese Xin code symbol to be verified and the second Chinese Xin code symbol to be verified respectively; After receiving the information, the verification server performs verification on the first code to be verified in the following situations: I) verifying the first code to be verified to determine that it is the correct first code, and if the second code has not been received, the first code to be verified is verified; II) verifying the first code to be verified to determine that it is the correct first code; if the second code has been received before, the first code to be verified is not verified; After receiving the information, the verification server verifies the second code to be verified; after verifying the second code to be verified, if it is the first time to determine that the correct second code has been received, the verification record of receiving the correct second code is saved.
2. According to claim 1, a composite Chinese Xin code verification method and system based on a coding conversion mechanism is characterized in that: After generating the first data codeword sequence and the second data codeword sequence, the first data codeword sequence and the second data codeword sequence are transformed according to the same rule, so that the nominal modules corresponding to the character sequence A of the first data codeword sequence are concentrated in the continuous graphic part of the code diagram of the first Hanxin code symbol, and the nominal modules corresponding to the character sequence B of the second data codeword sequence are concentrated in the continuous graphic part of the code diagram of the second Hanxin code symbol; After the code scanning device scans the first Hanxin code symbol and the second Hanxin code symbol, the read code needs to undergo an inverse transformation corresponding to the transformation to obtain the correct first code and second code.
3. According to claim 1, a composite Chinese Xin code verification method and system based on a coding conversion mechanism is characterized in that: When the Hanxin code generation system converts the first data codeword sequence into the codeword sequence to be arranged, the data codewords corresponding to the character sequence A are arranged in a concentrated manner in the codeword sequence to be arranged; When the Hanxin code generation system converts the second data codeword sequence into the codeword sequence to be arranged, the rule adopted is the same as the above-mentioned rule of "converting the first data codeword sequence into the codeword sequence to be arranged", so that the data codewords corresponding to the character sequence B are concentratedly arranged in the codeword sequence to be arranged.
4. A composite Chinese Xin code verification method and system based on a coding conversion mechanism according to claim 1, 2 or 3, characterized in that: In step 1), at least 1 bit of padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence A are not assigned to the same group; in step 2), at least 1 bit of padding character is inserted at each location, so that in the subsequent encoding process, the codes corresponding to the character sequence K and the character sequence B are not assigned to the same group.
5. A composite Chinese Xin code verification method and system based on a coding conversion mechanism according to claim 1, 2 or 3, characterized in that: The number of padding characters inserted in step 1) and step 2) is the same.
6. A composite Chinese Xin code verification method and system based on a coding conversion mechanism according to claim 1, 2 or 3, characterized in that: The first Hanxin code symbol and the second Hanxin code symbol have the same version, error correction level and mask scheme.
7. The composite Chinese Xin code verification method and system based on the coding conversion mechanism according to claim 1 is characterized in that: For the first code, padding characters are inserted before and after all character sequences constituting the first code, and between character sequence K and character sequence A; for the second code, padding characters are inserted before and after all character sequences constituting the second code, and between character sequence K and character sequence B.
8. According to claim 2, a composite Chinese Xin code verification method and system based on a coding conversion mechanism is characterized in that: When the first data codeword sequence and the second data codeword sequence are transformed according to the same rules, the nominal module corresponding to the character sequence A of the first data codeword sequence is concentrated at the tail of the code map of the first Hanxin code symbol, and the nominal module corresponding to the character sequence B of the second data codeword sequence is concentrated at the tail of the code map of the second Hanxin code symbol.
9. A composite Chinese Xin code verification method and system based on a coding conversion mechanism according to claim 1, 2 or 3, characterized in that: During verification, after scanning the first Hanxin code symbol to be verified and the second Hanxin code symbol to be verified, the code scanning device needs to perform an inverse transformation corresponding to the entire transformation process on the collected information to obtain information corresponding to the first code and the second code.
10. A composite Chinese Xin code verification method and system based on a coding conversion mechanism according to claim 1, 2, 3 or 7, characterized in that: Before and / or after character sequence A and character sequence B, insert a mode indicator.