Dual dynamic three-dimensional code based on random color texture, and generation, coding, recognition and decoding methods and generation devices thereof

By introducing random color textures and multiple error correction technologies into the 3D code, the shortcomings of existing QR codes and 3D codes in terms of security, maintenance and identification are solved, and the effects of high security, adaptive repair and personalized information are achieved.

CN120146083APending Publication Date: 2025-06-13WUHAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411677889.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Existing QR codes and 3R codes have shortcomings in security, maintenance and identification, especially the difficulty in providing personalized information and adapting to different environmental conditions.

Method used

A dual dynamic 3D code based on random color texture is used to generate a unique 3D code with adaptive repair capabilities through the combination of two-dimensional hierarchy and three-dimensional hierarchy.

Benefits of technology

It realizes high security, adaptive repair capabilities and personalized information provision, reduces hardware equipment and environmental requirements, and improves information density and capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146083A_ABST
    Figure CN120146083A_ABST
Patent Text Reader

Abstract

The invention discloses a dual dynamic three-dimensional code based on random color textures and a generation method, a coding method, a recognition method, a decoding method and a generation device thereof, a unique three-dimensional code is generated by adopting random combination and arrangement of specified color textures on the basis of a two-dimensional code, the three-dimensional code has two-dimensional and three-dimensional layers, and the two-dimensional and three-dimensional functions are integrated. Meanwhile, part of information in the encoding process is recorded and encrypted and converted into a decoding core for decoding, the dynamic decoding core provides dynamic three-dimensional hierarchical information under the condition that the corresponding three-dimensional code is not changed, and the content of the dynamic decoding core can point to a specific crowd and is dynamically updated. A two-dimensional level is generated by adopting a standard specification, so that a three-dimensional code is downwards compatible, and the public can directly obtain open information through mobile equipment. By designing a three-dimensional code template, using a multiple three-dimensional code information error correction technology in the generation and decoding process and using a double-flow image processing technology in the image recognition process, the self-adaptive repair capability, the recognition accuracy and the recognition speed of the three-dimensional code are improved, and the equipment requirement is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of high-density symbol coding and image recognition, and particularly to a dual dynamic three-dimensional code based on random color texture, and its generation, encoding, recognition, decoding methods, and generation device. Background Art

[0002] Different from traditional two-dimensional codes, three-dimensional codes provide more information dimensions in color and texture. In any slight change, these dimensions can adaptively adjust the encoding to ensure that each interaction is unique. At the same time, the complexity of its multi-dimensional structure, like a carefully designed maze, not only protects the security of internal information but also ensures that only the correct key can open the door and present different scenes. Skills are silent. Perhaps without words, its distinctiveness has been quietly shown in every touch.

[0003] With the rapid development of the Internet and the popularization of mobile devices, two-dimensional codes have gradually spread to every corner of social life and production. Two-dimensional codes appear in every corner such as payment, web pages, advertisements, bills, product tracking, etc. This two-dimensional code with a fast response mechanism, high data capacity, low cost, and strong error correction ability has been widely promoted by various countries with its advantages, forming an internationally unified encoding mechanism. This unification has promoted the exchange and dissemination of world cultures. However, precisely because of this unification, the information contained in a two-dimensional code has been determined since its birth, regardless of which country, which company, or what mobile phone or scanner is used to scan it. Once scanned by a third party, the two-dimensional code is easily prone to information leakage. Existing technologies encrypt two-dimensional codes through technologies such as structural three-dimensional codes, encrypted three-dimensional codes based on two-dimensional codes, blockchain technology, and random generation technology, which enhance the security of two-dimensional codes to a certain extent. However, the requirements for scanning devices by structural three-dimensional codes, the difficulty of customizing the encrypted area of encrypted three-dimensional codes, and the difficulty of downward compatibility have hindered their popularization to a certain extent.

[0004] Compared with two-dimensional codes, the expansion of the third dimension brings higher security and data capacity, but the maintenance and recognition of the third dimension have become problems. Affected by hardware facilities, environmental factors such as light and weathering, and human damage, etc., the form, color, and texture of three-dimensional codes are easily changed, making it difficult to maintain and recognize.

[0005] Compared with two-dimensional codes, three-dimensional codes are easier to achieve one code for one item, which undoubtedly improves the security of three-dimensional codes. However, in many cases, we need to provide different information for different objects. The product information seen by manufacturers when scanning the code may need to be more complete than that seen by customers, and the information languages seen by people in different countries when scanning the code may need to be different. However, although the current two-dimensional codes or three-dimensional codes can achieve one code for one item, they themselves cannot achieve one code with a thousand faces and cannot provide different users with personalized different information. Summary of the Invention

[0006] In view of the above defects or improvement requirements of the prior art, the present invention provides a dual dynamic three-dimensional code based on random color textures, and a generation, encoding, decoding method and generation device thereof.

[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0008] In a first aspect, a dual dynamic three-dimensional code based on random color textures is provided, including a two-dimensional layer and a three-dimensional layer. Among them, the two-dimensional layer contains fixed two-dimensional layer information, and the three-dimensional layer contains dynamic three-dimensional layer information. After the three-dimensional layer is binarized, it is converted into a two-dimensional layer.

[0009] Based on the same inventive concept, in a second aspect of the present invention, a generation method of a dual dynamic three-dimensional code based on random color textures is provided, including:

[0010] A1, encoding the two-dimensional layer information of the dual dynamic three-dimensional code to generate a two-dimensional code with a uniform distribution of black and white code points;

[0011] A2, obtaining the total number of preset color types, and determining the number of color types of different binarization results according to the number of black and white code points in the two-dimensional code and the total number of set color types. The formula is as follows:

[0012]

[0013] Where N b and N w respectively represent the number of black and white code points in the two-dimensional code, C n represents the total number of color types, C b represents the number of low gray value color types that are black after binarization, and the color is black after binarization, C w represents the number of high gray value color types that are white after binarization, and the color is white after binarization;

[0014] A3, determining the texture type;

[0015] A4, calculating the two-dimensional layer standard two-dimensional code version according to the information amount to be accommodated in the three-dimensional code two-dimensional layer, the error correction level and the information amount to be carried by the three-dimensional code;

[0016] A5, processing the three-dimensional code template according to the selected two-dimensional layer standard two-dimensional code version, color and texture;

[0017] A6, based on the multiple three-dimensional code error correction technology, randomly coloring the corresponding code points in the valid area with the colors of different binarization results to generate a dual dynamic three-dimensional code.

[0018] Based on the same inventive concept, a third aspect of the present invention provides an encoding method for a dual dynamic three-dimensional code based on random color textures, which is implemented based on the three-dimensional code generated by the generation method of the dual dynamic three-dimensional code based on random color textures described in the second aspect. The encoding method includes:

[0019] B1. According to the number of color types of different binarization results determined in step A2 and the texture types determined in step A3, obtain the number of types of color-texture combinations, and select a basic encoding base above binary.

[0020] B2. Obtain the information to be encoded, perform compression encoding on the information to be encoded, and convert it into an actual information code in the corresponding base.

[0021] B3. Weight the colors and textures of the three-dimensional hierarchical valid data area code points, convert them into a digital sequence of code point arrangements, combine with the actual information code for encoding, and calculate the mapping between different code points and code point combinations and the base code through an encoding algorithm.

[0022] B4. Select an adjacent segment of code points as a termination flag after the information code in the valid data area.

[0023] B5. Encrypt and store the valid encoded information in the decoding core. The valid encoded information includes the mapping between different code points and code point combinations and the base code.

[0024] Based on the same inventive concept, a fourth aspect of the present invention provides a recognition method for a dual dynamic three-dimensional code based on random color textures, which is implemented based on the three-dimensional code generated by the generation method of the dual dynamic three-dimensional code based on random color textures described in the second aspect. The recognition method includes:

[0025] Step 1. Use a mobile device to photograph the three-dimensional code to obtain one or more three-dimensional code images.

[0026] Step 2. Preprocess the obtained three-dimensional code images, including: locating the three-dimensional code, calibrating the color using a color card, and perspective transformation.

[0027] Step 3. Partition and denoise the preprocessed three-dimensional code images.

[0028] Step 4. Perform texture extraction and averaging, texture feature extraction, texture type matching, template color extraction and averaging, color type matching, and texture-color digital signal output on the three-dimensional code image template to obtain the code point sequence of the three-dimensional code valid data area.

[0029] Based on the same inventive concept, a fifth aspect of the present invention provides a decoding method for a dual dynamic three-dimensional code based on random color textures, which is implemented based on the recognition method of the dual dynamic three-dimensional code based on random color textures described in the second aspect. The decoding method includes:

[0030] E1. Perform multiple three-dimensional code information error correction on the sequence of code point positions in the valid data area of the three-dimensional code generated by the recognition method of the dual dynamic three-dimensional code;

[0031] E2. Use the information in the decoding core to restore the true sequence of arranged digital code points and restore and construct the coding tree, and use the coding tree to map the sequence of arranged digital code points to the actual information code;

[0032] E3. Restore the actual information code to the true data using a standard or user-defined coding method.

[0033] Based on the same inventive concept, a sixth aspect of the present invention provides a generating device for a dual dynamic three-dimensional code based on random color textures, including:

[0034] A two-dimensional hierarchical information encoding module, configured to encode the two-dimensional hierarchical information of the dual dynamic three-dimensional code to generate a two-dimensional code with evenly distributed black and white code points;

[0035] A binarization result color type calculation module, configured to obtain the total number of preset color types, and determine the number of color types of different binarization results according to the number of black and white code points in the two-dimensional code and the total number of preset color types;

