Anti-counterfeiting method and system for spraying code on outer package of product

By using a dual anti-counterfeiting solution of generating random microstructures and hash code verification on the packaging film, the problems of poor anti-counterfeiting effect and low efficiency of existing inkjet anti-counterfeiting technology are solved, and efficient and secure inkjet verification is achieved.

CN120707164AActive Publication Date: 2025-09-26SHANGHAI DAJUE PACKAGING PRODUCTS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510826403.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-26
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

The existing outer packaging film coding anti-counterfeiting technology has poor anti-counterfeiting effect, low verification efficiency and insufficient information security. The traditional identification system is easy to imitate, manual verification is prone to errors, and the existing electronic coding scheme has the risk of being cracked.

Method used

A random microstructure is formed on the surface of the packaging film to generate a unique physical interference map. Features are extracted through image acquisition equipment to generate a map feature vector, which is then quantized and encoded to generate a map summary code. The basic coding data and hash function are combined to generate an anti-counterfeiting hash code, which is printed on the packaging film. The user end scans and parses the coding information and compares the summary code and hash code to determine the authenticity of the product.

Benefits of technology

It improves the anti-counterfeiting ability of inkjet coding, ensures the authenticity and consistency of inkjet coding data, improves verification efficiency, enhances the safety of product packaging, and prevents counterfeiting and tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707164A_ABST
    Figure CN120707164A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of anti-counterfeiting, and discloses an anti-counterfeiting method and system for spraying codes on an outer package of a product, and the method comprises the following steps: forming a random microstructure on the surface of a packaging film, and generating a unique physical interference atlas; acquiring an atlas image and extracting features to generate an abstract code; generating an anti-counterfeiting hash code through a hash function in combination with the code spraying basic data; the three codes are jet-printed on the surface of the packaging film; a user scans a code to obtain data and collects an image to generate an abstract code, and the authenticity of a product is judged through the abstract code and Hash verification; the system comprises an image acquisition unit, an atlas characteristic quantification unit, a code spraying generation unit, user side equipment and a comparison verification unit. Through a dual verification mode of generating the abstract code and the hash value, the security and the inspection efficiency of code spraying anti-counterfeiting of the outer packaging film are effectively improved, the problems that a traditional anti-counterfeiting means is easy to counterfeit and tamper and the verification efficiency is low are solved, and the authenticity and the reliability of code spraying data are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of anti-counterfeiting technology, and in particular to an anti-counterfeiting method and system for spraying codes on product outer packaging. Background Art

[0002] With the continuous development of modern commodity production and distribution, the anti-counterfeiting of product packaging has received increasing attention. This is particularly true for food and pharmaceutical packaging, where counterfeiting and tampering are common. To ensure product authenticity and quality and protect consumer rights, anti-counterfeiting technologies have been widely adopted. As a common anti-counterfeiting measure, inkjet coding technology has been widely used on product packaging, including outer packaging films and bags.

[0003] Existing anti-counterfeiting technologies for outer packaging film coding primarily rely on traditional identification systems such as labels, QR codes, and barcodes. These technologies typically rely on manual scanning or verification of the coding information on the packaging to determine product authenticity. However, these methods have certain shortcomings in practical application, particularly in terms of anti-counterfeiting effectiveness and operational efficiency, making it difficult to meet growing market demands. Traditional coding and identification systems are easily imitated or copied by counterfeiters, resulting in poor anti-counterfeiting effectiveness. Furthermore, these technologies generally rely on visual identification, lacking effective guarantees for the uniqueness and immutability of the coding information.

[0004] Furthermore, existing inkjet verification methods mostly rely on manual operation or traditional scanning equipment, making the verification process inefficient and susceptible to human interference, thus affecting the accuracy and reliability of verification. In large-scale production and distribution processes, manual verification not only requires a significant amount of time and manpower, but is also prone to missed or false detections, further impacting overall verification efficiency.

[0005] While some new anti-counterfeiting technologies use electronic coding and data encryption to verify information, these technologies still carry the risk of being cracked. Existing anti-counterfeiting solutions mostly rely on the immutability of anti-counterfeiting labels, while neglecting encryption and multiple verification mechanisms for the coded information. This results in their limited ability to ensure the security of information printed on packaging films. Summary of the Invention

[0006] The purpose of the present invention is to provide a method and system for anti-counterfeiting by spraying codes on product outer packaging, which solves the problems of poor anti-counterfeiting effect, low verification efficiency and insufficient information security of the existing anti-counterfeiting technology of spraying codes on outer packaging films.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for anti-counterfeiting by spraying codes on product outer packaging, comprising the following steps: Forming random microstructures on the packaging film surface to generate a unique physical interference pattern; Use image acquisition equipment to collect physical interference maps, extract features, and generate map feature vectors; Quantize and encode the graph feature vector to generate a unique graph summary code; Generate basic coding data, and generate an anti-counterfeiting hash code by using a hash function on the basic coding data and the atlas summary code; The coding basic data, anti-counterfeiting hash code and atlas abstract code are jointly encoded and printed on the surface of the packaging film through a coding device to form a coding; On the user side, by scanning the inkjet code, the basic data of the inkjet code, the anti-counterfeiting hash code and the atlas summary code are parsed, and the packaging film area image is taken to extract the atlas features and generate the atlas summary code; Compare the generated image summary code with the parsed image summary code, and verify the matching of the basic data of the inkjet coding and the anti-counterfeiting hash code to determine whether the product is authentic.

[0008] Preferably, the step of forming a random microstructure on the surface of the packaging film to form a unique physical interference pattern includes: forming a random microstructure on the surface of the packaging film by laser etching or nano-printing technology, wherein the microstructure has an irregular shape and size, forming a unique physical interference pattern, and the unique physical interference pattern is unique for each packaging film and cannot be copied.

