Article anti-counterfeiting authentication terminal device and method

CN122714048APending Publication Date: 2026-09-08TIANJIN XINJINJIA TECH DEV CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611207921.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0005]为解决现有商品防伪验证过程中图像采集、质量控制、特征比对、通信交互和结果输出相互分散,且通用采集设备难以稳定获得适于个体级鉴真的微观纹理图像的问题,本发明提供一种物品防伪鉴真终端装置及方法

Benefits of technology

[0018]Compared to existing technologies, this application firstly enables the verification end to reliably acquire microscopic texture images of the corresponding registered area through preset acquisition area positioning, macro optical imaging, dedicated lighting, focus control, and motion state detection. Secondly, before feature extraction, three quality assessments—clarity, texture richness, and exposure status—are set to prevent images that do not meet the quality conditions from being included in the comparison process, and a re-acquisition prompt is used to encourage the terminal to reacquire a usable image. Thirdly, by having local structural features, spatial consistency, and texture statistical features jointly participate in similarity calculation, the authenticity determination does not solely rely on the machine-readable code itself, but is based on the matching relationship between the microscopic physical features of the object's surface and the registered features. The above processing establishes a quality-controllable technical link between image acquisition and feature comparison at the verification end.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122714048A_ABST
    Figure CN122714048A_ABST
Patent Text Reader

Abstract

This invention discloses a terminal device and method for anti-counterfeiting and authentication of goods. The method reads the unique identifier of the item to be verified, locates the microscopic acquisition area on the item's surface according to a preset location description, acquires a microscopic texture image through a macro-optical acquisition unit, and evaluates the clarity, texture richness, and exposure status of the microscopic texture image before feature extraction. When any quality indicator fails to meet the preset conditions, a re-acquisition prompt is triggered, and subsequent comparison processing is blocked. When the image quality is acceptable, the query feature representation is extracted and compared with the corresponding registered feature representation in the feature database, thereby outputting a authenticity determination conclusion and traceability information. This scheme can form an integrated processing flow of acquisition, quality control, feature comparison, communication, and result output at the verification end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anti-counterfeiting and product traceability technology, specifically to a terminal device and method for collecting, evaluating, comparing and determining authenticity of items by utilizing the microscopic physical characteristics of the surface of the item. Background Technology

[0002] Product anti-counterfeiting and traceability typically rely on QR codes, barcodes, anti-counterfeiting labels, RFID tags, or specialized anti-counterfeiting materials. While these methods can carry product information or increase the difficulty of counterfeiting, the encoded information, graphic symbols, or additional labels can still be copied, transferred, or reused, making it difficult to prove that the verified item and the registered item belong to the same individual item.

[0003] The surfaces of products, packaging boxes, labels, bottle caps, hang tags, etc., typically possess microscopic physical features formed during manufacturing, printing, molding, cutting, labeling, coding, or distribution processes. These features are random and vary from person to person, making them suitable as physical evidence for anti-counterfeiting and authentication. However, existing verification devices often disperse image acquisition, feature extraction, database comparison, and result display across different devices or processing stages, resulting in insufficient continuity in the verification process. Some devices directly send acquired images into the comparison process, lacking an image quality assessment mechanism tailored to anti-counterfeiting and authentication scenarios, making them susceptible to blurriness, abnormal exposure, or insufficient texture information, which can affect the judgment results.

[0004] Furthermore, general-purpose imaging equipment or fixed microscopic acquisition equipment typically lacks supporting processing capabilities such as acquisition area positioning assistance, dedicated lighting, resampling control, offline comparison, secure communication, and anomaly verification alarms, making it difficult to meet the comprehensive requirements of stable acquisition, reliable comparison, and traceable output at the field verification end. Therefore, it is necessary to provide an anti-counterfeiting and authentication terminal device and method capable of completing microscopic image acquisition, quality gating, feature comparison, communication interaction, and result output at the verification end. Summary of the Invention

[0005] To address the problem that existing anti-counterfeiting verification processes for goods are fragmented, involving image acquisition, quality control, feature comparison, communication interaction, and result output, and that general-purpose acquisition devices struggle to reliably obtain microscopic texture images suitable for individual-level authentication, this invention provides an anti-counterfeiting authentication terminal device and method. This solution is designed for verification scenarios, setting up a continuous processing flow for unique item identification reading, preset acquisition area positioning, macro optical acquisition, image quality assessment, feature extraction and similarity comparison, cloud or local determination, traceability information output, and abnormal verification alarms. This allows the verification terminal to complete the entire authentication process, from microscopic image acquisition to the output of authenticity conclusions, within a single terminal device.

[0006] This invention provides a method for anti-counterfeiting and authentication of goods, which is applied to anti-counterfeiting and authentication terminal devices. The method includes the following steps: S1, reading the unique identifier of the item to be verified, and determining a preset collection area on the surface of the item based on the location description associated with the unique identifier; S2, performing microscopic optical imaging on the preset collection area through the macroscopic optical acquisition unit of the anti-counterfeiting and authentication terminal device to obtain a query microscopic texture image; S3, before extracting features from the query microscopic texture image, performing an image quality assessment on the query microscopic texture image, the image quality assessment including sharpness assessment, texture abundance assessment, and exposure state assessment; S4, when any one of the sharpness assessment, texture abundance assessment, and exposure state assessment fails to meet the corresponding quality condition, generating a resampling prompt and blocking the query microscopic texture image from entering the feature comparison processing; S5, when the query microscopic texture image meets the corresponding quality condition, extracting the query feature representation, and comparing the query feature representation with the corresponding registered feature representation in the feature database; S6, outputting a authenticity determination conclusion based on the similarity comparison result, and outputting traceability information associated with the unique identifier of the item.

[0007] In the above method, the unique identifier of an item can be obtained through a machine-readable code set on the item itself, packaging box, packaging bottle, bottle cap, label, or hangtag. After reading the machine-readable code, the anti-counterfeiting and authentication terminal device can directly obtain the unique identifier of the item, or it can obtain index information for retrieving the unique identifier of the item. The location description can be pre-stored in a feature database and associated with the unique identifier of the item, registration feature representation, and traceability information. Through this location description, the anti-counterfeiting and authentication terminal device can locate the surface area of ​​the item corresponding to the registration stage at the verification end, so that the macro optical acquisition unit can be aligned with the same preset acquisition area for imaging.

[0008] Specifically, the location description may include a macroscopic positioning reference, an offset relative to the macroscopic positioning reference, the size of the acquisition window, and the acquisition direction. The macroscopic positioning reference may be a reproducibly identifiable structure such as the outline of the item, packaging boundaries, label boundaries, machine-readable coded positioning patterns, or printed pattern boundaries. After reading the unique identifier of the item, the anti-counterfeiting and authentication terminal device can establish the coordinate relationship of the acquisition area based on the macroscopic positioning reference and generate an alignment positioning frame in the display interface, enabling the operator to place the item to be verified in a suitable position, or enabling the fixed acquisition mechanism to automatically align with the preset acquisition area.

[0009] Specifically, the macro optical acquisition unit performs microscopic optical imaging of a preset acquisition area at a magnification of no less than 10 times. The macro optical acquisition unit may include a macro lens assembly, an image sensor, a dedicated illumination assembly, and an acquisition trigger assembly. The dedicated illumination assembly illuminates the preset acquisition area according to a preset illumination pattern, causing paper fibers, inked edges, film textures, processing marks, or micro-scratches on the surface of the item to form a microscopic texture image that can be acquired by the image sensor. To improve acquisition stability, the anti-counterfeiting authentication terminal device can perform focus control and motion detection before acquiring and querying the microscopic texture image. When the relative motion speed between the anti-counterfeiting authentication terminal device and the item to be verified exceeds a preset motion threshold, image acquisition is delayed; when the relative motion speed does not exceed the preset motion threshold, image acquisition is triggered.

[0010] In this invention, image quality assessment is set between image acquisition and feature extraction, serving as a quality gate before feature comparison processing. The sharpness assessment obtains a sharpness index C by calculating the Laplacian response variance of the query micro-texture image. The texture abundance assessment obtains a texture abundance index H by calculating the grayscale entropy of the query micro-texture image. The exposure status assessment obtains an exposure status index by calculating the overexposed pixel ratio Re and the underexposed pixel ratio Ru. When C is less than the sharpness threshold Tc, or H is less than the texture abundance threshold Th, or Re is greater than the overexposed ratio threshold Te, or Ru is greater than the underexposed ratio threshold Tu, the query micro-texture image is determined to not meet the corresponding quality conditions. The anti-counterfeiting authentication terminal device generates a re-sampling prompt and blocks the image from entering the feature comparison processing. When C ≥ Tc, H ≥ Th, Re ≤ Te, and Ru ≤ Tu, the query micro-texture image is determined to meet the corresponding quality conditions and is allowed to enter the feature extraction and similarity comparison process.

[0011] Furthermore, for the query micro-texture image that meets the quality requirements, the region of interest can be cropped, grayscale converted, brightness equalized, local contrast enhanced, scale normalized, and position corrected to obtain a uniform query image. Subsequently, local structural information formed by fiber intersections, fiber endpoints, ink penetration bright spots, pore boundaries, rough structures at ink-stained edges, film shrinkage textures, processing texture directions, or micro-scratches can be extracted from the uniform query image, and this local structural information is encoded into a query feature representation. The query feature representation may include a set of local salient point locations, a set of local descriptors, and a texture statistical feature vector. The registered feature representation is formed using a configuration corresponding to the query feature representation, enabling comparison between the query feature representation and the registered feature representation in the same feature space.

