Trademark identification method and system based on anti-counterfeiting coding

Through anti-counterfeiting encoding generation and blockchain evidence storage technology based on chaotic encryption, combined with the trademark authenticity and false identification model, the existing trademark identification methods are solved, and efficient and accurate trademark identification is achieved.

CN119129620BActive Publication Date: 2025-08-22JIANGSU NUOZHEN ANTI COUNTERFEITING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411134788.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-08-22
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The existing trademark identification technology relies on low manual identification efficiency and strong subjectivity, insufficient adaptability of methods based on visual features, high cost and is not suitable for contactless detection, and methods based on anti-counterfeiting labels are easy to be replicated, making it difficult to meet the needs of efficient and accurate trademark identification.

Method used

An anti-counterfeiting encoding generation algorithm based on chaotic encryption is used to generate a highly random and unpredictable anti-counterfeiting encoding, and embed it in the trademark image. It is verified through blockchain technology, combined with the trademark authenticity and false identification model and multi-source evidence to achieve efficient and accurate identification of trademarks.

Benefits of technology

It improves the security and aggressiveness of trademark identification, ensures the accuracy and uniqueness of the identification results, can resist image tampering, and achieves efficient and reliable judgment on trademark authenticity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129620B_ABST
    Figure CN119129620B_ABST
Patent Text Reader

Abstract

The present invention provides a trademark identification method and system based on anti-counterfeiting coding, which relates to the technical field of anti-counterfeiting identification, including obtaining a trademark image to be identified and preprocessing it, using an anti-counterfeiting code generation algorithm based on chaotic encryption to generate a corresponding anti-counterfeiting code, embedding the generated anti-counterfeiting code into a standard trademark image to obtain a trademark image carrying the anti-counterfeiting code, and encoding and positioning it to obtain a standardized anti-counterfeiting code image; decoding the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, verifying the validity of the original bit stream through hash verification, and obtaining an anti-counterfeiting code verification result; using a pre-trained trademark authenticity discrimination model to discriminate the authenticity confidence of the trademark image to be identified, and based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with pre-acquired multi-source heterogeneous trademark identification evidence, outputting a final trademark identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to anti-counterfeiting identification technology, and in particular to a trademark identification method and system based on anti-counterfeiting coding. Background Art

[0002] Trademark counterfeiting and counterfeiting continue to infringe trademark rights and interests, severely damaging the legitimate rights and interests of businesses and the vital interests of consumers. Existing trademark authentication technologies primarily rely on manual identification and testing, which suffers from low efficiency and high subjectivity, making it difficult to meet the growing demand for trademark authentication.

[0003] Currently, academia and industry have conducted a series of research and practice on trademark identification. Traditional trademark identification methods mainly include:

[0004] (1) Visual identification based on human experience. Professional appraisers, relying on years of accumulated experience, judge the authenticity of a trademark by observing its color, texture, and other characteristics. However, this method relies on the subjective judgment of the appraiser and is easily affected by personal ability and experience. It has low accuracy and low efficiency.

[0005] (2) Feature extraction based on image processing. Computer vision technology is used to extract the color histogram and texture features of trademark images, and then the authenticity of the trademark is determined through feature matching. However, simple visual features cannot fully depict the characteristics of the trademark and are not adaptable to complex counterfeiting methods.

[0006] (3) Material identification based on spectral analysis. The authenticity of trademarks can be identified by analyzing the spectral characteristics of the printed materials, such as ink composition and paper material. This method requires professional spectral analysis equipment, which is expensive and not suitable for non-contact detection scenarios.

[0007] (4) Tracking and tracing based on anti-counterfeiting labels. Anti-counterfeiting labels, such as QR codes and RFID tags, are attached to trademarks. Product information can be obtained by scanning the labels to verify the authenticity of the trademarks. However, anti-counterfeiting labels are easy to copy and imitate, and require additional costs, which limits their practical application. Summary of the Invention

[0008] The embodiments of the present invention provide a trademark authentication method and system based on anti-counterfeiting coding, which can solve the problems in the prior art.

[0009] According to a first aspect of the embodiments of the present invention,

[0010] Provides trademark authentication methods based on anti-counterfeiting codes, including:

[0011] Acquire the trademark image to be authenticated and pre-process it to obtain a standard trademark image. Based on the standard trademark image, use the chaotic encryption-based anti-counterfeiting code generation algorithm to generate a corresponding anti-counterfeiting code. Embed the generated anti-counterfeiting code into the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code. Perform coding positioning on the image to obtain the corresponding coding area. Correct the located coding area to obtain a standardized anti-counterfeiting code image.

[0012] The standardized anti-counterfeiting code image is decoded to obtain the original bit stream of the anti-counterfeiting code, and the original bit stream of the anti-counterfeiting code is compared with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system. The validity of the original bit stream is verified by hash verification to obtain the anti-counterfeiting code verification result:

[0013] The authenticity confidence of the trademark image to be identified is judged using a pre-trained trademark authenticity discrimination model to obtain the authenticity confidence of the trademark image to be identified. Based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence, the final trademark identification result is output.

[0014] According to a second aspect of the embodiments of the present invention,

[0015] Provides a trademark authentication system based on anti-counterfeiting coding, including:

[0016] The first unit is used to obtain a trademark image to be authenticated and perform preprocessing to obtain a standard trademark image; based on the standard trademark image, a corresponding anti-counterfeiting code is generated using an anti-counterfeiting code generation algorithm based on chaotic encryption; the generated anti-counterfeiting code is embedded in the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code; the code is located to obtain a corresponding code area; the located code area is corrected to obtain a standardized anti-counterfeiting code image;

[0017] The second unit is used to decode the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system, verify the validity of the original bit stream through hash verification, and obtain an anti-counterfeiting code verification result;

[0018] The third unit is used to use a pre-trained trademark authenticity discrimination model to discriminate the authenticity confidence of the trademark image to be identified, obtain the authenticity confidence of the trademark image to be identified, and output the final trademark identification result based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence.

[0019] According to a third aspect of the embodiments of the present invention,

[0020] An electronic device is provided, comprising:

[0021] processor;

[0022] a memory for storing processor-executable instructions;

[0023] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0024] According to a fourth aspect of the embodiments of the present invention,

[0025] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0026] This embodiment introduces an anti-counterfeiting code generation algorithm based on chaotic encryption. Leveraging the chaotic system's sensitivity to initial values ​​and random trajectory, it generates highly random and unpredictable anti-counterfeiting codes, effectively enhancing the security and anti-attack resistance of the anti-counterfeiting code and preventing malicious cracking and copying. Using code embedding and code positioning techniques, the generated anti-counterfeiting code is synchronously bound to the trademark image, ensuring the consistency and integrity of the trademark image and the anti-counterfeiting code. Even if the trademark image is cut or tampered with, the code area can still be accurately located, allowing the complete anti-counterfeiting code information to be extracted.

[0027] Through code area correction and standardization, code distortion and deformation caused by factors such as trademark image shooting angle and lighting conditions are eliminated, restoring high-quality anti-counterfeiting code images, providing reliable input for subsequent code verification, and improving the accuracy of anti-counterfeiting code verification. Using blockchain technology to build an anti-counterfeiting code evidence system, the standard anti-counterfeiting code bitstream is stored in the blockchain ledger. Leveraging the decentralized and tamper-proof characteristics of blockchain, the uniqueness and traceability of the anti-counterfeiting code is ensured, effectively preventing the anti-counterfeiting code from being forged or replaced. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the process of a trademark identification method based on anti-counterfeiting coding according to an embodiment of the present invention;

[0029] Figure 2 Schematic diagram of the structure of a trademark authentication system based on anti-counterfeiting coding according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0031] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0032] Figure 1 FIG. 1 is a flow chart of a trademark identification method based on anti-counterfeiting coding according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0033] S101. Obtain and pre-process the trademark image to be authenticated to obtain a standard trademark image. Based on the standard trademark image, generate a corresponding anti-counterfeiting code using an anti-counterfeiting code generation algorithm based on chaotic encryption. Embed the generated anti-counterfeiting code into the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code. Locate the code on the image to obtain the corresponding coding area. Correct the located coding area to obtain a standardized anti-counterfeiting code image.

