A tamper-resistant encryption sectorial coding method for commodity outer packaging
The encrypted sector circular encoding and decoding method solves the problem of insufficient uniqueness and recoverability of product information codes during circulation, realizes the uniqueness and efficient recovery of product information, and is suitable for information encoding and decoding of product outer packaging.
Patent Information
- Application Number
- CN202211149954.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-09-21
AI Technical Summary
Existing product information codes have problems with uniqueness and recoverability during circulation, especially when they are damaged or covered, making it difficult to trace product information.
An anti-interference encrypted sector circular encoding and decoding method is adopted to XOR encrypt the product information through a computer random encryption matrix and divide it into sector-shaped blocks. The information is stored using the central angle of the sector and printed on the outer packaging of the product to achieve uniqueness and recoverability of the information.
The uniqueness and recoverability of the product information code are improved. Even if part of the information is damaged or covered up, the product information can be effectively restored with high utilization rate and low cost.
Smart Images

Figure CN115511028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of commodity information encryption and decoding systems, and in particular to data processing of information encoding and decoding processes of commodity outer packaging in an anti-counterfeiting and tracing system, specifically to an anti-interference encryption sectoral encoding and decoding method for commodity outer packaging. Technical Background
[0002] With the continued development of the economy and the trend towards marketization, trade flows are becoming increasingly faster and more convenient. With the advancement of internet technology and intelligence, and the increasing frequency of online shopping, the primary mode of commodity distribution has shifted from offline to online. A more challenging challenge facing commodity manufacturers in this process is the non-uniqueness of product labeling, which makes it impossible to trace the goods during circulation. Furthermore, some distributors may counterfeit goods or damage product labels, potentially causing manufacturers to suffer significant economic losses.
[0003] The mainstream product information codes currently used in the market are QR codes or barcodes. While these codes offer advantages such as large information capacity and low production costs, their relatively fixed encoding methods and limited recoverability after damage make them unsuitable as unique product information codes. Therefore, improving the uniqueness and recoverability of product information codes is a critical issue. Summary of the Invention
[0004] The purpose of the present invention is to provide an anti-interference encrypted sector-circular encoding and decoding method for commodity outer packaging, which can effectively improve the recoverability of information after the packaging is damaged or covered, and provide one code for one item.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] An anti-interference encrypted sectoral circular encoding and decoding method for commodity outer packaging, characterized by comprising the following steps:
[0007] 1) Product information collection
[0008] The system collects commodity information through its collection device and converts it into a standard binary data format;
[0009] 2) Encrypt product information
[0010] The computer encrypts the binary product original information code and saves the code in sequence into the system database;
[0011] The specific encryption process is as follows: a random encryption matrix is generated by a computer and associated with the original information, and then the random encryption matrix is used to XOR encrypt the original information, and the encryption matrix and the sorted product information are stored in the system database in a certain order;
[0012] 3) Divide into fan-shaped blocks
[0013] The encrypted binary product information is divided into n segments, representing n sectors in the sector diagram. Each segment is identified by m bits. Each segment may have 2m-th power values, where m and n are positive integers.
[0014] 4) Generate the corresponding sectors for each block
[0015] First, convert the binary codes corresponding to the n blocks into decimal numbers. Then, use the formula θ = arctan(x) to calculate the central angle of the corresponding sector in radians. Here, θ is the central angle of the sector corresponding to the block, in rad, in the range (-π / 2, π / 2), and x is the decimal number corresponding to the block.
[0016] 5) Create a fan graph
[0017] Normalize the central angle radians of the aforementioned sectors to the interval (0, π / 2). This means summing the radian values and multiplying them by π / 2 radians according to their proportion in the sum to obtain the normalized radian value. Take a circle with radius r and a straight line as the central axis. Sequentially print the resulting sectors and computer-generated random intervals (the sum of each interval equals π / 2 radians) onto the semicircle on one side of the central axis. A mirror image of the other semicircle is then printed, symmetrically around the center, and applied to the product packaging. The radius r and the colors of the sector blocks and intervals can be selected as desired.
[0018] 6) Information Storage
[0019] The number of sectors and arc values and coding sequence are stored in a database;
[0020] 7) Information decoding
[0021] During the commodity circulation process, if the code is disturbed, the decoding method is used to recover the data and restore the commodity information. During decoding, the sector diagram on the packaging is identified, and the corresponding arc value and encrypted information are compared in the database. Then, the decryption is performed to obtain the corresponding commodity information.
[0022] In step 2), the commodity information is encrypted, and the unique information of each commodity package generated is subjected to a computer random encryption matrix.
[0023] In step 4), the product information is sectorized, and the product information is converted into arcs and stored in sectors of the sector diagram.
[0024] In step 6), the matrix information decoding is the inverse process of the encoding. When the encoding is disturbed, it is restored through the inverse process of the encoding to obtain the original matrix information corresponding to the encoding, and compared with the database to obtain the final corresponding product information.
[0025] Due to the adoption of the above-mentioned technical solution, the present invention can more effectively trace the flow of goods with fan-shaped circular markings, and has a strong ability to restore information for anti-counterfeiting goods and goods with damaged information markings. Since the product information is present in a semicircle, it can still be restored even if part of it is damaged. If the edge of the image is damaged, the center angle of the circle can be directly measured to obtain information. If the center of the image is damaged, the center angle can be calculated using the length of each arc segment and the radius of the circle, and the information can also be restored. At the same time, this product uses the angular relationship between the fan-shaped circle to store information, the surface utilization rate of the product outer packaging is high, and the cost of using black and white colors is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Flowchart of encoding and decoding of this method: (a) encoding, (b) decoding
[0027] Figure 2 Sector size distribution diagram of the embodiment
[0028] Figure 3 The embodiment does not perform symmetrical fan-shaped distribution and coding corresponding diagram
[0029] Figure 4 Symmetrical fan-shaped distribution and coding corresponding diagram of the embodiment
[0030] Figure 5 Final result of graphically encoding the embodiment
[0031] Figure 6 Annotated diagram of the graphical coding of the embodiment DETAILED DESCRIPTION
[0032] The present invention is further described below with reference to the accompanying drawings and examples.
[0033] The present invention proposes an anti-interference encrypted sectoral circular encoding and decoding method for commodity outer packaging. The main steps of the method are as follows:
[0034] 1. Specific implementation plan for coding
[0035] (1) Obtaining original product information
[0036] This example takes 16-bit binary code as an example
[0037] Assume that the original 16-bit binary code of the product is 1101_0111_1011_1111
[0038] (2) Generate an encryption sequence and perform XOR encryption
[0039] A 16-bit binary sequence is randomly generated by the computer to encrypt the original code of the product.
[0040] Assume the sequence is 1011_1110_1100_0101
[0041] The original product code and the encrypted sequence are XORed bit by bit. The resulting 16-bit binary sequence can be used as the encrypted product code. To decode, simply XOR the encrypted 16-bit binary sequence with the encrypted sequence bit by bit to obtain the original code.
[0042] For example, the original code and the encrypted sequence mentioned in this example are XORed bit by bit to obtain:
[0043] 0110_1001_0111_1010
[0044] (3) Divide the fan-shaped blocks according to the obtained code
[0045] Simply put, the 16-bit binary code can be divided into four blocks (m=4), and the possible values of the blocks are 16
[0046] (n=4), in this example the values are 0110, 1001, 0111, 1010 respectively.
[0047] (4) Generate sectors corresponding to each block
[0048] First, convert the binary codes corresponding to the four blocks into decimal numbers: 6, 9, 7, and 10. Next, use the formula θ = arctan(x) to calculate the central angle of the corresponding sector. Here, θ is the central angle of the sector corresponding to the block, in rad, ranging from (-π / 2 to π / 2), and x is the decimal number corresponding to the block. The central angles corresponding to the four blocks are: 1.406, 1.460, 1.429, and 1.471, in rad.
[0049] (5) Create a fan circle diagram
[0050] Normalize the central angles of the aforementioned sectors and restrict them to the interval (0, π / 2). This means summing the radian values and plotting the graph based on their proportions relative to the sum. The corresponding proportions of π / 2 radians for the aforementioned central angles are: 0.245, 0.253, 0.248, and 0.255. The actual radian values of each block are the product of these proportions and the π / 2 radian value. Using a computer, randomly select five positive decimals that sum to 1, and use these as intervals to represent the corresponding π / 2 radian proportions: 0.122, 0.135, 0.476, 0.246, and 0.021. In this example, black is used as the information storage block, and white is used as the interval block. At this point, plot each sector block and the corresponding sector in the interval sequentially within a semicircle, and mirror the resulting entire graph.
[0051] 2. Specific Decoding Measures
[0052] (1) Scan the graphic code
[0053] Using an image recognition algorithm, the central angles of the blocks on either side of the axis in the sector diagram are measured, and the decimal numbers corresponding to each block are obtained by rounding off the formula x = arctan(θ), which is then restored to the original 16-bit binary number.
[0054] (2) XOR decoding
[0055] Then, this 16-bit encryption code is XORed bit by bit with the 16-bit binary encryption sequence generated by the computer during the corresponding time period of the day to obtain the original code.
Claims
1. A method for anti-interference encryption sectoral circular encoding and decoding for commodity outer packaging, characterized in that: The following steps are involved: 1) Product information collection The system collects commodity information through its collection device and converts it into a standard binary data format; 2) Encrypt product information The computer encrypts the binary product original information code and saves the code in sequence into the system database; The specific encryption process is as follows: a random encryption matrix is generated by a computer and associated with the original information in step 1), and then the original information is XOR-encrypted using the random encryption matrix, and the encryption matrix and the sorted product information are stored in a system database in a certain order; 3) Divide into fan-shaped blocks The encrypted binary product information is divided into n segments, representing n sector blocks in the sector graph. Each segment is identified by m bits. Each segment may have 2m-th power values, where m and n are positive integers. 4) Generate the corresponding sectors for each block First, convert the binary codes corresponding to the n blocks into decimal numbers. Then, use the formula θ = arctan(x) to calculate the radian value of the central angle of the corresponding sector. Here, θ is the central angle of the sector corresponding to the block, in rad, ranging from (-π / 2 to π / 2), and x is the decimal number corresponding to the block. 5) Create a fan graph Normalize the central angle of the sector to the interval (0, π / 2). Take a circle with a radius of r and a straight line as the central axis. Print the sectors obtained by division and the computer-generated random intervals (the sum of the intervals is equal to π / 2 radians) in sequence on the semicircle on one side of the central axis. Perform a mirror image printing on the other semicircle symmetrically and spray it on the product packaging. 6) Information Storage The number of sectors and arc values and coding sequence are stored in a database; 7) Information decoding During the commodity circulation process, when the code is disturbed, the data is recovered and the commodity information is restored through decoding methods; During decoding, the sector diagram on the package is identified, and the corresponding radian value and encrypted information are compared in the database, and then decrypted to obtain the corresponding product information.
2. The anti-interference encryption sector circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 2), the commodity information is encrypted, and the unique information of each commodity package generated is encrypted by computer XOR.
3. The anti-interference encryption sector circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 4), the product information is sectorized, and the product information is converted into arcs and stored in sectors of the sector diagram.
4. The anti-interference encryption sector circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 4), the radian value of the central angle of the corresponding sector is calculated using the formula θ=arctan(x), where θ is the central angle of the sector corresponding to the block, the unit is rad, the range is (-π / 2, π / 2), and x is the decimal number corresponding to the block.
5. The anti-interference encryption sector circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 5), the radian value of the central angle of the sector is normalized to be limited to the interval (0, π / 2), that is, after summing up the radian values, the radians are multiplied by π / 2 radians according to their proportion in the total to obtain their normalized radian values.
6. The anti-interference encrypted sectoral circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 5), spray on the outer packaging of the product: the radius r and the colors of the fan-shaped blocks and intervals are selected as required.
7. The anti-interference encryption sector circular encoding and decoding method for commodity outer packaging according to claim 1, characterized in that: In step 7), the matrix information decoding is the inverse process of the encoding. When the encoding is disturbed, it is restored through the inverse process of the encoding to obtain the original matrix information corresponding to the encoding, and compared with the database to obtain the final corresponding product information.
Citation Information
Patent Citations
Non-linear structure geometrical code capable of expressing information
CN105046308A
A graphics information encoding and decoding method for commodity outer packaging
CN109242510A