A product identity verification method fusing two-dimensional code and visual fingerprint

By overlaying a virtual positioning frame onto a mobile terminal to capture high-definition images and extracting visual fingerprint vectors, and combining this with a cryptographic hash function to generate a composite identity hash value, the problem of easy copying of QR codes and authentication instability caused by environmental changes is solved. This achieves a highly secure and environmentally adaptable authentication method, improving the system's usability and robustness.

CN121543616BActive Publication Date: 2026-07-07JIANGSU LIANKANG ELECTRONICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU LIANKANG ELECTRONICS
Filing Date
2025-11-20
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing QR code technology has problems in product identity authentication, such as high replicability, insufficient binding to physical entities, and unstable authentication under environmental changes, making it difficult to meet the requirements of high security and robustness.

Method used

The identity verification method that integrates QR codes and visual fingerprints acquires high-definition images by overlaying a virtual positioning frame on a mobile terminal, extracts visual fingerprint vectors, generates composite identity hash values ​​by combining cryptographic hash functions, and uses a two-level cascaded verification strategy for comparison and authentication.

Benefits of technology

It achieves a strong binding between QR code information and physical entities, enhancing the security and robustness of anti-counterfeiting authentication, and improving the system's ease of use and authentication reliability in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543616B_ABST
    Figure CN121543616B_ABST
Patent Text Reader

Abstract

The application discloses a product identity verification method fusing a two-dimensional code and a visual fingerprint, comprising the following steps: obtaining two-dimensional code information of a product to be verified, guiding and collecting a high-definition image of a preset feature anchor area of the product based on an associated digital twin model through AR technology; performing geometric and illumination correction preprocessing on the image, extracting a to-be-verified visual fingerprint vector with local invariance and global depth texture features; combining the vector with the two-dimensional code information and a salt value, generating a to-be-verified composite identity hash value through a cryptographic hash function; comparing the hash value with an original hash value pre-stored on a distributed ledger, if the hash values are inconsistent, calculating the similarity between the to-be-verified visual fingerprint and an original visual fingerprint through a twin neural network, and performing auxiliary verification; the application realizes high-security and convenient product identity authentication by strongly binding an external two-dimensional code and internal physical features of a product, and adopts a cascade verification strategy, and effectively prevents counterfeiting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and information security technology, and in particular to a product identity verification method that integrates QR codes and visual fingerprints. Background Technology

[0002] With the development of the Internet of Things (IoT) and digital supply chain management technologies, assigning unique digital identities to physical products has become crucial for achieving full lifecycle tracking, anti-counterfeiting, and management. Currently, two-dimensional barcode technology, as the mainstream information carrier, is widely deployed on various products due to its large information capacity, wide encoding range, and low production cost. This technology encodes product serial numbers, batch numbers, production dates, and other information into graphic identifiers, enabling rapid machine reading and digital flow of product information, greatly improving the automation level and efficiency of warehousing, logistics, and sales. To further enhance security, the industry is currently adding physical anti-counterfeiting technologies to QR codes, such as using special inks, laser holographic labels, or engraving, to increase the physical difficulty of copying the QR codes.

[0003] However, the aforementioned existing technologies still have significant shortcomings in terms of fundamental security for identity authentication. First, a QR code is essentially an externally attached information tag, and the digital identity it carries is inherently separable from the physical entity of the product. No matter how high the barrier to physical copying is, the QR code information itself can still be easily read and cloned, making it difficult to effectively identify fraudulent activities such as "genuine code, fake product" using conventional scanning devices. This poses a serious security risk in the field of high-value products. Second, existing preliminary attempts to rely on product surface feature recognition, while aiming to establish an intrinsic connection between physical entities, generally face the problem of poor robustness. At the same time, in practical application scenarios, uncontrollable factors such as changes in lighting during image acquisition, slight deviations in shooting angle, and dirt and wear on the product surface can easily lead to feature extraction failure or a significant decrease in matching accuracy, causing the authentication system to be unstable and unable to meet the stringent reliability requirements of industrial applications.

[0004] Therefore, how to create a digital identity authentication method that is not only uncopyable and strongly bound to physical entities, but also stable in complex environments, is a technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0005] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0006] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides a product identity verification method that integrates QR codes and visual fingerprints to solve the problems mentioned in the background art.