[0034] In an optional embodiment,

[0035] Based on the standard trademark image, the corresponding anti-counterfeiting code is generated by using the anti-counterfeiting code generation algorithm based on chaotic encryption. The generated anti-counterfeiting code is embedded in the standard trademark image to obtain the trademark image carrying the anti-counterfeiting code. The code is then positioned to obtain the corresponding coding area. The positioned coding area is corrected to obtain a standardized anti-counterfeiting code image including:

[0036] Extracting the hash value of the standard trademark image and combining it with the key provided by the trademark owner to generate a random sequence through chaotic mapping, permuting and diffusing the random sequence to obtain a binary anti-counterfeiting code, and performing error correction coding and asymmetric encryption on the binary anti-counterfeiting code to obtain an encrypted anti-counterfeiting code;

[0037] The encrypted anti-counterfeiting code is embedded into the standardized trademark image using digital watermarking technology. The standardized trademark image is decomposed into low-frequency sub-bands and high-frequency sub-bands through discrete wavelet transform. The embedding strength is adaptively adjusted according to the importance of each sub-band. The bit information of the encrypted anti-counterfeiting code is embedded at the same time. The trademark image carrying the anti-counterfeiting code is reconstructed through inverse discrete wavelet transform.

[0038] Based on the obtained trademark image with anti-counterfeiting code, the edge detection algorithm is used to extract its region contour, and the initial code region is screened out by combining the prior knowledge of the anti-counterfeiting code. The initial code region is screened using the region proposal network, multiple candidate regions are generated, and classification and regression are performed, and finally the target code region is output;

[0039] The target coding area is preprocessed, and the preprocessed target coding area is geometrically corrected to finally obtain a standardized anti-counterfeiting coding image.

[0040] For example, a standard trademark image is required as a basis, typically provided by the trademark owner. Image processing techniques are then used to extract feature information from this standard trademark image. Common feature extraction algorithms include SIFT and SURF. The extracted feature information typically includes the location, scale, and orientation of key points.

[0041] Next, the extracted feature information is processed to generate a hash value for the standard trademark image. Hash algorithms can map data of any length to a fixed-length binary string and have good collision resistance. Common hash algorithms include MD5 and SHA-1. This solution uses the SHA-256 algorithm to generate a 256-bit hash value.

[0042] The trademark owner provides a pre-set key as the seed for generating the random sequence. The key is usually a binary string with a length of at least 128 bits to ensure sufficient security.

[0043] This scheme uses a chaotic map to generate random sequences. Chaotic systems are extremely sensitive to initial values, exhibit randomness and unpredictability, and are widely used in cryptography. Common chaotic maps include the Logistic map, the Tent map, and the Sine map. This scheme uses the Logistic map, which is expressed as:

[0044] x(n+1)=μ·x(n)·[1-x(n)];

[0045] Where μ is the bifurcation parameter, ranging from 0 to 4; x is the system variable, with an initial value of x(0)∈(0,1). When μ=4, the system is in a chaotic state.

[0046] Perform an XOR operation on the hash value and the key, and normalize the result to the interval (0, 1). This is used as the initial value x(0) of the chaotic map. Iterate the chaotic map N times, obtaining an x(n) value each time. Binarize this value to obtain a random binary sequence. The size of N depends on the required security code length.

[0047] The random sequence generated in the previous step is further processed using the permutation and diffusion methods to enhance its security. Permutation and diffusion are two basic principles of modern cryptography.

[0048] Permutation refers to changing the position of elements in a sequence. Common permutation algorithms include circular shift and swap. This scheme performs a circular shift on a random sequence, with the shift amount set to 1 / 4 of the sequence length.

[0049] Diffusion involves changing the values ​​of elements in a sequence so that a small difference in the input results in a significant change in the output. This solution uses an XOR operation to diffuse each bit in the sequence. Specifically, a pseudo-random sequence of the same length as the random sequence is generated, and the corresponding bits of the two sequences are XORed to produce the diffused sequence.

[0050] After permutation and diffusion processing, a binary anti-counterfeiting code for embedding the trademark image is obtained.

[0051] In order to improve the robustness and confidentiality of anti-counterfeiting codes, error correction coding and encryption are required.

[0052] Error correction coding encodes data at the transmitting end so that errors occurring during transmission can be detected and automatically corrected at the receiving end, thereby ensuring reliable data transmission. Common error correction codes include Hamming codes, BCH codes, and RS codes. This solution uses RS(7,3) code, which expands the 3-symbol information code into a 7-symbol systematic code. This allows the receiving end to correct 2-symbol errors or detect 3-symbol errors.

[0053] Encryption uses asymmetric algorithms, such as RSA and ECC. Asymmetric encryption algorithms use different encryption and decryption keys, keeping the encryption key public and the decryption key secret, to achieve both data encryption and identity authentication. This solution, based on elliptic curve cryptography (ECC), generates a public-private key pair. The private key is then used to encrypt the error-correction encoded security code, resulting in an encrypted security code.

[0054] Commonly used embedding domains for digital watermarking include the spatial domain and the transform domain. Transform domain embedding offers greater robustness. The Discrete Wavelet Transform (DWT) is a time-frequency analysis tool that can characterize local image features at multiple scales and is widely used in the field of digital watermarking.

[0055] This solution performs a three-level DWT decomposition on the standard trademark image, resulting in a low-frequency subband LL3 and multiple high-frequency subbands HLi, LHi, and HHi (i = 1, 2, 3). The low-frequency subband contains the main information of the image, while the high-frequency subband reflects the image's detailed texture. Generally, watermark information is embedded in the high-frequency subband to achieve better imperceptibility.

[0056] Different sub-bands have different masking capabilities for watermarks, with the LL3 sub-band having the strongest masking capability and the HH1 sub-band having the weakest. In order to minimize the impact on the original image while ensuring robustness, it is necessary to adaptively adjust the watermark embedding strength based on the importance of each sub-band.

[0057] Define a strength adjustment factor α(i), which is inversely proportional to the importance of the sub-band. Let α(3) = 1, and the values ​​of α(2) and a(1) increase in sequence. For the high-frequency sub-bands HLi, LHi, and HHi, the embedding strength should satisfy:

[0058] E(HLi)>E(LHi)>E(HHi), i=1, 2, 3;

[0059] Here, E(·) represents the embedding strength. This scheme sets three strength levels, for HL3 / LH3, HL2 / LH2 / HH3, and HL1 / LH1 / HH2 / HH1 sub-bands, respectively.

[0060] By utilizing the masking properties of human vision, the encrypted anti-counterfeiting code is embedded into the mid- and high-frequency coefficients of the wavelet subband. Each subband is embedded in sequence from low frequency to high frequency, with each coefficient used to embed one bit of encoded information.

[0061] For the sub-band coefficient C(i, j), the process of embedding the k-th coding information W(k) is:

[0062] C′(i,j)=C(i,j)+α·W(k), W(k)∈{0,1};

[0063] Where C′(i, j) is the coefficient after embedding the watermark, and α is the embedding strength factor. When W(k) is 0, C(i, j) remains unchanged; when W(k) is 1, α is added to or subtracted from C(i, j), causing the parity of C′(i, j) and C(i, j) to change.

[0064] After embedding, all subband coefficients carry the anti-counterfeiting coded bit information.

[0065] The watermarked wavelet coefficients obtained in the previous step are subjected to an inverse discrete wavelet transform (IDWT) step by step, from low frequency to high frequency, to ultimately reconstruct the trademark image carrying the security code. The IDWT process is the opposite of the DWT, gradually restoring image details through subband synthesis until a reconstructed image of the same size as the original is obtained.

[0066] Compared to standard trademark images, trademark images carrying security codes are visually indistinguishable, achieving the imperceptibility requirement of digital watermarks. Furthermore, the embedded security codes are robust against common image attacks, such as noise pollution and geometric deformation.

[0067] To accurately locate the area where the security code is embedded, we first need to extract the outline of the area that may contain the code from the trademark image carrying the security code. Common edge detection algorithms include Canny, Sobel, and Laplacian. This solution uses the Canny algorithm to detect edges in the image. The basic steps of Canny edge detection are as follows:

[0068] Gaussian filtering is performed on the image to smooth the image and remove noise. The image's gradient magnitude and direction are calculated. Non-maximum suppression of the gradient magnitude is performed to refine edges. Edges are detected and connected using a dual thresholding method. The Canny algorithm can effectively extract contour information from the image and obtain a preliminary encoding region.

[0069] Since there may be multiple extracted contours, it is necessary to filter them based on prior knowledge of the anti-counterfeiting code to obtain the initial coding area. Prior knowledge mainly includes the size, shape, and position of the coding area.

[0070] The specific screening criteria are as follows:

[0071] Size: The pixel area of ​​the coding area should be within a certain range; areas that are too large or too small will be eliminated. Aspect Ratio: The coding area should have a near-square aspect ratio; areas that are too narrow or flat will be eliminated. Location: The coding area is generally located at the edge or corner of the trademark image; areas in the center will be eliminated. Contours that meet these conditions are determined as the initial coding area and proceed to the next step.

[0072] To accurately locate the true security code region from multiple initial code regions, this solution uses a region proposal network (RPN) for further screening. RPN is a two-stage object detection algorithm that generates region proposals and performs classification and regression by sliding a small network on the convolutional feature map to achieve target location. The initial code region is input into the RPN and processed through the following steps:

[0073] Feature extraction: Image features are extracted using pre-trained convolutional neural networks (such as VGG and ResNet). Region proposal: A 3x3 convolution kernel is slid across the feature map, generating k anchor boxes at each location. Each anchor box is then classified into a binary classification (whether it is a coded region) and bounding box regression. Region screening: Region proposals are screened based on classification probabilities and bounding box coordinates, eliminating negative samples and regions with high overlap. Region merging: Remaining candidate regions are merged using the non-maximum suppression (NMS) algorithm to obtain the final coded region. The coded region positioning generated by RPN is more accurate, laying the foundation for subsequent anti-counterfeiting code extraction.

[0074] Due to the inevitable geometric distortion introduced during the digitization and printing processes, the located security code area may be deformed by rotation, scaling, tilt, etc. In order to extract a complete and accurate security code, geometric correction of the code area is required.

[0075] This solution uses a projection-based correction method. Assuming the coding area is a square, ideally, its horizontal and vertical edge projections should be two impulse functions. In practice, due to geometric distortion, edge projections can exhibit variations such as broadening and offset. An optimization objective function is constructed to minimize the difference between the corrected edge projections and the ideal impulse function, thereby estimating the deformation parameters. Using these parameters, the anti-counterfeiting coding area is reverse-mapped to eliminate the geometric distortion and obtain a standardized square area.

[0076] The method of the present application makes full use of technologies such as chaotic encryption, digital watermarking, and target detection, and takes into account the imperceptibility and robustness of the watermark while ensuring anti-counterfeiting performance, and can be effectively applied in the field of trademark rights protection.

[0077] In an optional embodiment,

[0078] Extract the hash value of the standard trademark image and combine it with the key provided by the trademark owner to generate a random sequence through chaotic mapping. The random sequence is permuted and diffused to obtain a binary anti-counterfeiting code. The binary anti-counterfeiting code is then subjected to error correction coding and asymmetric encryption. The encrypted anti-counterfeiting code includes:

[0079] Extract the hash value of the standard trademark image, introduce a quantum random number generator to generate an initial random sequence, and obtain the seed key by performing an XOR operation on the initial random sequence and the key provided by the trademark owner;

[0080] The obtained seed key is used as the initial value, and a fractional-order differential operator is introduced. By adjusting the order of the fractional-order differential operator, the target pseudo-random sequence is generated. The generated target pseudo-random sequence is adaptively and dynamically permuted using a permutation algorithm based on dynamic key control. At the same time, multiple chaotic functions are introduced to iteratively diffuse the target pseudo-random sequence to obtain the final binary anti-counterfeiting code.

[0081] A low-density parity-check code is used to perform primary error correction on the binary anti-counterfeiting code obtained, and a polar code is introduced to perform secondary error correction on the binary anti-counterfeiting code after the primary error correction, thereby obtaining an optimized anti-counterfeiting code.

[0082] Based on the optimized anti-counterfeiting code, encryption is performed in combination with a predefined user attribute set, wherein the user attribute set includes user authority and access authority, and the user's identity information is embedded in the optimized anti-counterfeiting code signature to obtain an encrypted anti-counterfeiting code.

[0083] For example, first, a standard trademark image provided by the trademark owner is needed as a basis. This image should be a clear, complete, and undistorted original trademark image. The image format can be common lossless formats such as BMP, PNG, and TIFF. Before extracting the hash value, the standard trademark image needs to be preprocessed, including:

[0084] Image format conversion: Convert the image uniformly to grayscale or binary images to reduce computational complexity; Image size normalization: Scale the image to a fixed size (e.g., 64x64) to eliminate the effects of size differences; Image filtering and denoising: Use methods such as median filtering and wavelet denoising to suppress image noise. After preprocessing, a standardized trademark image is obtained, laying the foundation for hash value extraction.

[0085] For the pre-processed standard trademark image, use a secure hash algorithm (such as SHA-256) to calculate its hash value. The specific steps are as follows:

[0086] The image is divided into small blocks of a fixed size (such as 16x16); the pixel mean of each small block is calculated to generate a 16x16 mean matrix; the mean matrix is ​​binarized, with pixels greater than the mean set to 1 and pixels less than the mean set to 0; the binarized matrix is ​​converted into a 256-bit binary string; the binary string is hashed with SHA-256 to obtain a 256-bit hash value.

[0087] Because SHA-256 is a one-way hash algorithm with a significant avalanche effect, even small image differences will result in significant changes in the hash value. Therefore, by comparing hash values, it is possible to quickly and accurately determine whether an image has been tampered with.

[0088] Traditional pseudo-random number generators are primarily based on deterministic algorithms and exhibit a certain degree of predictability. To further enhance randomness, this solution introduces a quantum random number generator as a random source. Quantum random numbers utilize the uncertainty principle of quantum mechanical systems to generate true random numbers by measuring physical processes such as photon polarization states and atomic decay times. To ensure the sufficient length of the random sequence, the initial random sequence must be no less than 128 bits. To enhance the security and unpredictability of the random sequence, the initial random sequence must be further processed. The trademark owner provides a preset key as a seed for random sequence generation. The key is a binary string no less than 128 bits in length.

[0089] The initial random sequence is XORed with the key, where corresponding bits that match are set to 0, and bits that differ are set to 1. XORing has excellent obfuscation and diffusion properties, effectively hiding the correlation between the random sequence and the key. The resulting binary string is used as the seed key for subsequent pseudo-random sequence generation.

[0090] This scheme innovatively introduces fractional-order differential operators to generate pseudo-random sequences. Unlike traditional integer-order differentials, fractional-order differentials have long-range correlation and memory, and can generate pseudo-random sequences with chaotic characteristics.

[0091] For a discrete function f(n), its p-order Grünwald-Letnikov fractional difference is defined as:

[0092]

[0093] Where n represents the discrete time variable, which represents the current moment and takes a non-negative integer value; f(n) represents the discrete function, which represents the function value at time n; p represents the fractional order, which can take any real value; k represents the summation variable, which represents the number of steps of time delay;

[0094] It represents the number of combinations of k elements from p different elements, and Γ represents the Gamma function, which is a generalization of factorial.

[0095] Using the above definition, fractional differentiation of the seed key yields a new pseudo-random sequence. By adjusting the value of the fractional order, p, the randomness and correlation of the sequence can be flexibly controlled. In this scheme, choosing p = 0.5 generates a pseudo-random sequence with good chaotic properties.

[0096] To further enhance the randomness and security of pseudorandom sequences, permutation is necessary. Traditional permutation algorithms typically use fixed permutation tables or functions, which exhibit certain regularities. This solution employs an adaptive permutation strategy based on dynamic keys, dynamically generating a permutation table and improving the unpredictability of permutations.