[0036] A texture type determination module, configured to determine the texture type;

[0037] A two-dimensional hierarchical standard two-dimensional code version determination module, configured to obtain the two-dimensional hierarchical standard two-dimensional code version according to the information volume to be accommodated in the two-dimensional level of the three-dimensional code, the error correction level, and the information volume to be carried by the three-dimensional code;

[0038] A three-dimensional code template processing module, configured to process the three-dimensional code template according to the selected two-dimensional hierarchical standard two-dimensional code version, color, and texture;

[0039] A coloring module, configured to randomly color the code points corresponding to the valid area with the colors of different binarization results respectively based on the multiple three-dimensional code error correction technology to generate a dual dynamic three-dimensional code.

[0040] Based on the same inventive concept, a seventh aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the generating method of the dual dynamic three-dimensional code based on random color textures described in the second aspect.

[0041] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:

[0042] 1. The three-dimensional code is downward compatible with the two-dimensional code. The two-dimensional layer can assist in the realization of the three-dimensional layer, but the three-dimensional layer does not depend on the two-dimensional layer. The two-dimensional layer information can be recognized using ordinary scanning devices and software.

[0043] 2. It has extremely high security. The randomly generated three-dimensional code cannot be cracked because its three-dimensional layer itself does not contain actual information. The randomly generated three-dimensional code is unique and has tracking and identification functions. The decoding core in the system background loses its practical significance without the unique three-dimensional code, and information cannot be stolen from the background. The encoding method and texture can be further customized by the issuer to further enhance its security.

[0044] 3. It has self-adaptive repair ability. Based on the three-dimensional code template and multiple error correction mechanisms, even if there are damages, omissions, or errors within a certain limit in the code points of the three-dimensional code, the correct three-dimensional code pattern can be restored layer by layer through the multiple error correction mechanisms.

[0045] 4. The requirements for hardware devices and storage environments are low. Based on the three-dimensional code template and image processing process, the actual color, shape, pixels, and texture features of the three-dimensional code are repaired. Greatly reduce the requirements for the precision and performance of three-dimensional code printing devices, display devices, and scanning devices, and enhance the self-adaptive ability to different lighting environments. The production and maintenance costs are greatly reduced, and the user base is expanded to all the public who hold smart phones.

[0046] 5. One object has one code, and one code has a thousand faces. The same three-dimensional code can provide different personalized information for different users, and the information obtained by scanning the code can be dynamically updated and traced.

[0047] 6. High information density. In addition to having the third dimension itself, the three-dimensional layer is expanded by methods such as repeated code taking, jumping code taking, forward and reverse order code taking, and weighted code taking, so that the three-dimensional code has a much higher information density than the two-dimensional code. In addition, the encoding method provided by the present invention uses a prefix encoding tree for encoding, with high encoding efficiency, and compression encoding and adaptation are performed for the application cases of octal real information codes and four textures and four colors, further enhancing the information density and capacity.

[0048] 7. The recognition process has a dual process of fast response mode and refined recognition. It can make self-adaptive judgments according to recognition devices, shooting angles, environmental factors, etc. Under good shooting conditions, the recognition speed can be accelerated to complete fast response. In a relatively harsh environment, the image can also be corrected and restored to obtain the correct information. Description of the Drawings

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0050] Figure 1 It is the overall flowchart of three-dimensional code recognition, encoding, and decoding in the embodiments of the present invention;

[0051] Figure 2 It is the structural diagram of the dual dynamic three-dimensional code template based on random color texture in the embodiments of the present invention;

[0052] Figure 3 It is the flowchart of three-dimensional code generation in the embodiments of the present invention;

[0053] Figure 4 It is the flowchart of three-dimensional code encoding in the embodiments of the present invention;

[0054] Figure 5 It is the flowchart of three-dimensional code recognition in the embodiments of the present invention;

[0055] Figure 6 It is the flowchart of three-dimensional code decoding in the embodiments of the present invention;

[0056] Figure 7 A is the two-dimensional level of the three-dimensional code in the embodiments of the present invention;

[0057] Figure 7 B is the three-dimensional level template of the three-dimensional code in the embodiments of the present invention;

[0058] Figure 7 C is the result of random color rendering of the three-dimensional code after multiple error corrections in the embodiments of the present invention;

[0059] Figure 7 D is the result of random color rendering of the three-dimensional code with a logo after multiple error corrections in the embodiments of the present invention;

[0060] Figure 7 E is the result of random texture rendering of the three-dimensional code after multiple error corrections in the embodiments of the present invention, that is, the final form of the three-dimensional code;

[0061] Figure 7 F is the result of random texture rendering of the three-dimensional code with a logo after multiple error corrections in the embodiments of the present invention, that is, the final form of the three-dimensional code. Detailed implementation manners

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0063] Embodiment 1

[0064] The present invention discloses a dual dynamic three-dimensional code based on random color textures, including a two-dimensional layer and a three-dimensional layer. Among them, the two-dimensional layer contains fixed two-dimensional layer information, and the three-dimensional layer contains dynamic three-dimensional layer information. After binarization processing, the three-dimensional layer is converted into a two-dimensional layer.

[0065] Specifically, regarding the fixed two-dimensional layer information, the information contained in the two-dimensional layer of the three-dimensional code is fixed, that is, once the three-dimensional code is generated, the two-dimensional information cannot be changed. Its specific content can be completely customized by the three-dimensional code maker, including Chinese, English, symbols, website addresses, etc. For example, in specific implementation, if remote verification is required to decode the three-dimensional layer, a string of website addresses connecting to the server can be included in the two-dimensional information, and after verification, a decoding core with corresponding permissions is sent for decoding.

[0066] Regarding the dynamic three-dimensional layer information, when the three-dimensional code is first generated, the three-dimensional layer does not contain actual information (because it is almost random). The information it contains is generated during encoding, and the information it contains can be changed each time encoding is performed. Its specific content can be completely customized by the three-dimensional code maker, including Chinese, English, symbols, website addresses, etc. Each time encoding can incorporate brand-new content, so it is dynamic.

[0067] Please refer to Figure 1 , which is the overall flowchart of three-dimensional code recognition, encoding, and decoding in the embodiments of the present invention.

[0068] As Figure 2 shown, among them, the specific features of the two-dimensional layer are:

[0069] Adopt the standard two-dimensional code encoding standard, including position detection patterns, position detection pattern separators, positioning patterns, correction patterns, format information, version information, data codes, and error correction codes, to ensure that the specified information can be effectively recognized after binarization. The two-dimensional layer can customize the central logo according to requirements, select an appropriate two-dimensional code version and error correction level based on the size of the logo. If the logo already exists, the logo area does not belong to the effective encoding area of the three-dimensional code.

[0070] The three-dimensional layer specifically includes the following regions:

[0071] M1: Color Card Fusion Position Detection Graphic Location Area. The area range is the same as that of the two-dimensional hierarchical standard QR code position detection graphic area, both being three 7×7 code point-sized positioning patterns in the lower left, upper left, and upper right corners. After binarization processing, this area is the same as the two-dimensional hierarchy. This area adopts certain color card fusion rules, and specifically fuses 3 high-saturation colors and 24 color cards to improve the color correction rate;

[0072] M2: Template Location Graphic Area. The area range is an "L" - shaped area starting from the lower - right code point of the upper - left position detection graphic. After binarization processing, this area is the same as the two-dimensional hierarchy. This area adopts certain template color texture arrangement criteria, sets specific template colors and textures to improve the recognition accuracy. The specific arrangement criteria are: in the template location graphic area of the "L" - shaped 3D code, starting from the next code point of the code point where the corner point is located, the colors are arranged orderly and alternately in two paths. Then, on the extended sequences of the same color, the textures are rendered orderly and alternately. Ensure that each texture - color combination is arranged orderly;

[0073] M3: Personalized logo Area. This area is an optional item. This area is usually located in a square area of a certain size in the center of the 3D code. The upper limit of the area size is based on the error correction level of the two-dimensional hierarchy. This area can place pictures such as logos through certain compression technologies;

[0074] M4: Valid Data Area. This area includes all areas of the three - dimensional hierarchy except M1, M2, and M3, including the standard QR code version information area, format information area, position detection graphic separator area, and correction graphic area in the two - dimensional hierarchy. These areas are all valid data areas in the three - dimensional hierarchy. After binarization processing, this area is the same as the two - dimensional hierarchy. The code points in this area include information such as colors and textures.

[0075] As Figure 2 shown, the certain color card fusion rules described in M1 have the following color card fusion rules that enhance the edge features and reduce the influence of the color card on the encoding points of the valid data area:

[0076] M101, the RGB values of the internal 5×5 square areas of the three position detection graphics of the 3D code are RGB(204, 0, 0), RGB(0, 204, 0), RGB(0, 0, 204) respectively. Just ensure that the three square areas have different colors, and the corresponding relationship has no influence;

[0077] M102, the outermost black border and the middle - layer white frame of the position detection graphic of the 3D code are arranged with 24 color cards. This step follows certain arrangement rules to enhance the edge features and reduce the influence of the color card on the encoding points of the valid data area.

[0078] In one embodiment, the 24 color card colors and their corresponding numbers, RGB values, and grayscale value L = 0.299R + 0.587G + 0.114B are as follows:

[0079]

[0080]

[0081] The numbers 25 and 26 are pure white and pure black respectively, and their RGB values are (255, 255, 255) and (0, 0, 0).