[0007] To address the aforementioned technical problems, this invention provides the following technical solution: a product identity verification method integrating QR codes and visual fingerprints, comprising:

[0008] The QR code information of the product to be verified is obtained. On the display interface of the mobile terminal, a virtual positioning frame is superimposed on a preset feature anchoring area of ​​the product to be verified based on the QR code information, and a high-definition image of the feature anchoring area is captured.

[0009] The high-definition image is preprocessed, and a visual fingerprint vector to be verified is extracted from the preprocessed image.

[0010] The QR code information is combined with the visual fingerprint vector to be verified, and a cryptographic hash function is used to generate a composite identity hash value to be verified.

[0011] The composite identity hash value to be verified is compared with a pre-stored original composite identity hash value associated with the QR code information, and a verification conclusion is output based on the comparison result.

[0012] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the position and posture information of the virtual positioning frame are generated based on the three-dimensional coordinate data in a digital twin model associated with the product model.

[0013] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the preprocessing includes:

[0014] A homography matrix is ​​calculated using the vertex coordinates of the virtual positioning box, and geometric correction processing is performed on the high-resolution image using the homography matrix.

[0015] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the preprocessing further includes:

[0016] After geometric correction, the image is subjected to frequency domain transformation and homomorphic filtering.

[0017] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the step of extracting the visual fingerprint vector to be verified includes:

[0018] Local invariant features and global depth texture features are extracted from the preprocessed image, respectively.

[0019] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the step of extracting the visual fingerprint vector to be verified further includes:

[0020] An attention fusion module is used to perform weighted fusion of the local invariant features and the global depth texture features to generate the visual fingerprint vector to be verified.

[0021] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, the generation of the composite identity hash value to be verified is obtained by adding a pre-stored salt value associated with the QR code information to the combination and then performing the cryptographic hash function operation.

[0022] As a preferred embodiment of the product identity verification method integrating QR code and visual fingerprint as described in this invention, when the composite identity hash value to be verified is inconsistent with the original composite identity hash value, the method further includes:

[0023] Obtain a raw visual fingerprint vector associated with the QR code information;

[0024] Calculate the vector similarity score between the visual fingerprint vector to be verified and the original visual fingerprint vector;

[0025] The similarity score is then compared with a preset confidence threshold to generate an auxiliary verification conclusion.

[0026] As a preferred embodiment of the product identity verification method that integrates QR codes and visual fingerprints as described in this invention, the vector similarity score is calculated using a pre-trained Siamese neural network model.

[0027] As a preferred embodiment of the product identity verification method that integrates QR codes and visual fingerprints as described in this invention, the original composite identity hash value, the original visual fingerprint vector, and the salt value are all recorded on a distributed ledger system.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0029] 1. This invention strongly binds publicly readable QR code information with the inherent, uncopyable microscopic physical texture (visual fingerprint) on the product surface through a cryptographic hash function to generate a composite identity hash value. This fundamentally solves the problem of "genuine code, fake product" in the existing technology. Even if an attacker can perfectly copy the QR code, they will not be able to generate the correct hash value without the corresponding physical entity, thereby improving the security of anti-counterfeiting authentication.

[0030] 2. By using digital twin models and AR augmented reality technology, a virtual positioning frame is superimposed on the mobile terminal to guide the user to align with the preset feature anchoring area. This not only ensures that the posture and area height are consistent for each image acquisition, but also simplifies user operation and improves the ease of use and deployability of the system in industrial scenarios through automatic focusing and triggering of shooting.

[0031] 3. In addition, the present invention adopts a two-level cascaded verification strategy of "fast hash verification" and "robust vector comparison". The second level of similarity measurement based on Siamese neural network is only activated when the hashes are inconsistent. This mechanism can effectively tolerate minor changes in physical features caused by factors such as normal wear and tear and changes in lighting, ensuring the robustness and high accuracy of authentication in complex real-world environments and avoiding misjudgments caused by rigid matching of traditional methods. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0033] Figure 1 This is a flowchart illustrating the overall process of a product identity verification method that integrates QR codes and visual fingerprints, as described in one embodiment of the present invention. Detailed Implementation

[0034] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0035] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0036] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0037] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0038] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0039] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0040] Example 1