[0009] Preferably, the step of using an image acquisition device to acquire a physical interference map, extracting features, and generating a map feature vector includes: Using an image acquisition device to acquire an image of the physical interference map on the packaging film surface, the image acquisition device at least comprising a high-resolution camera and a scanner; Preprocessing the collected image, wherein the preprocessing includes at least denoising, normalization, and contrast enhancement; An image processing algorithm is used to extract features from the preprocessed image and generate a graph feature vector, which is represented by the following formula: V=[v1,v2,…,v n ]; Among them, V is the graph feature vector; v i is the i-th eigenvalue; n is the number of features.

[0010] Preferably, the step of extracting features from the pre-processed image using an image processing algorithm comprises: Applying an image processing algorithm to the preprocessed image to extract features from the image, the image processing algorithm comprising the following steps: Use Gaussian filtering to remove noise from the image; Use Sobel operator to detect edges in the image; The texture features of the image are calculated through the gray-level co-occurrence matrix to generate the texture pattern in the image.

[0011] Preferably, the step of quantizing and encoding the graph feature vector to generate a unique graph abstract code includes: normalizing the acquired graph feature vector so that all feature values ​​are within a uniform numerical range; Apply quantization algorithm to the normalized graph feature vector to map continuous feature values ​​to discrete values; Based on the quantized eigenvalues, a summary code of the graph is generated. The summary code is a binary sequence of fixed length. The graph summary code is further processed using a hash algorithm to generate a final unique graph summary code.

[0012] Preferably, the basic coding data includes a timestamp, a device serial number, a random number and a batch number; The step of generating an anti-counterfeiting hash code by using a hash function for the basic coding data and the atlas abstract code comprises: The basic coding data and the atlas summary code are connected into a combined string, and an anti-counterfeiting hash code is generated through a hash function. The combined string is: D=[Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode]; Among them, Timestamp is the timestamp generated by the inkjet printer; DeviceID is the unique identifier of the inkjet printer device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image summary code; || represents the string concatenation operation; The hash value of the combined string is calculated using the hash function H(·) to generate an anti-counterfeiting hash code: AntiForgeryHash = H(D); Where H(·) is a hash function, AntiForgeryHash is the generated anti-counterfeiting hash code, and D is a combined string containing the basic coding data and the image summary code.

[0013] Preferably, the step of encoding the basic coding data, the anti-counterfeiting hash code and the graph abstract code together and printing them on the surface of the packaging film through a coding device to form the coding comprises: Encode the basic coding data, anti-counterfeiting hash code and graph summary code into a printable data format and convert them into recognizable coding information; The coded data is printed on the surface of the packaging film through the inkjet coding equipment to form a code.

[0014] Preferably, the step of capturing an image of the packaging film region, extracting pattern features, and generating a pattern summary code comprises: capturing an image of the packaging film region by a user terminal device, wherein the image of the packaging film region comprises: image data obtained by scanning the packaging film surface after coding by the user terminal, including microstructural features of the coding region; An image processing algorithm is applied to the packaging film area image to extract its texture features and microstructure features to generate atlas features; based on the extracted atlas features, an atlas abstract code is calculated, and the atlas abstract code is used to represent the unique physical features of the packaging film area.

[0015] Preferably, the step of comparing the generated graph abstract code with the parsed graph abstract code and verifying the matching of the coding basic data with the anti-counterfeiting hash code to determine whether the product is authentic includes: Compare the generated image summary code with the parsed image summary code. If the two are consistent, it means that the image information has not been tampered with. Verify the matching of the basic coding data and the anti-counterfeiting hash code. If the verification passes, the correctness of the coding data is verified. Determine whether the product is genuine. If the image summary code and the basic data of the inkjet printer match the anti-counterfeiting hash code, the product is determined to be genuine, otherwise it is a counterfeit.

[0016] The present invention also provides a product outer packaging coding anti-counterfeiting system, comprising: An image acquisition unit forms a random microstructure on the surface of the packaging film to generate a unique physical interference map, and uses an image acquisition device to acquire the physical interference map, extract features, and generate a map feature vector; A graph feature quantization unit, used to quantize and encode the graph feature vector to generate a unique graph summary code; A code generation unit is used to generate basic code data, and generate an anti-counterfeiting hash code by using a hash function to combine the basic code data and the atlas abstract code, and then encode the basic code data, the anti-counterfeiting hash code and the atlas abstract code and print them on the surface of the packaging film to form a code; The user terminal device is used to scan the inkjet code, parse the inkjet code basic data, anti-counterfeiting hash code and pattern summary code, and take an image of the packaging film area, extract pattern features, and generate a pattern summary code; The comparison and verification unit is used to compare the generated atlas summary code with the parsed atlas summary code, and to verify the matching of the basic data of the inkjet coding and the anti-counterfeiting hash code to determine whether the product is genuine.

[0017] In summary, the present invention includes at least one of the following beneficial technical effects: 1. This invention utilizes a dual verification scheme combining digest code generation and hash value technology, effectively enhancing the anti-counterfeiting capabilities of inkjet printing on outer packaging films. By digitizing the inkjet printing information and incorporating hash value technology, the authenticity and consistency of the inkjet printing data are ensured. Compared to existing single anti-counterfeiting measures, this invention addresses the vulnerability of anti-counterfeiting labels to counterfeiting and tampering, providing a higher level of security.

[0018] 2. This invention improves the efficiency of outer packaging film inspection through automated inkjet code verification technology. By intelligently comparing generated summary codes with stored hash values, the invention can quickly and accurately verify inkjet code information. Compared with existing solutions that rely on manual or traditional scanning methods, this invention significantly improves verification speed and solves the problems of low efficiency and error-prone manual inspection.

[0019] 3. This invention utilizes a hash value and digest code-based anti-counterfeiting verification mechanism, significantly enhancing the security of product packaging, particularly in preventing counterfeiting and tampering. Compared to conventional, easily cracked security labels, this invention provides a more reliable security guarantee. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Schematic diagram of the method flow of the present invention; Figure 2 This is a system architecture diagram of the present invention. DETAILED DESCRIPTION