[0082] For the outermost border of the three-dimensional hierarchical position detection pattern, a total of 24 code points are sequentially recorded as b1 from the upper left corner in a clockwise direction i , b2 i , b3 i , …, b24 i ; For each position detection pattern, there are 16 code points in the middle white frame, which are sequentially recorded as w1 from the upper left corner in a clockwise direction i , w2 i , w3 i , …, w16 i , where the subscript i codes the position detection pattern number. i = 1 corresponds to the upper left position detection pattern, i = 2 corresponds to the upper right position detection pattern, and i = 3 corresponds to the lower left position detection pattern. To strengthen the edge features and reduce the influence of the color card on the coding points, the code point-color correspondence is as follows:

[0083] b1 1 -13, b2 1 -14, b3 1 -9, b4 1 -15, b5 1 -18, b6 1 -3,

[0084] b7 1 -8, b8 1 -26, b9 1 -26, b10 1 -26, b11 1 -26, b12 1 -26,

[0085] b13 1 -24, b14 1 -26, b15 1 -26, b16 1 -26, b17 1 -26, b18 1 -26,

[0086] b19 1 -20, b20 1 -4, b21 1 -23, b22 1 -1, b23 1 -17, b24 1 -22,

[0087] b1 2 -8, b2 2 -3, b3 2 -18, b4 2 -15, b5 2 -9, b6 2 -14,

[0088] b7 2 -13, b8 2 -22, b9 2 -17, b10 2 -1, b11 2 -23, b12 2 -4,

[0089] b13 2 -24, b14 2 -26, b15 2 -26, b16 2 -26, b17 2 -26, b18 2 -26,

[0090] b19 2 -10, b20 2 -26, b21 2 -26, b22 2 -26, b23 2 -26, b24 2 -26,

[0091] b1 3 -24, b2 3 -26, b3 3 -26, b4 3 -26, b5 3 -26, b6 3 -26,

[0092] b7 3 -10, b8 3 -26, b9 3 -26, b10 3 -26, b11 3 -26, b12 3 -26,

[0093] b133 -8, b14 3 -3, b15 3 -18, b16 3 -15, b17 3 -9, b18 3 -14,

[0094] b19 3 -13, b20 3 -22, b21 3 -17, b22 3 -1, b23 3 -23, b24 3 -4;

[0095] w1 1 -25, w2 1 -25, w3 1 -20, w4 1 -19,

[0096] w5 1 -25, w6 1 -7, w7 1 -2, w8 1 -11,

[0097] w9 1 -25, w10 1 -6, w11 1 -5, w12 1 -12,

[0098] w13 1 -25, w14 1 -16, w15 1 -21, w16 1 -25,

[0099] w1 2 -25, w2 2 -19, w3 2 -20, w4 2 -25,

[0100] w5 2 -25, w6 2 -25, w7 2 -21, w8 2 -16,

[0101] w9 2 -25, w10 2 -12, w11 2 -5, w12 2 -6,

[0102] w13 2 -25, w14 2 -11, w15 2 -2, w16 2 -7,

[0103] w1 3 -25, w2 3 -7, w3 3 -2, w4 3 -11,

[0104] w5 3 -25, w6 3 -6, w7 3 -5, w8 3 -12,

[0105] w9 3 -25, w10 3 -19, w11 3 -20, w12 3 -25,

[0106] w13 3 -25, w14 3 -25, w15 3 -21, w16 3 -26。

[0107] As Figure 2 shown, a specific arrangement of the certain template color texture arrangement criteria described in M2 is as follows:

[0108] In the template positioning graphic area of the "L"-shaped three-dimensional code, starting from the next code point of the code point where the corner point is located, colors are arranged in two orderly and staggered ways. Then, textures are rendered in an orderly and staggered manner on the extended sequences of the same color. Ensure that each texture and color combination is arranged in an orderly manner.

[0109] Embodiment 2

[0110] Based on the same inventive concept, this embodiment discloses a method for generating a dual dynamic three-dimensional code based on random color textures as described in Embodiment 1. As Figure 3 shown, the method includes:

[0111] A1. Encode the two-dimensional hierarchical information of the dual dynamic three-dimensional code to generate a two-dimensional code with evenly distributed black and white code points;

[0112] A2. Obtain the total number of preset color types, and determine the number of color types of different binarization results according to the number of black and white code points in the two-dimensional code and the total number of preset color types;

[0113] A3. Determine the texture types;

[0114] A4. Calculate the standard two-dimensional code version of the two-dimensional level according to the information volume to be accommodated in the three-dimensional code two-dimensional level, the error correction level, and the information volume to be carried by the three-dimensional code.

[0115] A5. Process the three-dimensional code template according to the selected standard two-dimensional code version, color, and texture of the two-dimensional level.

[0116] A6. Based on the multiple three-dimensional code error correction technology, color the corresponding code points in the valid area with colors randomly with different binarization results to generate a dual dynamic three-dimensional code.

[0117] In the specific implementation process, in A1, first encode the information, then select a suitable version of the two-dimensional code, convert the encoding into a code point sequence of the two-dimensional code, and finally generate a two-dimensional code (two-dimensional level).

[0118] The user provides texture templates that are easy to distinguish by various graphic processes. The more the quantity, the richer the information volume accommodated in the three-dimensional level, but the greater the calculation and recognition difficulty. Considering the information density, computational complexity, and hardware facilities comprehensively, usually 4 colors, 4 textures, or 3 textures plus 1 blank texture are the best in step A3.

[0119] In the implementation of A4, methods such as repeated code extraction, jumping code extraction, forward and reverse order code extraction, weighted code extraction, etc. can be selected to effectively expand the number of equivalent code points in the valid data area of the three-dimensional level. Compare the number of equivalent code points with the estimated number of code points required to store the three-dimensional level information, and select a suitable two-dimensional level version 1. Then select a suitable two-dimensional level version 2 according to the information volume and error correction level of the two-dimensional level. Then select the larger version among version 1 and version 2 as the final version.

[0120] A5 can be implemented in the following ways:

[0121] A501. Render the color of the positioning area of the color card fusion position detection pattern using the color card fusion rule of M1.

[0122] A502. Render the color and texture of the template positioning pattern area using the template color texture arrangement criterion of M2.

[0123] The coloring rule of A6 is as follows:

[0124] A601. Arrange the code points in the valid data area of the three-dimensional level in a certain order to form an ordered code point sequence. Split the sequence into two ordered sequences CL1 and CL2 according to the black and white of the two-dimensional level. These two sequences store low gray value colors a, b, c... and high gray value colors A, B, C... respectively, and statistically calculate the lengths NCL1 and NCL2 of the sequences CL1 and CL2. According to the set error correction level, calculate the lengths of the error correction code and the information code of the two sequences respectively:

[0125] NError = NCL × level

[0126] NText = NCL - NError

[0127] Among them, level is the percentage of error correction symbols described by the error correction level. Then, according to the rules of the error correction level, the valid data area code points are divided into an information code area and an error correction code area respectively. Each code point in the information code area is randomly rendered with a color of the corresponding gray level type, and the error correction code area is not processed for the time being.

[0128] Then, the colors in the CL1 and CL2 sequences are respectively assigned 0, 1, 2... in the arrangement order in the template positioning graphic area to form new sequences and transcoded into binary to generate sequences BCL1 and BCL2. The data is represented as a polynomial m(x) and processed as follows:

[0129] g(x) = (x - α 0 )(x - α 1 )(x - α 2 )...(x - α NError )

[0130] r(x) = m(x) · x NError mod g(x)

[0131] Among them, g(x) is the generating polynomial, α is the primitive element in the finite field GF(256), usually α = 2. r(x) is the generated check codeword. The check codeword is reverse transcoded into an ordered sequence of colors, and the colors are arranged in the error correction area in an orderly manner according to the rules of the error correction level;

[0132] A602, randomly render textures for the corresponding code points in the colored valid data area, and the rules are as follows:

[0133] An ordered sequence of code points is formed according to the specified order based on the code point layout, denoted as TL. The length of TL is denoted as NTL. According to the set error correction level, calculate the lengths of the sequence information code and the error correction code:

[0134] NError = NCL × level

[0135] NText = NCL - NError

[0136] Among them, level is the percentage of error correction symbols described by the error correction level. Then, according to the rules of the error correction level, the valid code point area is divided into an information code area and an error correction code area respectively. Each code point in the information code area is randomly rendered with a texture, and the error correction code area is not processed for the time being.

[0137] Then, assign 0, 1, 2, … to the textures in the TL sequence according to their arrangement order in the template positioning graphic area, and transcode them into binary to generate the sequence BTL. Represent the data as a polynomial m(x) and perform the following operations respectively:

[0138] g(x) = (x - α 0 )(x - α 1 )(x - α 2 )…(x - α NError )

[0139] r(x) = m(x)·x NError mod g(x)

[0140] where g(x) is the generating polynomial, α is the primitive element in the finite field GF(256), usually α = 2. r(x) is the generated check codeword. Reverse transcode the check codeword into an ordered sequence of textures, and arrange the textures into the error correction area in an orderly manner according to the rules of the error correction level.

[0141] In specific implementation, the generation method can be implemented in the following manner:

[0142] A1, as Figure 7 shown in A, encode the two-dimensional hierarchical information to generate a two-dimensional code with a relatively uniform distribution of black and white code points, where the encoded information is: "Hello, this is a 3D-Barcode!";

[0143] A2, the user sets the number C n of color types. Then determine the number of color types of different binarization results, and the formula is as follows:

[0144]

[0145] C w = C n - C b

