Anti-counterfeiting mark encryption method and system

By generating a key embedded in the low-frequency region of the discrete cosine transform matrix, the problem of existing anti-counterfeiting marks being easily decoded is solved, thus achieving the security and robustness of encrypted watermarks.

CN121356757APending Publication Date: 2026-01-16AEROPRINT RFID TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511492721.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

In existing anti-counterfeiting label technologies, many anti-counterfeiting systems do not perform strong encryption processing on the label content, making it easy for anti-counterfeiting labels to be intercepted and decoded during transmission, storage, or identification, resulting in security vulnerabilities.

Method used

A first random sequence is generated based on product information. A key is generated using the Mason slew algorithm and a chaotic mapping model. AES encryption is performed, and a low-frequency region of the discrete cosine transform matrix is ​​embedded to generate an encrypted watermark, forming a second anti-counterfeiting mark.

Benefits of technology

It effectively prevents the anti-counterfeiting mark from being parsed and tampered with by attackers, and ensures that the watermark can still be extracted after image processing or transmission, thus possessing strong robustness and anti-cracking capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121356757A_ABST
    Figure CN121356757A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-counterfeiting mark encryption method and system, and belongs to the technical field of encryption, and the method comprises the steps: generating a first random sequence based on product information, encrypting the product information through an encryption algorithm based on the first random sequence as a secret key to obtain encrypted data, and generating an encrypted watermark based on the encrypted data. Then generating a first anti-counterfeiting mark based on the encrypted data, obtaining a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark, further identifying a low-frequency region in the discrete cosine transform matrix, embedding the encrypted watermark into the low-frequency region to obtain a second matrix, and storing the second matrix in the first matrix; and finally, a second anti-counterfeiting mark is generated based on the second matrix, so that the anti-counterfeiting mark is effectively prevented from being analyzed by an attacker and original product information is prevented from being tampered.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of encryption technology, in particular to a kind of anti-counterfeiting mark encryption method and system. BACKGROUND

[0002] Anti-counterfeiting mark is widely used in high-value commodities such as tobacco, liquor, medicine, cosmetics, electronic products and luxury goods as an important means to verify the authenticity of products. With the development of digital technology, two-dimensional code, anti-counterfeiting code and other digitally readable anti-counterfeiting marks have been widely used.

[0003] However, in the existing anti-counterfeiting mark technology, many anti-counterfeiting systems do not perform strong encryption on the mark content, resulting in security vulnerabilities in the transmission, storage or identification process of the anti-counterfeiting mark. SUMMARY

[0004] To solve the technical problems existing in the prior art, the present application provides an anti-counterfeiting mark encryption method, comprising the following steps: generating a first random sequence based on product information; encrypting the product information based on the first random sequence as a key through an encryption algorithm to obtain encrypted data; generating an encrypted watermark based on the encrypted data; generating a first anti-counterfeiting mark based on the encrypted data, and obtaining a corresponding discrete cosine transform matrix from the image of the first anti-counterfeiting mark; identifying the low-frequency region in the discrete cosine transform matrix, and embedding the encrypted watermark in the low-frequency region to obtain a second matrix; generating a second anti-counterfeiting mark based on the second matrix.

[0005] Further, the first random sequence is generated based on product information, specifically: generate an initial state array through the Mason rotation algorithm, and then perform nonlinear transformation on the initial state array to generate an initial random sequence; generate a chaotic sequence based on the initial random sequence through a chaotic mapping model; XOR the initial random sequence and the chaotic sequence to obtain the first random sequence.

[0006] Further, the initial state array is generated through the Mason rotation algorithm, specifically: After parameter structural processing of the product information, splice to obtain a composite parameter; perform hash calculation on the composite parameter through a hash algorithm to generate a hash value of a preset length; uniformly divide the hash value into multiple seed segments; Generate an initial state array by using a Meier rotation algorithm with the plurality of seed segments as input.