[0012] Furthermore, similarity comparison can include local salient point matching, descriptor distance calculation, spatial consistency verification, and comprehensive similarity calculation. In one feasible comprehensive similarity calculation method, the comprehensive similarity S can be calculated as S = aSp + bSd + cSe + dSh, where Sp represents the proportion of local salient point matches that pass the spatial consistency verification, Sd represents the descriptor similarity, Se represents edge structure consistency, Sh represents texture statistical feature consistency, and a, b, c, and d are weighting coefficients, with a + b + c + d = 1. By incorporating local salient points, descriptors, edge structures, and texture statistical features into the calculation, the impact of false detections of individual local features, local contamination, minor deviations in acquisition angle, or changes in lighting on the judgment results can be reduced. When the comprehensive similarity S is not lower than the judgment threshold Ts, a genuine product judgment conclusion can be output; when the comprehensive similarity S is lower than the judgment threshold Ts, a suspected counterfeit product, unregistered, or product requiring review judgment conclusion can be output. The judgment threshold Ts can be determined based on the intra-class similarity distribution obtained from repeated acquisitions of the same item and the inter-class similarity distribution obtained from acquisitions of different items.

[0013] Furthermore, the anti-counterfeiting authentication terminal device can choose between cloud-based comparison or local comparison based on network conditions. When the terminal device can establish a network connection with the feature database service, it uploads the query feature representation via encrypted communication and receives similarity comparison results, authenticity determination conclusions, and traceability information. The encrypted communication connection can combine two-way authentication, timestamps, and random numbers to securely process verification requests, preventing unauthorized terminal access and replaying of historical verification requests. When the network connection is unavailable, the terminal device uses a pre-cached subset of the feature database and judgment thresholds for local similarity comparison and temporarily stores offline verification records in local storage. After the network connection is restored, the terminal device uploads the offline verification records to the feature database service and updates the locally cached registered feature representation, judgment thresholds, and traceability information according to the synchronization information issued by the feature database service.

[0014] Furthermore, two or more preset collection areas can be set for the same item to be verified. The anti-counterfeiting and authentication terminal device sequentially collects the query micro-texture images of each preset collection area and forms corresponding query feature representations and region similarity Si. When multiple regions participate in verification, the fusion similarity Sf can be calculated according to Sf=w1S1+w2S2+...+wnSn, where n represents the number of preset collection areas participating in verification, wi represents the weight corresponding to the i-th preset collection area, and w1+w2+...+wn=1. When the fusion similarity Sf is not lower than the fusion judgment threshold, and the region similarity of the set key collection area is not lower than the corresponding minimum threshold, the conclusion of genuine product judgment is output. If two or more preset collection areas include the surface area of ​​the product body and the surface area of ​​the packaging container, the anti-counterfeiting and authentication terminal device can also verify whether the binding relationship between the product body and the packaging container is consistent with the registration record in the feature database.

[0015] Furthermore, when outputting a authenticity determination conclusion, the anti-counterfeiting authentication terminal device can record the verification time, verification location, terminal device identifier, item unique identifier, image quality assessment result, similarity comparison result, and determination conclusion. When the number of verifications of the same item's unique identifier within a preset time window exceeds a threshold, or when the same item's unique identifier appears at a verification location at a distance exceeding a preset distance threshold when the time interval is less than a preset time interval, or when the proportion of abnormal determination conclusions output by the same terminal device within a preset time window exceeds a device abnormality threshold, the anti-counterfeiting authentication terminal device can output an abnormal verification alarm simultaneously with the authenticity determination conclusion.

[0016] This invention also provides a terminal device for anti-counterfeiting and authentication of items. The terminal device includes an identifier reading and positioning module, a macro optical acquisition module, an image quality assessment module, a feature extraction and comparison module, a communication module, a local caching module, and a result output module. The identifier reading and positioning module reads the unique identifier of the item to be verified and determines a preset acquisition area on the item's surface based on the location description associated with the unique identifier. The macro optical acquisition module performs microscopic optical imaging at a magnification of at least 10 times on the preset acquisition area to obtain a query microscopic texture image. The image quality assessment module performs sharpness assessment, texture richness assessment, and exposure state assessment on the query microscopic texture image before feature extraction, and generates resampling control information if any assessment fails to meet the corresponding quality condition. The feature extraction and comparison module extracts query feature representations from the query microscopic texture images that meet the corresponding quality conditions and compares the query feature representations with registered feature representations for similarity. The communication module establishes an encrypted communication connection with a feature database service and securely processes verification requests through two-way authentication, timestamps, and random numbers. The local caching module is used to save a subset of the feature database, judgment thresholds, and offline verification records when the network connection is unavailable. The results output module is used to output the authenticity judgment conclusion, traceability information, resampling prompts, and abnormal verification alarms.

[0017] The technical solution of this application can be summarized as follows: In the verification terminal device, the microscopic area of ​​the surface of the item to be collected is first determined by the unique identifier and location description of the item, and then the microscopic texture image to be queried is obtained by macro-optical acquisition; before entering feature comparison, the microscopic texture image to be queried is evaluated for three types of quality: sharpness, texture richness, and exposure status, and unqualified images are blocked from the feature extraction process; for qualified images, the query feature representation that can characterize the microscopic physical features of the item surface is extracted, and a similarity comparison is performed with the corresponding registered feature representation in the feature database; when the network is available, cloud comparison is performed through encrypted communication, and when the network is unavailable, offline comparison is performed through a subset of the locally cached feature database; finally, the authenticity judgment conclusion, traceability information, and abnormal verification alarm are output. This solution makes the collection, quality control, comparison, communication, and output of the verification terminal a continuous technical processing flow.

[0018] Compared to existing technologies, this application firstly enables the verification end to reliably acquire microscopic texture images of the corresponding registered area through preset acquisition area positioning, macro optical imaging, dedicated lighting, focus control, and motion state detection. Secondly, before feature extraction, three quality assessments—clarity, texture richness, and exposure status—are set to prevent images that do not meet the quality conditions from being included in the comparison process, and a re-acquisition prompt is used to encourage the terminal to reacquire a usable image. Thirdly, by having local structural features, spatial consistency, and texture statistical features jointly participate in similarity calculation, the authenticity determination does not solely rely on the machine-readable code itself, but is based on the matching relationship between the microscopic physical features of the object's surface and the registered features. The above processing establishes a quality-controllable technical link between image acquisition and feature comparison at the verification end.

[0019] This application also integrates cloud-based comparison, local offline comparison, encrypted communication, traceability information output, and anomaly verification alarms into the processing flow of the same terminal device. This enables the terminal to securely interact with the feature database service when the network is available, complete verification based on locally cached data when the network is unavailable, and synchronize records after the network is restored. For scenarios involving multiple preset collection areas or simultaneously involving the product itself and its packaging container, this application forms a joint judgment mechanism through regional similarity, fusion similarity, and binding relationship verification, which can adapt to on-site situations such as localized damage, regional occlusion, and inconsistencies between packaging and the product itself. Thus, this application achieves integrated processing of microscopic image acquisition, image quality gating, feature matching judgment, traceability output, and anomaly behavior alerts at the verification end. Attached Figure Description

[0020] To more clearly illustrate the technical solution of this application, the accompanying drawings are briefly described below.

[0021] Figure 1 This is a schematic diagram of the overall process of the anti-counterfeiting and authentication method for articles of the present invention.

[0022] Figure 2 This is a schematic diagram of the system structure of the anti-counterfeiting and authentication terminal device of the present invention.

[0023] Figure 3 This is a schematic diagram of the image quality assessment and resampling control process of the present invention.

[0024] Figure 4 This is a schematic diagram of the query feature representation extraction and similarity comparison process of the present invention.

[0025] Figure 5 This is a schematic diagram illustrating the communication interaction between the anti-counterfeiting and authentication terminal device of the present invention and the feature database service.

[0026] Figure 6 This is a schematic diagram of the local offline comparison and network recovery synchronization process of the present invention.

[0027] Figure 7 This is a schematic diagram illustrating the application of the present invention in the anti-counterfeiting and authentication scenario of consumer product packaging.

[0028] Figure 8 This is a schematic diagram comparing the technical effects of the present invention with existing verification methods. Figure 8 (a) is a schematic diagram comparing the sample entry into the comparison process before and after image quality gating; Figure 8 (b) A schematic diagram showing the distribution of intra-class similarity formed by repeated sampling of the same item and inter-class similarity formed by comparison samples of different items; Figure 8 (c) is a schematic diagram comparing the similarity stability of single-region determination and multi-region fusion determination under local perturbation conditions; Figure 8 (d) is a schematic diagram comparing the continuity of verification processing under different network conditions between real-time cloud comparison only and cloud plus local offline comparison. Detailed Implementation

[0029] The technical solution of the present invention will be further described below with reference to the accompanying drawings. It should be understood that the following embodiments are used to illustrate the implementable structure, processing flow, and parameter setting method of the present invention, and are not intended to limit the scope of protection of the present invention. As long as a continuous processing flow of unique item identification reading, preset collection area positioning, macro optical imaging, image quality assessment, feature comparison, communication interaction, and result output can be realized at the verification end, it can be specifically configured according to the technical concept of the present invention.

[0030] Example 1

[0031] This embodiment illustrates the complete processing flow of a method for anti-counterfeiting and authentication of goods. (Refer to...) Figure 1 This method is executed by an anti-counterfeiting authentication terminal device, which can be a fixed desktop verification workstation or a fixed data collection station set up at a consumer product authentication service point. During the factory registration stage, the unique identifier of the item to be verified, the location description of the preset data collection area, registration feature representation, and traceability information are associated and stored in a feature database. When the verification terminal performs authentication, it does not rely solely on the machine-readable code on the item's surface to make a judgment. Instead, it uses the machine-readable code to determine the target item and further collects microscopic texture images of the corresponding area, using the microscopic physical feature matching results as the basis for determining authenticity.

[0032] In step S1, the anti-counterfeiting authentication terminal device reads the unique identifier of the item to be verified and determines a preset collection area on the item surface based on the location description associated with the unique identifier. Specifically, the anti-counterfeiting authentication terminal device first reads the machine-readable code set on the item body, packaging box, packaging bottle, bottle cap, label, or hangtag to obtain the unique identifier of the item or obtain index information for retrieving the unique identifier of the item. After reading the machine-readable code, the terminal device obtains the corresponding location description from the feature database service or local cache. The location description is used to indicate the microscopic area actually collected during the registration stage, and its content may include the macroscopic positioning reference, the offset of the collection window relative to the macroscopic positioning reference, the size of the collection window, and the collection direction. The macroscopic positioning reference may be the item outline, packaging boundary, label boundary, machine-readable code positioning pattern, or printed pattern boundary. Based on the above information, the terminal device generates an alignment positioning frame on the display interface so that the effective field of view of the macroscopic optical collection unit corresponds to the preset collection area.