[0021] The following is combined with Figure 1 -Attached Figure 2 , the present invention is described in further detail.

[0022] An embodiment of the present invention provides an anti-counterfeiting method for spraying codes on product outer packaging, comprising the following steps: S1, forming a random microstructure on the surface of the packaging film to generate a unique physical interference pattern; S2. Use an image acquisition device to collect a physical interference map, extract features, and generate a map feature vector; S3, quantize and encode the graph feature vector to generate a unique graph summary code; S4, generating basic coding data, and generating an anti-counterfeiting hash code by using a hash function on the basic coding data and the atlas summary code; S5, encoding the coding basic data, anti-counterfeiting hash code and atlas abstract code together and printing them on the surface of the packaging film through a coding device to form a coding; S6. On the user side, by scanning the inkjet code, parsing the inkjet code basic data, anti-counterfeiting hash code and pattern summary code, and taking an image of the packaging film area, extracting pattern features, and generating a pattern summary code; S7. Compare the generated image summary code with the parsed image summary code, and verify the matching of the inkjet coding basic data and the anti-counterfeiting hash code to determine whether the product is authentic.

[0023] In step S1, in this embodiment, random and unique microstructural features are introduced onto the packaging film surface to achieve product anti-counterfeiting. This creates an unreplicable physical interference pattern. This physical interference pattern, serving as the basis for subsequent extraction and verification of anti-counterfeiting image information, is highly unique and complex, and is a crucial component of the present invention's anti-counterfeiting mechanism.

[0024] Preferably, the random microstructure is achieved by artificially introducing random microstructural perturbations on the outer surface of the packaging film using laser etching or nanoprinting techniques. These microstructures exhibit nonlinear, irregular, and disordered distribution characteristics, with varying shapes, sizes, and arrangements, thus ensuring the inherent microstructural diversity of each packaging film.

[0025] In practice, laser etching technology creates microscopic, undulating structures on the packaging film surface by controlling laser energy, scanning trajectory, frequency, and exposure time. These structures appear as differences in image brightness and texture when illuminated and photographed, helping subsequent image acquisition equipment extract feature vectors from the image.

[0026] Another preferred approach is to use nanoprinting technology to imprint a randomly distributed microstructure template onto the packaging film surface. This template can be based on a micron- or even nanometer-scale mask template and incorporate perturbation mechanisms. For example, uncontrollable factors such as random pressure changes, temperature perturbations, or material elastic response can be introduced during the template imprinting process to further enhance the randomness and unpredictability of the microstructure.

[0027] To ensure the uniqueness of the physical characteristics of the random microstructure, the interference pattern formed must meet the following conditions: Randomness: The microstructure formed on each piece of packaging film is arranged differently, is not controlled by humans, and is naturally unpredictable. Uniqueness: Once formed, the microstructure cannot be reproduced in terms of spatial distribution and texture structure. Non-replicability: Since the structure generation process relies on slight changes in laser or printing perturbation parameters, it is almost impossible to be replicated under actual production conditions, even using the same process flow.

[0028] Once formed, the microstructure can be considered the "physical fingerprint" of the packaging film. Later in the anti-counterfeiting process, this microstructure map will serve as a data source and be input into an image acquisition device to obtain its characteristic image.

[0029] Based on the image formed by this physical structure feature, the interference pattern can be subsequently captured using a high-resolution camera or other imaging device. This image is further used for pattern feature extraction, feature vector construction, and summary code generation. Because this physical interference pattern is uncontrollably generated, it is highly secure and unique.

[0030] It should be noted that the generation of the above-mentioned microstructure does not rely on a preset graphic library or artificial graphic design, but rather on the spontaneous formation of the pattern through a natural perturbation mechanism. This method effectively circumvents the problem of fixed graphic structures in traditional anti-counterfeiting mechanisms that are easily imitated.

[0031] This embodiment completes the step of generating the physical interference map in the above manner, provides a basic image source for subsequent image extraction, map summary code generation and hash anti-counterfeiting, and constitutes the basic technical link in the entire anti-counterfeiting method process.

[0032] In step S2, in this embodiment, to digitally identify and trace the random microstructures introduced on the packaging film surface, an image acquisition device is used to capture image data of the physical interference pattern. Feature extraction from the image content is performed using an image processing algorithm, ultimately constructing a feature vector representing the pattern. This feature vector serves as the core data source for subsequent generation of the pattern summary code and anti-counterfeiting hash, ensuring uniqueness, comparability, and compactness.

[0033] Preferably, the image acquisition device includes at least a high-resolution camera, industrial scanner, or other device capable of capturing microscopic images, for capturing images of the microstructure on the packaging film surface. This image acquisition device should be able to achieve clear imaging of the microstructure map and possess strong detail restoration capabilities to ensure that the captured image fully preserves the microscopic perturbations.

[0034] After image acquisition is completed, the original image needs to be subjected to standardized preprocessing operations to improve the accuracy and stability of subsequent feature extraction. The preprocessing operations include but are not limited to the following steps: Image denoising: Gaussian filtering is preferably used to reduce the noise of the original image to remove random errors introduced by imaging noise or background interference during the shooting process. Gaussian filtering smoothes the pixels in the image through convolution operations. Its basic function form is: Among them, G(x,y) represents the value of the Gaussian function at the coordinate (x,y), which serves as the weight of the corresponding position in the filter kernel; x,y represent the horizontal and vertical coordinate offsets relative to the center pixel in the filter kernel; σ represents the standard deviation of the Gaussian distribution, which is used to control the degree of filtering. The larger the value, the smoother the filtering.

[0035] Normalization processing: The image pixel values ​​are uniformly scaled to a specific numerical range (for example, between 0 and 1) to keep the image brightness information consistent under different acquisition environments and avoid interference of ambient light changes on the image feature extraction results.