[0007] Further, the initial random sequence is generated by a nonlinear transformation, specifically: Each random number in the initial state array is bit-shifted XOR with its subsequent next random number to obtain each first random number, and the first four bytes of each first random number are replaced by using an S-box in the AES encryption algorithm to form an initial random sequence.

[0008] Further, the initial random sequence is iterated by using a chaotic mapping model to generate a chaotic sequence, specifically: Each element in the initial random sequence is sequentially input into the chaotic mapping model to generate each state value, each state value is combined into a new sequence, and each element in the new sequence is sequentially input into the chaotic mapping model, and the iteration is performed for a preset number of times to generate a chaotic sequence.

[0009] Further, the product information is encrypted by an encryption algorithm based on the first random sequence as a key to obtain encrypted data, specifically: The product information is encrypted by an AES encryption algorithm based on the first random sequence as a key to obtain primary ciphertext; The primary ciphertext and the first random sequence are combined to generate a second key by chaotic mapping, and the primary ciphertext is left-shifted according to the decimal value of the last three digits of the second key to obtain secondary ciphertext; The secondary ciphertext is encrypted by an AES encryption algorithm based on the second key to obtain the encrypted data.

[0010] Further, the corresponding discrete cosine transform matrix is obtained according to the image of the first anti-fake mark, specifically: The image of the anti-fake mark is converted into a gray-scale image, and the gray-scale image is divided into a plurality of sub-blocks of the same size; Each sub-block is subjected to two-dimensional discrete cosine transform to obtain each discrete cosine transform coefficient, and each discrete cosine transform coefficient is arranged according to the position of each sub-block in the gray-scale image to form a discrete cosine transform matrix.

[0011] The application also provides an anti-fake mark encryption system, comprising: A first generation module for generating a first random sequence based on product information; An encryption module for encrypting the product information by an encryption algorithm based on the first random sequence as a key to obtain encrypted data; A second generation module for generating an encrypted watermark based on the encrypted data; The watermark embedding module is configured to generate a first anti-counterfeiting mark based on the encrypted data, acquire a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark, identify a low-frequency region in the discrete cosine transform matrix, and embed the encrypted watermark in the low-frequency region to obtain a second matrix; The third generation module is configured to generate a second anti-counterfeiting mark based on the second matrix.

[0012] Further, the first random sequence is generated based on the product information, specifically as follows: An initial state array is generated by using the Mason rotation algorithm, and then a nonlinear transformation is performed on the initial state array to generate an initial random sequence; A chaotic sequence is generated based on the initial random sequence by using a chaotic mapping model; The initial random sequence and the chaotic sequence are XORed to obtain the first random sequence.

[0013] Further, the initial state array is generated by using the Mason rotation algorithm, specifically as follows: The product information is subjected to parameter structuralization processing and then spliced to obtain a composite parameter; A hash value of a preset length is generated by performing hash calculation on the composite parameter by using a hash algorithm; The hash value is uniformly divided into a plurality of seed segments; The plurality of seed segments are used as inputs to generate an initial state array by using the Mason rotation algorithm Compared with the prior art, the present application has the following advantages: The present application generates a first random sequence based on product information, and then encrypts the product information by using an encryption algorithm to obtain encrypted data, based on the first random sequence as a key, and then generates an encrypted watermark based on the encrypted data, and then generates a first anti-counterfeiting mark based on the encrypted data, acquires a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark, and then identifies a low-frequency region in the discrete cosine transform matrix, embeds the encrypted watermark in the low-frequency region to obtain a second matrix, and finally generates a second anti-counterfeiting mark based on the second matrix, effectively avoiding that the anti-counterfeiting mark is parsed and the original product information is tampered with by an attacker. The encrypted watermark is embedded in the DCT low-frequency coefficient region, the low-frequency component carries the main energy of the image, has strong robustness to conventional compression, noise, etc., and can ensure that the watermark can still be extracted after image processing or transmission; The initial state array is generated by using the Mason rotation algorithm, a high-periodicity pseudo-random number sequence is provided, the statistical uniformity and distribution uniformity are ensured, and the initial state array is subjected to nonlinear processing in combination with nonlinear transformation, the linear recursive structure of the Mason rotation algorithm is broken, and the data cracking resistance is improved. BRIEF DESCRIPTION OF DRAWINGS