[0033] In step S2, the terminal device performs microscopic optical imaging on a preset acquisition area using a macroscopic optical acquisition unit to obtain a query microscopic texture image. The macroscopic optical acquisition unit performs imaging at a magnification of no less than 10 times and illuminates the preset acquisition area using a dedicated illumination component. This dedicated illumination can be a fixed configuration of ring illumination, coaxial illumination, or multi-angle illumination, or a preset illumination mode can be selected based on the surface material of the object. Before acquisition, the terminal device can detect the relative motion state between the object to be verified and the acquisition unit; when the relative motion speed is greater than a preset motion threshold, the terminal device delays acquisition and prompts the user to remain still; when the relative motion speed is not greater than the preset motion threshold, imaging is triggered. Through this process, microscopic structures such as paper fibers, ink edges, film textures, processing marks, or micro-scratches can be processed in a stable image form for subsequent processing.

[0034] In step S3, the terminal device performs an image quality assessment on the query microtexture image before feature extraction. (Refer to...) Figure 3Image quality assessment includes sharpness assessment, texture richness assessment and exposure status assessment. For sharpness assessment, the Laplacian response variance of the queried microscopic texture image can be calculated to obtain the sharpness index C. For texture richness assessment, the information entropy of the gray histogram of the queried microscopic texture image can be calculated to obtain the texture richness index H. For exposure status assessment, the overexposed pixel ratio Re and the underexposed pixel ratio Ru can be calculated. The above indicators can be expressed as: C = Var(Lap(Iq)), H = -Σ pi lnpi, Re = Ne / N, Ru = Nu / N. Wherein, Iq represents the queried microscopic texture image, Lap(Iq) represents the Laplacian response of the image, Var(·) represents calculating the variance of the image response values in the parentheses, pi represents the occurrence probability of the i-th gray level in the image, ln represents the natural logarithm, N represents the total number of pixels of the image, Ne represents the number of pixels whose gray value is higher than the overexposure threshold, and Nu represents the number of pixels whose gray value is lower than the underexposure threshold.

[0035] In step S4, the terminal device determines whether to allow the queried microscopic texture image to enter the feature comparison processing according to the image quality assessment result. When C<Tc, or H<Th, or Re>Te, or Ru>Tu, the terminal device determines that the queried microscopic texture image does not meet the corresponding quality condition, and generates a re-acquisition prompt. Tc represents the sharpness threshold, Th represents the texture richness threshold, Te represents the overexposure ratio threshold, and Tu represents the underexposure ratio threshold. The re-acquisition prompt can be displayed as information such as adjusting the alignment position, adjusting the illumination, re-focusing or keeping still on the terminal display interface. At this time, the terminal device blocks the current frame of image from entering the feature extraction and comparison process, so as to prevent low-quality images from participating in the authenticity determination. When C≥Tc, H≥Th, Re≤Te and Ru≤Tu, the terminal device determines that the queried microscopic texture image meets the corresponding quality condition, and allows it to enter step S5.

[0036] In step S5, the terminal device performs feature extraction and similarity comparison on the queried microscopic texture image that meets the quality conditions. With reference to Figure 4 , the terminal device can first perform region of interest cropping, gray scaling, brightness equalization, local contrast enhancement, scale normalization and position correction on the queried microscopic texture image to obtain a normalized query image. Subsequently, the terminal device extracts local structure information formed by fiber intersections, fiber endpoints, ink penetration bright spots, pore boundaries, inked edge rough structures, film layer shrinkage textures, processing grain directions or micro-scratch intersection structures from the normalized query image, and encodes the local structure information into a query feature representation. The query feature representation includes a set of local salient point positions, a set of local descriptors and a texture statistical feature vector. The query feature representation and the corresponding registered feature representation in the feature database adopt the same or compatible composition mode, so that the two can be subjected to local matching, spatial consistency check and comprehensive similarity calculation.

[0037] In one possible implementation, the similarity comparison in step S5 includes local salient point matching, descriptor distance calculation, spatial consistency verification, and comprehensive similarity calculation. The comprehensive similarity S is calculated according to S = aSp + bSd + cSe + dSh. Here, Sp represents the proportion of local salient point matches that pass the spatial consistency verification, Sd represents the descriptor similarity, Se represents edge structure consistency, Sh represents texture statistical feature consistency, and a, b, c, and d represent weighting coefficients, satisfying a + b + c + d = 1. The judgment threshold Ts can be determined based on the intra-class similarity distribution obtained from repeated collections of the same item and the inter-class similarity distribution obtained from collections of different items. When S is not lower than Ts, the terminal device determines that the item to be verified matches the registered item in the preset collection area; when S is lower than Ts, the terminal device outputs a judgment status of suspected counterfeit, unregistered, or requiring verification.

[0038] In step S6, the terminal device outputs a authenticity determination conclusion based on the similarity comparison result, and outputs traceability information associated with the item's unique identifier. The traceability information may include production batch, production date, production line number, factory exit record, and distribution node. (Refer to...) Figure 5 When a network connection is available, the terminal device uploads a query for feature representation or similarity calculation to the feature database service via an encrypted communication connection, and receives the authenticity determination conclusion and source tracing information. The encrypted communication connection includes two-way authentication, timestamps, and random number processing to reduce the risk of unauthorized terminal access and replay of historical requests. (Refer to...) Figure 6 When the network connection is unavailable, the terminal device calls the locally cached feature database subset and judgment threshold to complete the local similarity comparison and temporarily stores the offline verification record in the local storage area; after the network is restored, the terminal device uploads the offline verification record to the feature database service and receives synchronous updates of registered feature representation, judgment threshold and traceability information.

[0039] After completing a single authenticity determination, the terminal device can also record the verification time, verification location, terminal device identifier, item unique identifier, image quality assessment result, similarity comparison result, and determination conclusion. When the number of verifications of the same item unique identifier within a preset time window exceeds a threshold, or when the same item unique identifier appears at a verification location at a distance exceeding a preset distance threshold with a time interval less than a preset time interval, or when the proportion of abnormal determination conclusions output by the same terminal device within a preset time window exceeds a device abnormality threshold, the terminal device can output an abnormal verification alarm simultaneously with the authenticity determination conclusion. Through the above steps, Figure 1 The method shown can form a continuous processing flow at the verification end, including data acquisition, quality control, comparison, communication, output, and anomaly alerts.

[0040] Example 2

[0041] This embodiment further describes the specific implementation of image quality assessment, acquisition control and re-acquisition processing on the basis of the first embodiment. With reference to Figure 3 , after the anti-counterfeiting and authenticity verification terminal device obtains the queried micro-texture image, it does not immediately perform feature extraction, but first sends the queried micro-texture image to the image quality assessment module. The image quality assessment module simultaneously assesses the definition, texture abundance and exposure status of the same frame of image. Only when all three assessment results meet the corresponding quality conditions, the frame of image is allowed to enter the subsequent feature extraction and comparison process. Through this arrangement, the terminal device can exclude images that are not suitable for micro-feature comparison, such as out-of-focus, jitter, insufficient texture, excessive reflection, and insufficient illumination, before the images enter the authenticity verification calculation.

[0042] In this embodiment, definition assessment can be implemented by Laplacian response variance. The terminal device performs Laplacian filtering on the queried micro-texture image Iq to obtain Lap(Iq), then calculates the variance of Lap(Iq) to obtain the definition index C, that is, C = Var(Lap(Iq)). Where Var(·) represents the variance operation, and Lap(Iq) represents the Laplacian response of the queried micro-texture image Iq. When the acquired image is out of focus, jittered, or the working distance deviates, the responses of edges and micro-textures in the image usually become weaker, and the Laplacian response variance decreases accordingly. The terminal device compares the definition index C with the definition threshold Tc. When C<Tc, it is determined that the frame of image does not meet the definition condition, and a prompt for refocusing, repositioning the item or keeping still is generated; when C≥Tc, it is determined that the frame of image meets the definition condition. The definition threshold Tc can be determined according to different magnifications, lens resolutions and acquisition materials when the terminal device is calibrated before delivery, and can also be recalibrated through standard samples during equipment maintenance or scene switching.

[0043] Texture abundance assessment is used to determine whether the queried micro-texture image contains sufficient identifiable microstructures. The terminal device can count the grayscale histogram of the queried micro-texture image, and calculate the information entropy H according to the grayscale probability pi, that is, H= -Σ pi ln pi. If the texture in the image is single, the acquisition area deviates from the preset area, the illumination is too uniform resulting in inconspicuous microstructures, or a blank area is acquired, the information entropy H is usually low. The terminal device compares H with the texture abundance threshold Th. When H<Th, it is determined that the frame of image does not meet the texture abundance condition, and prompts the operator to realign the preset acquisition area; when H≥Th, it is determined that the frame of image meets the texture abundance condition. The texture abundance threshold Th can be set separately according to the surface material of the item. For example, paper fiber areas, printed ink areas, leather surfaces, metal processed surfaces and film texture areas can correspond to different threshold ranges.

[0044] Exposure status assessment is used to determine whether there is overexposure or underexposure in the queried micro-texture image. The terminal device sets overexposure and underexposure grayscale thresholds, counts the number of pixels Ne with grayscale values ​​higher than the overexposure threshold and the number Nu with grayscale values ​​lower than the underexposure threshold, and calculates the overexposure pixel ratio Re and underexposure pixel ratio Ru based on the total number of pixels N in the image, where Re = Ne / N and Ru = Nu / N. When Re > Te, it indicates that the proportion of bright areas is too large, which may be caused by strong reflection, excessive lighting, or reflection from the coating on the object surface; when Ru > Tu, it indicates that the proportion of dark areas is too large, which may be caused by insufficient lighting, the acquisition area being blocked, or insufficient exposure time. The terminal device determines that the exposure status meets the conditions when Re ≤ Te and Ru ≤ Tu, and generates a prompt to adjust the lighting or re-acquire when Re > Te or Ru > Tu. Te and Tu are preset exposure ratio thresholds, which can be determined according to the material of the acquisition area and the lighting mode.

