A product outer package code spraying anti-counterfeiting method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2026-08-11
AI Technical Summary
1.本发明采用生成摘要代码和哈希值技术的双重验证方案,有效提升了外包装膜的喷码防伪能力。通过对喷码信息进行数字化处理,并结合哈希值技术,确保了喷码数据的真实性和一致性。相比于现有技术中单一的防伪措施,本发明解决了防伪标识容易被仿冒和篡改的不足,提供了更高水平的安全保障。
Smart Images

Figure CN120707164B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anti-counterfeiting technology, and in particular to a method and system for anti-counterfeiting by inkjet printing on product packaging. Background Technology
[0002] With the continuous development of modern commodity production and distribution, the issue of anti-counterfeiting in commodity packaging has received increasing attention, especially in the food and pharmaceutical industries, where counterfeiting and tampering with packaging are frequent occurrences. To ensure the authenticity and quality of goods and protect consumer rights, anti-counterfeiting technologies have been widely applied. Inkjet coding technology, as a common anti-counterfeiting method, has been widely used on commodity packaging such as outer packaging films and bags.
[0003] Existing anti-counterfeiting technologies for outer packaging films mainly rely on traditional label, QR code, and barcode identification systems. These technologies typically determine product authenticity by manually scanning or verifying the inkjet information on the packaging. However, these methods have certain shortcomings in practical applications, particularly in terms of anti-counterfeiting effectiveness and operational efficiency, making it difficult to meet the growing market demands. Traditional inkjet marking systems are easily imitated or copied by counterfeiters, resulting in poor anti-counterfeiting effectiveness. Furthermore, these technologies usually rely on visual markings, lacking effective guarantees for the uniqueness and tamper-proof nature of the inkjet information.
[0004] Furthermore, most existing inkjet printing verification methods rely on manual operation or traditional scanning equipment. This makes the verification process not only inefficient but also susceptible to human error, affecting its accuracy and reliability. In large-scale production and distribution, manual verification not only requires significant time and manpower but is also prone to missed or false detections, thus impacting overall verification efficiency.
[0005] While some new anti-counterfeiting technologies verify information through electronic coding and data encryption, these technologies still remain vulnerable to being cracked. Most existing anti-counterfeiting solutions rely on the immutability of anti-counterfeiting labels, neglecting the encryption and multi-factor verification mechanisms for inkjet printing information, thus limiting their ability to ensure the security of inkjet printing information on packaging films. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for anti-counterfeiting by inkjet printing on product outer packaging, which solves the problems of poor anti-counterfeiting effect, low verification efficiency and insufficient information security of existing anti-counterfeiting technologies for outer packaging films.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for anti-counterfeiting by inkjet printing on product outer packaging, comprising the following steps: Random microstructures are formed on the surface of the packaging film to generate a unique physical interference pattern; Physical interference maps are acquired using image acquisition equipment, and features are extracted to generate map feature vectors. The feature vectors of the graph are quantized and encoded to generate a unique graph digest code; Generate basic inkjet printing data, and then generate an anti-counterfeiting hash code by combining the basic inkjet printing data with the map digest code using a hash function; The basic inkjet data, anti-counterfeiting hash code, and image digest code are jointly encoded and printed onto the surface of the packaging film using an inkjet printer to form an inkjet code. On the user end, by scanning the inkjet code, the basic inkjet data, anti-counterfeiting hash code and image digest code are parsed out, and an image of the packaging film area is captured, image features are extracted, and an image digest code is generated. The generated image digest code is compared with the parsed image digest code, and the matching between the basic inkjet data and the anti-counterfeiting hash code is verified to determine whether the product is genuine.
[0008] Preferably, the step of forming random microstructures on the surface of the packaging film to form a unique physical interference pattern includes: forming random microstructures on the surface of the packaging film by laser etching or nanoprinting technology, wherein the microstructures have irregular shapes and sizes, forming a unique physical interference pattern, wherein the unique physical interference pattern is unique and cannot be replicated for each packaging film.
[0009] Preferably, the step of acquiring a physical interference spectrum using an image acquisition device, extracting features, and generating a spectrum feature vector includes: Images of physical interference patterns on the surface of the packaging film are acquired using an image acquisition device, which includes at least a high-resolution camera and a scanner. The acquired images are preprocessed, and the preprocessing includes at least noise reduction, normalization, and contrast enhancement. Image processing algorithms are used to extract features from the preprocessed image, generating a spectral feature vector. This feature vector is represented by the following formula: V = [v1, v2, ..., v n ]; Where V is the spectral feature vector; v i Let be the i-th feature value; n is the number of features.
[0010] Preferably, the step of extracting features from the preprocessed image using an image processing algorithm includes: The image processing algorithm is applied to the preprocessed image to extract features. The image processing algorithm includes the following steps: Use Gaussian filtering to remove noise from the image; The Sobel operator is used to detect edges in the image; The grayscale co-occurrence matrix is used to calculate the texture features of an image and generate texture patterns in the image.
[0011] Preferably, the step of quantizing and encoding the spectral feature vector to generate a unique spectral digest code includes: normalizing the obtained spectral feature vector so that all feature values are within a uniform numerical range; A quantization algorithm is applied to the normalized spectral feature vectors to map continuous feature values to discrete values; Based on the quantized feature values, a digest code for the graph is generated, which is a fixed-length binary sequence. The graph digest code is further processed using a hash algorithm to generate the final unique graph digest code.
[0012] Preferably, the basic inkjet printing data includes a timestamp, device serial number, random number, and batch number; The step of generating an anti-counterfeiting hash code from the basic inkjet data and the map digest code using a hash function includes: The basic inkjet printing data and the image digest code are concatenated into a combined string, and an anti-counterfeiting hash code is generated using a hash function. The combined string is: D=[Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode]; Where Timestamp is the timestamp of the inkjet printing generation; DeviceID is the unique identifier of the inkjet printing 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(·), generating an anti-counterfeiting hash code: AntiForgeryHash = H(D); Where H(·) is the hash function, AntiForgeryHash is the generated AntiForgeryHash, which is the anti-counterfeiting hash code; D is the combined string, which contains the basic data of the inkjet printing and the map digest code.
[0013] Preferably, the step of encoding the basic inkjet data, anti-counterfeiting hash code, and image digest code together and printing them onto the surface of the packaging film using an inkjet printer to form the inkjet code includes: The basic inkjet data, anti-counterfeiting hash code, and map digest code are encoded into a printable data format and converted into recognizable inkjet information. The encoded data is printed onto the surface of the packaging film using an inkjet printer to form a code.
[0014] Preferably, the step of capturing an image of the packaging film area, extracting spectral features, and generating a spectral digest code includes: capturing an image of the packaging film area through a user terminal device, wherein the image of the packaging film area includes: image data after the user terminal scans the surface of the packaging film after inkjet printing, which includes the microstructure features of the inkjet printing area; The image of the packaging film area is processed using image processing algorithms to extract its texture and microstructure features, generating spectral features. Based on the extracted spectral features, a spectral digest code is calculated, which is used to represent the unique physical features of the packaging film area.
[0015] Preferably, the step of comparing the generated image digest code with the parsed image digest code, and verifying the matching between the basic inkjet printing data and the anti-counterfeiting hash code to determine whether the product is genuine includes: Compare the generated map digest code with the parsed map digest code. If they match, it means that the map information has not been tampered with. Verify the matching between the basic inkjet data and the anti-counterfeiting hash code. If the verification passes, the correctness of the inkjet data is verified. To determine if a product is genuine, if the image summary code and the basic data of the inkjet printing match the anti-counterfeiting hash code, the product is considered genuine; otherwise, it is counterfeit.
[0016] The present invention also provides a coding anti-counterfeiting system for product outer packaging, comprising: The image acquisition unit forms random microstructures on the surface of the packaging film to generate a unique physical interference spectrum. It also uses an image acquisition device to acquire the physical interference spectrum, extracts features, and generates a spectrum feature vector. The graph feature quantization unit is used to quantize and encode the graph feature vector to generate a unique graph digest code; The inkjet printing generation unit is used to generate basic inkjet printing data, and to generate an anti-counterfeiting hash code by using a hash function with the basic inkjet printing data and the map digest code. Then, the basic inkjet printing data, the anti-counterfeiting hash code and the map digest code are encoded and printed on the surface of the packaging film to form inkjet printing. The user terminal device is used to scan the inkjet code, parse the basic inkjet data, anti-counterfeiting hash code and image digest code, and take an image of the packaging film area, extract the image features and generate the image digest code. The comparison and verification unit is used to compare the generated image digest code with the parsed image digest code, and to verify the matching between the basic inkjet data and the anti-counterfeiting hash code to determine whether the product is genuine.
[0017] In summary, the present invention has at least one of the following beneficial technical effects: 1. This invention employs a dual verification scheme combining digest code generation and hash value technology, effectively enhancing the anti-counterfeiting capabilities of the inkjet printing on outer packaging films. By digitizing the inkjet printing information and combining it with hash value technology, the authenticity and consistency of the inkjet printing data are ensured. Compared to the single anti-counterfeiting measures in existing technologies, this invention addresses the shortcomings of anti-counterfeiting labels being easily counterfeited and tampered with, providing a higher level of security.
[0018] 2. This invention improves the inspection efficiency of outer packaging films through automated inkjet printing verification technology. By intelligently comparing and generating digest codes and storing hash values, this invention can quickly and accurately verify inkjet printing information. Compared with existing technologies that rely on manual or traditional scanning methods, this invention significantly improves verification speed and solves the problems of low efficiency and error-proneness in manual inspection.
[0019] 3. This invention employs an anti-counterfeiting verification mechanism combining hash values and digest codes, significantly enhancing the security of product packaging, particularly in preventing counterfeiting and tampering. Compared to traditional anti-counterfeiting labels in the prior art that are easily cracked, this invention provides more reliable security. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a system architecture diagram of the present invention. Detailed Implementation
[0021] The following is in conjunction with the appendix Figure 1 -Appendix Figure 2 The present invention will be further described in detail below.
[0022] This invention provides a method for anti-counterfeiting by inkjet printing on product packaging, comprising the following steps: S1. Random microstructures are formed on the surface of the packaging film to generate a unique physical interference pattern; S2. Use image acquisition equipment to acquire physical interference maps, extract features, and generate map feature vectors; S3. Quantize and encode the feature vectors of the graph to generate a unique graph digest code; S4. Generate basic inkjet coding data, and generate an anti-counterfeiting hash code by combining the basic inkjet coding data and the map digest code using a hash function; S5. The basic inkjet data, anti-counterfeiting hash code, and map digest code are jointly encoded and printed on the surface of the packaging film using an inkjet printer to form an inkjet code. S6. At the user end, by scanning the inkjet code, the basic data of the inkjet code, the anti-counterfeiting hash code and the image digest code are parsed, and an image of the packaging film area is captured, the image features are extracted, and an image digest code is generated. S7. Compare the generated image digest code with the parsed image digest code, and verify the matching between the basic inkjet data and the anti-counterfeiting hash code to determine whether the product is genuine.
[0023] In step S1, in this embodiment, to achieve product anti-counterfeiting, random and unique microstructural features are introduced onto the surface of the packaging film to form an unreplicable physical interference pattern. This physical interference pattern serves as the basis for subsequent anti-counterfeiting image information extraction and verification, possessing high uniqueness and complexity, and is an important component of the anti-counterfeiting mechanism of this invention.
[0024] Preferably, the random microstructure is achieved through the following technical means: on the outer surface area of the packaging film, a microstructure disturbance with a random shape is artificially introduced using laser etching or nanoprinting technology. These microstructures have characteristics such as nonlinearity, irregularity, and disordered distribution, and their shape, size, and arrangement are not fixed, thereby ensuring the natural differences in the microstructure of each packaging film.
[0025] In practice, laser etching technology creates a textured structure on the surface of the packaging film at a microscale by controlling the laser energy, scanning trajectory, frequency, and processing time. These textured structures manifest as differences in image brightness and texture during illumination and imaging, which helps subsequent image acquisition equipment extract spectral feature vectors.
[0026] Another preferred approach is to use nanoprinting technology to imprint a template with randomly distributed microstructures onto the surface of the packaging film. This template can be based on a micron- or even nanon-scale mask template and combined with perturbation mechanisms, such as introducing uncontrollable factors like random pressure changes, temperature disturbances, or material elastic responses during the template imprinting process, thereby further enhancing the randomness and unpredictability of the microstructure.
[0027] To ensure the uniqueness of the physical characteristics of random microstructures, the resulting interference pattern must meet the following conditions: Randomness: The arrangement of microstructures formed by each packaging film is different, not controlled by human intervention, and has a natural unpredictability; Uniqueness: Once formed, the microstructures cannot be reproduced in terms of spatial distribution, texture structure, etc. Unreproducible: Due to the reliance on minute changes in laser or printing perturbation parameters during the structure generation process, it is almost impossible to replicate under actual production conditions, even using the same process flow.
[0028] Once the aforementioned microstructure is formed, it can be considered the "physical fingerprint" of the packaging film. Subsequently, in the anti-counterfeiting process, this microstructure map will serve as a data source, inputting into an image acquisition device to obtain its characteristic image.
[0029] Based on this physical structural feature, the resulting image can be used to acquire its interference spectrum image via a high-resolution camera or other imaging equipment. This image can then be used for spectrum feature extraction, feature vector construction, and digest code generation. Because the physical interference spectrum is generated uncontrollably, it possesses high security and uniqueness.
[0030] It should be noted that the generation of the aforementioned microstructures does not rely on a preset graphic library or manual graphic design, but rather the pattern forms spontaneously through a natural perturbation mechanism. This method effectively avoids the problem of fixed graphic structures that are easily counterfeited in traditional anti-counterfeiting mechanisms.
[0031] This embodiment completes the physical interference map generation step through the above method, providing a basic image source for subsequent image extraction, map digest code generation and hash anti-counterfeiting, constituting the basic technical link in the entire anti-counterfeiting method process.
[0032] For step S2, in this embodiment, to achieve digital identification and anti-counterfeiting traceability processing of the random microstructures introduced on the surface of the packaging film, image data of the physical interference spectrum needs to be acquired through an image acquisition device, and features are extracted from the image content based on image processing algorithms to finally construct a feature vector representing the spectrum. This feature vector will serve as the core data source for subsequent spectrum digest code generation and anti-counterfeiting hash generation, possessing uniqueness, comparability, and compact expressiveness.
[0033] Preferably, the image acquisition device includes at least a high-resolution camera, an industrial scanner, or other equipment capable of acquiring microscopic images, for acquiring images of the microstructure on the surface of the packaging film. This image acquisition device should be able to meet the requirements for clear imaging of the microstructure and possess strong detail reproduction capabilities to ensure that the captured image completely preserves the microscopic perturbation structure.
[0034] After image acquisition, the obtained raw images need to undergo standardization preprocessing to improve the accuracy and stability of subsequent feature extraction. This preprocessing includes, but is not limited to, the following steps: Image denoising: Gaussian filtering is preferably used to denoise the original image to remove random errors introduced by imaging noise or background interference during shooting. Gaussian filtering smooths the pixels in the image through convolution operations, and its basic function form is: Where G(x,y) represents the value of the Gaussian function at coordinates (x,y), which serves as the weight of the corresponding position in the filter kernel; x,y represent the horizontal and vertical coordinate offsets of the filter kernel relative to the center pixel; σ represents the standard deviation of the Gaussian distribution, which is used to control the degree of filtering, and the larger the value, the smoother the filtering.
[0035] Normalization: The image pixel values are uniformly scaled to a specific range (e.g., between 0 and 1) to keep the image brightness information consistent under different acquisition environments and avoid interference from changes in ambient light 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 and texture regions in the image and improve the distinguishability of edge and texture information.
[0037] After preprocessing, image processing algorithms are applied to extract structured feature information from the image. This processing flow includes the following steps: Edge detection: The Sobel operator is used to extract the edge contours of microstructures in the image. The Sobel operator obtains the contour change regions of the image by calculating the gradient information in the horizontal and vertical directions. Its basic form is as follows: Among them, G x G y These represent the horizontal and vertical convolution kernels of the Sobel operator, respectively; the horizontal gradient I is obtained after the convolution operation. x and vertical gradient I y This allows us to calculate the edge intensity G of a pixel: The result G describes the rate of change of gray values in local regions of an image and can be used to capture edge information of microstructures.
[0038] Texture Feature Extraction: The Gray-Level Co-occurrence Matrix (GLCM) method is used to model and quantize the microstructure texture in the image. GLCM describes the spatial relationship of image texture by statistically analyzing the co-occurrence frequency of pixel gray-level pairs in a specific direction and distance. The gray-level co-occurrence matrix is P(i,j), which represents the number of times (or probability) that pixel pairs with gray values i and j appear simultaneously in the image.
[0039] To further extract the texture patterns of the image, this example introduces the Gray-Level Co-occurrence Matrix (GLCM) to model the spatial co-occurrence relationships between image gray levels. Let the total number of gray levels in the image be N. g Then GLCM is defined as: P(i,j,d,θ); Where i,j represent the gray values of two pixels in the image; d represents the distance between the two pixels; θ represents the directional angle between the pixel pair (e.g., 0°, 45°, 90°, 135°); P(i,j) represents the frequency (or normalized probability value) of the pixel pair with gray values i and j at a given distance and direction. Based on GLCM, a series of representative texture features can be extracted, specifically including: Energy: The higher the energy value, the smoother the image texture and the fewer irregular variations.
[0040] Contrast: The higher the contrast value, the more dramatic the texture changes in the image and the more obvious the grayscale differences.
[0041] Correlation: Where, μ i ,μ j σ represents the expected values of grayscale values i and j, respectively; i ,σ j These are the standard deviations of the corresponding grayscale values.
[0042] Used to measure the linear correlation between pixel grayscale values.
[0043] Entropy: This indicates the uncertainty of image information; The higher the entropy value, the more complex the texture.
[0044] After image processing, a set of representative texture features, edge information, and other descriptors extracted are used to form a feature vector, which is used to identify the unique features of the physical interference map. The map feature vector is denoted as: V = [v1, v2, ..., v...]. n ]; Where V is the spectral feature vector; v i Let be the i-th feature value; n is the number of features. Each feature value can include multi-dimensional feature descriptors such as texture energy, contrast, edge gradient value, and oriented gradient histogram.
[0045] The feature vector of this graph is reconstructable and measurable, and can be used for digest code calculation, hash anti-counterfeiting code generation, and comparison with the original graph during user-end verification, thereby achieving the anti-counterfeiting identification goal.
[0046] In summary, this embodiment acquires images of the packaging film's microstructure using an image acquisition device, extracts structured feature data using image processing techniques, and generates spectral feature vectors, providing fundamental data support for subsequent data processing and comparison in the anti-counterfeiting method of this invention.
[0047] For step S3, the first step is to obtain a high-dimensional real-valued vector, where each dimension represents a feature value of the atlas image in a certain 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 avoiding the adverse effects of some feature values being too large or too small on subsequent processing.
[0048] In this embodiment, the normalization method is min-max normalization, and the processing formula is as follows: Where x is the original eigenvalue; -x min and x max and are the minimum and maximum values of all values in the eigenvector, respectively; -x′ is the normalized eigenvalue.
[0049] After normalization, each feature value x′ will be within the range of [0, 1], avoiding the dimensional differences between different feature values and facilitating subsequent quantization operations.
[0050] Next, the normalized feature vector of the graph is quantized. Quantization refers to discretizing continuous feature values into a predetermined number of discrete values. The quantization operation divides the continuous range of values of the feature vector 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: Define the quantization interval: Set a quantization step size Δ, and divide the range of the feature vector into multiple intervals based on this step size. The start and end points of each interval are controlled by Δ.
[0052] Where, x max and x min These are the maximum and minimum values of the eigenvectors, respectively; N is the discrete series after quantization, usually a fixed value, such as 256 (corresponding to 8-bit quantization).
[0053] Mapping to discrete values: Mapping each normalized feature value x ′ The mapping to a discrete value q can be done using the following formula: Where q is the quantized discrete value, representing the discrete interval where the normalized feature value is located; This indicates the floor function.
[0054] Through quantization, the feature values are mapped to corresponding discrete integer values, which will serve as the basis for generating the graph digest code.
[0055] Generate a digest code for the graph. Based on the quantized feature values, generate a digest code for the graph. The digest code is a fixed-length binary sequence, where each bit corresponds to a quantized feature value. To obtain a fixed-length digest code, first arrange all the quantized feature values in a specific order and convert them into binary form.
[0056] If each quantized value occupies b bits (binary), then the length of the graph digest 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 bits corresponding to each quantization value, usually 8 bits or 16 bits, depending on the quantization level and the required precision.
[0057] In the process of generating the map digest code, this embodiment adopts a fixed-length binary representation. Each quantized feature value is converted into a corresponding binary sequence, and finally these binary sequences are concatenated together to form a unique map digest code.
[0058] To enhance the uniqueness and security of the graph digest code, this embodiment further uses a hash algorithm to process the generated graph digest code. The hash algorithm encrypts or hashes the graph digest code to generate a unique value of fixed length, effectively preventing different graph feature vectors from generating the same digest code and increasing anti-counterfeiting capabilities.
[0059] The hash algorithm process can be represented by the following function: H (digest code) = hash value; Where H is the hash function, usually a common hash algorithm such as SHA-256 is chosen; the digest code is the digest code of the previously generated graph.
[0060] The hash algorithm maps the digest code to a fixed-length unique hash value, which ultimately serves as the unique identifier of the graph.
[0061] Through the above steps, the spectral feature vectors are normalized, quantized, and hashed to generate a final unique spectral digest code. This digest code can be used for subsequent applications such as anti-counterfeiting verification and spectral comparison to achieve unique identification and protection of the spectral data.
[0062] For step S4, the first goal is to generate an anti-counterfeiting hash code, which uniquely identifies the product's anti-counterfeiting information and is used to verify the product's authenticity. The anti-counterfeiting hash code is generated jointly from the inkjet printing base data and the image digest code to ensure its uniqueness and non-counterfeitability. To achieve this goal, the inkjet printing base data and the image digest code need to be processed.
[0063] The basic data for inkjet printing is a core component for generating anti-counterfeiting hash codes, and includes the following: Timestamp: Represents the time information of the inkjet printing generation. A timestamp records the specific time during the product's production or packaging process, typically expressed in seconds since January 1, 1970. For example, a timestamp can be the UTC time of a specific moment.
[0064] DeviceID (Device Serial Number): A unique serial number that identifies the inkjet printer. The device serial number ensures that each inkjet printer is uniquely identified, preventing different devices from generating the same coding information. The device serial number is typically a unique identifier assigned to the inkjet printer at the factory.
[0065] RandomNum (random number): A random number is generated each time the anti-counterfeiting hash code is generated to increase its unpredictability. The range and number of bits of the random number can be flexibly set according to system design requirements, and it is usually used to enhance the randomness of the anti-counterfeiting code.
[0066] BatchNo: Represents the production batch number of the product. The batch number is used to distinguish products from different production batches and to ensure that the batch information of each product is accurately recorded and traced.
[0067] These basic inkjet data need to be concatenated into a single string. Assuming each data item is connected using double vertical bars ("||"), the combined string D would take the following form: D=[Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode]; Where Timestamp is the timestamp of the inkjet printing generation; DeviceID is the unique identifier of the inkjet printing device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image summary code; and || represents the string concatenation operation.
[0068] Once the combined string D is generated, the next step is to process the string using a hash function to generate a counterfeit-proof hash code. The hash function H() is a one-way function that maps input data (regardless of data size) to a fixed-length output value, and this output value is highly unique and unpredictable.
[0069] The combined string D is hashed using a hash function to generate the anti-counterfeiting hash code AntiForgeryHash. The calculation formula is as follows: AntiForgeryHash = H(D); Where H(·) is the hash function, AntiForgeryHash is the generated AntiForgeryHash, which is the anti-counterfeiting hash code; D is the combined string, which contains the basic data of the inkjet printing and the map digest code.
[0070] The hash calculations described above result in a fixed-length binary or hexadecimal string for preventing counterfeiting. This hash code is unique and cannot be reverse-engineered from the data items generated during the process. Therefore, the anti-counterfeiting hash code serves 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 graph digest code, but is also enhanced by the basic inkjet printing data (including timestamp, device serial number, random number, and batch number), giving the anti-counterfeiting hash code higher security and tamper resistance. Thus, even if counterfeiters exist, it is difficult for them to generate an anti-counterfeiting hash code identical to the genuine product by forging the graph digest code or other data, thereby effectively ensuring the product's anti-counterfeiting effect.
[0072] In summary, this embodiment details how to combine basic inkjet printing data and image digest codes, and generate a unique anti-counterfeiting hash code using a hash function. By combining timestamps, device serial numbers, random numbers, batch numbers, and image digest codes, and processing them using a hash algorithm, the generated anti-counterfeiting hash code possesses uniqueness, security, and unforgeability, effectively ensuring the product's anti-counterfeiting capabilities and traceability.
[0073] In step S5, the goal is to effectively encode the previously generated basic inkjet data, anti-counterfeiting hash code, and image digest code, and then print them onto the surface of the packaging film using an inkjet printer to form an identifiable inkjet code. The inkjet code design must not only include the product's unique identification information but also ensure the integrity, traceability, and anti-counterfeiting functionality of the information.
[0074] Encoding of basic inkjet printing data, anti-counterfeiting hash code, and image digest code: First, the basic inkjet data, anti-counterfeiting hash code, and image digest code are encoded to ensure that they can meet the printing requirements of the inkjet printing equipment and can be correctly identified and decoded in practical applications.
[0075] The basic coding data includes timestamps, device serial numbers, random numbers, and batch numbers. This data is typically in text or number format and needs to be converted into barcode or QR code formats suitable for the coding equipment. To adapt to different coding technologies, the basic coding data can use a standardized encoding format, such as: QR code encoding: Converting basic inkjet printing data into QR code format for high-density information storage; Barcode encoding: Converts basic inkjet printing data into barcode format, suitable for low-density information storage.
[0076] The encoding process 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 resistance to damage.
[0077] The encoding of anti-counterfeiting hash codes and graph digest codes is crucial. These codes are typically complex long strings or binary data, requiring conversion into a format that is easy to print and decode. Specifically, the following encoding methods can be used: Anti-counterfeiting hash code: This is usually a fixed-length hexadecimal or binary string. To facilitate inkjet printing and anti-counterfeiting verification, it can be converted into a QR code or barcode, and the appropriate encoding method can be selected according to actual needs.
[0078] Map digest codes: These are also long strings and can be encoded in a similar way. Map digest codes can be stored as QR codes to ensure information integrity and readability.
[0079] By encoding the basic inkjet data, anti-counterfeiting hash code, and graph digest code, they can be converted into a unified format suitable for printing.
[0080] Data format conversion and inkjet printing information generation: The data encoded with basic inkjet data, anti-counterfeiting hash codes, and image digest codes needs to be converted into printable inkjet information. The key to this step is combining multiple data items into a unified information structure so that the inkjet printer can correctly print it on the surface of the packaging film.
[0081] According to the design of this embodiment, the inkjet printing information will include the following: D = [Timestamp||DeviceID||RandomNum||BatchNo||SummaryCode||AntiForgeryHash]; where Timestamp is the timestamp of the inkjet printing generation; DeviceID is the unique identifier of the inkjet printing device; RandomNum is the generated random number; BatchNo is the product batch number; SummaryCode is the image digest code; and AntiForgeryHash represents the anti-counterfeiting hash code.
[0082] By combining the above data, a complete inkjet information structure D is formed. This information is then converted into a printable data format, such as a QR code or barcode, for use by the inkjet printing equipment.
[0083] During the coding process, the equipment uses inkjet technology or laser engraving to print data onto the surface of the packaging film, forming a clear QR code or barcode for subsequent scanning and verification.
[0084] The graphics or symbols printed by the inkjet printer contain all the basic inkjet data, anti-counterfeiting hash code, and graphic summary code. By scanning the inkjet information, functions such as anti-counterfeiting verification and traceability query of products can be realized.
[0085] In summary, this embodiment ensures the effective storage and readability of inkjet printing information by encoding the basic inkjet data, anti-counterfeiting hash code, and image digest code into a data format suitable for inkjet printing equipment. The inkjet printing equipment prints QR codes or barcodes based on this encoded information, making each inkjet code on the surface of the packaging film unique and resistant to counterfeiting. This step not only provides technical support for subsequent product traceability, verification, and anti-counterfeiting detection but also effectively enhances the security and authenticity of the product.
[0086] For step S6, in this embodiment, the steps of scanning the inkjet code, parsing the basic inkjet data, anti-counterfeiting hash code, and image digest code, taking an image of the packaging film area, extracting image features, and generating an image digest code are described in detail at the user end.
[0087] On the user end, the user first scans the inkjet code printed on the surface of the packaging film using a scanning device (such as a smartphone or scanner). The scanned image data includes the basic inkjet code data, the anti-counterfeiting hash code, and the image digest code. By parsing the image, the user-end device can extract the basic inkjet code data and the anti-counterfeiting hash code, forming the basic data of the product information, which supports subsequent verification.
[0088] Scanning and data parsing: The user terminal device processes the inkjet-printed image and decodes the inkjet information in the image into basic inkjet data, anti-counterfeiting hash code, and image digest code through an adapted QR code or barcode decoding algorithm.
[0089] The basic data for inkjet printing includes, but is not limited to, timestamps, device serial numbers, batch numbers, and random numbers; the anti-counterfeiting hash code is generated based on an anti-counterfeiting algorithm and is used to ensure the authenticity of the product; the image digest code is generated based on the microstructural features of the packaging film surface and is used to further verify the uniqueness of the packaging film.
[0090] Image capture and feature extraction follow, with the user-end device then capturing images of the packaging film area, including the microstructural features of the coding area and its surroundings. The key to this step is the quality and sharpness of the captured images, ensuring that subtle structural changes on the packaging film surface are captured for use in generating the image digest code.
[0091] The captured images are usually processed as follows: Image denoising: to eliminate environmental noise interference and improve image quality. This process uses Gaussian filtering, and the specific filtering function and formula are the same as in step S2, so this step directly references the relevant content.
[0092] Edge detection and texture extraction: Edge detection algorithms are applied to extract edge features from the surface of the packaging film, and further algorithms such as Gray-Level Co-occurrence Matrix (GLCM) are used to extract texture features from the image. The specific formulas are the same as in step S2, so they are omitted here.
[0093] Microstructural Feature Extraction: In this embodiment, in addition to texture features, it is also necessary to extract the microstructural features of the packaging film surface, such as surface roughness and local texture non-uniformity. This part will also be completed using image processing algorithms. The extraction of microstructural features is of great significance for verifying the uniqueness of the packaging film.
[0094] Generating map features and digest codes: Once feature extraction is complete, the system combines the extracted texture and microstructure features to form a map feature vector V, defined as: V = [v1, v2, ..., v n ]; Among them, v i Let represent the i-th feature parameter, which represents an independent feature of the microstructure or texture on the packaging film surface; n is the number of features. The spectral feature vector V is used to represent the unique physical features of the packaging film surface.
[0095] Next, a hash algorithm (preferably asymmetric hashing or fingerprint hashing) is used to process the graph feature vector to generate a graph digest code that can reliably represent the uniqueness of the packaging film.
[0096] In summary, step S6, through scanning and imaging by the user-end device combined with image processing algorithms, successfully extracted the microstructural features of the packaging film area and generated a unique image digest code. This image digest code can not only verify the authenticity of the product together with the basic inkjet data and anti-counterfeiting hash code, but also provide a reliable basis for product traceability. This step ensures anti-counterfeiting verification of the product at the user end, enhancing the anti-counterfeiting performance and credibility of the packaging film.
[0097] In this embodiment, step S7 involves determining the authenticity of the product by comparing the image digest code and verifying the basic inkjet printing data and anti-counterfeiting hash code. The specific implementation steps are as follows.
[0098] To compare the image digest codes, the system first compares the image digest code generated by the user terminal with the image digest code parsed from the inkjet printing. The generated image digest code is a unique identifier calculated using a hash algorithm after the user terminal device captures an image of the packaging film and extracts its microstructural features. This image digest code represents the unique physical characteristics of the packaging film.
[0099] The parsed image digest code is information extracted from the inkjet code. It is a digest code containing image feature information obtained by decoding the QR code or barcode.
[0100] During the comparison process, if the generated image digest code matches the parsed image digest code, it indicates that the image information of the packaging film has not been tampered with. This step is completed using hash value comparison technology. Specifically, the comparison operation is performed using the following formula: GeneratedSummaryCode=H(V ′ ); Where H(·) represents a hash function; V ′ This is a normalized feature vector obtained through image processing and feature extraction. If the generated digest code matches the image digest code parsed from the inkjet print, it indicates that the image information has not been tampered with, and the verification passes. If the two do not match, it indicates that the microstructural features on the surface of the packaging film may have been tampered with or forged, the verification fails, and the product is judged to be counterfeit.
[0101] Verifying the Matching Between the Basic Inkjet Data and the Anti-counterfeiting Hash Code: Next, the system verifies the matching between the basic inkjet data and the anti-counterfeiting hash code. The basic inkjet data includes information such as the product's timestamp, equipment serial number, random number, and batch number. This information is generated by the inkjet printing equipment during product manufacturing and packaging and stored on the inkjet print in the form of a barcode or QR code.
[0102] Anti-counterfeiting hash codes are generated using a hash algorithm based on specific product information (such as production batch, product parameters, production equipment, etc.) to ensure the product's anti-counterfeiting properties. Anti-counterfeiting hash codes are used to verify the authenticity of inkjet printing data and prevent data tampering.
[0103] To complete the verification, the system compares the scanned basic inkjet data with the pre-stored anti-counterfeiting hash code. Specifically, the basic inkjet data is extracted from the inkjet code through decoding, while the anti-counterfeiting hash code is usually stored in a secure database or cloud platform. During the comparison process, the system verifies the matching between the basic inkjet data and the anti-counterfeiting hash code using the following formula: GeneratedHash = H(BaseData); Where H(·) represents the hash function, and BaseData is the basic data decoded from the inkjet code, including information such as timestamp, device serial number, and batch number. If the generated hash value matches the stored anti-counterfeiting hash code, the verification passes; otherwise, the verification fails, indicating that the inkjet code data may have been altered or forged.
[0104] Determining Product Authenticity: After comparing the image digest code and verifying the match between the inkjet printing base data and the anti-counterfeiting hash code, the system determines whether the product is authentic based on the overall results. Specifically, if the image digest code matches and the inkjet printing base data matches the anti-counterfeiting hash code, it indicates that the product information has not been tampered with and the product is genuine. In this case, the system determines the product to be authentic.
[0105] Conversely, if any verification fails (e.g., the image digest code is inconsistent or the inkjet printing base data does not match the anti-counterfeiting hash code), the product is determined to be counterfeit. This step is based on the following logic: IsGenuineProduct=(GSC==PSC)∧(GH==SH); Wherein, GSC is the generated digest code; PSC is the parsed digest code; GH is the generated hash value; and SH is the stored hash value.
[0106] The product is considered genuine when the generated digest code equals the parsed digest code and the generated hash value equals the stored hash value.
[0107] In summary, this embodiment, by comparing the image digest code and verifying the matching between the basic inkjet data and the anti-counterfeiting hash code, and combining the verification results of both, can accurately determine the authenticity of the product. This verification process involves comparing the hash value of the image digest code, verifying the anti-counterfeiting hash of the inkjet data, and logical judgment. It is an efficient and reliable anti-counterfeiting verification method that effectively prevents counterfeiting and tampering. In this way, the authenticity and security of the product at the consumer end can be ensured.
[0108] Please see the appendix Figure 2 The present invention also provides a product outer packaging inkjet anti-counterfeiting system, comprising: The image acquisition unit forms random microstructures on the surface of the packaging film to generate a unique physical interference spectrum. It also uses an image acquisition device to acquire the physical interference spectrum, extracts features, and generates a spectrum feature vector. The graph feature quantization unit is used to quantize and encode the graph feature vector to generate a unique graph digest code; The inkjet printing generation unit is used to generate basic inkjet printing data, and to generate an anti-counterfeiting hash code by using a hash function with the basic inkjet printing data and the map digest code. Then, the basic inkjet printing data, the anti-counterfeiting hash code and the map digest code are encoded and printed on the surface of the packaging film to form inkjet printing. The user terminal device is used to scan the inkjet code, parse the basic inkjet data, anti-counterfeiting hash code and image digest code, and take an image of the packaging film area, extract the image features and generate the image digest code. The comparison and verification unit is used to compare the generated image digest code with the parsed image digest code, and to verify the matching between the basic inkjet data and the anti-counterfeiting hash code to determine whether the product is genuine.
[0109] The system in this embodiment can be used to execute the above method embodiments, and its principle and technical effect are similar, so they will not be described again here.
[0110] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for anti-counterfeiting by inkjet printing on product outer packaging, characterized in that, Includes the following steps: Random microstructures are formed on the surface of the packaging film to generate a unique physical interference pattern; Physical interference maps are acquired using image acquisition equipment, and features are extracted to generate map feature vectors. The feature vectors of the graph are quantized and encoded to generate a unique graph digest code; Generate basic inkjet printing data, and then generate an anti-counterfeiting hash code by combining the basic inkjet printing data with the map digest code using a hash function; The basic inkjet data, anti-counterfeiting hash code, and image digest code are jointly encoded and printed onto the surface of the packaging film using an inkjet printer to form an inkjet code. On the user end, by scanning the inkjet code, the basic inkjet data, anti-counterfeiting hash code and image digest code are parsed out, and an image of the packaging film area is captured, image features are extracted, and an image digest code is generated. Compare the generated image digest code with the parsed image digest code, and verify the matching between the basic inkjet data and the anti-counterfeiting hash code to determine whether the product is genuine. The step of forming random microstructures on the surface of the packaging film to create a unique physical interference pattern includes: Random microstructures are formed on the surface of the packaging film using laser etching or nanoprinting technology. These microstructures have irregular shapes and sizes, forming a unique physical interference pattern. This unique physical interference pattern is unique to each packaging film and cannot be replicated. The basic data for inkjet printing includes timestamp, device serial number, random number, and batch number; The step of generating an anti-counterfeiting hash code from the basic inkjet data and the map digest code using a hash function includes: The basic inkjet printing data and the image digest code are concatenated into a combined string, and an anti-counterfeiting hash code is generated using a hash function. The combined string is: ; in, The timestamp for the inkjet printing generation; A unique identifier for the inkjet printing device; For generated random numbers; For product batch number; This is the map digest code; This represents a string concatenation operation; Through hash function Calculate the hash value of the combined string and generate a counterfeit-proof hash code: ; in, For hash functions, To prevent the use of fake hash codes; This is a combined string containing basic inkjet data and a map digest code.
2. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 1, characterized in that, The steps of acquiring physical interference maps using image acquisition equipment, extracting features, and generating map feature vectors include: Images of physical interference patterns on the surface of the packaging film are acquired using an image acquisition device, which includes at least a high-resolution camera and a scanner. The acquired images are preprocessed, and the preprocessing includes at least noise reduction, normalization, and contrast enhancement. Image processing algorithms are used to extract features from the preprocessed image, generating a spectral feature vector. This feature vector is represented by the following formula: ; in, For the spectral feature vector; Let be the i-th eigenvalue; The number of features.
3. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 2, characterized in that, The step of extracting features from the preprocessed image using an image processing algorithm includes: The image processing algorithm is applied to the preprocessed image to extract features. The image processing algorithm includes the following steps: Use Gaussian filtering to remove noise from the image; Edges in an image are detected using the Sobel operator; The grayscale co-occurrence matrix is used to calculate the texture features of an image and generate texture patterns in the image.
4. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 1, characterized in that, The step of quantizing and encoding the graph feature vector to generate a unique graph digest code includes: The obtained spectral feature vectors are normalized so that all feature values are within a uniform numerical range. A quantization algorithm is applied to the normalized spectral feature vectors to map continuous feature values to discrete values; Based on the quantized feature values, a digest code for the graph is generated, which is a fixed-length binary sequence. The graph digest code is further processed using a hash algorithm to generate the final unique graph digest code.
5. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 1, characterized in that, The step of encoding the basic inkjet data, anti-counterfeiting hash code, and image digest code together and printing them onto the surface of the packaging film using an inkjet printer to form an inkjet code includes: The basic inkjet data, anti-counterfeiting hash code, and map digest code are encoded into a printable data format and converted into recognizable inkjet information. The encoded data is printed onto the surface of the packaging film using an inkjet printer to form a code.
6. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 1, characterized in that, The steps of capturing images of the packaging film area, extracting spectral features, and generating spectral digest codes include: The packaging film area image is captured by the user terminal device. The packaging film area image includes: image data after the user terminal scans the inkjet code on the surface of the packaging film, which includes the microstructure features of the inkjet code area. The image of the packaging film area is processed using image processing algorithms to extract its texture and microstructure features and generate spectral features. Based on the extracted spectral features, a spectral digest code is calculated, which is used to represent the unique physical characteristics of the packaging film region.
7. The anti-counterfeiting method for inkjet printing on product outer packaging according to claim 1, characterized in that, The steps of comparing the generated image digest code with the parsed image digest code, and verifying the matching between the basic inkjet printing data and the anti-counterfeiting hash code to determine whether the product is genuine include: Compare the generated map digest code with the parsed map digest code. If they match, it means that the map information has not been tampered with. Verify the matching between the basic inkjet printing data and the anti-counterfeiting hash code. If the verification passes, then verify the correctness of the inkjet printing data. To determine if a product is genuine, if the image summary code and the basic data of the inkjet printing match the anti-counterfeiting hash code, the product is considered genuine; otherwise, it is counterfeit.
8. A product outer packaging inkjet anti-counterfeiting system, applied to the product outer packaging inkjet anti-counterfeiting method as described in any one of claims 1-7, characterized in that, include: The image acquisition unit forms random microstructures on the surface of the packaging film to generate a unique physical interference spectrum. It also uses an image acquisition device to acquire the physical interference spectrum, extracts features, and generates a spectrum feature vector. The graph feature quantization unit is used to quantize and encode the graph feature vector to generate a unique graph digest code; The inkjet printing generation unit is used to generate basic inkjet printing data, and to generate an anti-counterfeiting hash code by using a hash function with the basic inkjet printing data and the map digest code. Then, the basic inkjet printing data, the anti-counterfeiting hash code and the map digest code are encoded and printed on the surface of the packaging film to form inkjet printing. The user terminal device is used to scan the inkjet code, parse the basic inkjet data, anti-counterfeiting hash code and image digest code, and capture an image of the packaging film area, extract the image features, and generate an image digest code. The comparison and verification unit is used to compare the generated image digest code with the parsed image digest code, and to verify the matching between the basic inkjet data and the anti-counterfeiting hash code to determine whether the product is genuine.
Citation Information
Patent Citations
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
Trademark identification method and system based on anti-counterfeiting codes
CN119129620A