[0014] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate one embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, for those skilled in the art, based on the drawings, other drawings can also be obtained without any creative work.

[0016] Figure 1 is a flowchart of an anti-counterfeiting identification encryption method of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work fall within the scope of protection of the present application.

[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative positional relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly.

[0019] In addition, the descriptions of "first", "second", etc. in the present application are only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that the technical solutions can be realized by those skilled in the art. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the scope of protection claimed by the present application.

[0020] Embodiment one Referring to Figure 1 The anti-counterfeiting identification encryption method provided by the present application specifically includes the following steps: S1, generating a first random sequence based on product information; S2, encrypting the product information by an encryption algorithm based on the first random sequence as a key to obtain encrypted data; S3, generating an encrypted watermark based on the encrypted data; S4, generating a first anti-counterfeiting mark based on the encrypted data, and obtaining a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark; S5, identifying a low-frequency region in the discrete cosine transform matrix, and embedding the encrypted watermark in the low-frequency region to obtain a second matrix; S6, generating a second anti-counterfeiting mark based on the second matrix.

[0021] In step S1, the product information includes but is not limited to product feature information, product production information, product serial number, etc.

[0022] In step S1, the first random sequence is generated based on the product information, specifically: S11, generating an initial state array through a Mersenne rotation algorithm, and then performing nonlinear transformation on the initial state array to generate an initial random sequence; S12, generating a chaotic sequence based on the initial random sequence through a chaotic mapping model; S13, performing XOR operation on the initial random sequence and the chaotic sequence to obtain the first random sequence.

[0023] In step S11, the initial state array is generated through the Mersenne rotation algorithm, specifically: S111, performing parameter structural processing on the product information and then splicing to obtain a composite parameter; S112, performing hash calculation on the composite parameter through a hash algorithm to generate a hash value of a preset length; S113, uniformly dividing the hash value into multiple seed segments; S114, using the multiple seed segments as input, and generating an initial state array using the Mersenne rotation algorithm.

[0024] The Mersenne rotation algorithm (Mersenne Twister, MT) is a high-quality pseudo-random number generation algorithm that uses a large internal state array to generate high-quality random sequences. An initial seed is needed to initialize its internal state array, and then a random sequence is generated. The present scheme uses product information as input parameters to ensure the uniqueness of the seed and the certainty related to the product. The internal mechanism of the Mersenne rotation algorithm is used to mix the entire state array once, and bit operations are used to further scramble the values to make them closer to the true random state. The entire state array obtained in this way constitutes the initial state array of the present scheme, which is a composite value based on product information, ensuring that different products generate different seeds while maintaining the repeatability and security of the process.

[0025] In step S11, the initial random sequence is generated through nonlinear transformation, specifically: Bit shift XOR operation is performed on each random number in the initial state array and its subsequent next random number to obtain each first random number, and the S-box in the AES encryption algorithm is used to replace the first four bytes of each first random number to form an initial random sequence.

[0026] AES (Advanced Encryption Standard) is a symmetric encryption algorithm, and the S-box (Substitution Box) in the AES is a nonlinear substitution table that can enhance the confusion of the algorithm through byte substitution.

[0027] In step S12, the initial random sequence is iterated using the chaotic mapping model to generate a chaotic sequence, specifically: Each element in the initial random sequence is sequentially input into the chaotic mapping model to generate each state value, and each state value is combined into a new sequence, and each element in the new sequence is sequentially input into the chaotic mapping model, and the iteration is performed for a preset number of times to generate a chaotic sequence.

[0028] The types of the chaotic mapping model can be selected from, but are not limited to, Logistic mapping, Tent mapping, etc.

[0029] In step S2, the product information is encrypted by an encryption algorithm based on the first random sequence as a key to obtain encrypted data, specifically: S21, encrypt the product information by the AES encryption algorithm based on the first random sequence as a key to obtain first-level ciphertext; S22, combine the first-level ciphertext and the first random sequence, generate a second key through chaotic mapping, and left shift the first-level ciphertext based on the last three digits of the second key to obtain second-level ciphertext; S23, encrypt the second-level ciphertext by the AES encryption algorithm based on the second key to obtain the encrypted data.

[0030] In step S3, the encrypted watermark is generated based on the encrypted data, specifically: S31, extract the hash value of the encrypted data, and obtain the UNIX timestamp when the hash value is extracted and the preset key of the product manufacturer; S32, after splicing the hash value, the UNIX timestamp and the preset key, perform a second hash operation to obtain a second hash value, and finally generate a digital watermark based on the second hash value; S33, generate a dynamic session key based on the preset key and the UNIX timestamp, and encrypt the digital watermark by the national symmetric encryption algorithm based on the dynamic session key to generate an encrypted watermark.

[0031] In step S4, the image according to the first anti-counterfeit mark is obtained corresponding discrete cosine transform matrix, specifically: S41, the image of the anti-counterfeit mark is converted into a gray image, and the gray image is divided into a plurality of sub-blocks with the same size; S42, each sub-block is subjected to two-dimensional discrete cosine transform to obtain each discrete cosine transform coefficient, and each discrete cosine transform coefficient is arranged according to the position of each sub-block in the gray image to form a discrete cosine transform matrix.

[0032] In step S5, the low-frequency region in the discrete cosine transform matrix is identified, specifically by regarding the region corresponding to the discrete cosine transform coefficient less than or equal to a preset value as a low-frequency region.

[0033] In step S6, the second matrix is used to generate a second anti-counterfeit mark, that is, the discrete cosine transform matrix embedded with the encrypted watermark is subjected to discrete pre-inverse transformation, that is, DCT inverse transformation to restore the corresponding anti-counterfeit mark image.

[0034] Embodiment two The application also provides an anti-counterfeit mark encryption system, which specifically comprises: A first generation module for generating a first random sequence based on product information; An encryption module for encrypting the product information based on the first random sequence as a key to obtain encrypted data through an encryption algorithm; A second generation module for generating an encrypted watermark based on the encrypted data; A watermark embedding module for generating a first anti-counterfeit mark based on the encrypted data, obtaining a corresponding discrete cosine transform matrix according to the image of the first anti-counterfeit mark, identifying a low-frequency region in the discrete cosine transform matrix, and embedding the encrypted watermark in the low-frequency region to obtain a second matrix; A third generation module for generating a second anti-counterfeit mark based on the second matrix.

[0035] The first random sequence is generated based on the product information, specifically: An initial state array is generated through a Mersenne rotation algorithm, and the initial state array is subjected to nonlinear transformation to generate an initial random sequence; A chaotic sequence is generated through a chaotic mapping model based on the initial random sequence; The initial random sequence and the chaotic sequence are subjected to XOR operation to obtain the first random sequence.

[0036] The initial state array is generated through the Mersenne rotation algorithm, specifically: The product information is parameter-structured and spliced to obtain a composite parameter; A hash value of a preset length is generated by performing hash calculation on the composite parameter through a hash algorithm; The hash value is uniformly divided into multiple seed segments; The multiple seed segments are used as input to generate an initial state array by using a Mersenne rotation algorithm.

[0037] The initial random sequence is generated by a nonlinear transformation, specifically: Each random number in the initial state array and its subsequent next random number are subjected to bit shift XOR to obtain each first random number, and the first four bytes of each first random number are replaced by using an S-box in the AES encryption algorithm to form an initial random sequence.

[0038] The initial random sequence is iterated by using a chaotic mapping model to generate a chaotic sequence, specifically: Each element in the initial random sequence is sequentially input into the chaotic mapping model to generate each state value, and each state value is combined into a new sequence, and each element in the new sequence is sequentially input into the chaotic mapping model, and the iteration is performed for a preset number of times to generate a chaotic sequence.

[0039] The product information is encrypted by an encryption algorithm based on the first random sequence as a key to obtain encrypted data, specifically: The product information is encrypted by an AES encryption algorithm based on the first random sequence as a key to obtain first-level ciphertext; The first-level ciphertext and the first random sequence are combined to generate a second key by chaotic mapping, and the first-level ciphertext is left-shifted according to the decimal value of the last three digits of the second key to obtain second-level ciphertext; The second-level ciphertext is encrypted by an AES encryption algorithm based on the second key to obtain the encrypted data.

[0040] The corresponding discrete cosine transform matrix is obtained according to the image of the first anti-fake mark, specifically: The image of the anti-fake mark is converted into a grayscale image, and the grayscale image is divided into multiple sub-blocks of the same size; Each sub-block is subjected to two-dimensional discrete cosine transform to obtain each discrete cosine transform coefficient, and each discrete cosine transform coefficient is arranged according to the position of each sub-block in the grayscale image to form a discrete cosine transform matrix.

[0041] Embodiment three The application further provides an electronic device, comprising a processor, a sending device, an input device, an output device and a memory.

[0042] Embodiment four The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program comprises program instructions.

[0043] The application has the following advantages: The application generates a first random sequence based on product information, encrypts the product information by an encryption algorithm based on the first random sequence as a key to obtain encrypted data, generates an encrypted watermark based on the encrypted data, generates a first anti-counterfeiting mark based on the encrypted data, acquires a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark, identifies a low-frequency area in the discrete cosine transform matrix, embeds the encrypted watermark in the low-frequency area to obtain a second matrix, and generates a second anti-counterfeiting mark based on the second matrix, thereby effectively avoiding that the anti-counterfeiting mark is parsed by an attacker and the original product information is tampered with. The encrypted watermark is embedded in the DCT low-frequency coefficient area, the low-frequency component carries the main energy of an image, has strong robustness to conventional compression and noise, and can ensure that the watermark can still be extracted after image processing or transmission. The initial state array is generated by the Mason rotation algorithm to provide a high periodicity pseudo-random number sequence, ensure statistical uniformity and distribution uniformity, and combine nonlinear transformation to perform nonlinear processing on the initial state array, break the linear recursive structure of the Mason rotation algorithm, and improve the data cracking resistance.

[0044] In the description, reference to "one embodiment," "an example," "certain examples," etc., mean that a particular feature, structure, material, or characteristic being referred to is included in at least one embodiment or example of the disclosure. The appearances of the phrases "in one embodiment," "an example," "in certain examples," etc., in various places in the specification are not necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0045] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit. When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially, or the part that contributes to the prior art, or all or a part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.