[0041] Reference Figure 1 This is the first embodiment of the present invention, which provides a product identity verification method that integrates QR codes and visual fingerprints, including:

[0042] It should be noted that before detailing the verification method of this invention, the initial registration process for product identity needs to be explained. This registration process is performed in a controlled environment such as product production, packaging, or shipment, and the steps are as follows:

[0043] For a brand new product to be registered, the operator uses an industrial-grade acquisition device with the same or higher precision as the one used for verification, aligns it with the product's QR code and obtains the QR code information. Then, based on the product model associated with the QR code information, the operator performs image acquisition under multiple angles and lighting conditions in the product's preset feature anchoring area.

[0044] Multiple high-resolution images are preprocessed (e.g., geometric correction, illumination normalization), and their visual fingerprint vectors are extracted. Then, by averaging, clustering, or selecting the optimal vectors, a standardized and highly representative original visual fingerprint vector is generated. This aims to eliminate the random noise that may exist in a single acquisition and ensure the robustness of the original vector.

[0045] A unique, high-entropy random string is generated for the QR code information as a salt value. Then, the QR code information, the original visual fingerprint vector, and the salt value are combined according to the same normalization and concatenation rules as during verification, and the original composite identity hash value is generated by operating the same cryptographic hash function (such as SHA3-256).

[0046] The original identity record of a product, consisting of QR code information, original visual fingerprint vector, and salt value, is written to a pre-set distributed ledger system through a transaction. Once the transaction is verified by consensus nodes and packaged into a block, the unique identity of the product is permanently and immutably recorded.

[0047] S1. Obtain the QR code information of the product to be verified. On the display interface of the mobile terminal, based on the QR code information, overlay a virtual positioning frame on a preset feature anchoring area of ​​the product to be verified, and capture a high-definition image of the feature anchoring area.

[0048] It should be noted that this step aims to achieve standardized and high-precision image acquisition of specific microscopic feature areas of the product through AR (Augmented Reality) technology;

[0049] Furthermore, the operator launches a dedicated app on the mobile terminal, enters verification mode, and then the app uses the terminal's rear camera to point at the QR code on the product to be verified. The app's built-in decoding engine processes the video stream captured by the camera in real time. Once the QR code is recognized and successfully parsed, its internal encoded string information is obtained, denoted as... This string typically contains the product's unique serial number (SN) or material code (SKU), which the app then transmits via wireless network. The message was sent to the backend server, and the backend server received it. Next, a search is performed in the database to retrieve the digital twin model data associated with the product model. This data defines the three-dimensional coordinate information of one or more "feature anchoring regions," that is, the set of vertex coordinates of the "feature anchoring region" in the product's three-dimensional model coordinate system. Finally, the backend server returns the 3D coordinate data to the mobile terminal APP;

[0050] Furthermore, after receiving the 3D coordinate data of the feature anchoring area, the mobile terminal APP activates its built-in AR engine (such as an engine based on ARKit or ARCore). In this embodiment, an AR engine is used. This AR engine utilizes SLAM (Simultaneous Localization and Mapping) technology or model-based object recognition technology to identify and continuously track the physical product to be verified in the real-time preview image of the camera, thereby calculating the pose (position and rotation) of the product in the real-world coordinate system in real time. This pose can be represented by a 4×4 model-world transformation matrix. To represent this, and in order to project the 3D coordinate data of the feature anchoring area onto the 2D screen to form a virtual positioning box, the APP needs to perform a series of matrix transformation operations. Among them, the projection transformation process in the matrix transformation operation can be represented by the following formula:

[0051]

[0052] in, It is the final calculated two-dimensional pixel coordinate vector of the feature anchoring region vertex on the screen. ); It is the viewport transformation matrix that transforms the clipping coordinate system (usually in the range of [-1, 1]) to the mobile terminal screen pixel coordinate system; It is a projection matrix that transforms the camera coordinate system to the clipping coordinate system, defines the camera's view frustum, and is usually a perspective projection; It is a view transformation matrix that transforms the world coordinate system to the camera (viewpoint) coordinate system, which is determined by the camera's pose in the world; It is a transformation matrix that is calculated in real time by the AR engine to transform the model coordinate system to the world coordinate system; It is the homogeneous coordinate vector of a vertex of the feature anchoring region in the coordinate system of the product's 3D model. );