[0045] To create a closed loop between image quality assessment and acquisition control, refer to Figure 2 and Figure 3 The image quality assessment module feeds back the reasons for non-compliance to the result output module and the macro optical acquisition module. When the sharpness does not meet the requirements, the terminal device can prioritize triggering autofocus control or prompt adjustment of the acquisition working distance; when the texture richness does not meet the requirements, the terminal device can prompt re-alignment of the preset acquisition area and redisplay the alignment positioning frame on the display interface; when the overexposure ratio does not meet the requirements, the terminal device can reduce the illumination brightness, switch to polarized illumination, or shorten the exposure time; when the underexposure ratio does not meet the requirements, the terminal device can increase the illumination brightness, extend the exposure time, or prompt removal of obstructions. The above feedback processing can be executed automatically by the terminal device, or the terminal device can display specific adjustment instructions to the operator for the operator to complete.

[0046] In a fixed dedicated verification workstation, the macro optical acquisition module may include a fixed-height acquisition arm, a fixed-focal-length macro lens, an image sensor, a ring LED lighting assembly, an object support station, and a trigger button. After the object is placed on the support station, the terminal device first reads the object's unique identifier and overlays an alignment frame onto the display interface according to the location description. After the operator adjusts the object so that the preset acquisition area enters the positioning frame, the terminal device performs motion state detection. The motion state can be determined by the pixel displacement between consecutive frames, the vibration sensor signal in the acquisition station, or the displacement of the positioning mark in the image. When the relative motion speed corresponding to the displacement between consecutive frames is greater than a preset motion threshold Vm, the terminal device does not trigger formal acquisition; when the relative motion speed is not greater than Vm and continues to reach a preset stabilization time, the terminal device triggers macro optical imaging. This method can reduce image blurring caused by momentary button jitter or unstable object placement.

[0047] In autofocus-based terminal devices, the macro optical acquisition module can perform a small-range focal length scan along the optical axis at the acquisition front and select a focal plane with higher sharpness based on the sharpness index C of the candidate images. Specifically, the terminal device acquires multiple preview images within a preset focal length range, calculates the sharpness index C for each preview image, and uses the focal length position where the sharpness index reaches a local maximum and is not lower than a preset preview threshold as the acquisition focal length. If no focal length position meeting the preview threshold is found within the preset focal length range, the terminal device indicates an anomaly in the object height, acquisition distance, or acquisition area position. This process does not require the terminal device to perform complex searches during each verification; it can also preset a fixed working distance based on the object type and acquisition station, and initiate autofocus correction when needed.

[0048] In terms of lighting control, the terminal device can preset several lighting modes and select the appropriate mode based on the image quality assessment results. For paper fiber areas or ordinary printing areas, uniform ring lighting can be used to stably present fiber intersections, ink penetration highlights, and pore boundaries. For laminated labels, smooth packaging boxes, or metal processing surfaces, polarized lighting or oblique lighting can be used to reduce the impact of specular reflection on the overexposed pixel ratio Re. For areas with obvious surface unevenness, low-angle lighting can be used to enhance edge and texture direction information. The switching of lighting modes can be linked to the image quality assessment results. For example, when the sharpness is acceptable but Re is consistently greater than Te, the terminal device can prioritize reducing the lighting intensity or switching to polarized lighting; when H is consistently less than Th but the exposure is acceptable, the terminal device can switch to oblique lighting to enhance the contrast of micro-textures.

[0049] The image quality assessment module can also save the quality parameters for each acquisition. For qualified images that enter the feature comparison process, the terminal device can save C, H, Re, and Ru along with the verification record. For unqualified images that do not enter the feature comparison process, the terminal device can save the reason for the unqualification and the number of re-acquisitions. The above quality parameters can be used for subsequent equipment maintenance, threshold adjustment, and abnormal acquisition analysis. When the same terminal device produces a high proportion of images with unqualified clarity within a certain period of time, it can prompt to check the lens cleanliness, acquisition station stability, or focusing mechanism status; when the texture abundance index of the same item category is consistently low, it can prompt to reconfirm whether the preset acquisition area is suitable as a microscopic feature acquisition area.

[0050] In a specific application configuration, the terminal device performs micro-collection on the black module area of the two-dimensional code on the paper packaging box. The macro optical collection module adopts a magnification of 10 to 30 times, the lighting component adopts annular LED lighting and an optional polarizer, and the image sensor outputs a grayscale image or a color image. The terminal device first reads the two-dimensional code encoding information, then establishes a two-dimensional code coordinate system according to the two-dimensional code positioning pattern, and determines a preset collection window inside one of the black modules. After collecting and obtaining the queried micro-texture image, the terminal device calculates C, H, Re and Ru. If Re>Te due to reflection from the coating film on the collected image, the terminal device switches to polarized illumination and collects again; if H<Th because the collected image is not aligned with the black module, the terminal device redisplays the positioning frame and prompts to adjust the position of the article; if C<Tc due to key jitter in the collected image, the terminal device delays collection and re-triggers after the picture is stabilized. Only when C≥Tc, H≥Th, Re≤Te and Ru≤Tu, the terminal device sends the image to the feature extraction and comparison process.

[0051] Through the processing method of this embodiment, the terminal device can complete the image collection quality control before feature extraction. Image quality assessment does not exist as post statistical information, but directly determines whether the queried micro-texture image enters the authenticity identification and comparison process. This processing can enable subsequent local salient point extraction, descriptor calculation, spatial consistency check and comprehensive similarity calculation to be based on images whose quality meets the requirements, avoiding unstable comparison results caused by unavailable collected images.

[0052] Embodiment 3

[0053] This embodiment further illustrates the specific implementation of query feature representation construction, similarity comparison, multi-region joint determination and threshold setting based on Embodiment 1 and Embodiment 2. With reference to Figure 4 , after the queried micro-texture image passes the image quality assessment, the terminal device performs consistency processing on it, and extracts feature information that can characterize the micro-physical structure of the article surface from the consistentized image. This processing is not limited to a specific image recognition algorithm, but requires that the registration stage and the verification stage adopt corresponding feature construction methods, so that the registration feature representation and the query feature representation can calculate the similarity under the same comparison rule.

[0054] In this embodiment, the standardization process includes region of interest (ROI) cropping, grayscale conversion, brightness equalization, local contrast enhancement, scale normalization, and position correction. ROI cropping is used to extract the same or corresponding acquisition window from the query micro-texture image as the one used in the registration stage, reducing the impact of irrelevant background on feature extraction. Grayscale conversion converts the color image into a grayscale image suitable for texture analysis; if different color channels contain different texture information, each channel can be processed separately before fusion. Brightness equalization and local contrast enhancement reduce the impact of variations in lighting intensity, surface reflection differences, or sensor response differences on texture display. Scale normalization ensures that images obtained from different devices or at different acquisition distances remain comparable at the pixel scale. Position correction performs translation, rotation, or scale correction on the image based on machine-readable coded positioning patterns, printing boundaries, edge directions, or significant texture points, ensuring a correspondence between the preset acquisition area in the query image and the registered image.

[0055] The query feature representation can be expressed as Fq=(Pq,Dq,Hq,Qq). Here, Pq represents the set of local salient point locations in the query image, Dq represents the descriptor subset corresponding to each local salient point, Hq represents the texture statistical feature vector, and Qq represents the set of image quality parameters. The registration feature representation can be expressed as Fr=(Pr,Dr,Hr,Qr). Here, Pr, Dr, Hr, and Qr correspond to Pq, Dq, Hq, and Qq, respectively. The parentheses in the above expressions indicate that the feature representation consists of multiple feature components, and there is no requirement that each component must be stored according to a fixed data structure. In practical implementations, Pq and Pr can be composed of two-dimensional coordinates, scale, and orientation information; Dq and Dr can be composed of local gradients, gray-level distribution, edge directions, or learned encoding vectors; Hq and Hr can be composed of bright spot density, pore area distribution, edge direction histogram, texture energy, and local gray-level statistics; and Qq and Qr can be composed of sharpness, texture abundance, and exposure state indicators.

[0056] For paper fiber areas, local salient points can originate from fiber intersections, fiber ends, overlapping fiber bundles, abrupt changes in pore boundaries, or points of change in local texture direction. For printed inked areas, local salient points can originate from ink penetration highlights, burrs at inked edges, pore boundaries, ink layer particle aggregation points, or rough structures at the edges of black modules. For laminated packaging areas, local salient points can originate from film shrinkage textures, micro-creases, local reflective structures, or abrupt changes in texture direction. For metal or plastic processed surfaces, local salient points can originate from changes in processing texture direction, intersecting micro-scratches, granular surface undulations, or local abrasion boundaries. The terminal device can select the corresponding feature extraction weights based on the material type of the preset collection area, but the same or compatible feature extraction methods should be used for the same material type during the registration and verification stages.

[0057] In the local salient point matching stage, the terminal device first filters candidate matching points from Dq and Dr based on descriptor distances. Descriptor distances can be represented using Euclidean distance, Hamming distance, cosine distance, or a normalized model distance. For each query salient point, candidate points with smaller descriptor distances can be selected from the registered salient point set, and unstable matches are eliminated through distance ratio constraints or bidirectional nearest neighbor constraints. Subsequently, the terminal device performs spatial consistency checks on the candidate matching points. Spatial consistency checks are used to determine whether the relative positional relationships between candidate matching points are consistent with the relative positional relationships in the registered image. For example, for the black module region of a QR code, the relative positions of matching points with respect to the module boundary, module center, and QR code positioning direction can be compared; for the black stripe region of a barcode, the relative spacing of matching points along the stripe length direction and the offset relationship along the stripe width direction can be compared; for the paper fiber region of a packaging box, the local geometric relationships between multiple fiber intersection points can be compared.