[0046] The above description is merely one specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for encrypting an anti-counterfeit mark, characterized in that, The method comprises the following steps: generating a first random sequence based on product information; encrypting the product information by an encryption algorithm based on the first random sequence as a key to obtain encrypted data; generating an encrypted watermark based on the encrypted data; generating a first anti-counterfeiting mark based on the encrypted data, and obtaining a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark; identifying a low-frequency area in the discrete cosine transform matrix, and embedding the encrypted watermark in the low-frequency area to obtain a second matrix; generating a second anti-counterfeiting mark based on the second matrix.

2. The anti-counterfeit identification encryption method according to claim 1, characterized in that, The first random sequence is generated based on the product information, and specifically: an initial state array is generated by a Mersenne rotation algorithm, and then a nonlinear transformation is performed on the initial state array to generate an initial random sequence; a chaotic sequence is generated by a chaotic mapping model based on the initial random sequence; the initial random sequence and the chaotic sequence are XORed to obtain the first random sequence.

3. The anti-counterfeit mark encryption method according to claim 2, characterized in that, The initial state array is generated by the Mersenne rotation algorithm, and specifically: after parameter structural processing of the product information, the product information is spliced to obtain a composite parameter; a hash value of a preset length is generated by performing hash calculation on the composite parameter by a hash algorithm; the hash value is uniformly divided into multiple seed segments; the multiple seed segments are used as inputs to generate the initial state array by the Mersenne rotation algorithm.