[0036] Image enhancement: Apply contrast stretching or adaptive histogram equalization (such as CLAHE) methods to enhance the contrast of microstructure texture areas in the image and improve the distinguishability of edge and texture information.

[0037] After preprocessing, image processing algorithms are applied to the image to extract structural feature information. In this process, the image processing algorithm includes the following steps: Edge detection: The Sobel operator is used to extract the edge contours of microstructures in the image. The Sobel operator calculates the gradient information of the image in the horizontal and vertical directions to obtain the image contour change area. Its basic form is: Among them, G x , G y Represents the convolution kernel of the Sobel operator in the horizontal and vertical directions respectively; after the convolution operation, the horizontal gradient I is obtained x and vertical gradient I y , and then the edge strength G of the pixel can be calculated: The result G describes the rate of change of the grayscale value of the local area in the image and can be used to capture the edge information of the microstructure.

[0038] Texture feature extraction: The gray-level co-occurrence matrix (GLCM) method is used to model and quantify the microstructural texture in the image. The GLCM describes the spatial relationship between image textures by counting the co-occurrence frequencies between grayscale pairs of pixels in an image at specific directions and distances. The gray-level co-occurrence matrix, P(i, j), represents the number (or probability) of simultaneous occurrences of pixel pairs with grayscale values ​​i and j in the image.

[0039] In order to further extract the texture pattern of the image, the gray level co-occurrence matrix (GLCM) is introduced in this example to model the spatial co-occurrence relationship between the gray levels of the image. Assume that the total number of gray levels of the image is N g , then GLCM is defined as: P(i,j,d,θ); Where i and j represent the grayscale values ​​of two pixels in the image; d represents the distance between the two pixels; θ represents the directional angle between the pixel pairs (such as 0°, 45°, 90°, 135°); P(i, j) represents the frequency (or normalized probability value) of the occurrence of pixel pairs with grayscale values ​​i and j at a given distance and direction. Based on GLCM, a series of representative texture features can be extracted, including: Energy The higher the energy value, the smoother the texture of the image and the less irregular changes.

[0040] Contrast: The larger the contrast value, the more dramatic the texture change of the image and the more obvious the grayscale difference.

[0041] Correlation: Among them, μ i ,μ j are the expected values ​​of grayscale values ​​i and j respectively; σ i ,σ j are the standard deviations of the corresponding grayscale values.

[0042] Used to measure the linear correlation between pixel gray levels.

[0043] Entropy: Indicates the uncertainty of image information; The larger the entropy value, the more complex the texture.

[0044] After the image processing is completed, a set of representative texture features, edge information and other descriptors are extracted to form a set of feature vectors, which are used to identify the unique characteristics of the physical interference map. The map feature vector is denoted as: V = [v1, v2, ..., v n ]; Among them, V is the graph feature vector; v i is the i-th eigenvalue; n is the number of features. Each eigenvalue can include multi-dimensional feature descriptors such as texture energy, contrast, edge gradient value, and directional gradient histogram.

[0045] The graph feature vector is reconstructible and measurable, and can be used for summary code calculation, hash anti-counterfeiting code generation, and comparison with the original graph during user-side verification in subsequent steps, thereby achieving the goal of anti-counterfeiting identification.

[0046] In summary, this embodiment uses an image acquisition device to acquire the microstructure image of the packaging film, combines image processing technology to extract structured feature data, and generates a graph feature vector, providing basic data support for subsequent data processing and comparison of the anti-counterfeiting method of the present invention.

[0047] In step S3, the acquired atlas feature vector is typically a high-dimensional real number vector, with each dimension representing the eigenvalue of the atlas image at a specific feature dimension. To ensure the effectiveness and consistency of subsequent processing, the first part of this step is to normalize the feature vector. The purpose of normalization is to standardize the value range of each feature, making the dimensions of different features consistent, thereby preventing the magnitude of certain eigenvalues ​​from being too large or too small, which may adversely affect subsequent processing.

[0048] Normalization processing: In this embodiment, the normalization method is minimum-maximum normalization, and the processing formula is as follows: Among them, x is the original eigenvalue; -x min and x max are the minimum and maximum values ​​of all values ​​in the eigenvector respectively; -x′ is the normalized eigenvalue.

[0049] After normalization, each eigenvalue x′ will be in the range of [0, 1], avoiding the dimensional difference between different eigenvalues ​​and facilitating subsequent quantization operations.

[0050] Quantization encoding: Next, the normalized graph feature vector is quantized and encoded. Quantization refers to discretizing continuous feature values ​​into a predetermined number of discrete values. The quantization operation divides the continuous range of feature vector values ​​into several intervals by defining a quantization step size, with each interval corresponding to a discrete value.

[0051] In this embodiment, the quantization process includes the following steps: Set quantization interval: Set a quantization step size Δ, and divide the range of the feature vector into multiple intervals according to the step size. The starting point and end point of each interval are controlled by Δ.

[0052] Among them, x max and x min are the maximum and minimum values ​​of the eigenvector respectively; N is the discrete level after quantization, which is usually a fixed value, such as 256 (corresponding to 8-bit quantization).

[0053] Mapping to discrete values: Each normalized eigenvalue x ′ Mapping to discrete values ​​q can be done using the following formula: Among them, q is the quantized discrete value, which represents the discrete interval where the normalized eigenvalue is located; Indicates a floor operation.

[0054] Through quantization, the eigenvalues ​​are mapped to corresponding discrete integer values, which will serve as the basis for generating the graph summary code.

[0055] Generate a graph summary code based on the quantized eigenvalues. The summary code is a fixed-length binary sequence, where each bit corresponds to a quantized eigenvalue. To obtain a fixed-length summary code, first arrange all quantized eigenvalues ​​in a specific order and convert them into binary form.

[0056] If each quantized value occupies b bits (binary), the length of the spectrum summary code is: L = N × b; Where N is the dimension of the feature vector (i.e., the number of features); b is the number of binary bits corresponding to each quantized value, usually 8 or 16 bits, depending on the quantization level and the required accuracy.