[0053] Furthermore, the app can define the 3D vertex of the feature anchoring region. By performing the above calculations, we can obtain its corresponding two-dimensional coordinates on the screen. Then, lines are drawn between these two-dimensional coordinate points to accurately overlay a virtual positioning frame that dynamically adjusts as the user moves onto the real-time video stream. At the same time, the app will change the color of the frame or give a prompt sound (e.g., red when misaligned, green when perfectly aligned) based on the alignment degree between the virtual positioning frame and the actual feature area on the physical product, to guide the operator to adjust the shooting angle and distance.

[0054] Furthermore, when the app detects that the alignment error between the virtual positioning box and the physical feature area is within a preset threshold, and the terminal's posture remains stable for more than a short time period (e.g., 300 milliseconds), it can automatically lock focus on the feature anchor area and trigger the camera to perform a high-definition photo capture. This eliminates the need for the operator to manually press the shutter, ensuring that each captured image is obtained under optimal posture and clarity, thus producing a high-quality image of the feature anchor area containing rich microscopic texture details, denoted as... It should be emphasized that, in this embodiment, the resolution of the image is no less than 12 million pixels to ensure the accuracy of subsequent visual fingerprint extraction.

[0055] S2. Preprocess the high-definition image and extract a visual fingerprint vector to be verified from the preprocessed image.

[0056] It should be noted that the purpose of this step is to eliminate geometric and lighting changes introduced by the acquisition environment and device posture, and to extract a high-dimensional feature vector from the standardized image that can represent both macroscopic structure and microscopic randomness, namely the "visual fingerprint".

[0057] Furthermore, since the APP recorded the coordinates of the four vertices of the virtual positioning box on the screen in step S1, let's assume they are... These four points constitute the high-definition image captured. The image contains a feature anchoring region with perspective distortion. To eliminate this distortion, we define a standard target rectangular region with the coordinates of its four vertices as follows: For example, a 2048×2048 pixel square can be mapped from a distorted image to a standard frontal view by solving for the homography matrix H between the source coordinate point set and the target coordinate point set. It should be emphasized that the homography matrix in this embodiment is represented as a 3×3 matrix, which satisfies the following relationship:

[0058]

[0059] in, and These are the homography coordinates of the original point and the target point, respectively. The homography matrix can be solved using the Direct Linear Transformation (DLT) algorithm, utilizing at least four pairs of corresponding points. Once the homography matrix is ​​calculated, functions like cv::warpPerspective in OpenCV can be used to analyze the entire high-resolution image. Perform perspective transformation to obtain a geometrically corrected image. ;

[0060] Furthermore, since lighting in real-world environments is often uneven, it can create shadows and highlights on product surfaces, thus affecting texture feature extraction. Therefore, in this embodiment, homomorphic filtering-based lighting normalization addresses this issue. It should be explained that homomorphic filtering is an effective method for simultaneously compressing the image brightness range and enhancing contrast in the frequency domain. For the corrected image... This can be modeled as the product of the incident light component and the reflected light component. By taking the logarithm, the multiplicative relationship is transformed into an additive relationship. Then, a high-pass filter is used to suppress the low-frequency incident light component and enhance the high-frequency reflected light component (texture details). This process can be represented as:

[0061]

[0062] in, The image is after geometric correction; F represents the two-dimensional Fourier transform, which aims to transform the image from the spatial domain to the frequency domain. This is the transfer function of a high-pass filter, which in this embodiment is a Gaussian high-pass filter; Represented as a two-dimensional inverse Fourier transform; This indicates taking the natural exponent, which aims to recover the image from the logarithmic domain;

[0063] It should be noted that, after the above processing, an image with uniform lighting and enhanced texture details can be obtained. ;

[0064] Furthermore, in order to construct a robust and discriminative visual fingerprint, the present invention also involves parallel processing from... Extract two different dimensions of features:

[0065] Local invariance features: Modern feature point detection and description algorithms such as AKAZE (Accelerated-KAZE) or ORB (Oriented FAST and Rotated BRIEF) are employed. These algorithms can detect keypoints with good invariance to scale, rotation, and illumination changes, and generate a high-dimensional binary or floating-point descriptor for each keypoint. The set of descriptors for all keypoints in the image is denoted as... ;