[0146] where N b and N w represent the number of black and white code points in the two-dimensional code respectively, C n represents the total number of color types, which is set by the user. The larger the number, the more information the three-dimensional hierarchy can accommodate, but the greater the calculation and recognition difficulty. C b represents the number of color types with low gray values that are black after binarization, and the color is black after binarization. C wrepresents the number of high-gray-value color types that are white after corresponding binarization. The color is white after binarization. Through the mask, in most cases, the number of the two colors can be made the same. The high-gray-value colors are denoted as A, B, C…, and the low-gray-value colors are denoted as a, b, c… After confirming the number of colors with different gray values, the user customizes and sets the specific pixel values of each color according to the gray limit;

[0147] A3. Determine the texture types. The user provides multiple texture templates that are easy to distinguish in graphic processing. The more the quantity, the richer the information contained in the three-dimensional level, but the greater the calculation and recognition difficulty. Considering the information density, calculation complexity, and hardware facilities comprehensively, usually 4 colors, 4 textures, or 3 textures plus 1 blank texture are the best;

[0148] A4. According to the information volume to be accommodated in the two-dimensional level of the three-dimensional code, the error correction level, and the information volume to be carried by the three-dimensional code, calculate the standard two-dimensional code version of the two-dimensional level. Methods such as repeated code taking, jumping code taking, forward and reverse order code taking, weighted code taking, etc. can be selected to effectively expand the equivalent code point quantity of the effective data area of the three-dimensional level. Compare the equivalent code point quantity with the estimated required code point quantity for storing the three-dimensional level information, and select a suitable two-dimensional level version 1. Then select a suitable two-dimensional level version 2 according to the two-dimensional level information volume and the error correction level. Then select the larger version of version 1 and version 2 as the final version. In this example, a three-dimensional code with a size of 25×25 is selected;

[0149] A5, as Figure 7 shown in B, process the three-dimensional code template according to the selected version, color, and texture. The steps are as follows:

[0150] A501. Render the color of the color card fusion position detection graphic positioning area;

[0151] A502. Render the color and texture of the template positioning graphic area;

[0152] A6, as Figure 7 shown in C, based on the multiple three-dimensional code error correction technology, randomly color the corresponding code points in the effective area with the colors of different binarization results. The rules are as follows:

[0153] A601. Form an ordered code point sequence for the code points in the effective data area of the three-dimensional level in a certain order. Split the sequence into two ordered sequences CL1 and CL2 according to the black and white of the two-dimensional level. These two sequences store the low-gray-value colors a, b and the high-gray-value colors A, B respectively, and statistically calculate the lengths NCL1 and NCL2 of the sequences CL1 and CL2. In this example, the length of CL1 is 232, and the length of CL2 is 249. According to the set error correction level, calculate the lengths of the error correction code and the information code of the two sequences respectively:

[0154] NError = NCL × level

[0155] NText = NCL - NError

[0156] Where level is the percentage of error correction symbols described by the error correction level. Then, according to the rules of the error correction level, the code points in the valid data area are divided into an information code area and an error correction code area respectively. Each code point in the information code area is randomly rendered with a color of the corresponding gray level type, and the error correction code area is not processed for the time being.

[0157] Then, the colors in the CL1 and CL2 sequences are respectively assigned 0, 1, 2... in the arrangement order in the template positioning graphic area to form new sequences and transcoded into binary to generate sequences BCL1 and BCL2, with lengths of 229 and 249 respectively in this example. In the example, the 1st to 48th, 81st to 128th, and 161st to 197th bits of CL1 store data codes, and the binary sequences corresponding to the randomly generated colors are respectively:

[0158] 101011000110101010011010100111011100100110001011, 011001011100011100100101111001100011010101001010, 1000101110010001011001101100110101011;

[0159] The remaining bits store error correction codes. The 1st to 48th, 81st to 128th, and 161st to 217th bits of CL2 store data codes, and the binary sequences corresponding to the randomly generated colors are respectively 010101110110001011010110001011100111000101010011, 111000001010011000110001101101010100111011001001, 001011110100010100011110010101000111101010011000110101001, and the remaining bits store error correction codes.

[0160] The data is represented as a polynomial m(x), and the following processing is performed respectively:

[0161] g(x) = (x - α 0 )(x - α 1 )(x - α 2 )...(x - α NError )

[0162] r(x) = m(x) · x NError mod g(x)

[0163] Among them, g(x) is the generating polynomial, α is the primitive element in the finite field GF(256), usually α = 2. r(x) is the generated check codeword. The check codeword is reverse-coded into an ordered sequence of colors, and the colors are arranged in the error correction area in an orderly manner according to the rules of the error correction level; in the example, the binary sequence corresponding to the color containing the complete error correction code of CL1 is 1010110001101010100110101001110111001001100010111001011010111111010011101110010001100101110001110010010111100110001101010100101001010101001000001000110111100110100010111001000101100110110011010101111011101110010100010000100001011,

[0164] 0 corresponds to the first dark color, 1 corresponds to the second dark color, and the colors are mapped to the corresponding code point positions. The binary sequence corresponding to the color containing the complete error correction code of CL2 is:

[0165] 010101110110001011010110001011100111000101010011010111100111111001111110101100011110000010100110001100011011010101001110110010010001000100010101010011110000111000101111010001010001111001010100011110101001100011010100101111100111100001100010101100100, 0 corresponds to the first light color, 1 corresponds to the second light color, and the colors are mapped to the corresponding code point positions. Using the error correction function, the logo can be directly attached to the central area as Figure 7 shown in D.

[0166] A6, as Figure 7 shown in E, randomly render the texture on the corresponding code points of the colored effective data area, and the rules are as follows:

[0167] According to the codepoint arrangement, an ordered sequence of codepoints is formed in a specified order, denoted as TL. The length of TL is denoted as NTL, and in this example, the length is 478. Among them, the data codes are stored at the 1st to 64th, 81st to 144th, 161st to 224th, 241st to 304th, 321st to 384th, and 401st to 462nd positions of CL1. The quaternary sequences corresponding to the randomly generated textures are respectively:

[0168] 0232122111130312200333310233312130032010312332120103030211120130,1321313022121000130102203222020230130203030320103000020330331322,3103120103311110200220131130210333213101221130200232331332203021,1002223222021303332223032202300232300031202322010003232312323221,2212031030201302121121333113303112031302012221123130110120303233,31210012121023011120132012113122202211101200323103233133232002;

[0169] The remaining positions store the error-correcting codes. According to the set error-correcting level, calculate the lengths of the sequence information code and the error-correcting code:

[0170] NError = NCL × level

[0171] NText = NCL - NError

[0172] Among them, level is the percentage of error-correcting symbols described by the error-correcting level. Then, according to the rules of the error-correcting level, the effective codepoint area is divided into an information code area and an error-correcting code area respectively. Each codepoint in the information code area is randomly rendered with a texture, and the error-correcting code area is not processed temporarily.

[0173] Then, assign 0, 1, 2... to the textures in the TL sequence according to their arrangement order in the template positioning graphic area and transcode them into binary to generate the sequence BTL. Represent the data as a polynomial m(x) and perform the following processing respectively:

[0174] g(x) = (x - α 0 )(x - α 1 )(x - α 2 )…(x - α NError )

[0175] r(x) = m(x)·x NError moge(x)

[0176] Among them, g(x) is the generating polynomial, α is the primitive element in the finite field GF(256), usually α = 2. r(x) is the generated check codeword.The complete binary sequence of data plus error correction code in the example is: 001011100110100101010111001101101000001111111101001011111101100111000011100001001101101111100110000100110011001001010110000111000101101001001000010111001111000101111001110111001010011001000000011100010010100011101010001000101100011100100011001100111000010011000000001000111100111101111010010101100001111010001100000100111101001101100001001111010101010010000010100001110101110010010011111110011101000110100101110010000010111011110111111010001100100111010001100000101000011101111000010000101010111010100010011100111111101010110011101000101100001011101000010000001110111011011011101110100101000011001101010011110110101011 101001100011010011001000011100100110010110011111110101111100110101100011011100100 0011010100101101101110001010001100011001110111101110001000001111100001000001111 110110010000011001100100101100010101100001111000011001011101101010001010010101000110000011101101001110111101111110111000001010001000011101111101011010000010;。

[0177] Reverse the check codeword into an ordered sequence of textures, and arrange the textures into the error correction area in an orderly manner according to the rules of the error correction level. The ordered texture sequence is:

[0178] 0232122111130312200333310233312130032010312332120103030211120130112210201130 3301132131302212100013010220322202023013020303032010300002033033132211120132203 0010331031201033111102002201311302103332131012211302002323313322030213101200220 1313201002223222021303332223032202300232300031202322010003232312323221100303110 3312223221203103020130212112133311330311203130201222112313011012030323313010013 30020033312100121210230111201320121131222022111012003231032331332320022020131331122002, where 0 to 3 respectively represent the 1st to 4th textures, and the generated graph is as Figure 7 shown in E. The logo can be directly attached to the central area as Figure 7 shown in F.

[0179] Embodiment 3

[0180] Based on the same inventive concept, the present invention also provides an encoding method for a dual dynamic three-dimensional code based on random color textures, which is implemented based on the three-dimensional code generated by the generation method of the dual dynamic three-dimensional code based on random color textures described in Embodiment 2. Please refer to Figure 4 , and the encoding method includes:

[0181] B1. According to the number of color types of different binarization results determined in step A2 and the texture types determined in step A3, obtain the number of types of color-texture combinations, and select a basic encoding base with a base above binary; in the example, octal is used as the basic encoding base;

[0182] B2. Obtain the information to be encoded, perform compression encoding on the information to be encoded, and convert it into an actual information code in the corresponding base;