[0057] In the process of generating the graph summary code, a fixed-length binary representation is adopted in this embodiment, and each quantized eigenvalue is converted into a corresponding binary sequence, and finally these binary sequences are spliced ​​together to form a unique graph summary code.

[0058] To enhance the uniqueness and security of the graph summary code, this embodiment further uses a hash algorithm to process the generated graph summary code. The hash algorithm encrypts or hashes the graph summary code to generate a unique value of fixed length. This effectively prevents different graph feature vectors from generating the same summary code, thus increasing anti-counterfeiting.

[0059] The hashing process can be represented by the following function: H (digest code) = hash value; Where H is a hash function, usually a common hash algorithm such as SHA-256 is selected; the summary code is the previously generated graph summary code.

[0060] The hash algorithm maps the summary code to a unique hash value of fixed length, which ultimately serves as the unique identifier of the graph.

[0061] Through the above steps, the graph feature vector is normalized, quantized, and hashed to generate a final unique graph summary code. This summary code can be used in subsequent applications such as anti-counterfeiting verification and graph comparison to uniquely identify and protect the graph.

[0062] In step S4, the goal is to generate an anti-counterfeiting hash code, which uniquely identifies the product's anti-counterfeiting information and verifies the product's anti-counterfeiting status. The anti-counterfeiting hash code is generated from both the basic coding data and the image summary code to ensure its uniqueness and unforgeability. To achieve this goal, the basic coding data and the image summary code must be processed.

[0063] The basic coding data is the core component of generating the anti-counterfeiting hash code, including the following: Timestamp: Indicates the time when the code was generated. The timestamp records the specific time during the product production or packaging process, usually expressed as the number of seconds since January 1, 1970. For example, the timestamp can be the UTC time of a specific moment.

[0064] Device ID (Device Serial Number): A serial number that uniquely identifies a coding device. This number ensures that each coding device is uniquely identified, preventing different devices from generating the same coding information. The device serial number is typically a unique identifier assigned to a coding device when it leaves the factory.

[0065] RandomNum (Random Number): Each time a code is generated, a random number is generated to increase the unpredictability of the anti-counterfeiting hash code. The range and number of bits of the random number generated can be flexibly set according to the system design requirements, and is generally used to enhance the randomness of the anti-counterfeiting code.

[0066] Batch No: Indicates the production batch number of the product. The batch number is used to distinguish products from different production batches and ensure that the batch information of each product is accurately recorded and traceable.

[0067] These basic coding data need to be connected into a composite string. Assuming that each data item is connected using double vertical bar symbols (“||”), the composite string D is as follows: D=[Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode]; Among them, Timestamp is the timestamp generated by the inkjet printer; DeviceID is the unique identifier of the inkjet printer device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image summary code; || represents the string concatenation operation.

[0068] Once the combined string D is generated, the next step is to process it through a hash function to generate a secure hash code. A hash function H() is a one-way function that maps input data (regardless of its size) to an output value of a fixed length that is highly unique and unpredictable.

[0069] The combined string D is calculated using a hash function to generate an anti-counterfeiting hash code AntiForgeryHash, whose calculation formula is: AntiForgeryHash = H(D); Where H(·) is a hash function, AntiForgeryHash is the generated anti-counterfeiting hash code, and D is a combined string containing the basic coding data and the image summary code.

[0070] The resulting anti-counterfeiting hash code is a fixed-length binary or hexadecimal string. This hash code is unique, and the original information cannot be deduced from the data items generated during the generation process. Therefore, the anti-counterfeiting hash code can serve as a unique identifier for a product, ensuring its authenticity and anti-counterfeiting capabilities.

[0071] In this embodiment, the anti-counterfeiting hash code not only relies on the image summary code, but is also enhanced by the basic data (including the timestamp, device serial number, random number, and batch number) of the inkjet printer, making the anti-counterfeiting hash code more secure and tamper-resistant. This makes it difficult for a counterfeiter to forge the image summary code or other data to generate an anti-counterfeiting hash code that is identical to the authentic product, effectively ensuring the product's anti-counterfeiting effectiveness.

[0072] In summary, this embodiment describes in detail how to combine basic inkjet printing data with an image summary code and generate a unique anti-counterfeiting hash code using a hash function. By combining the timestamp, device serial number, random number, batch number, and image summary code and processing them using a hash algorithm, the generated anti-counterfeiting hash code is unique, secure, and unforgeable, effectively ensuring product anti-counterfeiting and traceability.

[0073] In step S5, the goal is to effectively encode the previously generated basic coding data, anti-counterfeiting hash code, and image summary code, and then print it on the packaging film surface using the coding equipment to form an identifiable coding code. The coding design must not only contain the product's unique identification information but also ensure information integrity, traceability, and anti-counterfeiting capabilities.

[0074] Coding of basic coding data, anti-counterfeiting hash code and image summary code: First, the basic coding data, anti-counterfeiting hash code and graph summary code are encoded to ensure that they can adapt to the printing requirements of the coding equipment and can be correctly identified and decoded in actual applications.

[0075] The encoding of basic coding data includes timestamp, device serial number, random number and batch number. This data is usually in text or numeric format and needs to be converted into a barcode or QR code format suitable for the coding device. In order to adapt to different coding technologies, the basic coding data can adopt a standardized encoding format, such as: QR code encoding: converting basic coding data into QR code format for high-density information storage; Barcode encoding: Converts the basic coding data into barcode format, suitable for low-density information storage.

[0076] The encoding in this step needs to ensure that the data can be accurately recognized by scanning devices (such as QR code scanners or barcode readers) and has strong damage resistance.

[0077] The encoding of anti-counterfeiting hash codes and graph abstract codes is usually a long and complex string or binary data, so it is necessary to convert them into a format that is easy to print and decode. Specifically, the following methods can be used for encoding: Anti-counterfeiting hash code: This is typically a fixed-length hexadecimal or binary string. To facilitate printing and anti-counterfeiting verification, it can be converted into a QR code or barcode, and the appropriate encoding method can be selected based on actual needs.