[0097] Specifically, a control parameter is adjusted in real time based on the local statistical characteristics of the pseudo-random sequence (such as the ratio of 0s to 1s). This parameter is used as the seed key for generating the permutation table. Because the local characteristics of the sequence are randomly and dynamically changing, the corresponding permutation table is also generated and updated in real time, thus realizing an adaptive dynamic permutation mechanism.

[0098] Although the permuted sequence exhibits increased randomness, it still retains some statistical characteristics of the original sequence. To completely eliminate this correlation, the sequence needs to be diffused. This approach introduces multiple chaotic functions and generates the final pseudo-random sequence through iterative diffusion.

[0099] Common chaotic functions include the Logistic map, the Tent map, the Sine map, and the Chebyshev map. These maps all exhibit chaotic properties such as sensitivity to initial values, non-intersecting orbits, and infinite periods. To fully exploit the chaotic effect, this scheme employs a triple chaotic function, performing three rounds of iterative diffusion on the permuted sequence.

[0100] Taking the logistic map as an example, its expression is: x(n+1)=μx(n)(1-x(n)), where μ is the bifurcation parameter and x is the state variable. When μ=4, the system is in a completely chaotic state. First, the initial values ​​and parameters of the chaotic system are initialized with the permuted sequence. After several iterations, a new sequence is obtained. Then, the chaotic parameters are updated with the new sequence, and several iterations are repeated again. Finally, a diffused pseudo-random sequence is obtained.

[0101] After permutation and diffusion, the statistical characteristics of the original sequence are completely disrupted, generating a highly randomized, unpredictable, and irregular pseudo-random sequence. Converting this sequence into binary form yields the final binary anti-counterfeiting code.

[0102] Considering the potential for bit errors during transmission and storage of security codes, channel coding of binary security codes is necessary to improve their error correction capabilities. Low-density parity-check codes (LDPC codes) are linear block codes with performance close to the Shannon limit. They offer excellent error correction performance and low decoding complexity, and are widely used in communications and storage.

[0103] This scheme uses LDPC codes for primary error correction of binary anti-counterfeiting codes. Assuming the length of the original code is n, a k×n parity check matrix H can be constructed, where k is the number of redundant bits. For any coded bit, the corresponding column of H is randomly set to 1, and the remaining columns are set to 0, ensuring that the number of 1s in each column is much smaller than n. The positions of the 1s can be controlled using a pseudo-random sequence to avoid artificial regularity.

[0104] Multiplying the security code with the check matrix H yields a k-bit check code. Appending the check code to the security code completes the LDPC encoding. Using this check relationship at the decoding end, certain random bit errors can be detected and corrected, thereby improving the reliability of the security code.

[0105] In addition to random bit errors, anti-counterfeiting codes may also be affected by complex channels such as burst errors and erasure errors. To further enhance the robustness of anti-counterfeiting codes, this scheme introduces polar codes for secondary error correction based on LDPC codes.

[0106] Polar codes are a coding scheme based on channel polarization that achieves channel capacity. Given a binary input discrete memoryless channel (B-DMC), polar codes can transform it into a set of polarized subchannels with capacities approaching 0 or 1. Through recursive construction, cascade combination, and split mapping, a set of positively polarized subchannels is obtained. The security code bits are then selectively mapped onto reliable subchannels for transmission, achieving channel capacity.

[0107] This scheme uses a CRC-assisted sequential decoding method to construct polar codes. Assuming the length of the anti-counterfeiting code after LDPC encoding is m, its CRC checksum is calculated using a preset CRC generator polynomial. The Bhattacharyya parameter is then used to estimate the reliability of each bit channel, and the m channels with the highest reliability are selected as information bit channels. Several frozen bits are inserted between the information bit channel and the CRC checksum, forming a polar codeword of length N. The insertion pattern and value of the frozen bits can be controlled using a pseudo-random sequence.

[0108] On the decoding side, a CRC-assisted sequential decoding algorithm is used. A recursive calculation is used to determine the likelihood ratio of each bit. Then, the bits are decoded sequentially, in descending order of likelihood ratio. For each decoded bit, if it is an information bit, its soft decision value is compared with a preset decoding threshold to make a hard decision. If it is a frozen bit, the frozen value is directly output. If the CRC check passes, a valid decoding path has been found, and the information bit is output as the anti-counterfeiting code.

[0109] The secondary error correction of polarization codes can effectively resist burst errors and deletion errors caused by complex channels, significantly improving the fault tolerance and reliability of anti-counterfeiting codes.

[0110] To provide refined control over access rights to anti-counterfeiting codes, this solution introduces attribute-based encryption (ABE). ABE implements fine-grained access control by associating user attributes with ciphertext. Only authorized users who meet specific attributes can decrypt the ciphertext and obtain the plaintext information.

[0111] First, you need to predefine a user attribute set, which includes attributes describing multiple dimensions such as user identity, role, and permissions. For example, for trademark anti-counterfeiting scenarios, you can define the following attributes:

[0112] User identity: ordinary user, trademark owner, authorized agent, law enforcement agency, etc.; geographical scope: domestic, foreign, a province or city, etc.; industry field: clothing, electronics, food, etc.; anti-counterfeiting level: level one, level two, level three, etc.; time limit: permanent, one year, six months, etc.

[0113] These attributes can be freely combined to generate a variety of fine-grained access policies. For example, "(Identity = Authorized Agent) AND (Region = Beijing) AND (Industry = Clothing) AND (Level >= Level 2)" represents a Level 2 or higher anti-counterfeiting access policy for clothing agents in Beijing.

[0114] Based on the attribute set, the system generates a master key (MK) and a public key (PK). Then, based on the attributes of each authorized user, the system uses MK to generate a corresponding attribute key (SK). An attribute key is a data structure containing a user attribute identifier and its corresponding key component.

[0115] The system also generates a pair of public and private keys (pk, sk). The public key pk is embedded in the anti-counterfeiting code signature, and the private key sk is used to generate attribute keys and decrypt ciphertext. The public and private keys are generated using lightweight asymmetric cryptographic algorithms such as elliptic curve cryptography (ECC) to balance security and computational efficiency.

[0116] For the anti-counterfeiting code after error correction encoding, the system first generates an access structure (such as a linear secret sharing scheme) based on a predefined access policy T and appends it to the ciphertext. Then, the system uses the public key pk and the master key MK to encrypt the anti-counterfeiting code based on the attribute set S. The encryption process consists of two main steps:

[0117] A session key ek is randomly selected and used to symmetric encrypt the anti-counterfeiting code (such as AES) to obtain the ciphertext CT; using the linear secret sharing scheme, ek is split into multiple shares, and each share is associated with an attribute in the attribute set S to generate a set of attribute ciphertexts AC.

[0118] Therefore, the final ABE ciphertext consists of three parts: (T, CT, AC). This ciphertext is stored and transmitted as an encrypted anti-counterfeiting code.

[0119] When a new user needs to access the anti-counterfeiting code, the system administrator verifies their identity attributes and distributes the corresponding attribute key SK to them based on the attributes. SK can be transmitted through a secure channel (such as SSL / TLS) or delivered to the user offline (copying to a USB flash drive).

[0120] User attributes may change dynamically over time (e.g., due to role changes or permission revocation), so user attribute keys need to be updated regularly. A simple approach is to set an expiration date for attribute keys, requiring users to reapply when a key expires. Another approach is to bind attribute keys to timestamps and periodically update the timestamps to automatically invalidate old keys.

[0121] When an authorized user needs to access the security code, they first submit their attribute key SK and the encrypted security code (T, CT, AC). The system verifies whether the user's attributes meet the access policy T. If so, the user can use their SK and T to recover the session key ek. Finally, CT is symmetrically decrypted using ek to obtain the plaintext security code. If the user's attributes do not match the access policy, ek cannot be recovered and the decryption fails.

[0122] By binding user attributes to keys, ABE enables fine-grained authorized access control for anti-counterfeiting codes, significantly improving data security. Even if the anti-counterfeiting code is leaked, unauthorized users cannot recover valid information without authorization. Combined with the aforementioned digital fingerprint extraction, pseudo-random sequence permutation and diffusion, and error correction coding, this forms a complete trademark anti-counterfeiting solution based on cryptography and information security theory.