4. The anti-counterfeit mark encryption method according to claim 2, characterized in that, The initial random sequence is generated by the nonlinear transformation, and specifically: each random number in the initial state array and its subsequent next random number are bit-shifted and XORed to obtain each first random number, and then the first four bytes of each first random number are replaced by an S-box in an AES encryption algorithm to form the initial random sequence.

5. The anti-counterfeit identification encryption method according to claim 2, characterized in that, The chaotic sequence is generated by iterating the initial random sequence using the chaotic mapping model, and specifically: each element in the initial random sequence is sequentially input into the chaotic mapping model to generate each state value, each state value is combined into a new sequence, and each element in the new sequence is sequentially input into the chaotic mapping model, and the iteration is performed for a preset number of times to generate the chaotic sequence.

6. The anti-counterfeit identification encryption method according to claim 1, characterized in that, The product information is encrypted by the encryption algorithm based on the first random sequence as a key to obtain the encrypted data, and specifically: the product information is encrypted by an AES encryption algorithm based on the first random sequence as a key to obtain first-level ciphertext; a second key is generated by combining the first-level ciphertext and the first random sequence through chaotic mapping, and the first-level ciphertext is left-shifted according to the decimal value of the last three digits of the second key to obtain second-level ciphertext; the second-level ciphertext is encrypted by an AES encryption algorithm based on the second key to obtain the encrypted data.