[0058] After spatial consistency verification, the terminal device obtains a set of valid matching points and calculates the local salient point matching ratio Sp. Sp can be determined based on the ratio between the number of valid matching points and the number of valid salient points in the registered image, or it can be normalized by combining the number of valid salient points in the query image. Descriptor similarity Sd can be calculated based on the descriptor distance of valid matching points, for example, mapping the average descriptor distance to a similarity between 0 and 1. Edge structure consistency Se can be determined based on the local distribution differences of ink edges, pore boundaries, fiber boundaries, or processing texture directions. Texture statistical feature consistency Sh can be determined based on the distance between Hq and Hr, for example, comparing the differences between bright spot density, pore area distribution, edge direction histogram, and local grayscale statistics.

[0059] In one possible implementation, the overall similarity S is calculated according to S = aSp + bSd + cSe + dSh, where a, b, c, and d represent weighting coefficients and satisfy a + b + c + d = 1. For the black module area of ​​the QR code, ink penetration highlights and rough inked edges are generally more important, thus giving Sp and Se higher weights. For paper fiber areas, fiber intersections and texture direction statistics are generally more important, thus giving Sp and Sh higher weights. For metal processed surfaces, local processing texture direction and micro-scratch intersection structures are generally more important, thus increasing the weight of Se. The above weight settings are used to adapt to the microscopic feature manifestations of different material surfaces, but do not change the basic calculation relationship of the overall similarity.

[0060] The determination threshold Ts can be determined through the intra-class similarity distribution and the inter-class similarity distribution. The intra-class similarity distribution is obtained by repeated collection and comparison of the same item under different times, different collection times, different lighting conditions or different terminal devices, and is used to characterize the variation range of similarity when the same item is repeatedly verified. The inter-class similarity distribution is obtained by mutual comparison of collection areas of different items, and is used to characterize the degree of discrimination between different items. The threshold Ts can be set between the high-value region of inter-class similarity and the low-value region of intra-class similarity. When the sample size gradually increases, the terminal device or the feature database service can update the threshold according to new verification records. If the lower bound of intra-class similarity of a certain material type is relatively low, the system can increase the image quality gating requirement or add other collection regions to participate in the joint determination; if the high-value region of inter-class similarity of a certain material type is relatively high, the system can increase the determination threshold or reduce the weight of this region in the fusion determination.

[0061] For single-region determination, the terminal device outputs a conclusion according to the comparison between the comprehensive similarity S and the determination threshold Ts. When S≥Ts, the terminal device can output a genuine product determination conclusion and output traceability information in combination with the unique identifier of the item. When S<Ts and the unique identifier of the item exists in the database, the terminal device can output a conclusion of suspected counterfeit product or requiring re-verification. When no registration record can be retrieved for the unique identifier of the item, the terminal device can output an unregistered conclusion. When the image quality index meets the minimum quality requirement but is close to the threshold boundary, or the number of effective matching points is lower than the preset stable number, the terminal device can output a conclusion of requiring re-verification, so as to facilitate re-collection or adopt multi-region joint determination.

[0062] For multi-region joint authenticity identification, the terminal device sequentially collects query micro-texture images of multiple regions according to the preset collection region list, and separately performs image quality assessment, feature extraction and similarity calculation. The region similarity corresponding to the i-th collection region is recorded as Si. The terminal device calculates the fusion similarity Sf according to Sf=w1S1+w2S2+...+wnSn, wherein n represents the number of preset collection regions participating in the verification, wi represents the weight of the i-th preset collection region, and satisfies w1+w2+...+wn=1. The region weights can be set according to region stability, degree of repeatable positioning, material wear resistance, historical error distribution and verification level. Regions that are easy to locate and have stable micro-texture can be set with higher weights, while regions that are easily blocked, worn or contaminated can be set with lower weights.

[0063] For the fusion determination, both the fusion determination threshold Tf and the minimum threshold Tk for key regions can be set at the same time. The key region refers to the collection region directly related to the unique identifier of the item or the main physical anti-counterfeiting basis, such as the black module region of a two-dimensional code, the black stripe region of a barcode, the fixed texture region on the surface of the commodity itself, or the registration region on the packaging container. When Sf≥Tf and the similarity of the key region is not lower than the corresponding Tk, the terminal device outputs a genuine product determination conclusion. When Sf≥Tf but the similarity of the key region is lower than the corresponding Tk, the terminal device outputs a conclusion requiring recheck. When Sf<Tf, the terminal device outputs a conclusion of suspected counterfeit, unregistered, or requiring recheck. This processing prevents the overall determination from deviating from the physical feature matching result of the key region due to accidental similarity in some auxiliary regions.

[0064] In the authenticity identification scenario where the commodity itself and the packaging container are jointly verified, the feature database pre-stores the registered feature representation of the commodity surface, the registered feature representation of the packaging container surface, and the binding relationship between the two. The verification end collects the surface region of the commodity itself and the surface region of the packaging container respectively to obtain the similarity of the commodity region and the similarity of the packaging region. When both the commodity region similarity and the packaging region similarity meet the corresponding thresholds, and the currently read unique item identifier, packaging container identifier are consistent with the binding record in the database, the terminal device outputs a genuine product determination conclusion. When the commodity region matches but the packaging region does not match, or the packaging region matches but the commodity region does not match, or both match but the binding relationship is inconsistent, the terminal device outputs a conclusion of abnormal binding or requiring recheck. This method is suitable for scenarios where it is necessary to identify commodities and packaging that have been split, replaced, or recombined.

[0065] In a specific parameter configuration, for the black module region of a two-dimensional code on paper packaging, the weights in the comprehensive similarity S can be set as a=0.35, b=0.25, c=0.25, d=0.15. For the paper fiber region, the weights can be set as a=0.30, b=0.20, c=0.15, d=0.35. For the metal processed surface region, the weights can be set as a=0.25, b=0.20, c=0.40, d=0.15. The above parameters are used to illustrate the implementable configurations under different material types, and can be adjusted according to sample statistical results and equipment collection conditions in practical applications.

[0066] Through the processing method of this embodiment, the terminal device can extract comparable microscopic physical features after the image quality meets the conditions, and jointly use local salient points, descriptors, edge structures and texture statistical features for comprehensive similarity calculation. For single-region verification, this method can output a determination conclusion based on the microscopic feature matching result of the preset collection region; for multi-region or joint verification of the commodity itself and packaging, this method can provide a more complete judgment basis through fusion similarity and binding relationship verification.

[0067] Embodiment 4

[0068] This embodiment illustrates the system module structure and specific implementation of each module of an anti-counterfeiting and authentication terminal device for goods. (Refer to...) Figure 2 The terminal device includes an identifier reading and positioning module, a macro optical acquisition module, an image quality assessment module, a feature extraction and comparison module, a communication module, a local cache module, and a result output module. These modules can be integrated within the same housing, or they can be connected via a wired interface to form a verification terminal device combination consisting of a fixed acquisition station, a processing host, a display terminal, and a communication unit. Regardless of whether an integrated or combined structure is adopted, the modules are interconnected according to... Figure 2 The data flow shown completes the reading of the item's unique identifier, the positioning of the preset collection area, the acquisition of microscopic images, the image quality gating, the feature comparison, the communication interaction, and the output of results.

[0069] The identification reading and positioning module is used to read the unique identifier of the item to be verified and determine a preset collection area on the item's surface based on the location description associated with the unique identifier. This module may include a machine-readable code reader, an image recognition processing unit, and a positioning guidance unit. The machine-readable code reader is used to read QR codes, barcodes, or other coded information that can be recognized by the terminal. The image recognition processing unit is used to identify macroscopic positioning references such as item outlines, packaging boundaries, label boundaries, machine-readable coded positioning patterns, or printed pattern boundaries. The positioning guidance unit is used to generate an alignment positioning frame in the display interface or collection preview screen based on the location description, enabling the macro optical acquisition module to align with the preset collection area corresponding to the registration stage.

[0070] In its implementation, the identification reading and positioning module, after reading the machine-readable code, can directly obtain the item's unique identifier or index information used to retrieve it. The terminal device then queries the feature database service for a location description based on this identifier or index, or reads the location description from the local cache module. The location description can include a macroscopic positioning reference, the offset of the acquisition window relative to the macroscopic positioning reference, the acquisition window size, and the acquisition direction. If the preset acquisition area is located within the black QR code module, the identification reading and positioning module can establish a QR code coordinate system using the QR code positioning pattern and determine the microscopic acquisition window based on the module's row and column positions and offset. If the preset acquisition area is located near the packaging boundary, the identification reading and positioning module can use the packaging edge or label edge as a macroscopic positioning reference to establish a local coordinate relationship.

[0071] The macro optical acquisition module is used to perform microscopic optical imaging at a magnification of no less than 10x on a preset acquisition area to obtain a query microscopic texture image. This module may include a macro lens assembly, an image sensor, a dedicated illumination component, an acquisition trigger component, a focusing mechanism, and a motion detection unit. The macro lens assembly is used to form a magnified microscopic image; the image sensor is used to output a grayscale or color image; the dedicated illumination component is used to provide controllable illumination to the preset acquisition area; the acquisition trigger component is used to trigger formal imaging when acquisition conditions are met; the focusing mechanism is used to adjust the focal length or lens position; and the motion detection unit is used to determine whether the object to be verified is relatively stationary relative to the macro optical acquisition module.

[0072] In a fixed verification workstation, the macro optical acquisition module can be mounted on a fixed-height acquisition arm. After the item is placed at the acquisition station, a preset working distance is maintained between the fixed-focus lens and the support station. For packaging boxes, labels, or bottle caps with minimal height variations, a fixed-focus optical design can be used; for items with varying surface heights, a motorized focusing mechanism can be used for small-range focusing. The dedicated lighting components can employ ring LED lighting, coaxial lighting, oblique lighting, or polarized lighting. Ring lighting is suitable for paper fibers and ordinary printing areas; coaxial lighting is suitable for surfaces with weak planar reflection; oblique lighting is suitable for surfaces with noticeable processing textures or micro-scratches; and polarized lighting is suitable for laminated packaging or highly reflective labels.