[0123] S102. Decode the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system, verify the validity of the original bit stream through a hash check, and obtain an anti-counterfeiting code verification result;

[0124] In an optional embodiment,

[0125] Decode the standardized anti-counterfeiting code image to obtain the original bit stream of the anti-counterfeiting code, and compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system. Verify the validity of the original bit stream through hash verification, and obtain the anti-counterfeiting code verification results including:

[0126] Construct a consortium blockchain system jointly participated by trademark owners, manufacturers, and sellers. The consortium blockchain system includes smart contracts for anti-counterfeiting code registration, verification, and management. In the consortium blockchain system, the anti-counterfeiting code generated by the trademark owner is sent to the manufacturer, who prints the anti-counterfeiting code on the trademarked product and submits a multi-hash value of the anti-counterfeiting code to the consortium blockchain system. The multi-hash value is generated from the anti-counterfeiting code, a timestamp, and a random number.

[0127] The standardized anti-counterfeiting code image is decoded using the discrete wavelet transform algorithm to extract the original bit stream of the anti-counterfeiting code. The original bit stream of the anti-counterfeiting code is hashed to obtain a verification hash value, and the obtained verification hash value is submitted to the smart contract in the alliance blockchain system.

[0128] The smart contract queries the corresponding multi-hash value on the alliance blockchain system based on the received verification hash value, and determines the authenticity of the anti-counterfeiting code by comparing the verification hash value with the multi-hash value. At the same time, it uses the zero-knowledge proof protocol to determine whether the anti-counterfeiting code is valid. The final anti-counterfeiting code verification result is obtained by combining the authenticity judgment results and the validity judgment results of the anti-counterfeiting code.

[0129] For example, a consortium blockchain system is being built, involving trademark owners, manufacturers, and sellers. The consortium blockchain utilizes a permissioned mechanism, requiring only authenticated nodes to access the network and participate in blockchain maintenance. Each party fulfills their respective responsibilities and permissions according to the agreed-upon rules. Smart contracts are deployed on the consortium blockchain to implement functions such as registration, verification, and management of anti-counterfeiting codes. Smart contracts are written in a Turing-complete programming language, allowing for flexible customization of business logic and processing flows.

[0130] The trademark owner is responsible for generating the security code. This code should be sufficiently random, unique, and unpredictable, and can be designed using various cryptographic algorithms (such as SHA256 and AES). The trademark owner sends the generated security code to the manufacturer via a secure channel. To prevent man-in-the-middle attacks, the code can be digitally signed or encrypted.

[0131] After receiving the security code, the manufacturer prints it on the branded product, which serves as the sole proof of product traceability and authenticity verification. The manufacturer also submits the security code to the consortium blockchain system for registration and evidence storage. To protect the confidentiality and integrity of the security code, the manufacturer multi-hashes it before submitting it to the blockchain. Multi-hashing incorporates parameters such as timestamps and random numbers to prevent replay attacks and rainbow table attacks. The multi-hash value of the security code is packaged into a blockchain transaction, passed through the entire network, and written to a new block. The blockchain's immutability ensures the trustworthy storage and traceability of the security code.

[0132] When a seller or consumer receives a branded product with an anti-counterfeiting code, they can use a mobile device such as a phone to capture an image of the code and initiate a verification request. This verification request is submitted to the consortium blockchain's smart contract, triggering the on-chain verification logic. The smart contract then invokes an image processing module to pre-process the uploaded anti-counterfeiting code image, including image enhancement, noise filtering, and geometric correction, to produce a standardized coded image.

[0133] The standardized coded image is subjected to digital watermark extraction and error correction decoding to obtain the original bitstream of the security code. The watermark extraction algorithm can be implemented using methods such as discrete wavelet transform and singular value decomposition. The extracted original bitstream is hashed to obtain a verification hash value. To prevent tampering with the verification hash value, a zero-knowledge proof protocol is introduced to prove the correctness of the verification hash value without leaking the original information. Based on the verification hash value, the smart contract retrieves the corresponding multiple hash values ​​on the consortium blockchain. By comparing the two hash values, the authenticity of the security code is determined. Furthermore, the zero-knowledge proof results determine whether the security code is valid and has not been reused. Combining the results of the security code authenticity and validity determination, the smart contract returns the final verification result and synchronizes the verification record to the consortium blockchain ledger, forming a complete and trusted chain of verification evidence.

[0134] This solution leverages the decentralized, tamper-resistant, and traceable nature of blockchain technology, combined with cryptographic mechanisms like multi-hashing and zero-knowledge proofs, to fundamentally enhance the security, reliability, and unforgeability of anti-counterfeiting codes. Furthermore, algorithms like image digital watermarking and error-correcting coding enhance the robustness and fault tolerance of anti-counterfeiting codes.

[0135] In an optional embodiment,

[0136] The smart contract queries the corresponding multi-hash value on the alliance blockchain system based on the received verification hash value. By comparing the verification hash value with the multi-hash value, the authenticity of the anti-counterfeiting code is determined. At the same time, the zero-knowledge proof protocol is used to determine whether the anti-counterfeiting code is valid. The final anti-counterfeiting code verification result is obtained by combining the authenticity judgment results and the validity judgment results of the anti-counterfeiting code.

[0137] The received verification hash value and the corresponding multi-hash value on the consortium blockchain system are used as inputs to a multi-party secure computation protocol. The verification hash value and the multi-hash value are split into several shares using a secret sharing scheme. Each share is an independent polynomial point, and the original hash value can only be recovered when at least a specified number of shares are collected.

[0138] The generated verification hash value shares and multi-hash value shares are distributed to each node in the consortium blockchain system through a secure channel. Each node only holds a pair of shares consisting of a verification hash value share and a multi-hash value share.

[0139] Based on the received shares, each node uses the secure multi-party comparison algorithm in the multi-party secure computing protocol to determine whether the verification hash value and the multi-hash value are equal, and obtains the initial comparison result in the form of secret sharing;

[0140] The threshold secret recovery algorithm is used to aggregate the initial comparison results of each node. When the number of aggregated initial comparison results reaches the preset threshold value, the final hash value matching comparison result is recovered and submitted to the alliance blockchain to obtain the anti-counterfeiting code verification result.

[0141] Exemplarily, the anti-counterfeiting coding verification method for smart contracts based on multi-party secure computing and zero-knowledge proof includes the following steps:

[0142] After submitting the anti-counterfeiting code verification request to the consortium blockchain, the smart contract automatically triggers the verification logic and queries the corresponding multi-hash value in the blockchain ledger based on the verification hash value carried in the request. To protect the privacy of the hash value and prevent single-point leakage, a secret sharing mechanism is introduced. The Shamir secret sharing scheme is used to split the verification hash value and multi-hash value into h shares, respectively, and set a threshold value M (M <= h). The secret sharing scheme meets the following requirements:

[0143] By selecting any M or more shares from the total h shares, the original hash value can be uniquely restored; by selecting no more than h-1 shares, no information about the original hash value can be obtained.

[0144] Construct an h-1 degree polynomial f(x) over the finite field GF(p):

[0145] f(x)=a_0+a_1*x+a_2*x^2+…+a_(h-1)*x^(h-1)mod p;

[0146] Where p is a prime number greater than the original hash value, a_0 is the original hash value, a_1 to a(h-1) are randomly selected polynomial coefficients, and x represents the input variable.

[0147] Generate h shares of the verification hash value (x_1, f(x_1)), (x_2, f(x_2)), …, (x_h, f(x_h)), and h shares of the multi-hash value (y_1, g(y_1)), (y_2, g(y_2)), …, (y_h, g(y_h)). Where x_h and y_h are pre-agreed independent variable values, and f(x) and g(x) are polynomials embedded with the verification hash value and multi-hash value, respectively.

[0148] The smart contract distributes the generated hash value shares to each node of the consortium blockchain through a secure channel. Each node only holds a pair of shares and cannot independently recover the original hash value.

[0149] Each node in the consortium blockchain participates in a secure multi-party computation (SSLC) protocol based on the hash value share it receives. This protocol allows nodes to jointly complete privacy-protected computation tasks without disclosing their own data. This solution uses a hybrid protocol framework that combines Boolean circuits and secret sharing to design a secure multi-party comparison algorithm. The algorithm flow is as follows:

[0150] Each node inputs its verification hash share and multi-hash share into a pre-built Boolean circuit. This Boolean circuit is compiled using the Goldreich-Micali-Wigderson (GMW) protocol and can securely evaluate arbitrary functions. The circuit compares the two hash shares bit by bit, calculates the exclusive-OR (XOR) result, and generates an initial comparison result. This initial comparison result is still distributed across nodes in the form of a secret share. Each node holds only a single bit of the secret share and is unaware of the shares of other nodes.

[0151] Each node submits its share of the initial comparison results to the smart contract, which acts as an honest "middleman" responsible for collecting and aggregating results from different nodes.

[0152] The smart contract performs threshold secret recovery on the initial comparison result shares received. Using the Lagrange interpolation formula, the original comparison result can be reconstructed with any number of h or more shares. To prevent nodes from submitting forged result shares, a zero-knowledge proof mechanism is introduced. Each node is required to provide proof of the correctness of its calculation process when submitting result shares. The smart contract verifies the proof, ensuring that all shares are calculated honestly. Zero-knowledge proof is implemented using the Schnorr protocol. Nodes use homomorphic hiding technology to prove that the submitted shares satisfy a polynomial relationship without revealing the share value.

[0153] By aggregating and verifying the zero-knowledge proofs of each node, the smart contract can determine the credibility of the final recovered comparison results without knowing the contributions of individual nodes. The authenticity and validity of the anti-counterfeiting code can be determined by combining the comparison results with the proof verification results.

[0154] The key data generated during the verification process (such as aggregated zero-knowledge proofs and recovered comparison results) is packaged into a transaction and submitted to the consortium blockchain. After the transaction is reached through network-wide consensus, it is stored on the blockchain, forming a trusted chain of evidence for anti-counterfeiting verification.

[0155] The smart contract returns the verification result of the anti-counterfeiting code to the seller or consumer who requested verification, and automatically triggers subsequent business logic based on the verification result.

[0156] If the anti-counterfeiting code is verified, it indicates that the product is authentic and its source is trustworthy. The system can further trace information about the product's production, circulation, and sales, achieving visual traceability throughout the entire supply chain. At the same time, the incentive mechanism tokenizes the verification behavior and result data, encouraging users to participate in verification and provide data, forming a virtuous cycle.

[0157] If the security code fails verification, it indicates a product security issue and may be counterfeit or inferior. The system automatically triggers an alarm, triggering an investigation by regulatory agencies. Leveraging the immutable and traceable nature of blockchain, the source of problematic products can be traced, the responsible party identified, and illegal distribution channels promptly blocked.

[0158] The data generated during the verification process (such as coded images, verification requests, and comparison results), after being desensitized, can provide samples for big data analysis and risk model training. Through data mining and machine learning algorithms, characteristic patterns of counterfeit products can be identified, anti-counterfeiting strategies can be optimized, and risk events can be warned.

[0159] The above is the complete process of building a consortium blockchain anti-counterfeiting code verification method by integrating cryptographic technologies such as multi-party secure computing, zero-knowledge proof, and secret sharing. The technical effects of this solution are:

[0160] Secret sharing is used to split hash values ​​into multiple redundant shares, which are distributed across blockchain network nodes, mitigating single points of failure and data leakage risks. Secure multi-party computation is employed to achieve privacy-preserving hash value matching, completing verification tasks without revealing the original hash value. Zero-knowledge proof mechanisms are introduced to verify the integrity of the computation process and results without revealing node contributions, preventing malicious nodes from acting recklessly. Smart contracts and blockchain technology are utilized to automate the anti-counterfeiting verification process, ensure trusted evidence storage, and seamlessly integrate with other business systems.

[0161] S103. Use the pre-trained trademark authenticity discrimination model to discriminate the authenticity confidence of the trademark image to be identified, and obtain the authenticity confidence of the trademark image to be identified. Based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence, output the final trademark identification result.

[0162] In an optional embodiment,

[0163] The authenticity confidence of the trademark image to be identified is determined using a pre-trained trademark authenticity discrimination model to obtain the authenticity confidence of the trademark image to be identified. Based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence, the final trademark identification result is output, including:

[0164] Constructing a trademark image dataset containing multiple typical features, and training the trademark image dataset using a convolutional neural network to obtain a trademark authenticity discrimination model. The trademark authenticity discrimination model extracts texture, color, and shape features of the trademark image through a convolutional layer, performs multimodal feature fusion through a fully connected layer, and uses a classifier to output the authenticity confidence of the trademark image to be authenticated;

[0165] Collect multi-source heterogeneous trademark authentication evidence, including trademark registration information, trademark sales records, trademark logistics data, and consumer feedback information. Extract heterogeneous evidence features through feature engineering methods, and use embedded representation methods to map the extracted heterogeneous evidence features into a unified feature space.

[0166] For heterogeneous evidence features mapped into a unified feature space, a multi-view representation learning method is used to evaluate their credibility. Based on the obtained credibility of each heterogeneous evidence feature, a comprehensive evidence feature is generated. At the same time, a reasoning mechanism based on the trademark domain knowledge graph is introduced to perform semantic enhancement and logical reasoning on the comprehensive evidence feature to obtain its semantic support.

[0167] The authenticity confidence of the trademark image to be identified, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are input into the pre-trained integrated learning model to generate the final trademark identification result.

[0168] In an optional embodiment,

[0169] The authenticity confidence of the trademark image to be authenticated, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are input into the pre-trained ensemble learning model to generate the final trademark authentication results, including:

[0170] A training set is constructed using samples of genuine trademarks and known counterfeit trademarks. The ensemble learning model is trained using an adaptive boosting algorithm to obtain a base classifier group consisting of multiple decision trees, wherein each decision tree recursively selects the optimal feature attributes of the training samples to perform node splitting until a preset splitting stopping condition is reached;

[0171] During the iteration process, the classification loss is calculated based on the feature vector of each training sample and the weighted voting results of the current base classifier group. The weight of the misclassified training samples is increased so that the next decision tree focuses on the previously misclassified samples.

[0172] The authenticity confidence of the trademark image to be identified, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are used as input feature vectors and input into each trained decision tree at the same time to obtain the classification results of each decision tree. The classification results of each decision tree are combined to generate the final trademark identification result.

[0173] For example, collect common images of genuine and counterfeit trademarks on the market to construct a high-quality training dataset. The dataset should cover multiple trademark categories and include rich texture, color, shape, and other features. Preprocess the original trademark images, including size normalization, noise removal, and background segmentation, to improve data quality and consistency. Use data augmentation techniques (such as rotation, scaling, and flipping) to expand the training samples and improve model generalization capabilities.

[0174] The convolutional neural network (CNN) is used as the main architecture of the trademark authenticity discrimination model. The convolution layer and pooling layer are used to extract the local texture, color and shape features of the trademark image, and the hierarchical abstraction of features is achieved by stacking multiple convolution blocks. After the convolution layer, the attention mechanism layer is introduced to adaptively adjust the weights of features in different regions, highlight the key features of the trademark, and suppress the interference of background noise. The features extracted by the convolution layer are subjected to multimodal feature fusion through the fully connected layer, and the texture, color and shape information are comprehensively utilized to comprehensively characterize the visual characteristics of the trademark. After the fully connected layer, a classifier (such as the Softmax layer) is connected to output the authenticity confidence of the trademark image to be identified. As needed, multiple categories (such as genuine, counterfeit, unidentifiable, etc.) can be set to achieve fine-grained classification.

[0175] Cross entropy is used as the model's loss function, and L1 / L2 regularization terms are introduced to prevent overfitting. Mini-batch gradient descent is used to optimize model parameters and accelerate training convergence. Appropriate hyperparameters (such as learning rate, batch size, regularization coefficient, etc.) are set to control model complexity and generalization performance. An early stopping mechanism is introduced to dynamically adjust the number of training rounds based on the validation set performance to avoid overfitting. Data parallelism and model parallelism strategies are adopted to accelerate training using multiple GPUs. Checkpointing is used to periodically save the model to prevent interruptions during training.