[0066] Global depth texture features: Utilizing a pre-trained deep convolutional neural network (DCNN), such as a ResNet-50 or EfficientNet model pre-trained on ImageNet, to transform the image... The input is fed into this network, and the output of its intermediate layers or global average pooling layers is extracted as a global feature vector characterizing the overall texture and structure distribution of the image. This vector is denoted as... ;

[0067] Furthermore, since local and global features have different sensitivities to different types of surface textures and disturbances, simply concatenating them may not be the optimal choice. Therefore, this invention employs a lightweight attention fusion module to adaptively weight these two types of features. This attention fusion module can be a small, fully connected network designed to receive the concatenated features. As input, and output two weight scalars and (satisfy The final visual fingerprint vector to be verified Generated by weighted summation:

[0068]

[0069] in, This indicates a vector concatenation operation; It is an aggregate function used to... Multiple local feature descriptors are aggregated into a single, fixed-length vector. In this embodiment, the aggregation function is implemented using the Bag of Visual Words (BoVW) model, and the specific process is as follows:

[0070] First, using a codebook pre-constructed by performing K-Means clustering on local feature descriptors of a large number of product images, containing K cluster centers (i.e., "visual vocabulary"), the codebook will... Each local feature descriptor in the codebook is assigned to the visual word that is closest to it; subsequently, statistics are performed. All descriptors are assigned to the frequency of each visual word, forming a K-dimensional histogram vector; finally, L2 normalization is performed on the histogram vector to obtain a fixed-length aggregated feature vector.

[0071] It should be noted that by extracting two dimensions and using attention fusion, the dependence on local details and global structure can be dynamically adjusted according to the content of the current image, thereby generating a more robust and discriminative visual fingerprint vector to be verified.

[0072] S3. Combine the QR code information with the visual fingerprint vector to be verified, and generate a composite identity hash value to be verified through a cryptographic hash function.

[0073] It should be noted that the purpose of this step is to cryptographically bind the externally readable QR code information with the internal, invisible physical micro-features (represented by the visual fingerprint vector). That is, through a one-way, collision-resistant hash operation, a compact and highly condensed identity digest is generated to ensure that even if an attacker can copy the QR code, they cannot forge the correct composite identity hash value without the corresponding physical entity.

[0074] Furthermore, to defend against rainbow table attacks, this invention introduces a "salt" mechanism, that is, the QR code information is obtained in step S1. Afterwards, the mobile app will send a request to the backend server, not only to obtain the digital twin model data, but also to obtain a unique identifier related to the digital twin. A unique, pre-generated and stored random string, namely the salt value S, is generated when the product is first registered and stored together with information such as the original visual fingerprint;

[0075] Furthermore, after obtaining the salt value, data combination and serialization will be performed. The combined data includes three parts: the first part is the information parsed from the QR code. The visual fingerprint vector to be verified extracted in step S2 And the obtained salt value S; it should be noted that, in order to ensure the determinism and consistency of the input to the hash operation, these three elements need to be concatenated in a fixed order; at the same time, because Typically, the input data is a floating-point vector, which must first be converted into a deterministic byte sequence. This conversion can be achieved by quantizing its elements into fixed-point numbers or integers, and then serializing them according to big-endian or little-endian byte order. It can be represented as:

[0076]

[0077] in, This represents a function that converts data into a normalized, unambiguous byte stream, for example, S can be converted into a UTF-8 encoded byte string. As mentioned above, convert to byte serialization; This indicates a byte stream concatenation operation;

[0078] Furthermore, the serialized input data As the message body, it is fed into a standard, securely verified cryptographic hash function for computation. In this embodiment, the SHA3-256 algorithm from the SHA-3 (Secure Hash Algorithm 3) family is preferred. It should be explained that the SHA-3 algorithm is based on the Keccak sponge structure, possessing excellent collision resistance, pre-image resistance, and second pre-image resistance, ensuring that even... There is a tiny change in any bit (e.g., by) (Caused by subtle differences), the hash value output will also experience an avalanche effect, producing drastically different results. This operation process can be represented as:

[0079]

[0080] in, This indicates that the SHA3-256 hash algorithm is being executed. This represents the final generated composite identity hash value to be verified. This hash value is a 256-bit (32-byte) binary data, usually represented as a 64-character hexadecimal string.

[0081] It should be noted that the mobile terminal APP calculates the composite identity hash value to be verified locally. Then, it is sent to the backend server via a secure channel (such as HTTPS protocol using TLS / SSL encryption) for further comparison and verification. It's important to note that performing the hash operation locally rather than on the server side effectively prevents the raw visual fingerprint vector from being directly compared. Transmitting data over a network reduces the risk of sensitive data being intercepted and leaked, thus enhancing overall security.

[0082] S4. Compare the composite identity hash value to be verified with a pre-stored original composite identity hash value associated with QR code information, and output a verification conclusion based on the comparison result.

[0083] It should be noted that this step aims to achieve product identity authentication. Based on this, the present invention adopts a two-level cascaded verification strategy that combines "fast hash verification" and "robust vector comparison". Specifically, this strategy aims to quickly handle most cases through a hash comparison with extremely low computational cost and absolute result. Only when the hash comparison fails is a deep learning model with relatively large computational cost but tolerant of small physical changes activated to make a similarity judgment. Thus, while ensuring extremely high security, it also takes into account verification efficiency and robustness to the complexity of the real world.

[0084] Specifically, the two-level cascaded verification strategy is divided into a first-level verification (identity comparison of composite identity hash values) and a second-level verification (similarity measurement of visual fingerprint vectors).

[0085] Furthermore, for the first level of verification, the backend server receives the composite identity hash value to be verified, calculated and uploaded by the mobile terminal in step S3. and the associated QR code information Then, the backend server used Using the primary key, a query is initiated to a pre-built data storage system with immutable and traceable characteristics. In this embodiment, the data storage system is a distributed ledger system deployed in a consortium blockchain or private blockchain environment (e.g., built on Hyperledger Fabric). The backend server securely reads data from the ledger by invoking chaincode or smart contracts. The corresponding original identity record stored during product registration includes at least: the original composite identity hash value. Original visual fingerprint vector And the salt value S; subsequently, the backend server... and obtained from the ledger Perform a bit-by-bit identity comparison:

[0086]

[0087] It should be noted that, if If the result is true (i.e., both hash values ​​are exactly the same), then the verification is considered "passed." This indicates that the QR code information of the product being verified and its microscopic texture structure are completely consistent with the original state at the time of registration, with no perceptible changes. The backend server will send this final verification result to the mobile terminal APP, and the APP will then display the authentication success interface to the user. At this point, the verification process ends. A false result (i.e., the two hash values ​​are different) does not immediately indicate a verification failure, as this inconsistency could be caused by forgery or by minor, acceptable physical changes to the product surface (such as minor scratches, stains, or normal wear and tear). A small change occurs, which then causes a hash avalanche effect. The significant difference will automatically trigger and enter the second-level verification process in this case;

[0088] It should be noted that the second-level validation is only performed if the first-level validation fails;

[0089] Furthermore, for the second level of verification, the backend server sends a request to the mobile terminal APP, requesting it to upload the unhashable visual fingerprint vector to be verified generated in step S2. Meanwhile, the backend server has already obtained the original visual fingerprint vector from the distributed ledger. Then, the server calls a deep learning model specifically designed for measuring the similarity of high-dimensional feature vectors to calculate... and The similarity score between them; in this embodiment, the deep learning model is a pre-trained Siamese Neural Network, which contains two subnetworks with shared weights, used to receive the similarity score between them respectively. and As input, these values ​​are mapped to a more discriminative metric space, and the Siamese neural network ultimately outputs a scalar value between 0 and 1, namely the similarity score. This process can be represented as:

[0090]

[0091] in, This refers to a pre-trained Siamese neural network, which is trained through contrastive learning on a large number of positive sample pairs of "same product under different collection conditions" and negative sample pairs of "different products" to learn to remain insensitive to vector differences caused by factors such as lighting, angle, and minor defects, while remaining highly sensitive to vector differences caused by fundamentally different physical surfaces. The output vector similarity score is such that the closer the value is to 1, the more similar the physical surfaces represented by the two vectors are.

[0092] Specifically, the training process of this neural network uses a contrastive loss function as the optimization objective. This contrastive loss function encourages positive sample pairs (fingerprint vectors of the same product collected under different conditions) to minimize the distance in the metric space, while penalizing negative sample pairs (fingerprint vectors of different products) whose distance is less than a certain boundary value. Its formula can be expressed as:

[0093]

[0094] in, For labels, positive sample pairs negative sample pairs , There are two input vectors and In the Euclidean distance under the neural network mapping, m is a preset boundary hyperparameter;

[0095] Furthermore, the backend server compares the calculated similarity score with a preset confidence threshold:

[0096]

[0097] in, It is a hyperparameter determined by adjusting on the validation set to balance the false acceptance rate (FAR) and the false rejection rate (FRR), and its range is the same as that of the similarity score, for example, 0.95;

[0098] Furthermore, based on the comparison results Generate an auxiliary verification conclusion: If If true, then "auxiliary verification passed," meaning that although a minor change in the physical characteristics of the product surface caused the hash verification to fail, its core, unique microscopic texture identity is still maintained, confirming it as the original authentic product. If the result is false, the verification will be deemed "failed". This means that the physical characteristics of the product to be verified are significantly different from the original record, which exceeds the tolerance range of normal changes. It is very likely that the product is counterfeit or its feature anchoring area has been severely damaged.

[0099] Furthermore, the backend server sends this final auxiliary verification conclusion or failure conclusion to the mobile terminal APP, and the APP displays the corresponding interface to the user based on this, thus completing the entire verification process.

[0100] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0101] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0104] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0105] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A product identity verification method integrating QR code and visual fingerprint, characterized in that, include: The QR code information of the product to be verified is obtained. On the display interface of the mobile terminal, a virtual positioning frame is superimposed on a preset feature anchoring area of ​​the product to be verified based on the QR code information, and a high-definition image of the feature anchoring area is captured. The high-definition image is preprocessed, and a visual fingerprint vector to be verified is extracted from the preprocessed image. The QR code information is combined with the visual fingerprint vector to be verified, and a cryptographic hash function is used to generate a composite identity hash value to be verified. The hash value of the composite identity to be verified is generated by adding a pre-stored salt value associated with the QR code information to the combination, and then performing the cryptographic hash function operation. The composite identity hash value to be verified is compared with a pre-stored original composite identity hash value associated with the QR code information, and a verification conclusion is output based on the comparison result. When the composite identity hash value to be verified is inconsistent with the original composite identity hash value, the method further includes: Obtain a raw visual fingerprint vector associated with the QR code information; Calculate the vector similarity score between the visual fingerprint vector to be verified and the original visual fingerprint vector; The similarity score is then compared with a preset confidence threshold to generate an auxiliary verification conclusion.