[0073] The image quality assessment module performs sharpness, texture abundance, and exposure status assessments on the query micro-texture image before feature extraction, and generates resampling control information if any assessment fails to meet the corresponding quality condition. This module can be implemented by a processor within the terminal device executing the image quality assessment program, or by an image processing chip or embedded vision processing unit. Sharpness assessment outputs a sharpness index C, texture abundance assessment outputs a texture abundance index H, and exposure status assessment outputs the overexposed pixel ratio Re and the underexposed pixel ratio Ru. The image quality assessment module compares these indices with sharpness threshold Tc, texture abundance threshold Th, overexposed ratio threshold Te, and underexposed ratio threshold Tu, respectively, to obtain the image quality assessment result.

[0074] In its implementation, the image quality assessment module can also output the reasons for non-compliance to the result output module and the macro optical acquisition module. When the sharpness index does not meet the conditions, the image quality assessment module outputs control information for focusing adjustment or maintaining stillness; when the texture richness index does not meet the conditions, it outputs control information for re-aligning with the preset acquisition area; when the overexposed pixel ratio does not meet the conditions, it outputs control information for reducing illumination brightness, switching polarized illumination, or shortening exposure time; when the underexposed pixel ratio does not meet the conditions, it outputs control information for increasing illumination brightness or extending exposure time. Through this feedback path, the image quality assessment module not only provides pass or fail results but also participates in the closed-loop control of the terminal device's acquisition.

[0075] The feature extraction and comparison module extracts query feature representations from query micro-texture images that meet quality criteria and compares the query feature representations with registered feature representations based on similarity. This module may include an image homogenization processing unit, a local structure extraction unit, a feature encoding unit, a spatial consistency verification unit, and a similarity calculation unit. The image homogenization processing unit performs region-of-interest (ROI) cropping, grayscale conversion, brightness equalization, local contrast enhancement, scale normalization, and position correction. The local structure extraction unit detects fiber intersections, fiber endpoints, ink penetration bright spots, pore boundaries, rough structures at inkd edges, film shrinkage textures, and the intersection of processing texture directions or micro-scratches. The feature encoding unit forms the query feature representation. The spatial consistency verification unit filters candidate matches where the relative positional relationships between local salient points are inconsistent. The similarity calculation unit calculates a comprehensive similarity based on the matching ratio of local salient points, descriptor similarity, edge structure consistency, and texture statistical feature consistency.

[0076] When terminal computing power allows, the feature extraction and comparison module can complete feature extraction, spatial consistency verification, and comprehensive similarity calculation locally on the terminal, and only send the item's unique identifier, query feature representation, or comparison result to the feature database service. When terminal computing power is limited, the feature extraction and comparison module can complete image quality assessment and basic feature extraction on the terminal side, and then send the query feature representation to the feature database service via the communication module, with the server performing part of the comparison calculation. Regardless of whether local or cloud-based comparison is used, the query feature representation and the registered feature representation use corresponding feature composition methods to ensure that the comparison results have consistent technical meaning.

[0077] The communication module establishes an encrypted communication connection with the feature database service and securely processes verification requests through two-way authentication, timestamps, and random numbers. This module may include a wireless communication unit, a wired network interface, a security authentication unit, a data encryption unit, and a request encapsulation unit. The wireless communication unit can support cellular networks or wireless LANs, and the wired network interface can support Ethernet connections. The security authentication unit verifies the legitimate identities of both the terminal device and the feature database service before sending the verification request. The data encryption unit encrypts the transmission of the query feature representation, the item's unique identifier, and the verification record. The request encapsulation unit adds a timestamp and a random number to each verification request to reduce the risk of duplicate submissions of historical requests.

[0078] The local caching module is used to save a subset of the feature database, judgment thresholds, and offline verification records when the network connection is unavailable. This module may include non-volatile memory, a cache management unit, a data encryption storage unit, and a synchronization control unit. The feature database subset may include registered feature representations, location descriptions, judgment thresholds, and traceability information related to a specific verification scenario, specific region, specific batch, or specific service point. Judgment thresholds may include single-region judgment thresholds, fusion judgment thresholds, and minimum thresholds for key regions. Offline verification records may include verification time, terminal device identifier, item unique identifier, image quality assessment results, similarity comparison results, and offline judgment conclusions. After the network is restored, the synchronization control unit uploads the offline verification records to the feature database service via the communication module and receives updated cached data.

[0079] To prevent unauthorized reading or tampering of locally cached data, the local caching module can encrypt and store a subset of the feature database and offline verification records, and save the cache version number, validity period, and integrity verification information. When the terminal device performs offline comparison, it first checks whether the locally cached data is within its validity period and confirms that the integrity verification has passed. If the cached data has exceeded its validity period or the integrity verification fails, the terminal device can output a status indicating that online verification or re-verification is required. Through this setting, the local caching module can provide verification capabilities when the network is unavailable, while avoiding the impact of long-term expired cache on the judgment results.

[0080] The results output module outputs the authenticity determination conclusion, traceability information, re-sampling prompts, and anomaly verification alarms. This module may include a display screen, indicator lights, an audible alert, a printing interface, or a data output interface. The display screen can show the status of genuine products, suspected counterfeit products, unregistered products, products requiring verification, and products requiring re-sampling, as well as traceability information such as production batch, production date, production line number, factory exit record, and distribution node. Indicator lights or audible alerts can be used to quickly indicate the result status on-site. The data output interface can send the determination conclusion, traceability information, and verification records to the management terminal or business system.

[0081] The output module can also provide corresponding prompts based on different abnormal situations. When the image quality is unqualified, the output module will prompt for resampling and display the specific reason for the failure, such as insufficient sharpness, insufficient texture, overexposure, or underexposure. When the similarity is lower than the judgment threshold, the output module will output a judgment conclusion of suspected counterfeit, unregistered, or requiring verification. When the unique identifier of the same item shows abnormal verification frequency, abnormal geographical location, or abnormal terminal device, the output module will output an abnormal verification alarm in addition to the authenticity judgment conclusion. The output of this module is not limited to text display; it can also provide results to external systems through status codes, graphical interfaces, or data interfaces.

[0082] Reference Figure 5 A verification request processing link is formed between the communication module, feature extraction and comparison module, local caching module, and result output module. After the terminal device reads the unique identifier of the item and generates a query feature representation, the communication module first performs two-way authentication with the feature database service. After successful authentication, the encrypted verification request is sent to the server. The server returns the similarity comparison result, the authenticity determination conclusion, the traceability information, and the abnormal status. After receiving the returned result, the terminal device displays the determination conclusion through the result output module, and the local caching module records the verification information. If the communication module cannot establish a network connection, the feature extraction and comparison module calls a subset of the feature database in the local caching module to perform a local comparison, and the result output module outputs the offline determination result.

[0083] Through the device structure of this embodiment, the identification reading and positioning module solves the problem of determining the acquisition object and acquisition area, the macro optical acquisition module solves the problem of acquiring microscopic images, the image quality assessment module solves the problem of low-quality images entering the comparison process, the feature extraction and comparison module solves the problem of matching microscopic physical features, the communication module solves the problem of secure interaction of verification requests, the local caching module solves the problem of continuing verification and subsequent synchronization in the absence of network, and the result output module solves the problem of on-site presentation of judgment conclusions, traceability information and abnormal alarms.

[0084] Example 5

[0085] This embodiment illustrates the specific application of the present invention in the context of anti-counterfeiting and authentication of consumer product packaging. (Refer to...) Figure 7The item to be verified can be a consumer product packaging box with a machine-readable code and a preset collection area. This packaging box has been registered at the production end, and the registration information includes the item's unique identifier, a description of the preset collection area's location, a registered microscopic texture image, registered feature representations, image quality parameters, production batch number, production date, production line number, and distribution records. The verification end uses a fixed anti-counterfeiting authentication terminal device, which includes a collection station, a fixed-height collection arm, a macro optical collection module, a dedicated lighting assembly, an embedded processor, a communication module, a local cache module, and a touch screen display.

[0086] In this embodiment, the machine-readable code on the consumer product packaging box can be a QR code. This QR code is not only used to read the item's unique identifier or database index information, but also serves as a macroscopic positioning reference for determining a preset collection area. During production registration, a QR code coordinate system is established based on the QR code positioning pattern, and a preset collection window is selected within the black module area of ​​the QR code as a microscopic collection area. The position of the preset collection window can be described by the row and column number of the QR code module, the offset relative to the positioning pattern, the size of the collection window, and the collection direction. The production end collects the registration microscopic texture image of this black module area at a magnification of no less than 10 times and generates a registration feature representation. The ink penetration bright spots, pore boundaries, and rough structures of the inked edges in the black module area of ​​the QR code can serve as sources of individual-level microscopic physical features.

[0087] At the verification end, the operator places the consumer product packaging box at the collection station of the fixed anti-counterfeiting authentication terminal device. The identification reading and positioning module reads the QR code encoding information to obtain the item's unique identifier or database index information. The terminal device reads the location description from the feature database service or local cache module based on this identifier or index and displays an alignment and positioning frame in the preview screen of the touch display. The operator adjusts the position of the packaging box according to the alignment and positioning frame so that the preset collection window in the QR code is within the effective field of view of the macro optical collection module. If the terminal device is equipped with an automatic positioning mechanism, the automatic positioning mechanism can also adjust the collection position according to the positioning pattern and offset.

[0088] The hardware selection in this embodiment can be configured as follows: The macro optical acquisition module uses a macro lens group with a magnification of 10x to 30x, and the image sensor resolution can be set to no less than 2 million pixels, with the acquisition station maintaining a fixed working distance. The dedicated illumination component can use ring-shaped LED illumination with independent inner and outer ring control, where the inner ring illumination is used to enhance bright spots and pore structures in the black module area, and the outer ring illumination is used to improve the visibility of rough edge structures. For laminated packaging boxes or highly reflective labels, a polarizer can be placed in front of the illumination component or lens to reduce the proportion of overexposed pixels caused by local reflections. The embedded processor is used to perform image quality assessment, feature extraction, similarity comparison, and local cache management. The communication module can support wireless or wired network connections to interact with the feature database service.