[0176] Collect trademark registration information (such as registration number, category, application date, etc.), trademark sales records (such as sales time, channel, quantity, etc.), trademark logistics data (such as storage address, transportation trajectory, etc.), and consumer feedback information (such as reviews, complaints, etc.). Clean and preprocess the raw evidence data to address missing values, outliers, and inconsistent representations. Convert unstructured data (such as text and images) into structured features to unify the representation of evidence.

[0177] Design specific feature engineering methods for different types of evidence data. For structured data (such as sales records), extract statistical features (such as sales volume, frequency), time series features (such as fluctuation trends), etc. Use methods such as one-hot encoding and continuous encoding to process discrete features. For text data (such as consumer reviews), use methods such as bag-of-words model and TF-IDF to extract text features. Use word embedding models such as Word2vec and GloVe to learn the distributed representation of words. For image data (such as logistics documents), use CNN to extract visual features. For spatiotemporal data (such as logistics trajectories), use models such as RNN and LSTM to capture temporal dependencies. For graph-structured data (such as knowledge graphs), use graph neural networks (GNNs) to learn embedded representations of nodes and edges while retaining the topological structure information of the graph.

[0178] Embedded representation learning methods are used to map the extracted heterogeneous evidence features into a unified low-dimensional feature space. This ensures that the features of different pieces of evidence are distributed on the same scale, facilitating subsequent feature interaction and fusion. Common embedded representation learning methods include linear mapping (such as PCA), nonlinear mapping (such as manifold learning), and deep learning (such as autoencoders). Appropriate methods are selected to balance representation capability and computational efficiency. In a unified feature space, multi-view representation learning methods are used to jointly model the feature distributions of different pieces of evidence. A unified evidence representation is learned by maximizing the mutual information between different pieces of evidence. Common multi-view representation learning methods include CCA (Canonical Correlation Analysis) and MvDA (Multi-view Discriminant Analysis). By optimizing the correlation or discriminability between pieces of evidence, a compact and consistent evidence representation is obtained.

[0179] Evaluate the credibility of heterogeneous evidence features mapped into a unified feature space. Credibility reflects the extent to which the evidence supports the determination of trademark authenticity, helping to identify and eliminate unreliable evidence. Common methods for assessing evidence credibility include support calculation, consistency testing, and confidence estimation. Integrate trademark domain knowledge to design targeted evaluation indicators and rules. For evidence supporting the authenticity of a trademark, increase its credibility weight; for evidence supporting the counterfeit, reduce its credibility weight; and for conflicting evidence, reconcile its credibility to minimize its impact on the final determination.

[0180] Based on the evidence credibility assessment results, heterogeneous evidence features are selected and filtered. Low-credibility and noisy features are eliminated, while high-credibility and discriminative features are retained. A weighted fusion strategy based on evidence credibility is employed to generate comprehensive evidence features. High-credibility evidence features are given greater weights, while low-credibility evidence features are given less weights, achieving dynamic weighting of evidence features.

[0181] Introduce the trademark domain knowledge graph to perform semantic enhancement on comprehensive evidence features. The knowledge graph contains association information between trademarks (such as trademark ownership relationships, trademark usage relationships, etc.), which helps to explore the implicit semantics between evidence features. Use knowledge representation learning technology (such as TransE) to embed comprehensive evidence features into the representation space of the knowledge graph. Through semantic interaction with trademark entities and relationships, enrich the semantic representation capabilities of evidence features. Apply reasoning mechanisms (such as rule-based reasoning and path-based reasoning) on ​​the knowledge graph to perform logical reasoning on comprehensive evidence features. Discover new relationships between evidence and improve the semantic support of evidence features.

[0182] The multi-dimensional evidence matrix incorporates discriminative information from three different perspectives: trademark characteristics, multi-source heterogeneous evidence, and anti-counterfeiting code verification. It comprehensively depicts the authenticity of the trademark and provides sufficient basis for judgment.

[0183] For the trademark to be authenticated, its image features and heterogeneous evidence features are extracted, the anti-counterfeiting code verification results are obtained, and a multi-dimensional evidence matrix is ​​constructed. This evidence matrix is ​​input into the trained ensemble learning model, and each base classifier gives a judgment result. Through strategies such as weighted voting and majority voting, the judgment results of each base classifier are integrated to generate the final trademark authentication result (such as authentic, counterfeit, doubtful, etc.). The interpretability of the authentication results is analyzed, key evidence and judgment basis are located, and the credibility of the authentication results is evaluated. If necessary, human experts are introduced to participate in the review and provide the final authentication opinion.

[0184] Figure 2 FIG. 1 is a structural diagram of a trademark identification system based on anti-counterfeiting coding according to an embodiment of the present invention. Figure 2 As shown, the system includes:

[0185] The first unit is used to obtain a trademark image to be authenticated and perform preprocessing to obtain a standard trademark image; based on the standard trademark image, a corresponding anti-counterfeiting code is generated using an anti-counterfeiting code generation algorithm based on chaotic encryption; the generated anti-counterfeiting code is embedded in the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code; the code is located to obtain a corresponding code area; the located code area is corrected to obtain a standardized anti-counterfeiting code image;

[0186] The second unit is used to decode the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system, verify the validity of the original bit stream through hash verification, and obtain an anti-counterfeiting code verification result;

[0187] The third unit is used to use a pre-trained trademark authenticity discrimination model to discriminate the authenticity confidence of the trademark image to be identified, obtain the authenticity confidence of the trademark image to be identified, and output the final trademark identification result based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence.

[0188] According to a third aspect of the embodiments of the present invention,

[0189] An electronic device is provided, comprising:

[0190] processor;

[0191] a memory for storing processor-executable instructions;

[0192] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0193] According to a fourth aspect of the embodiments of the present invention,

[0194] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0195] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A trademark identification method based on anti-counterfeiting coding, characterized in that: include: Acquire the trademark image to be authenticated and pre-process it to obtain a standard trademark image. Based on the standard trademark image, use the chaotic encryption-based anti-counterfeiting code generation algorithm to generate a corresponding anti-counterfeiting code. Embed the generated anti-counterfeiting code into the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code. Perform coding positioning on the image to obtain the corresponding coding area. Correct the located coding area to obtain a standardized anti-counterfeiting code image. Decoding the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, comparing the original bit stream of the anti-counterfeiting code with a standard anti-counterfeiting code bit stream stored in a pre-built blockchain system, verifying the validity of the original bit stream through a hash check, and obtaining an anti-counterfeiting code verification result; The authenticity confidence of the trademark image to be identified is determined using a pre-trained trademark authenticity discrimination model to obtain the authenticity confidence of the trademark image to be identified. Based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence, a final trademark identification result is output, including: Constructing a trademark image dataset containing multiple typical features, and training the trademark image dataset using a convolutional neural network to obtain a trademark authenticity discrimination model. The trademark authenticity discrimination model extracts texture, color, and shape features of the trademark image through a convolutional layer, performs multimodal feature fusion through a fully connected layer, and uses a classifier to output the authenticity confidence of the trademark image to be authenticated; Collect multi-source heterogeneous trademark authentication evidence, including trademark registration information, trademark sales records, trademark logistics data, and consumer feedback information. Extract heterogeneous evidence features through feature engineering methods, and use embedded representation methods to map the extracted heterogeneous evidence features into a unified feature space. For heterogeneous evidence features mapped into a unified feature space, a multi-view representation learning method is used to evaluate their credibility. Based on the obtained credibility of each heterogeneous evidence feature, a comprehensive evidence feature is generated. At the same time, a reasoning mechanism based on the trademark domain knowledge graph is introduced to perform semantic enhancement and logical reasoning on the comprehensive evidence feature to obtain its semantic support. The authenticity confidence of the trademark image to be identified, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are input into the pre-trained integrated learning model to generate the final trademark identification result.