[0078] Image summary code: This is also a long string that can be encoded in a similar way. The image summary code can be stored as a QR code to ensure the integrity and readability of the information.

[0079] By encoding the basic coding data, anti-counterfeiting hash code and atlas summary code, they can be converted into a unified format suitable for printing.

[0080] Data format conversion and coding information generation: The data encoded with the basic coding data, anti-counterfeiting hash code, and image summary code needs to be converted into printable coding information. The key to this step is to combine multiple data items into an overall information structure so that the coding equipment can correctly print it on the packaging film surface.

[0081] According to the design of this embodiment, the coding information will include the following contents: D = [Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode||AntiForgeryHash]; where Timestamp is the timestamp generated by the inkjet printer; DeviceID is the unique identifier of the inkjet printer device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image summary code; and AntiForgeryHash represents the anti-counterfeiting hash code.

[0082] By combining the above data, a complete coding information structure D is formed, and then the information is converted into a printable data format, such as a QR code or barcode, for use by the coding device.

[0083] During the coding process, the equipment will print data on the surface of the packaging film through inkjet technology or laser engraving technology, forming a clear QR code or barcode for subsequent scanning and verification.

[0084] The graphics or symbols printed by the inkjet coding equipment contain all the basic coding data, anti-counterfeiting hash code and graph summary code. By scanning the inkjet coding information, the product's anti-counterfeiting verification, traceability query and other functions can be realized.

[0085] In summary, this embodiment ensures effective storage and readability of the coding information by encoding the basic coding data, anti-counterfeiting hash code, and image summary code into a data format suitable for printing by the coding device. The coding device then prints a QR code or barcode based on this encoded information, ensuring that each coding on the packaging film surface is unique and anti-counterfeiting. This step not only provides technical support for subsequent product traceability, verification, and anti-counterfeiting testing, but also effectively enhances product safety and authenticity.

[0086] Regarding step S6, in this embodiment, at the user end, by scanning the inkjet code, parsing the inkjet code basic data, anti-counterfeiting hash code and atlas summary code, and taking a picture of the packaging film area, extracting atlas features, and generating the atlas summary code step is described in detail.

[0087] On the user's end, they first scan the printed code on the packaging film surface using a scanning device (such as a smartphone or scanner). The resulting image data contains the basic code data, an anti-counterfeiting hash code, and an image summary code. By parsing the image, the user's device extracts the basic code data and anti-counterfeiting hash code, forming the foundational data for product information and supporting subsequent verification.

[0088] Scanning and data analysis: The user-end device processes the inkjet code image and decodes the inkjet code information in the image into basic inkjet code data, anti-counterfeiting hash code and image summary code through the adapted QR code or barcode decoding algorithm.

[0089] The basic data of the inkjet coding includes but is not limited to timestamp, equipment serial number, batch number and random number; the anti-counterfeiting hash code is generated based on the anti-counterfeiting algorithm to ensure the authenticity of the product; the atlas summary code is generated based on the microstructure characteristics of the packaging film surface to further verify the uniqueness of the packaging film.

[0090] Image capture and feature extraction: The user-end device then captures an image of the packaging film area, which includes the microstructural features of the coding area and its surroundings. Critical to this step is the quality and clarity of the captured image, ensuring that subtle structural variations on the packaging film surface are captured for use in generating the atlas summary code.

[0091] The captured images are usually processed as follows: Image denoising: This eliminates the interference of environmental noise and improves image quality. This process uses Gaussian filtering. The specific filtering function and formula are the same as those in step S2, so this step directly quotes the relevant content.

[0092] Edge Detection and Texture Extraction: Edge features of the packaging film surface are extracted by applying an edge detection algorithm. Texture features within the image are further extracted using algorithms such as the Gray Level Co-occurrence Matrix (GLCM). The specific formulas are the same as in step S2, so a repetitive description is omitted here.

[0093] Microstructural Feature Extraction: In this example, in addition to texture features, microstructural features of the packaging film surface, such as surface roughness and localized texture heterogeneity, need to be extracted. This is also accomplished using image processing algorithms. Extracting microstructural features is crucial for verifying the uniqueness of the packaging film.

[0094] Generate atlas features and summary codes: Once feature extraction is completed, the system combines the extracted texture features and microstructure features to form an atlas feature vector V, defined as: V=[v1,v2,…,v n ]; Among them, v i represents the i-th feature parameter, representing an independent feature of the microstructure or texture of the packaging film surface; n is the number of features. The spectral feature vector V is used to represent the unique physical characteristics of the packaging film surface.

[0095] Next, a hash algorithm (preferably an asymmetric hash algorithm or a fingerprint hash algorithm) is used to process the graph feature vector to generate a graph summary code, which can stably represent the uniqueness of the packaging film.

[0096] In summary, step S6 successfully extracts the microstructural features of the packaging film area through scanning and capturing by the user-side device, combined with image processing algorithms, and generates a unique image summary code. This image summary code, combined with the basic coding data and anti-counterfeiting hash code, not only verifies the authenticity of the product but also provides a reliable basis for product traceability. This step ensures product anti-counterfeiting verification at the user end, enhancing the anti-counterfeiting performance and credibility of the packaging film.

[0097] Regarding step S7, in this embodiment, step S7 involves determining the authenticity of the product by comparing the image summary code and verifying the basic coding data and the anti-counterfeiting hash code. The specific implementation steps are as follows.

[0098] To compare the image summary code, the system first compares the image summary code generated by the user with the image summary code parsed by scanning the inkjet printer. The generated image summary code is a unique identifier calculated by using a hash algorithm after capturing an image of the packaging film and extracting microstructural features. This image summary code represents the unique physical characteristics of the packaging film.