[0089] Regarding parameter settings, the terminal device can preset the sharpness threshold Tc, texture abundance threshold Th, overexposure ratio threshold Te, underexposure ratio threshold Tu, and judgment threshold Ts. For the black module area of ​​the QR code, Tc can be determined by the sharpness distribution obtained from standard samples at different focal length positions, Th can be determined by the effective texture information entropy distribution in the registered samples, and Te and Tu can be determined based on the allowable proportions of overly bright and overly dark pixels in the image. The comprehensive similarity S can be calculated as S=aSp+bSd+cSe+dSh, where Sp represents the proportion of local salient points matched through spatial consistency verification, Sd represents the descriptor similarity, Se represents the consistency of the ink edge structure, and Sh represents the consistency of texture statistical features. For the black module area of ​​the QR code, a, b, c, and d can be set to 0.35, 0.25, 0.25, and 0.15, respectively; for the paper fiber area, the weight of Sh can be increased; for the laminated area, the weight of edge structure and texture statistical features can be increased based on the reflectivity. The above values ​​are illustrative configurations and can be adjusted according to the material type and sample statistical results during actual implementation.

[0090] After verification begins, the terminal device first reads the QR code encoding information and retrieves the location description. The macro optical acquisition module displays the alignment and positioning frame corresponding to the preset acquisition window on the display interface. The operator aligns the packaging box and triggers acquisition. Before formal imaging, the terminal device performs motion state detection; if the displacement between consecutive preview frames exceeds the preset motion threshold Vm, acquisition is delayed and a prompt to remain still is given; if the displacement is within the allowable range, macro optical imaging is triggered to obtain the queried microscopic texture image. Subsequently, the image quality evaluation module calculates C, H, Re, and Ru, and determines whether C≥Tc, H≥Th, Re≤Te, and Ru≤Tu are satisfied. If not, the terminal device displays the reason for resampling, such as insufficient sharpness, insufficient texture, excessive reflection, or insufficient illumination, and adjusts the illumination, performs refocusing, or prompts the user to reposition the packaging box based on the reason.

[0091] When the queried micro-texture image meets the quality requirements, the terminal device performs consistency processing to obtain a consistent query image. For the black module area of ​​the QR code, position correction can be completed using the QR code positioning pattern, module boundary, and acquisition window position description. The feature extraction and comparison module extracts the set of local salient point positions, the local descriptive subset, and the texture statistical feature vector, and compares them with the registered feature representation. Local salient points can include the center of ink penetration bright spots, pore boundary points, and rough structure points of ink-stained edges. Spatial consistency verification can compare the normalized positional relationship of matching points relative to the QR code module boundary and the QR code positioning direction. Through this processing, even if the QR code encoded content is copied, if the micro-inking structure of the black module area is inconsistent with the registered item, the overall similarity S will still be lower than the judgment threshold Ts.

[0092] When network connectivity is available, the terminal device establishes an encrypted communication connection with the feature database service via the communication module. The communication module performs two-way authentication and generates a timestamp and random number for this verification request. The terminal device encrypts and uploads the item's unique identifier, query feature representation or similarity calculation request, terminal device identifier, and necessary image quality parameters to the feature database service. The feature database service returns the authenticity determination conclusion, similarity comparison result, traceability information, and abnormal status. The result output module displays the conclusions such as genuine product, suspected counterfeit product, unregistered product, or product requiring verification on the touch screen, and simultaneously displays traceability information such as production batch, production date, production line number, factory record, and distribution node. If the server detects abnormal verification frequency or abnormal geographical location, the result output module also displays an abnormal verification alarm.

[0093] When network connectivity is unavailable, the terminal device uses a subset of the feature database and a judgment threshold from its local cache module to complete offline comparison. The local cache module pre-stores registration feature representations, location descriptions, judgment thresholds, and traceability information related to the service point or batch of consumer goods. After completing the local comparison, the terminal device outputs the offline judgment conclusion and saves the verification time, terminal device identifier, item unique identifier, image quality assessment result, overall similarity, and judgment conclusion as an offline verification record. Once network connectivity is restored, the terminal device uploads the offline verification record and receives cache update information from the feature database service. If the server detects multiple abnormal verification records for the same item unique identifier during the offline period, it can output an anomaly alert to the terminal device or management terminal after synchronization.

[0094] In this embodiment, joint authentication of the product and its packaging can be further implemented. For consumer products with inner packaging, outer packaging, and the product itself, the production end can register the microscopic features of the black module area of ​​the QR code on the packaging box and a preset area on the surface of the product, respectively, and establish a binding relationship between the two in the feature database. The verification end first collects the black module area of ​​the QR code on the packaging box, and then collects the preset area on the surface of the product, calculating the similarity of the packaging area and the similarity of the product area. When both meet the corresponding thresholds and the binding relationship is consistent with the registration record, the terminal device outputs a conclusion that the product is genuine. When the packaging area matches but the product area does not, or the product area matches but the packaging area does not, or both match but the binding relationship is inconsistent, the terminal device outputs a binding error or a conclusion requiring review. This process is suitable for scenarios that require preventing the reuse of packaging, the replacement of the product, or the use of duplicate packaging.

[0095] Reference Figure 8 The technical effect comparison diagram is used to illustrate the impact of image quality gating, similarity determination, multi-region fusion, and offline comparison on the verification processing results. Figure 8 The comparative data can come from the same batch of registered items and several unregistered or different individual items as verification samples. For each registered item, multiple verification acquisitions are conducted under standard acquisition conditions, slight defocus conditions, local reflection conditions, slight offset conditions of the acquisition area, and local contamination conditions to form repeated acquisition samples of the same item. For different individual items, items with the same category, the same packaging material, and the same machine-readable coding area morphology are selected, and microscopic texture images of their corresponding areas are acquired to form comparative samples of different items. Each acquisition records the sharpness index C, texture abundance index H, overexposed pixel ratio Re, underexposed pixel ratio Ru, effective number of local salient points, comprehensive similarity S, regional similarity Si, fusion similarity Sf, network status, and final judgment conclusion. Figure 8 The data shown is not required to be limited to a fixed sample size. In specific implementation, the sample size can be determined according to the category of items, the number of data collection devices, and the verification scenario.

[0096] Figure 8 (a) is a schematic diagram comparing the entry of samples into the comparison process before and after image quality gating. The horizontal axis can represent different acquisition states, including standard acquisition, slight defocus, local reflection, underexposure, and acquisition area offset; the vertical axis can represent the proportion or number of images allowed to enter the feature comparison process under the corresponding state. As a comparison, the acquired images without quality gating are directly sent into the feature extraction and comparison process, so images with slight defocus, local reflection, or insufficient texture may still participate in the judgment; the quality gating method of this invention first filters according to the conditions C≥Tc, H≥Th, Re≤Te and Ru≤Tu, and images that do not meet the conditions are guided to be re-acquired. Figure 8 (a) This is used to explain that quality gating does not change the registration features or the judgment threshold, but rather excludes input images that are not suitable for comparison before feature comparison, so that the image samples entering the subsequent process have relatively consistent clarity, texture richness and exposure status.

[0097] Figure 8 (b) is a schematic diagram showing the distribution of intra-class similarity formed by repeated sampling of the same item and inter-class similarity formed by comparison of samples of different items. The horizontal axis can represent the range of values ​​for the overall similarity S, and the vertical axis can represent the sample frequency or normalized density. Figure 8 In (b), the intra-class similarity distribution is obtained by comparing the query feature representation of the same registered item obtained at different times, with different collection times, or under different slight perturbation conditions, with its registered feature representation; the inter-class similarity distribution is obtained by cross-comparing the query feature representation of different items with the target registered feature representation. The judgment threshold Ts is set between the high value region of inter-class similarity and the low value region of intra-class similarity. As can be seen from this sub-figure, the similarity judgment of this invention does not use the consistency of machine-readable codes as the sole criterion, but rather determines the judgment boundary based on the comprehensive similarity distribution of microscopic physical features. When image quality gating and spatial consistency verification are adopted, low-quality perturbation samples in intra-class samples are re-collected or corrected, the intra-class similarity distribution becomes more concentrated, and the setting of the judgment threshold Ts has a clearer data basis.

[0098] Figure 8 (c) is a schematic diagram comparing the similarity stability of single-region determination and multi-region fusion determination under local perturbation conditions. The horizontal axis can represent different perturbation conditions, including no perturbation, slight contamination, partial occlusion, acquisition angle shift, and illumination change; the vertical axis can represent the changes in the similarity S1 of a single region, the similarity S2 of another auxiliary region, and the fusion similarity Sf. As a comparison, single-region determination only compares the similarity of a preset acquisition region with a threshold. When the region has local contamination or occlusion, the similarity may drop to near or below the threshold. Multi-region fusion determination uses the regional similarity of two or more preset acquisition regions simultaneously and calculates the fusion similarity according to Sf=w1S1+w2S2+...+wnSn, while requiring the similarity of key regions to meet a minimum threshold. Figure 8 (c) is used to explain that multi-region fusion is not simply increasing the number of samples, but rather using complementary information from multiple regions under the constraint of the minimum threshold in the key region, so that local contamination, slight occlusion or changes in the sampling angle will not determine the final judgment result solely by fluctuations in a single region.

[0099] Figure 8(d) is a schematic diagram comparing the continuity of verification processing between real-time cloud-based comparison and cloud-based offline comparison combined with local comparison under different network conditions. The horizontal axis represents three states: network available, weak network latency, and network unavailable. The vertical axis represents the completion status index, which is determined by normalizing the verification request completion status, average processing time, and verification record synchronization status. As a comparison, the processing method relying solely on real-time cloud-based comparison cannot complete feature database retrieval and return of judgment results when the network is unavailable. When using the terminal device of this invention, in the network available state, comparison and traceability information return are completed through encrypted communication connection with the feature database service. In the weak network state, request retries or cached records awaiting synchronization can be performed. In the network unavailable state, a locally cached subset of the feature database and judgment threshold can be called to complete local comparison, and offline verification records are uploaded and the local cache is updated after the network recovers. Figure 8 (d) is used to explain that the local cache is not a separate set of judgment rules independent of the cloud database, but a terminal-side execution mechanism formed after the feature database service issues the registered feature representation, judgment threshold and traceability information. Its judgment results are consistent with the cloud comparison rules and the records are kept consistent through the synchronization processing after the network is restored.