2. The method according to claim 1, characterized in that Based on the standard trademark image, the corresponding anti-counterfeiting code is generated by using the anti-counterfeiting code generation algorithm based on chaotic encryption. The generated anti-counterfeiting code is embedded in the standard trademark image to obtain the trademark image carrying the anti-counterfeiting code. The code is then positioned to obtain the corresponding coding area. The positioned coding area is corrected to obtain a standardized anti-counterfeiting code image including: Extracting the hash value of the standard trademark image and combining it with the key provided by the trademark owner to generate a random sequence through chaotic mapping, permuting and diffusing the random sequence to obtain a binary anti-counterfeiting code, and performing error correction coding and asymmetric encryption on the binary anti-counterfeiting code to obtain an encrypted anti-counterfeiting code; The encrypted anti-counterfeiting code is embedded into the standardized trademark image using digital watermarking technology. The standardized trademark image is decomposed into low-frequency sub-bands and high-frequency sub-bands through discrete wavelet transform. The embedding strength is adaptively adjusted according to the importance of each sub-band. The bit information of the encrypted anti-counterfeiting code is embedded at the same time. The trademark image carrying the anti-counterfeiting code is reconstructed through inverse discrete wavelet transform. Based on the obtained trademark image with anti-counterfeiting code, the edge detection algorithm is used to extract its region contour, and the initial code region is screened out by combining the prior knowledge of the anti-counterfeiting code. The initial code region is screened using the region proposal network, multiple candidate regions are generated, and classification and regression are performed, and finally the target code region is output; The target coding area is preprocessed, and the preprocessed target coding area is geometrically corrected to finally obtain a standardized anti-counterfeiting coding image.

3. The method according to claim 2, characterized in that Extract the hash value of the standard trademark image and combine it with the key provided by the trademark owner to generate a random sequence through chaotic mapping. The random sequence is permuted and diffused to obtain a binary anti-counterfeiting code. The binary anti-counterfeiting code is then subjected to error correction coding and asymmetric encryption. The encrypted anti-counterfeiting code includes: Extract the hash value of the standard trademark image, introduce a quantum random number generator to generate an initial random sequence, and obtain the seed key by performing an XOR operation on the initial random sequence and the key provided by the trademark owner; The obtained seed key is used as the initial value, and a fractional-order differential operator is introduced. By adjusting the order of the fractional-order differential operator, the target pseudo-random sequence is generated. The generated target pseudo-random sequence is adaptively and dynamically permuted using a permutation algorithm based on dynamic key control. At the same time, multiple chaotic functions are introduced to iteratively diffuse the target pseudo-random sequence to obtain the final binary anti-counterfeiting code. A low-density parity-check code is used to perform primary error correction on the binary anti-counterfeiting code obtained, and a polar code is introduced to perform secondary error correction on the binary anti-counterfeiting code after the primary error correction, thereby obtaining an optimized anti-counterfeiting code. Based on the optimized anti-counterfeiting code, encryption is performed in combination with a predefined user attribute set, wherein the user attribute set includes user authority and access authority, and the user's identity information is embedded in the optimized anti-counterfeiting code signature to obtain an encrypted anti-counterfeiting code.

4. The method according to claim 1, wherein Decode the standardized anti-counterfeiting code image to obtain the original bit stream of the anti-counterfeiting code, and compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system. Verify the validity of the original bit stream through hash verification, and obtain the anti-counterfeiting code verification results including: Construct a consortium blockchain system jointly participated by trademark owners, manufacturers, and sellers. The consortium blockchain system includes smart contracts for anti-counterfeiting code registration, verification, and management. In the consortium blockchain system, the anti-counterfeiting code generated by the trademark owner is sent to the manufacturer, who prints the anti-counterfeiting code on the trademarked product and submits a multi-hash value of the anti-counterfeiting code to the consortium blockchain system. The multi-hash value is generated from the anti-counterfeiting code, a timestamp, and a random number. The standardized anti-counterfeiting code image is decoded using the discrete wavelet transform algorithm to extract the original bit stream of the anti-counterfeiting code. The original bit stream of the anti-counterfeiting code is hashed to obtain a verification hash value, and the obtained verification hash value is submitted to the smart contract in the alliance blockchain system. The smart contract queries the corresponding multi-hash value on the alliance blockchain system based on the received verification hash value, and determines the authenticity of the anti-counterfeiting code by comparing the verification hash value with the multi-hash value. At the same time, it uses the zero-knowledge proof protocol to determine whether the anti-counterfeiting code is valid. The final anti-counterfeiting code verification result is obtained by combining the authenticity judgment results and the validity judgment results of the anti-counterfeiting code.

5. The method according to claim 4, characterized in that The smart contract queries the corresponding multi-hash value on the alliance blockchain system based on the received verification hash value. By comparing the verification hash value with the multi-hash value, the authenticity of the anti-counterfeiting code is determined. At the same time, the zero-knowledge proof protocol is used to determine whether the anti-counterfeiting code is valid. The final anti-counterfeiting code verification result is obtained by combining the authenticity judgment results and the validity judgment results of the anti-counterfeiting code. The received verification hash value and the corresponding multi-hash value on the consortium blockchain system are used as inputs to a multi-party secure computation protocol. The verification hash value and the multi-hash value are split into a number of shares using a secret sharing scheme, where each share is an independent polynomial point and the original hash value can be recovered when at least a specified number of shares are collected. The generated verification hash value shares and multi-hash value shares are distributed to each node in the consortium blockchain system through a secure channel. Each node only holds a pair of shares consisting of a verification hash value share and a multi-hash value share. Based on the received shares, each node uses the secure multi-party comparison algorithm in the multi-party secure computing protocol to determine whether the verification hash value and the multi-hash value are equal, and obtains the initial comparison result in the form of secret sharing; The threshold secret recovery algorithm is used to aggregate the initial comparison results of each node. When the number of aggregated initial comparison results reaches the preset threshold value, the final hash value matching comparison result is recovered and submitted to the alliance blockchain to obtain the anti-counterfeiting code verification result.

6. The method according to claim 1, characterized in that The authenticity confidence of the trademark image to be authenticated, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are input into the pre-trained ensemble learning model to generate the final trademark authentication results, including: A training set is constructed using samples of genuine trademarks and known counterfeit trademarks. The ensemble learning model is trained using an adaptive boosting algorithm to obtain a base classifier group consisting of multiple decision trees, wherein each decision tree recursively selects the optimal feature attributes of the training samples to perform node splitting until a preset splitting stopping condition is reached; During the iteration process, the classification loss is calculated based on the feature vector of each training sample and the weighted voting results of the current base classifier group. The weight of the misclassified training samples is increased so that the next decision tree focuses on the previously misclassified samples. The authenticity confidence of the trademark image to be identified, the semantic support of the comprehensive evidence features, and the anti-counterfeiting code verification results are used as input feature vectors and input into each trained decision tree at the same time to obtain the classification results of each decision tree. The classification results of each decision tree are combined to generate the final trademark identification result.

7. A trademark authentication system based on anti-counterfeiting coding, used to implement the method according to any one of claims 1 to 6, characterized in that: include: The first unit is used to obtain a trademark image to be authenticated and perform preprocessing to obtain a standard trademark image; based on the standard trademark image, a corresponding anti-counterfeiting code is generated using an anti-counterfeiting code generation algorithm based on chaotic encryption; the generated anti-counterfeiting code is embedded in the standard trademark image to obtain a trademark image carrying the anti-counterfeiting code; the code is located to obtain a corresponding code area; the located code area is corrected to obtain a standardized anti-counterfeiting code image; The second unit is used to decode the standardized anti-counterfeiting code image to obtain an original bit stream of the anti-counterfeiting code, compare the original bit stream of the anti-counterfeiting code with the standard anti-counterfeiting code bit stream stored in the pre-built blockchain system, verify the validity of the original bit stream through hash verification, and obtain an anti-counterfeiting code verification result; The third unit is used to use a pre-trained trademark authenticity discrimination model to discriminate the authenticity confidence of the trademark image to be identified, obtain the authenticity confidence of the trademark image to be identified, and output the final trademark identification result based on the anti-counterfeiting code verification result and the authenticity confidence of the trademark image to be identified, combined with the pre-acquired multi-source heterogeneous trademark identification evidence.

8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Product antifake method based on digital watermarking and graphic code and apparatus thereof

    CN105701757A

  • Commodity anti-counterfeiting code batch generation method based on trademark picture scrambling encryption

    CN113935344A