[0099] The parsed graph summary code is information extracted from the inkjet code. It is a summary code containing graph feature information obtained by decoding a QR code or barcode.

[0100] During the comparison process, if the generated image summary code is consistent with the parsed image summary code, it means that the image information of the packaging film has not been tampered with. This step is completed through hash value comparison technology. Specifically, the comparison operation is performed using the following formula: GeneratedSummaryCode=H(V ′ ); Where H(·) represents the hash function; V ′ is a normalized feature vector obtained through image processing and feature extraction. If the generated summary code matches the image summary code parsed from the inkjet printer, the image information has not been tampered with and the verification passes. If the two do not match, the microstructure of the packaging film surface may have been tampered with or forged, the verification fails, and the product is judged to be counterfeit.

[0101] Verify the matching of basic coding data and anti-counterfeiting hash code: Next, the system verifies the matching of basic coding data and anti-counterfeiting hash code. Basic coding data includes information such as product timestamp, device serial number, random number, and batch number. This information is generated by the coding equipment during product production and packaging and stored on the coding in the form of a barcode or QR code.

[0102] The anti-counterfeiting hash code is generated using a hash algorithm based on specific product information (such as production batch, product parameters, and production equipment). It is designed to ensure product anti-counterfeiting. The anti-counterfeiting hash code is used to verify the authenticity of the coded data and prevent data tampering.

[0103] To complete the verification, the system compares the scanned inkjet basic data with the pre-stored anti-counterfeiting hash code. Specifically, the inkjet basic data is extracted from the inkjet code through decoding, and the anti-counterfeiting hash code is usually stored in a secure database or cloud platform. During the comparison process, the system verifies the matching of the inkjet basic data and the anti-counterfeiting hash code using the following formula: GeneratedHash = H (BaseData); Here, H(·) represents a hash function, and BaseData is the basic data decoded from the inkjet code, including information such as the timestamp, device serial number, and batch number. If the generated hash value matches the stored anti-counterfeiting hash code, verification passes; otherwise, verification fails, indicating that the inkjet code data may have been altered or forged.

[0104] Determining Product Authenticity: After comparing the image summary code and verifying the matching of the basic inkjet printer data with the anti-counterfeiting hash code, the system uses the combined results to determine whether the product is authentic. Specifically, if the image summary code is consistent and the basic inkjet printer data matches the anti-counterfeiting hash code, the product information has not been tampered with and the product is authentic. At this point, the system determines the product is authentic.

[0105] On the contrary, if any verification fails (for example, the image summary code is inconsistent or the basic data of the inkjet printer does not match the anti-counterfeiting hash code), it is determined to be a counterfeit. This step is judged by the following logic: IsGenuineProduct=(GSC==PSC)∧(GH==SH); Among them, GSC is the generated summary code; PSC is the parsed summary code; GH is the generated hash value; SH is the stored hash value.

[0106] When the generated digest code is equal to the parsed digest code, and the generated hash value is equal to the stored hash value, the product is considered authentic.

[0107] In summary, this embodiment accurately determines product authenticity by comparing the image summary code and verifying the matching of the inkjet coding data with the anti-counterfeiting hash code. This verification process involves comparing the hash value of the image summary code, verifying the anti-counterfeiting hash of the inkjet coding data, and performing logical analysis. It is an efficient and reliable anti-counterfeiting verification method that effectively prevents counterfeiting and tampering. This ensures the authenticity and safety of the product at the consumer end.

[0108] Please see the attached Figure 2 The present invention also provides a product outer packaging coding anti-counterfeiting system, comprising: An image acquisition unit forms a random microstructure on the surface of the packaging film to generate a unique physical interference map, and uses an image acquisition device to acquire the physical interference map, extract features, and generate a map feature vector; A graph feature quantization unit, used to quantize and encode the graph feature vector to generate a unique graph summary code; A code generation unit is used to generate basic code data, and generate an anti-counterfeiting hash code by using a hash function to combine the basic code data and the atlas abstract code, and then encode the basic code data, the anti-counterfeiting hash code and the atlas abstract code and print them on the surface of the packaging film to form a code; The user terminal device is used to scan the inkjet code, parse the inkjet code basic data, anti-counterfeiting hash code and pattern summary code, and take an image of the packaging film area, extract pattern features, and generate a pattern summary code; The comparison and verification unit is used to compare the generated atlas summary code with the parsed atlas summary code, and to verify the matching of the basic data of the inkjet coding and the anti-counterfeiting hash code to determine whether the product is genuine.

[0109] The system of this embodiment can be used to execute the above method embodiments, and its principles and technical effects are similar, so they will not be repeated here.

[0110] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for anti-counterfeiting by spraying code on product outer packaging, characterized in that: The following steps are involved: Forming random microstructures on the packaging film surface to generate a unique physical interference pattern; Use image acquisition equipment to collect physical interference maps, extract features, and generate map feature vectors; Quantize and encode the graph feature vector to generate a unique graph summary code; Generate basic coding data, and generate an anti-counterfeiting hash code by using a hash function on the basic coding data and the atlas summary code; The coding basic data, anti-counterfeiting hash code and atlas abstract code are jointly encoded and printed on the surface of the packaging film through a coding device to form a coding; On the user side, by scanning the inkjet code, the basic data of the inkjet code, the anti-counterfeiting hash code and the atlas summary code are parsed, and the packaging film area image is taken to extract the atlas features and generate the atlas summary code; Compare the generated image summary code with the parsed image summary code, and verify the matching of the basic data of the inkjet coding and the anti-counterfeiting hash code to determine whether the product is authentic.

2. The anti-counterfeiting method for spraying codes on product outer packaging according to claim 1, characterized in that: The step of forming a random microstructure on the surface of the packaging film to form a unique physical interference pattern comprises: Random microstructures are formed on the surface of the packaging film by laser etching or nano-printing technology. The microstructures have irregular shapes and sizes, forming a unique physical interference pattern. The unique physical interference pattern is unique to each packaging film and cannot be copied.