[0100] pass Figure 8 (a) to Figure 8 The combined presentation in (d) shows that the technical effect evaluation of this embodiment revolves around four comparative relationships: comparison between image quality gating and direct comparison, comparison between the similarity distribution of the same item and different items, comparison between single-region determination and multi-region fusion determination, and comparison between real-time cloud comparison only and cloud plus local offline comparison. All of the above comparisons are based on the micro-texture images, image quality parameters, similarity calculation results, and verification records collected at the verification end, which can correspondingly illustrate the processing effects of this invention in terms of acquisition quality control, physical feature matching, adaptation to complex acquisition states, and network state adaptation.

[0101] In this embodiment, the machine-readable code on the consumer product packaging box not only serves as a function for reproducing information but also acts as an entry point for locating preset collection areas and retrieving registration records. The terminal device verifies individual items using macro-optical acquisition, image quality gating, and microscopic physical feature comparison, and outputs results based on traceability information and anomaly verification alarms. This application scenario corresponds to the method steps in Embodiment 1, the image quality control in Embodiment 2, the similarity comparison and multi-region joint determination in Embodiment 3, and the terminal device module in Embodiment 4.

[0102] The embodiments of the present invention have been described above with reference to the accompanying drawings, but the above description does not constitute a limitation on the scope of protection of the present invention. For those skilled in the art, equivalent substitutions or adaptive adjustments can be made to the hardware form, communication method, lighting structure, feature extraction method, similarity calculation method, threshold setting method, and result output format of the terminal device without departing from the technical concept of the present invention. Any technical solution based on the verification terminal device described in this invention that achieves unique item identification reading, preset collection area positioning, macro optical acquisition, image quality assessment, feature comparison, traceability output, and anomaly alarm should fall within the scope of protection of this invention.

Claims

1. A method for authenticating and preventing counterfeiting of goods, characterized in that, Applied to anti-counterfeiting and authentication terminal devices, the process includes the following steps: S1, Read the unique identifier of the item to be verified, and determine the preset collection area on the surface of the item based on the location description associated with the unique identifier; S2, the micro-optical acquisition unit of the anti-counterfeiting and authentication terminal device performs microscopic optical imaging on the preset acquisition area to obtain the query microscopic texture image; S3, Before performing feature extraction on the query micro-texture image, perform image quality assessment on the query micro-texture image. The image quality assessment includes sharpness assessment, texture richness assessment and exposure status assessment. S4, when any of the sharpness assessment, texture abundance assessment and exposure status assessment does not meet the corresponding quality conditions, a resampling prompt is generated and the query micro-texture image is blocked from entering the feature comparison processing; S5, when the queried micro-texture image meets the corresponding quality condition, extract the query feature representation and compare the similarity of the query feature representation with the corresponding registered feature representation in the feature database; S6. Output the authenticity determination conclusion based on the similarity comparison result, and output the traceability information associated with the unique identifier of the item.

2. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In step S1, the anti-counterfeiting and authentication terminal device first reads the machine-readable code set on the item body, packaging box, packaging bottle, bottle cap, label or hang tag to obtain the unique identifier of the item or obtain index information for retrieving the unique identifier of the item. Then, it determines the preset collection area according to the location description recorded in the feature database. The location description includes a macro positioning reference, an offset relative to the macro positioning reference, a collection window size and a collection direction. The macro positioning reference is the outline of the item, the packaging boundary, the label boundary, the machine-readable code positioning pattern or the printed pattern boundary. The anti-counterfeiting and authentication terminal device displays an alignment and positioning frame on the display interface, so that the effective field of view of the macro optical acquisition unit corresponds to the preset acquisition area.

3. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In step S2, the macro optical acquisition unit images the preset acquisition area at a magnification of no less than 10 times and provides illumination to the preset acquisition area through a dedicated illumination component. Before acquiring the query micro-texture image, the anti-counterfeiting authentication terminal device performs focus control and motion state detection. When the relative motion speed between the anti-counterfeiting authentication terminal device and the item to be verified is greater than a preset motion threshold, image acquisition is delayed. When the relative motion speed is not greater than the preset motion threshold, image acquisition is triggered. The dedicated illumination component illuminates the preset acquisition area according to a preset illumination mode, so that the paper fibers, ink edges, film textures, processing textures, or micro-scratches on the surface of the item form a micro-texture image that can be used for feature extraction.

4. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In steps S3 and S4, the sharpness assessment obtains a sharpness index C by calculating the Laplacian response variance of the query microtexture image; the texture abundance assessment obtains a texture abundance index H by calculating the grayscale information entropy of the query microtexture image; and the exposure status assessment obtains an exposure status index by calculating the overexposed pixel ratio Re and the underexposed pixel ratio Ru. When C is less than the sharpness threshold Tc, or H is less than the texture abundance threshold Th, or Re is greater than the overexposed ratio threshold Te, or Ru is greater than the underexposed ratio threshold Tu, the query microtexture image is determined to not meet the corresponding quality conditions. When C is not less than Tc, H is not less than Th, Re is not greater than Te, and Ru is not greater than Tu, the query microtexture image is determined to meet the corresponding quality conditions.

5. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In step S5, the query microtexture image that meets the corresponding quality conditions is subjected to region of interest cropping, grayscale conversion, brightness equalization, local contrast enhancement, scale normalization, and position correction to obtain a uniform query image. Local structural information formed by fiber intersections, fiber endpoints, ink penetration bright spots, pore boundaries, rough structures at inkd edges, film shrinkage textures, processing texture directions, or micro-scratches is extracted from the uniform query image, and this local structural information is encoded into a query feature representation. The query feature representation includes a set of local salient point locations, a set of local descriptors, and a texture statistical feature vector. The registered feature representation is formed using a feature composition method corresponding to the query feature representation.

6. The method for anti-counterfeiting and authentication of articles according to claim 5, characterized in that, Step S5's similarity comparison includes local salient point matching, descriptor distance calculation, spatial consistency verification, and comprehensive similarity calculation. In the comprehensive similarity calculation, the comprehensive similarity S is calculated according to S=aSp+bSd+cSe+dSh, where Sp represents the proportion of local salient point matching that passes the spatial consistency verification, Sd represents the descriptor similarity, Se represents the edge structure consistency, Sh represents the texture statistical feature consistency, and a, b, c, and d are weight coefficients, and a+b+c+d=1. When the comprehensive similarity S is not lower than the judgment threshold Ts, a genuine product judgment conclusion is output; when the comprehensive similarity S is lower than the judgment threshold Ts, a suspected counterfeit product, unregistered, or product requiring review judgment conclusion is output. The judgment threshold Ts is determined based on the intra-class similarity distribution obtained from repeated collections of the same item and the inter-class similarity distribution obtained from collections of different items.

7. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In step S5, when the anti-counterfeiting authentication terminal device can establish a network connection with the feature database service, it uploads the query feature representation and receives the similarity comparison result, authenticity judgment conclusion, and traceability information through an encrypted communication connection; when the network connection is unavailable, it calls the feature database subset and judgment threshold pre-cached locally on the anti-counterfeiting authentication terminal device to perform local similarity comparison and temporarily stores the offline verification record in the local storage area; after the anti-counterfeiting authentication terminal device restores the network connection, it uploads the offline verification record to the feature database service and updates the locally cached registration feature representation, judgment threshold, and traceability information according to the synchronization information issued by the feature database service.

8. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In steps S5 and S6, when two or more preset collection areas are set for the same item to be verified, the anti-counterfeiting and authentication terminal device sequentially collects the query micro-texture images of each preset collection area and forms corresponding query feature representations and region similarity Si. The fusion similarity Sf is calculated according to Sf=w1S1+w2S2+...+wnSn, where n represents the number of preset collection areas participating in the verification, wi represents the weight corresponding to the i-th preset collection area, and w1+w2+...+wn=1. When the fusion similarity Sf is not lower than the fusion judgment threshold, and the region similarity of the set key collection area is not lower than the corresponding minimum threshold, the genuine product judgment conclusion is output. When the two or more preset collection areas include the surface area of ​​the product body and the surface area of ​​the packaging container, the anti-counterfeiting and authentication terminal device also verifies whether the binding relationship between the product body and the packaging container is consistent with the registration record in the feature database.

9. The method for anti-counterfeiting and authentication of articles according to claim 1, characterized in that, In step S6, the anti-counterfeiting authentication terminal device records the verification time, verification location, terminal device identifier, item unique identifier, image quality assessment result, similarity comparison result, and judgment conclusion when outputting the authenticity determination conclusion. When the number of verifications of the same item unique identifier within a preset time window exceeds the number threshold, or when the same item unique identifier appears at a verification location at a distance exceeding a preset distance threshold when the time interval is less than the preset time interval, or when the proportion of abnormal judgment conclusions output by the same terminal device within a preset time window exceeds the device abnormality threshold, the anti-counterfeiting authentication terminal device outputs an abnormal verification alarm while outputting the authenticity determination conclusion.

10. A terminal device for authenticating and verifying the authenticity of goods, characterized in that, It includes an identifier reading and positioning module, a macro optical acquisition module, an image quality assessment module, a feature extraction and comparison module, a communication module, a local caching module, and a result output module; The identifier reading and positioning module is used to read the unique identifier of the item to be verified and determine the preset collection area on the surface of the item based on the location description associated with the unique identifier. The macro optical acquisition module is used to perform microscopic optical imaging of the preset acquisition area at a magnification of no less than 10 times to obtain the query microscopic texture image. The image quality assessment module is used to assess the sharpness, texture abundance, and exposure status of the query micro-texture image before feature extraction, and to generate resampling control information when any assessment fails to meet the corresponding quality conditions. The feature extraction and comparison module is used to extract query feature representations from query micro-texture images that meet the corresponding quality conditions, and to compare the similarity of the query feature representations with the registered feature representations. The communication module is used to establish an encrypted communication connection with the feature database service and to perform secure processing of verification requests through two-way authentication, timestamps, and random numbers. The local caching module is used to save a subset of the feature database, the judgment threshold, and offline verification records when the network connection is unavailable; the result output module is used to output the authenticity judgment conclusion, the source information, the re-sampling prompt, and the abnormal verification alarm.