[0183] B3. Weight the colors and textures of the code points in the three-dimensional hierarchical valid data area, convert them into a digital sequence of code point arrangements, combine with the actual information code for encoding, and calculate the mapping between different code points and code point combinations and the base code through the encoding algorithm;

[0184] B4. Select an adjacent segment of code points after the information code in the valid data area as the termination flag;

[0185] B5. Encrypt and store the valid encoded information in the decoding core. The valid encoded information includes the mapping between different code points and code point combinations and the base code.

[0186] In the specific implementation process, in step B3, after weighting the colors and textures of the code points in the three-dimensional hierarchical valid data area, it further includes selecting whether to use methods such as repeated code extraction, jumping code extraction, forward and reverse order code extraction, and weighted code extraction to expand the three-dimensional hierarchy.

[0187] Among them, B2 performs compression encoding on the information to be encoded, and the specific process is as follows:

[0188] An octal encoding algorithm ensures that each character or character combination uses an integer number of three-dimensional code points, avoiding the overall impact caused by damage to some code points. Examples encode the two columns of information "PR:3DCode\nPD:2024-10-31" and "PR:3DCode\nPD:2024-10-31\nSN:a9dn8fh29f" respectively. During the encoding process, the string is traversed and encoded. For each or every two characters, the following rules are followed for encoding:

[0189] C1: For a combination of two consecutive English numbers or general symbols (denoted as a, b),

[0190] 8Code = (ASCLL(a) << 7) + ASCLL(b)

[0191] Where 8Code is the octal encoding of this character, and ASCLL() is a function that calculates the ASCLL encoding value of the character. This type of 8Code occupies 5 octal digits. After being converted into binary, its first digit is 0, which can be distinguished from other characters during decoding and occupies a total of 15 binary digits;

[0192] C2: For a single English character (denoted as a) and this character is the last digit of the information string or the next character of this character is Chinese, the following formula is used for encoding:

[0193] 8Code = 1 << 9 + ASCLL(a);

[0194] Where 8Code is the octal encoding of the character, and ASCLL() is the function to obtain the ASCLL encoding value of the character. The 8Code of this type occupies 3 octal digits. After being converted to binary, its first two bits are 10, which can be distinguished from other characters during decoding, and a total of 9 binary bits are occupied;

[0195] C3: For a single Chinese character (denoted as c), it is encoded according to the following formula:

[0196] a = ASCLL(c)

[0197] 8Code[1] = 7

[0198] 8Code[2] = a >> 14

[0199] 8Code[3] = (0xFFFF & (a << 2)) >> 14 << 1 + 1;

[0200] 8Code[4] = (0xFFFF & (a << 4)) >> 14

[0201] 8Code[5] = (0xFFFF & (a << 6)) >> 13