3. The anti-counterfeiting method for spraying codes on product outer packaging according to claim 1, characterized in that: The steps of using an image acquisition device to acquire a physical interference map, extracting features, and generating a map feature vector include: Using an image acquisition device to acquire an image of the physical interference map on the packaging film surface, the image acquisition device at least comprising a high-resolution camera and a scanner; Preprocessing the collected image, wherein the preprocessing includes at least denoising, normalization, and contrast enhancement; An image processing algorithm is used to extract features from the preprocessed image and generate a graph feature vector, which is represented by the following formula: V=[v1,v2,…,v n ]; Among them, V is the graph feature vector; v i is the i-th eigenvalue; n is the number of features.

4. The anti-counterfeiting method for spraying codes on product packaging according to claim 3, characterized in that: The step of extracting features from the pre-processed image using an image processing algorithm comprises: Applying an image processing algorithm to the preprocessed image to extract features in the image, the image processing algorithm comprising the following steps: removing noise in the image using a Gaussian filtering method; Use Sobel operator to detect edges in the image; The texture features of the image are calculated through the gray-level co-occurrence matrix to generate the texture pattern in the image.

5. The anti-counterfeiting method for spraying codes on product packaging according to claim 1, characterized in that: The step of quantizing and encoding the graph feature vector to generate a unique graph summary code includes: Normalize the acquired atlas feature vectors so that all feature values ​​are within a uniform numerical range; Apply quantization algorithm to the normalized graph feature vector to map continuous feature values ​​to discrete values; Based on the quantized eigenvalues, a summary code of the graph is generated. The summary code is a binary sequence of fixed length. The graph summary code is further processed using a hash algorithm to generate a final unique graph summary code.

6. The anti-counterfeiting method for spraying codes on product packaging according to claim 1, characterized in that: The basic coding data includes timestamp, equipment serial number, random number and batch number; The step of generating an anti-counterfeiting hash code by using a hash function for the basic coding data and the atlas abstract code comprises: The basic coding data and the atlas summary code are connected into a combined string, and an anti-counterfeiting hash code is generated through a hash function. The combined string is: D=[Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode]; Among them, Timestamp is the timestamp generated by the inkjet printer; DeviceID is the unique identifier of the inkjet printer device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image summary code; || represents the string concatenation operation; The hash value of the combined string is calculated using the hash function H(·) to generate an anti-counterfeiting hash code: AntiForgeryHash=H(D): Where H(·) is a hash function, AntiForgeryHash is the generated anti-counterfeiting hash code, and D is a combined string containing the basic coding data and the image summary code.

7. The anti-counterfeiting method for spraying codes on product packaging according to claim 1, characterized in that: The step of encoding the basic coding data, the anti-counterfeiting hash code and the image abstract code together and printing them on the surface of the packaging film through a coding device to form the coding comprises: Encode the basic coding data, anti-counterfeiting hash code and graph summary code into a printable data format and convert them into recognizable coding information; The coded data is printed on the surface of the packaging film through the inkjet coding equipment to form a code.

8. The anti-counterfeiting method for spraying codes on product packaging according to claim 1, characterized in that: The steps of capturing an image of the packaging film region, extracting image features, and generating an image summary code include: Capturing an image of the packaging film area by a user terminal device, the image of the packaging film area includes: image data of the packaging film surface after the user terminal scans the coding, including microstructural features of the coding area; An image processing algorithm is applied to the packaging film area image to extract its texture features and microstructure features to generate atlas features; based on the extracted atlas features, an atlas abstract code is calculated, and the atlas abstract code is used to represent the unique physical features of the packaging film area.

9. The anti-counterfeiting method for spraying codes on product packaging according to claim 1, characterized in that: The steps of comparing the generated image summary code with the parsed image summary code and verifying the matching of the inkjet coding basic data with the anti-counterfeiting hash code to determine whether the product is authentic include: Compare the generated graph summary code with the parsed graph summary code. If the two are consistent, it means that the graph information has not been tampered with. Verify the matching between the basic coding data and the anti-counterfeiting hash code. If the verification passes, the correctness of the coding data is verified. Determine whether the product is genuine. If the image summary code and the basic data of the inkjet printer match the anti-counterfeiting hash code, the product is determined to be genuine, otherwise it is a counterfeit.

10. A product outer packaging coding anti-counterfeiting system, applied to a product outer packaging coding anti-counterfeiting method according to any one of claims 1 to 9, characterized in that: include: An image acquisition unit forms a random microstructure on the surface of the packaging film to generate a unique physical interference map, and uses an image acquisition device to acquire the physical interference map, extract features, and generate a map feature vector; A graph feature quantization unit, used to quantize and encode the graph feature vector to generate a unique graph summary code; A code generation unit is used to generate basic code data, and generate an anti-counterfeiting hash code by using a hash function to combine the basic code data and the atlas abstract code, and then encode the basic code data, the anti-counterfeiting hash code and the atlas abstract code and print them on the surface of the packaging film to form a code; The user terminal device is used to scan the inkjet code, parse the inkjet code basic data, anti-counterfeiting hash code and pattern summary code, and take an image of the packaging film area, extract pattern features, and generate a pattern summary code; The comparison and verification unit is used to compare the generated atlas summary code with the parsed atlas summary code, and to verify the matching of the basic data of the inkjet coding and the anti-counterfeiting hash code to determine whether the product is genuine.

Citation Information

Patent Citations

  • Covering code anti-counterfeiting method and system to which method is applied

    CN107169777A

  • Anti-fake method and application using random spray coverage pattern and digital image contrast technology

    CN108074110A

  • Accurate comparison anti-counterfeiting method and application based on randomly sprayed overlay image

    CN108647975A

  • Product code spraying anti-counterfeiting method and system based on code spraying machine

    CN111951031A

  • Biological feature template protection method and device based on deep learning

    CN112347855A