2. The product identity verification method integrating QR code and visual fingerprint as described in claim 1, characterized in that, The position and orientation information of the virtual positioning frame are generated based on the three-dimensional coordinate data in a digital twin model associated with the product model.

3. The product identity verification method integrating QR code and visual fingerprint as described in claim 1, characterized in that, The preprocessing includes: A homography matrix is ​​calculated using the vertex coordinates of the virtual positioning box, and geometric correction processing is performed on the high-resolution image using the homography matrix.

4. The product identity verification method integrating QR code and visual fingerprint as described in claim 3, characterized in that, The preprocessing also includes: After geometric correction, the image is subjected to frequency domain transformation and homomorphic filtering.

5. The product identity verification method integrating QR code and visual fingerprint as described in claim 1, characterized in that, The step of extracting the visual fingerprint vector to be verified includes: Local invariant features and global depth texture features are extracted from the preprocessed image, respectively.

6. The product identity verification method integrating QR code and visual fingerprint as described in claim 5, characterized in that, The step of extracting the visual fingerprint vector to be verified further includes: An attention fusion module is used to perform weighted fusion of the local invariant features and the global depth texture features to generate the visual fingerprint vector to be verified.

7. The product identity verification method integrating QR code and visual fingerprint as described in claim 1, characterized in that, The vector similarity score is calculated using a pre-trained Siamese neural network model.

8. The product identity verification method integrating QR code and visual fingerprint as described in any one of claims 1 to 7, characterized in that, The original composite identity hash value, the original visual fingerprint vector, and the salt value are all recorded on a distributed ledger system.