[0202] 8Code[6] = (0xFFFF & (a << 9) >> 15 << 2 + 2

[0203] 8Code[7] = (0xFFFF & (a << 10)) >> 13

[0204] 8Code[8] = (0xFFFF(a << 13)) >> 13

[0205] Where 8Code[i] is the i-th bit of the octal encoding of the character, and ASCLL() is the function to obtain the ASCLL encoding value of the character. The 8Code of this type occupies 7 octal digits. After being converted to binary, its first four bits are 1110, which can be distinguished from other characters during decoding, and a total of 24 bits are occupied;

[0206] C4: Custom encoding rules, such as prefix codes, Huffman codes, and various encryption and compression encoding rules. After encoding, if the encoding is not octal, it is converted to octal.

[0207] The octal actual information codes after encoding the two columns of information are L1: "241221644014704207573114502520210721006214062150551426013263463", L2: "2412216440147042075731145025202107210062140621505514260132631421224716164403027131156161463206216346"

[0208] In step B3, after weighting the colors and textures of the three-dimensional hierarchical valid data area code points, it further includes selecting whether to use methods such as repeated code extraction, skipping code extraction, forward and reverse order code extraction, and weighted code extraction to expand the three-dimensional hierarchy.

[0209] Step B3 performs encoding by combining the three-dimensional code point arrangement and the encoding results of the corresponding base, and calculates the mapping between different code points and code point combinations and the basic elements of the actual information code through the encoding algorithm, including the following specific steps:

[0210] B301: Weight the colors and textures of the three-dimensional hierarchical valid data area code points, select whether to use methods such as repeated code extraction, skipping code extraction, forward and reverse order code extraction, and weighted code extraction to expand the three-dimensional hierarchy, and convert it into an n 颜色 ×n 纹理 -ary code point arrangement digital sequence, briefly recorded as the code point sequence. In the example, the code point sequence base is 16. Weigh 0, 1, 2, 3 for the four colors respectively, and 0, 1, 2, 3 for the four textures respectively. The final serial number of the code point is 4 × color weight + texture weight. Without expanding the three-dimensional hierarchy, the finally generated code point sequence is:

[0211] 0f7f5bf19d1b8b17784b3339c3fb7d7db0837c58b1733b1fc58f8b03959f817019379c3c9d343b8193b9bdf83f5718889b810bf4b7fbcb87b05b07cb4b0338d8bc8c03473c7fd7f3195fc1b33cf8cd4fb507138d8f31d518f8c3bc939538718f3735b5cdb791b870c73fff57b7f0fc35b14d3087301b17f05cc3fb3f7783df477bf3bf037b8fb84f37f44c35f433b789000f7f7bd7f737f994874b1587f5377ff7dfcf10b0b013879b91397f391f78f513075bc78dbfbd1b35b01949f07433b7938d0493fc074cf7fd79409fdb58bbc51d70dbfc9b9d71fff4f3dd505f04bb3d03b375b3b7f48774f4139775d7f00f

[0212] B302: Select an appropriate depth h to construct a full n-ary encoding tree of depth h. Take the first h - 1 code points from the code point sequence at an interval of h - 1, denoted as a 颜色 ×n 纹理 -ary encoding tree. Take the first h - 1 code points from the code point sequence at an interval of h - 1, denoted as a 1 , and at the same time a 1 maps the first bit of the actual information code. In the example, a depth of 5 is selected. Store the mapping relationship in the corresponding child node of the encoding tree, with the corresponding value being the first bit of the actual information code, and temporarily store the number of times of this mapping, 1, in this child node. Each time a mapping is performed, if a new mapping is generated, store the mapping relationship in the child node of the encoding tree. Each time the mapping terminates, check whether the end of the actual information code is reached. If not, perform the mapping of the next bit of the actual information code;

[0213] B303: At the i-th mapping:

[0214] If there is a code point at the head of the queue, take the first h - 1 code points at the head of the queue, denoted as a i .

[0215] If the corresponding binary tree node has not been encoded yet, map it to the i-th value of the actual information code, and temporarily store the number of times of this mapping, i, in this child node.

[0216] If the corresponding binary tree node already has a mapping and the mapping value is exactly the i-th value of the actual information code, then only temporarily store the mapping count i of this time into the sub-node.

[0217] Otherwise, continue to scan a code point b from the beginning of the code point sequence i (without taking it out), check the sequence n = a i + b i Whether there is a corresponding sub-node in the coding tree and whether the mapping value of the node is the i-th value of the actual information code. If both conditions are satisfied, then only temporarily store the mapping count i of this time into the sub-node;

[0218] If there is no corresponding sub-node, locate the position of the mapping count temporarily stored in the sub-node corresponding to the sequence a i in the complete actual information code. The sequences starting from these positions are denoted as m k = a i +…, compare the sequences of the same length n = a i + b i +… with all m k , until n and all m k are all different. Map the sub-node corresponding to the sequence n and temporarily store the mapping count i in the node;

[0219] If there is a corresponding node and the node has no mapping value, it means that the node still has sub-nodes. Deduce the set M of all corresponding valid code point sequences a i + b i +… under the sub-node of the node. Repeat scanning the code points c i , d i …(without taking it out) one by one from the beginning of the code point sequence until the sequence a i + b i +…+ d i + e i does not belong to M. If a i + b i +…+ d i The corresponding node has no mapping, then map the node to the i-th value of the actual information code and temporarily store the mapping count i of this time into the sub-node,

[0220] Otherwise, locate the position of the mapping count temporarily stored in the sub-node corresponding to the sequence a i + b i +…+ d i in the complete actual information code. The sequences starting from these positions are denoted as m k = a i + b i +…+ d i +…, compare the sequences of the same length ai +b i +…+d i +e i +… and all I k until n and all m k are all different, map the child nodes corresponding to the sequence n, and store the mapping times i temporarily at this node;

[0221] If it is detected that the code points are insufficient and empty when retrieving code points from the code point sequence, encoding failure occurs. If the number of failure times does not reach a certain number, pop the first t - 1 bits of the initial complete 3D code sequence, and use methods such as repeated code retrieval, jumping code retrieval, forward and reverse order code retrieval, weighted code retrieval, etc. to expand the code point sequence. Re - execute the encoding for the new code point sequence, where t is the number of encoding times. If the number of encoding failure times is greater than a certain number, return an error report;

[0222] B304: After encoding is completed, continue to use the encoding tree of B303 to retrieve a continuous segment from the beginning of the remaining code point sequence as the termination code. If the remaining 3D code queue is empty, the termination code is recorded as empty. If the remaining 3D code is not sufficient for mapping, record the number of code points in the remaining code point sequence.

[0223] Step B5 encrypts and stores the valid encoding information in the decoding core. Each time the encoding information in this step is independently encrypted and encapsulated and stored as a decoding core for decoding a specific 3D code. L1 and L2 generate two decoding cores in total, which are provided to different users respectively. The stored content includes: storing the user - defined encrypted information, storing whether to use methods such as repeated code retrieval, jumping code retrieval, forward and reverse order code retrieval, weighted code retrieval, etc. to expand the 3D hierarchy; storing the basic encoding base customized in B1; storing the basic color and texture serial numbers in B1; storing the encoding standard customized in B2; storing the code point mapping relationship of the encoding tree customized in B3; storing the termination code customized in B4. Encrypt the decoding core using an encryption algorithm.

[0224] Embodiment 4

[0225] Based on the same inventive concept, the present invention also provides a recognition method for a dual - dynamic 3D code based on random color texture, which is implemented based on the 3D code generated by the generation method of the dual - dynamic 3D code based on random color texture described in Embodiment 2. The recognition method and the decoding method include:

[0226] D1, by moving the recognition device, obtain the two - dimensional level information of the dual - dynamic 3D code;

[0227] D2, by moving the recognition device, obtain the code point arrangement sequence of the effective area of the three - dimensional level of the dual - dynamic 3D code;

[0228] D3, obtain the matching decoding core from the local or the server. Different users have different matching decoding cores at different times;

[0229] D4. Parse the 3D barcode sequence using the valid encoding information in the decoding core to obtain the information encoding (n).

[0230] D5. Parse the information encoding (n) using the encoding form of the valid encoding information in the decoding core to obtain the decoded information.

[0231] Among them, D1 and D2 are the steps of the recognition method, and D3 - D5 are the steps of decoding. Among them, D3 is the connection step between recognition and decoding, and can also be regarded as a necessary condition for decoding. The valid encoding information in the code core refers to the mapping stored in the decoding core, and the finally obtained decoded information refers to the information at the three-dimensional level of the dual dynamic 3D barcode.

[0232] In the specific implementation process, the two-dimensional level information in D1 is "Hello, this is a 3D-Barcode!".

[0233] Such as Figure 5 As shown, the recognition method of the dual dynamic 3D barcode based on random color texture has a fast response mode and a high-precision mode, including the following steps. Among them, some steps have different operation rules in the fast response mode and the high-precision mode. The recognition method includes:

[0234] Step 1. Use a mobile device to take pictures of the 3D barcode to obtain one or more clear color images.

[0235] Step 2. Preprocess the 3D barcode image, including: locating the 3D barcode, calibrating the color using a color card, and perspective transformation.

[0236] Step 3. Partition and denoise the 3D barcode image after image enhancement.

[0237] Step 4. Extract and average the template texture of the 3D barcode image, extract texture features, match texture types, extract and average template colors, match color types, and output texture-color digital signals.

[0238] In the specific implementation process, the specific method in Step 1 is as follows:

[0239] Use a mobile device to aim at the 3D barcode. When taking pictures, ensure that the light is uniform and good, the exposure is accurate, and there is a complete 3D barcode image within the range. Focus on the image, automatically obtain one or more color images when the resolution of the obtained image reaches the maximum value, and number the images respectively: S = {S1, S2, S3,..., S25, S26, S27,...}. In the high-precision mode, it is necessary to follow the system instructions to adjust the device angle and position, and obtain multiple color images at different positions respectively.

[0240] The specific method in Step 2 is as follows:

[0241] Step 201: Locate one or more acquired 3D code images. The specific process is as follows:

[0242] Step 2011: Detect corner points of the image according to the following formula:

[0243]

[0244] R = det(M) - k(trace(M))^2

[0245] where m(i, j) is the grayscale value of the image at pixel coordinate position (i, j), ω(i, j) is the window function. The simplest case is that the weight coefficients corresponding to all pixels within the window are all 1. det(M) is to find the determinant of the square matrix, trace(M) is to find the sum of the elements on the main diagonal of the square matrix, k is an empirical constant, generally with a value range of 0.04 - 0.06, M is the obtained feature matrix, and it is judged whether it is a corner point through the value of R. When the value of R is positive, the coordinate position (i, j) is considered a corner point. The obtained set of corner points is denoted as B;

[0246] Step 2012: Detect edges of the image according to the following steps:

[0247]

[0248]

[0249] where G i , G j are the gradients in the horizontal and vertical directions respectively, and G is the gradient magnitude. T(x, y) is the local threshold at pixel (x, y), I(i, j) represents the grayscale value of pixel (i, j) in the image, and N(x, y) is a local neighborhood around pixel (x, y). ω(i, j) is the weight of each pixel in the Gaussian kernel, usually following a normal distribution, expressed as: After threshold comparison, retain the significant edge features of the image. Use the union-find algorithm to obtain the connected components of all continuous edges, and perform linear interpolation on the broken edges with a small distance between two edge points. Extract and retain only all the closed edges;

[0250] Step 2013: Screen the edges for square features.

[0251] Step 2014: Check the nesting relationship of the approximated squares obtained by screening. The steps are as follows:

[0252] I 0 = {P 1 (x 1 , y 1 ), P 2 (x2 , y 2 ), …, P m (x m , y m ), … P n (x n , y n ), …}

[0253] Distance between each point

[0254]

[0255] Where I 0 is the set of points of the center of the square obtained in step 2013, I is a sub - interval of I 0 . A is the set of overlapping points, and d is the maximum deviation value of two points that can be judged as overlapping. Discard the point sets with the number of elements less than 3, and decompose the point sets with the number of elements greater than 3 into point sets with the number of elements 3; Calculate the area ratio for the squares corresponding to the points in the obtained point set A′ to get the areas S 1 , S 2 , S 3 and S 1 < S 2 < S 3 . If there is and then this point set meets the requirements of the three positioning patterns, and the center of this point set is denoted as M i ; S 1 , S 2 , S 3 The corresponding squares are respectively denoted as Outer i , Middle i , Inner i ; If and this point set meets the requirements of the calibration pattern, S 1 , S 2 , S 3 The corresponding squares are respectively denoted as Outer j , Middle j , Inner j . Otherwise this point set is invalid. If the number of valid positioning pattern point sets is less than three, exclude this picture;

[0256] Step 2015: Analyze the relative positions of the positioning points, and the formula is as follows:

[0257]

[0258] Where M i , M j , M kis the center point of the point set obtained in the three steps 2014, M ix , M iy is the center point M i 's horizontal and vertical pixel coordinates. Sort d from small to large, and denote them as d 1 , d 2 , d 3 . If and , then these three points meet the requirements.

[0259] Finally, determine three positioning points, denoted as D 1 , D 2 , D 3 , where D 1 is the right-angled vertex, and the counterclockwise angle ∠D 3 D 1 D 2 ≈90°.

[0260] Otherwise, exclude this picture;

[0261] Step 2016. Determine the final range of the 3D code, and the steps are as follows:

[0262]

[0263] P′ 4 =min{(P 4x - P x ) 2 +(P 4y - P y ) 2 |P∈B}

[0264] where P 1 , P 2 , P 3 are the points among the vertices of the corresponding Outer square of D 1 , D 2 , D 3 that are farthest from the midpoint of the line connecting D 2 , D 3 ; Q 2 , Q 3 are the points among the vertices of the corresponding Outer square of D 1 , D 2 , D 3 that are not on P 1 P 2 , P 2 P 3 , P 3 P 1 and its extension line. P 4x , P 4y are the vertices P 4Coordinates. B is the set of corner points obtained in step 2011;

[0265] Step 2017, central logo area detection, the steps are as follows:

[0266] Select from the set of center points I of the squares obtained in step 2013 0 the point closest to P 2 P 3 and closest to coincidence, and judge whether the perimeter of the square is less than P 1 ,P 2 ,P 3 the average value of the perimeters of the inner squares corresponding to P. If so, the 3D code is the detected central logo area, otherwise it means that the 3D code has a central logo area. Denote the square frame of the logo area as CLogo;

[0267] Step 202, image color calibration, the steps are as follows:

[0268] In the fast response mode, take D 1 ,D 2 ,D 3 the average RGB values of the pixels within the Inner square to which it belongs, denoted as R 1 ,G 1 ,B 1 ,R 2 ,G 2 ,B 2 ,R 3 ,G 3 ,B 3 .

[0269] R ′ =(R 1 +R 2 +R 3 +R ideal *2) / 3

[0270] G ′ =(G 1 +G 2 +G 3 +G ideal *2) / 3

[0271] B ′ =(B 1 +B 2 +B 3 +B ideal *2) / 3

[0272] M=[R ideal G ideal B ideal [R ′ G′ B ′ -1

[0273] [R′ i,j ,G′ i,j ,B′ i,j = [R i,j ,G i,j ,B i,j ·M

[0274] Among them, R ideal ,G ideal ,B ideal are the ideal RGB values, usually taken as 204. R i,j ,G i,j ,B i,j are the RGB values of the pixel point (i, j) of the 3D code image, and R′ i,j ,G′ i,j ,B′ i,j are the corrected RGB values of this point.

[0275] In the high-precision mode, color correction is performed using the auxiliary color card carried in the 3D code template. First, white balance correction is carried out, and the variation coefficients R s ,G s ,B s are calculated. The formula is as follows:

[0276]

[0277]

[0278] Among them, R l G l B l ,R m G m B m ,R d G d B d are the average values of R, G, and B obtained by separately extracting the main bodies of the color blocks numbered 20, 21, and 22 from the three positioning patterns and calculating them by number. ω l ,ω m ,ω d are the weights of each gray block. The weights are assigned according to the brightness and can also be set to be equal. Finally, the following white balance adjustment is performed on each pixel of the entire image, and the formula is as follows:

[0279] R ′ = R × R s ,G ′ = G × G s ,B ′ = B × B​s

[0280] Then perform color difference correction, and its formula is as follows:

[0281] M = (V·V T ) -1 .(V·X T )

[0282] [R′ i,j ,G′ i,j ,B′ i,j = [R i,j ,G i,j ,B i,j ,B i,j ,R i,j G i,j ,R i,j B i,j ,G i,j B i,j ,R i,j 2 ,G i,j 2 ,B i,j 2 ·M

[0283] Among them, both V and X are 10×Nc matrices, and V T represents the transpose of V. First, locate all the color card color patches according to the template rules. Assume the number of color cards under the template is Nc. Then, extract the R, G, and B values of the color patch main bodies of each type number from the three positioning patterns and calculate the average values of R, G, and B by number. Construct a polynomial of [1, R, G, B, RG, RB, GB, R 2 ,G 2 ,B 2 , and construct a 10×24 polynomial regression matrix V. At the same time, construct another 10×24 standard matrix X using the RGB standard values of the color cards included in the version information. Finally, correct the RGB values of the original pixels by applying M;

[0284] Step 203: Perform perspective transformation on the image, and its formula is as follows:

[0285] Assume the transformation matrix H is:

[0286]

[0287] Solve H through the following matrix operations:

[0288]

[0289] Perform operations on all pixel coordinates of the image:

[0290]

[0291] Among them, size is the pixel width of the three-dimensional code corrected image. H is the perspective transformation matrix. i and j respectively represent the pixel point coordinates within the three-dimensional code area of the original image, and i' and j' respectively represent the pixel point coordinates of the transformed three-dimensional code image. Only the pixel points whose horizontal and vertical coordinates are both within the range of [0, size] are retained;

[0292] Step 204: Interpolate the image after perspective transformation, and the steps are as follows:

[0293] In the fast response mode, bilinear interpolation is used for interpolation. In the fine recognition mode, bicubic interpolation is used for interpolation.

[0294] The specific method in Step 3 is:

[0295] Step 301: Partition the three-dimensional code image, and the steps are as follows:

[0296] D 1 The corresponding Outer1 square is transformed through Step 203 to the corresponding square Outer1'. Its upper left, upper right, lower left, and lower right vertices are respectively denoted as O1a, P1b, O1c, and O1d. Similarly, the upper left, upper right, lower left, and lower right vertices of Middle1' are respectively denoted as M1a, M1b, M1c, and M1d. The y coordinate ranges from O1dy + 1 to O3by - 1, and calculate and for I 均j calculate the absolute value of the gradient value grad(I 均j ). Count the number of consecutive regions where the gradient value is greater than a certain constant p, denoted as n. Divide the image into n + 15 equal parts both horizontally and vertically.

[0297] Step 302: Denoise the image. In the fast response mode, the steps are as follows:

[0298] Select the clearest one from the multiple images generated in Step 204 for denoising and subsequent image processing.

[0299] In the high-precision mode, the steps are as follows:

[0300] Step 3021: Take the average of the pixel points of the multiple three-dimensional code images generated in Step 204 according to the point-to-point position method to remove random noise; and determine the adaptive detection threshold for fixed noise;

[0301] Step 3022: According to the image coordinate information generated in Step 204, list the position coordinate information of the fixed noise and perform edge detection; if it is an edge, fill it by the mirror reflection method, and perform 3x3 median filtering algorithm processing on the pixel points at the position of the noise point according to the following formula:

[0302] g(i, j) = [f(i, j) + f(i + 1, j) + f(i - 1, j) + f(i, j + 1) + f(i, j - 1) + f(i + 1, j + 1)

[0303] + f(i + 1, i - 1) + f(i - 1, i + 1) + f(i - 1, i - 1)] / 9

[0304] Wherein, f(i, j) is the image grayscale value at the image pixel coordinate position (i, j), and g(i, j) is the processed picture.

[0305] Step 3023: Based on the block division in Step 204, perform noise reduction on the effective three-dimensional code code point block using the NLM algorithm.

[0306] The specific method in Step 4 of the recognition method is as follows:

[0307] Step 402: Average the texture features of the template area, and the steps are as follows:

[0308] Step 4021: Extract the texture features of the template area:

[0309] Let (m, n) be the m-th row and n-th column of the image after image partitioning, and LBP(m, n) represents the LBP histogram of this area. According to the previous claims, the LBP histograms of each element in the areas with the same texture in the three-dimensional code template positioning graphic area are averaged respectively to eliminate color errors, and average histograms LBP1, LBP2, LBP3, and LBP4 are generated.

[0310] Step 403: Use the LBP algorithm to extract the texture features of each effective area, and the histogram is denoted as LBP(m, n).

[0311] Step 404: Match the texture features of the effective information area with the template, and the steps are as follows:

[0312] The Euclidean distances between each effective area and the four template histograms are calculated respectively, and the template texture corresponding to the smallest distance value is the texture type of this area.

[0313] Step 405: Extract and average the color features of the template area, and the steps are as follows:

[0314] (m, n) is the image of the m-th row and n-th column after image partitioning, and RGB(m, n) represents the average value of each RGB color band in this area. According to the previous claims, for {LBP(m, n)|m = 7 and n = 7 + 2×t + 1 and n ≤ size - 7, k ∈ N}, {RGB(m, n)|m = 7 and n = 7 + 2×t + 2 and n ≤ size - 7, k ∈ N}, {RGB(m, n)|n = 7 and m = 7 + 2×t + 1 and m ≤ size - 7, k ∈ N}, {RGB(m, n)|n = 7 and m = 7 + 2×t + 2 and m ≤ size - 7, k ∈ N} these four sets, the R, G, and B values are averaged respectively to obtain R 1 G 1 B 1 , R 2 G 2 B 2 , R 3 G 3 B 3 , R 4 G 4 B 4 .

[0315] Step 406: Match the RGB features of the valid information area with the template, and the steps are as follows:

[0316] Calculate the distance d from each valid area to the RGB values of the four templates ix =(R x -R i ) 2 +(G x -G i ) 2 +(B x -B i ) 2 , and the template texture corresponding to the minimum distance value is the color model of this area.

[0317] Step 407: Output the texture-color as an array signal, and the steps are as follows:

[0318] After the texture and color are successfully matched with the template respectively, the code point sequence of the three-dimensional code valid data area is output in the specified order.

[0319] Embodiment 5

[0320] Based on the same inventive concept, the present invention also provides a decoding method for a dual dynamic three-dimensional code based on random color texture, which is implemented based on the recognition method of the dual dynamic three-dimensional code based on random color texture described in Embodiment 4. As Figure 6 shown, the decoding method includes:

[0321] E1. Perform multiple three-dimensional code information error correction on the sequence of code point in the valid data area of the three-dimensional code generated by the recognition method of the dual dynamic three-dimensional code;

[0322] E2. Use the information in the decoding kernel to restore the real sequence of arranged digital code points and restore the constructed coding tree, and use the coding tree to map the sequence of arranged digital code points into the actual information code;

[0323] E3. Restore the actual information code to the real data using the standard or user-defined coding method.

[0324] In the specific implementation process, E1 can be realized in the following ways:

[0325] E101. Perform Reed-Solomon error correction decoding at the two-dimensional level to restore the original data and recover the complete original data polynomial m(x). Then recompute the check symbols in combination with the generating polynomial g(x). Finally, restore the black-and-white binary arrangement sequence DCL of the entire valid code point area.

[0326] E102. Split DCL into two ordered sequences according to binary black-and-white conversion. Correlate each element of the sequences with the corresponding three-dimensional code points respectively to generate an ordered color sequence, and then convert the sequence into binary sequences UCL1 and UCL2 according to the matching color weighting of the template. If there are three-dimensional code points that cannot be recognized, they are replaced by 0. Calculate the syndrome value of each symbol using the generating polynomial g(x).

[0327] If all syndrome values S i = 0, it indicates that the codeword is correct. Otherwise, there is an error, and the next step of error location is performed. Use the Berlekamp-Massey algorithm to deduce the error location polynomial. After finding the error location, use the Chien search algorithm to determine the specific error location, and then calculate the correction value of each error symbol through the Forney algorithm. After error correction is completed, recover the complete original data polynomial m(x). Then recompute the check symbols in combination with the generating polynomial g(x). Finally, restore the color arrangement sequence CL of the entire valid code point area. In the example, the restored color sequence is the same as the sequence used in the three-dimensional code generation step.

[0328] E103. Restore the texture data: Convert the recognized ordered texture sequence into a binary code UCL. If there are three-dimensional code points that cannot be recognized, they are replaced by 0. Calculate the syndrome value of each symbol using the generating polynomial g(x).

[0329] If all syndrome values S i= 0 indicates that the codeword is error-free. Otherwise, there is an error and the next step of error localization is performed. Using the Berlekamp-Massey algorithm, the error location polynomial is derived. After finding the error location, the Chien search algorithm is used to determine the specific error location, and then the correction value of each error symbol is calculated by the Forney algorithm. After error correction is completed, the complete original data polynomial m(x) is restored. Furthermore, the parity symbol is recalculated in combination with the generating polynomial g(x). Finally, the texture arrangement sequence TL of all valid code point regions is restored. In the example, the restored texture sequence is the same as the sequence used in the 3D code generation step.

[0330] E104, Based on the 3D code template, decoding kernel information, and the code point sequence of the valid data region after repair in the above steps, the color and texture are weighted to generate a digital sequence of code point arrangements. As follows:

[0331] “0f7f5bf19d1b8b17784b3339c3fb7d7db0837c58b1733b1fc58f8b03959f817019379c3c9d343b8193b9bdf83f5718889b810bf4b7fbcb87b05b07cb4b0338d8bc8c03473c7fd7f319 5fc1b33cf8cd4fb507138d8f31d518f8c3bc939538718f3735b5cdb791b870c73fff57b7f0fc35b14d3087301b17f05cc3fb3f7783df477bf3bf037b8fb84f37f44c35f433b789000f7f7bd7f737f994874b1587f5377ff7dfcf10b0b013879b91397f391f78f513075bc78dbfbd1b35b01949f07433b7938d0493fc074cf7fd79409fdb58bbc51d70dbfc9b9d71fff4f3dd505f04bb3d03b375b3b7f48774f4139775d7f00f”.

[0332] In E2, the actual information codes obtained by the two decoding kernels are:

[0333] "241221644014704207573114502520210721006214062150551426013263463", "2412216440147042075731145025202107210062140621505514260132631421224716164403027131156161463206216346".

[0334] E3, and then use a standard or user-defined coding method to restore the actual information code to the real data. In the example, after decoding, what the customer type user with the first decoding core sees is:

[0335] PR: 3DCode

[0336] PD: 2024-10-33

[0337] The customer type user with the first decoding core can see more complete content, that is:

[0338] PR: 3DCode

[0339] PD: 2024-10-31

[0340] SN: a9dn8fh29f.

[0341] Example Six

[0342] Based on the same inventive concept, the present invention also provides a generating device for a dual dynamic three-dimensional code based on random color textures, including:

[0343] A two-dimensional hierarchical information encoding module for encoding the two-dimensional hierarchical information of the dual dynamic three-dimensional code to generate a two-dimensional code with a uniform distribution of black and white code points;

[0344] A binarization result color type calculation module for obtaining the total number of preset color types, and determining the number of color types of different binarization results according to the number of black and white code points in the two-dimensional code and the total number of preset color types. The formula is as follows:

[0345]

[0346] Where N b and N w respectively represent the number of black and white code points in the two-dimensional code, C n represents the total number of color types, C b represents the number of color types with a low gray value that are black after binarization, and the color is black after binarization, C wRepresents the number of high gray - scale value color types that are white after corresponding binarization, and the color is white after binarization;

[0347] The texture type determination module is used to determine the texture type;

[0348] The two - dimensional hierarchical standard QR code version determination module is used to obtain the two - dimensional hierarchical standard QR code version according to the information capacity to be accommodated in the two - dimensional level of the three - dimensional code, the error correction level, and the information capacity to be carried by the three - dimensional code;

[0349] The three - dimensional code template processing module is used to process the three - dimensional code template according to the selected two - dimensional hierarchical standard QR code version, color, and texture;

[0350] The coloring module is used to randomly color the code points corresponding to the valid area with colors of different binarization results based on the multiple three - dimensional code error correction technology to generate a dual - dynamic three - dimensional code.

[0351] Embodiment Seven

[0352] The present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in Embodiment Two is implemented.

[0353] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present invention. Obviously, those skilled in the art can make various changes and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and variations.

Claims

1. A dual dynamic 3D code based on random color texture, characterized in that: It includes two-dimensional hierarchy and three-dimensional hierarchy, wherein the two-dimensional hierarchy contains fixed two-dimensional hierarchy information, the three-dimensional hierarchy contains dynamic three-dimensional hierarchy information, and the three-dimensional hierarchy is converted into a two-dimensional hierarchy after binarization processing.

2. The dual dynamic three-dimensional code based on random color texture as claimed in claim 1, characterized in that: The two-dimensional hierarchical information includes: Position detection pattern, position detection pattern separator, positioning pattern, correction pattern, format information, version information, data code and error correction code.

3. The dual dynamic three-dimensional code based on random color texture as claimed in claim 1, characterized in that: The three-dimensional hierarchy includes: M1 color card fusion position detection graphic positioning area, M2 template positioning graphic area, M3 personalized logo area and M4 valid data area, wherein the color card fusion position detection graphic positioning area adopts a preset color card fusion rule, the template positioning graphic area is an L-shaped area starting from the lower right corner code point of the upper left corner position detection graphic, the personalized logo area is an optional option, a square area of ​​a certain size located in the center of the three-dimensional code, and the valid data area includes all areas in the three-dimensional hierarchy except M1, M2, and M3, including the standard two-dimensional code version information area, format information area, position detection graphic separator area and correction graphic area in the two-dimensional hierarchy.

4. The dual dynamic three-dimensional code based on random color texture as claimed in claim 3, characterized in that: The color card fusion position detection graphic positioning area adopts a preset color card fusion rule, including: Set RGB values ​​for the inner square areas of the three position detection patterns of the 3D code; Arrange 24 color cards for the outermost black frame and the middle white frame of the 3D code position detection graphic, and set the corresponding relationship between code points and colors.

5. A method for generating a dual dynamic three-dimensional code based on random color texture according to any one of claims 1 to 4, characterized in that: include: A1, encode the two-dimensional hierarchical information of the dual dynamic three-dimensional code to generate a two-dimensional code with uniform distribution of black and white code points; A2, obtain the total number of preset color types, and determine the number of color types of different binarization results according to the number of black and white code points in the QR code and the total number of set color types. The formula is as follows: C w =C n -C b Among them, N b and N w Respectively represent the number of black and white dots in the QR code, C n Represents the total number of color types, C b Represents the number of low grayscale color types whose corresponding colors are black after binarization. The colors are black after binarization. w Represents the number of high grayscale value color types that are white after the corresponding binarization, and the color is white after the binarization; A3, determine the texture type; A4, according to the amount of information required to be contained in the two-dimensional layer of the three-dimensional code, the error correction level and the amount of information required to be carried by the three-dimensional code, calculate and obtain a two-dimensional layer standard two-dimensional code version; A5, process the 3D code template according to the selected 2D hierarchical standard 2D code version, color and texture; A6, based on multiple 3D code error correction technology, uses different binarization results to randomly color the code points corresponding to the valid area to generate a double dynamic 3D code.

6. A method for encoding a dual dynamic three-dimensional code based on random color texture, which is implemented based on the three-dimensional code generated by the method for generating a dual dynamic three-dimensional code based on random color texture according to claim 5, characterized in that: The encoding method comprises: B1, according to the number of color types of different binarization results determined in step A2 and the number of texture types determined in step A3, the number of color-texture combinations is obtained, and a basic coding system higher than binary is selected; B2, obtaining the information to be encoded, compressing and encoding the information to be encoded, and converting it into an actual information code of a corresponding system; B3, weighting the color and texture of the code points in the three-dimensional effective data area, converting them into a code point arrangement digital sequence and encoding them in combination with the actual information code, and calculating the mapping between different code points and code point combinations and base codes through the encoding algorithm; B4, select a segment of adjacent code points after the valid data area information code as the termination mark; B5, encrypt the valid coding information and store it in the decoding core. The valid coding information includes the mapping of different code points and code point combinations with binary codes.

7. A method for identifying a dual dynamic three-dimensional code based on random color texture, which is implemented based on the three-dimensional code generated by the method for generating a dual dynamic three-dimensional code based on random color texture according to claim 5, characterized in that: The identification method comprises: Step 1: Use a mobile device to take a photo of the 3D code to obtain one or more 3D code images; Step 2: preprocessing the acquired 3D code image, including: locating the 3D code, calibrating the color using a color card, and perspective transformation; Step 3: Partition and reduce noise on the preprocessed 3D code image; Step 4: Perform texture extraction and averaging, texture feature extraction, texture type matching, template color extraction and averaging, color type matching, and texture-color digital signal output on the 3D code image template to obtain a code point sequence in the valid data area of ​​the 3D code.

8. A method for decoding a dual dynamic three-dimensional code based on random color texture, which is implemented based on the method for recognizing a dual dynamic three-dimensional code based on random color texture according to claim 7, characterized in that: The decoding method comprises: E1, performing multiple 3D code information error correction on the 3D code valid data area code point sequence generated by the dual dynamic 3D code recognition method; E2, using the information in the decoding core to restore the real code point arrangement digital sequence and restore the construction of the coding tree, and using the coding tree to map the code point arrangement digital sequence into the actual information code; E3, uses standard or user-defined encoding methods to restore the actual information code to real data.

9. A device for generating a dual dynamic three-dimensional code based on random color texture, characterized in that: include: A two-dimensional hierarchical information encoding module is used to encode the two-dimensional hierarchical information of the dual dynamic three-dimensional code to generate a two-dimensional code with uniform distribution of black and white code points; The binarization result color type calculation module is used to obtain the total number of preset color types, and determine the number of color types of different binarization results according to the number of black and white code points in the QR code and the total number of set color types. The formula is as follows: C w =C n -C b Among them, N b and N w Respectively represent the number of black and white dots in the QR code, C n Represents the total number of color types, C b Represents the number of low grayscale color types whose corresponding colors are black after binarization. The colors are black after binarization. w Represents the number of high grayscale value color types that are white after the corresponding binarization, and the color is white after the binarization; A texture type determination module, used to determine the texture type; A two-dimensional hierarchical standard two-dimensional code version determination module, used to obtain a two-dimensional hierarchical standard two-dimensional code version according to the amount of information required to be contained in the two-dimensional hierarchical layer of the three-dimensional code, the error correction level and the amount of information required to be carried by the three-dimensional code; A 3D code template processing module is used to process the 3D code template according to the selected 2D hierarchical standard 2D code version, color and texture; The coloring module is used to randomly color the code points corresponding to the valid area using different colors of binarization results based on multiple three-dimensional code error correction technologies to generate a double dynamic three-dimensional code.

10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for generating a dual dynamic three-dimensional code based on random color texture as described in claim 5 is implemented.

Citation Information

Cited By

  • Color database management system based on active display

    CN120994664A