7. The anti-counterfeit identification encryption method according to claim 1, characterized in that, The discrete cosine transform matrix corresponding to the image of the first anti-counterfeiting mark is obtained, and specifically: the image of the anti-counterfeiting mark is converted into a grayscale image, and the grayscale image is divided into multiple sub-blocks of the same size; each sub-block is subjected to two-dimensional discrete cosine transform to obtain each discrete cosine transform coefficient, and each discrete cosine transform coefficient is arranged according to the position of each sub-block in the grayscale image to form a discrete cosine transform matrix.

8. A system for encrypting a security mark, which applies the security mark encryption method according to any one of claims 1 to 7, characterized by, The method comprises: a first generation module for generating a first random sequence based on product information; An encryption module is configured to encrypt the product information based on the first random sequence as a key to obtain encrypted data through an encryption algorithm; A second generation module is configured to generate an encrypted watermark based on the encrypted data; A watermark embedding module is configured to generate a first anti-counterfeiting mark based on the encrypted data, to obtain a corresponding discrete cosine transform matrix according to an image of the first anti-counterfeiting mark, to identify a low-frequency region in the discrete cosine transform matrix, and to embed the encrypted watermark in the low-frequency region to obtain a second matrix; A third generation module is configured to generate a second anti-counterfeiting mark based on the second matrix.

9. The anti-counterfeit mark encryption system according to claim 8, characterized in that, The first random sequence is generated based on the product information, and specifically: An initial state array is generated through a Mersenne Twister algorithm, and an initial random sequence is generated through nonlinear transformation of the initial state array; A chaotic sequence is generated through a chaotic mapping model based on the initial random sequence; The initial random sequence and the chaotic sequence are XORed to obtain the first random sequence.

10. The anti-counterfeit mark encryption system according to claim 9, characterized in that, The initial state array is generated through the Mersenne Twister algorithm, and specifically: The product information is subjected to parameter structuralization processing and then spliced to obtain a composite parameter; A hash value of a preset length is generated through hash calculation of the composite parameter through a hash algorithm; The hash value is uniformly divided into multiple seed segments; The multiple seed segments are taken as inputs to generate the initial state array through the Mersenne Twister algorithm.