A method and system for preventing counterfeiting of pressed tea based on image features of pressed tea

By constructing a convex knowledge graph and evolutionary model, the problems of image quality and object shape differences in the anti-counterfeiting verification of pressed tea were solved, and high-precision identification and real-time verification were achieved under uncontrollable conditions at the consumer end.

CN122156673APending Publication Date: 2026-06-05HUBEI TEA TERMINAL SUPPLY CHAIN CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUBEI TEA TERMINAL SUPPLY CHAIN CO LTD
Filing Date
2026-03-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the current technology for verifying the authenticity of pressed tea, the vastly different shooting conditions of consumers and the physical changes of tea cakes over time lead to differences in image quality and object shape, which reduces the accuracy of verification.

Method used

By constructing a convex knowledge graph, SIFT key points on the surface of pressed tea are extracted and their spatial adjacency relationships are encoded. Combined with the convex evolution model to simulate morphological changes, multiple possibility templates are generated. Hierarchical matching and geometric consistency verification are used to screen internal points for authenticity judgment and establish a verification result feedback mechanism.

Benefits of technology

It improves the accuracy of identifying aged tea cakes, adapts to uncontrollable shooting conditions at the consumer end, supports real-time processing and offline verification on the device, and builds a digital ID card for tea cakes that can evolve with time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156673A_ABST
    Figure CN122156673A_ABST
Patent Text Reader

Abstract

The application provides a pressed tea anti-counterfeiting method and system based on pressed tea image features, and relates to the field of anti-counterfeiting verification. The method comprises the following steps: obtaining a pressed tea registration image, extracting registration convex touch features in the registration image through a SIFT algorithm, and constructing a convex touch knowledge graph. Based on the convex touch knowledge graph and a convex touch evolution model, a possibility template is generated. The convex touch evolution model is used to simulate the physical form changes of convex touch over time, humidity and aging process. A pressed tea verification image is obtained, verification convex touch features in the verification image are extracted through the SIFT algorithm, and the verification convex touch features are matched with the possibility template and verified for geometric consistency to obtain a matching verification result. The authenticity of the pressed tea is judged based on the matching verification result, and a judgment result is output. The technical problem that the verification image has quality defects and the tea cake itself changes physically over time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of anti-counterfeiting verification, and in particular to an anti-counterfeiting method and system for pressed tea based on the image features of pressed tea. Background Technology

[0002] Image-based anti-counterfeiting technology for pressed tea utilizes the naturally formed, unreplicable textures on the surface of the pressed tea cake as a unique identifier. This technology involves using professional-grade image acquisition equipment to perform high-definition scanning of the tea cake surface under controlled light and standardized shooting angles after the tea is pressed. This captures a detailed texture image, and algorithms extract key feature points to generate a unique digital "tea texture ID," which is stored in the cloud or on the blockchain. Before purchasing or consuming the tea, consumers simply need to take a photo of the tea cake with a mobile device and upload it. Algorithms such as image matching or deep learning compare the texture features of the photographed image with a pre-stored registration template to verify authenticity. This creates an unforgeable digital identity card for each tea cake, shifting the anti-counterfeiting anchor from easily copied external packaging to the product itself.

[0003] However, in actual consumer applications, this technology faces numerous challenges. Consumers use their personal mobile phones for photo verification, and the shooting conditions vary greatly: dim lighting in teahouses can lead to excessive image noise, direct sunlight can cause localized overexposure of the tea cake's surface, and consumers often hold the camera casually, resulting in a distorted perspective view of the tea cake instead of the standard frontal view used during registration. Furthermore, the paper wrapping the tea cake can create complex shadows and reflections in the image due to wrinkles. Additionally, for post-fermented teas like Pu-erh, the time between factory registration and consumer verification often spans months or even years. During this period, moisture, dryness, or natural aging during storage can cause microscopic physical changes on the tea cake's surface, such as altered gaps between the tea leaves due to expansion or the appearance of new fine cracks. Therefore, there is a double gap between the image obtained at the verification end (a low-quality photo affected by equipment quality, lighting, angle, and occlusion) and the image template established at the registration end (a high-definition image under standardized conditions before aging), which has both differences in image quality and differences in object shape over time. This reduces the accuracy of the overall comparison and verification, making it impossible to accurately identify counterfeit products. Summary of the Invention

[0004] This application provides a method and system for anti-counterfeiting of pressed tea based on the image features of pressed tea, which solves the technical problems of existing technology where the verification image has quality defects and the tea cake itself undergoes physical changes over time.

[0005] To achieve the above objectives, this application adopts the following technical solution: Firstly, a method for preventing counterfeiting of compressed tea based on image features includes: acquiring a registered image of the compressed tea; extracting registered convex features from the registered image using the SIFT algorithm; constructing a convex knowledge graph to characterize the convex features on the surface of the compressed tea and their spatial adjacency relationships; generating a possibility template based on the convex knowledge graph and a convex evolution model, whereby the convex evolution model simulates the physical morphological changes of convex features over time, humidity, and aging; acquiring a verification image of the compressed tea; extracting verification convex features from the verification image using the SIFT algorithm; matching and verifying the geometric consistency of the verification convex features with the possibility template to obtain a matching verification result; and determining the authenticity of the compressed tea based on the number and proportion of inliers that pass the matching verification result, and outputting the determination result.

[0006] In conjunction with the first aspect mentioned above, in one possible implementation, the process of extracting registered convex features from a registered image using the SIFT algorithm specifically includes: acquiring a registered image of pressed tea; constructing a Gaussian pyramid in parallel using a SIFT acceleration chip and detecting extrema in scale space; extracting key points from the registered image of pressed tea; and defining key points as uniquely identified convex primitive units, which are scale-invariant and rotation-invariant. The convex primitive units are then located and edge response is removed. Registered convex features with stability exceeding a preset stability threshold are selected to generate registered convex features. These registered convex features include their position coordinates, scale factor, principal direction, and a 128-dimensional SIFT descriptor.

[0007] In conjunction with the first aspect mentioned above, in one possible implementation, the process of constructing a convex touch knowledge graph specifically includes: designating the original convex touch units as graph vertices, obtaining the position coordinates of the graph vertices, and calculating the spatial Euclidean distance between any two graph vertices. Obtaining a preset spatial adjacency threshold and spatial Euclidean distance, constructing spatial adjacency edges between corresponding graph vertices; these spatial adjacency edges are used to characterize the microscopic texture topology of the pressed tea surface. Using all graph vertices and all spatial adjacency edges as graph edges, and combining them with registered convex touch features, constructing a convex touch knowledge graph. Obtaining the registration timestamp and registration environment parameters of the registered convex touch features, and embedding them into the corresponding graph vertices in the convex touch knowledge graph.

[0008] In conjunction with the first aspect mentioned above, in one possible implementation, the construction process of the convex touch evolution model specifically includes: acquiring a historical convex touch dataset, which contains registered convex touch features collected from the same pressed tea at different time points and under different environmental humidity levels. Based on the historical convex touch dataset, a convex touch evolution model is constructed, which includes a time evolution sub-model, a humidity response sub-model, and an aging perturbation sub-model. The time evolution sub-model adopts a long short-term memory network architecture, taking the initial state vector of the registered convex touch features in the historical convex touch dataset and the evolution time difference as input, to predict the positional drift and scale change within a preset window. The humidity response sub-model adopts a multilayer perceptron architecture, taking the original 128-dimensional SIFT descriptors of the registered convex touch features in the historical convex touch dataset and the current environmental humidity as input, to generate a humidity-adjusted descriptor vector. The aging perturbation sub-model adopts a variational autoencoder architecture to learn the uncertainty probability distribution of the registered convex touch features in the historical convex touch dataset during the natural aging process.

[0009] In conjunction with the first aspect mentioned above, in one possible implementation, the process of generating the probability template specifically includes: extracting registered convex features, registration timestamps, and registration environment parameters from the convex knowledge graph, and obtaining verification timestamps and verification environment humidity. The registered convex features, registration timestamps, and verification timestamps are input into the convex evolution model. A time evolution sub-model predicts the positional drift and scale change of each registered convex feature within a preset time window, outputting the time evolution state. The time evolution sub-model employs a long short-term memory network architecture. The original 128-dimensional SIFT description of the registered convex features, conforming to the verification environment humidity, is input into the convex evolution model. A humidity response sub-model outputs the humidity response state, employing a multilayer perceptron architecture. The registered convex features are input into the convex evolution model. A aging perturbation sub-model learns the probability distribution of natural aging uncertainty, outputting the aging perturbation state. The aging perturbation sub-model employs a variational autoencoder architecture. Based on the verification timestamps and verification environment humidity, the time evolution state, humidity response state, and aging perturbation state are fused and analyzed to obtain the predicted convex features. By combining predicted convex features with graph vertices and spatial adjacent edges in the convex knowledge graph, possible templates for different evolutionary stages are constructed.

[0010] In conjunction with the first aspect mentioned above, one possible implementation involves matching and verifying the geometric consistency of verification convex features with the possibility templates. Specifically, this includes: acquiring verification convex features and loading possibility templates in priority order; employing a fast nearest neighbor search algorithm to calculate the Euclidean distance between the feature descriptors of each verification convex feature and the convex features in the possibility templates, and filtering candidate matching pairs; based on the candidate matching pairs, employing an asymptotic consistent sampling algorithm to calculate the geometric transformation model between the verification image and the possibility templates; by calculating the reprojection error of all candidate matching pairs under the geometric transformation model, marking inliers and recording the number and proportion of inliers; extracting the graph vertices corresponding to the inliers in the original convex knowledge graph and the spatial adjacency edges between these vertices, and constructing an inlier topological subgraph; constructing a verification topological subgraph based on the position coordinates of the verification convexes corresponding to the inliers; verifying the topological similarity between the verification topological subgraph and the inlier topological subgraph to obtain the matching verification result.

[0011] In conjunction with the first aspect mentioned above, in one possible implementation, the process of determining the authenticity of pressed tea based on the number and proportion of inner points that pass the matching verification result, and outputting the determination result, specifically includes: obtaining the matching verification result and loading a preset dual determination threshold. The matching verification result includes the number and proportion of inner points, and the dual determination threshold includes a minimum inner point number threshold and an inner point proportion threshold. The matching verification result and the dual determination threshold are compared and judged to obtain the determination result.

[0012] In conjunction with the first aspect mentioned above, one possible implementation also includes an optimization process for the convex touch evolution model, specifically comprising: receiving matching verification results, which include verified convex touch features, successfully matched probability templates, and corresponding inlier-point matching correspondences; calculating the difference between the verified convex touch features and their corresponding convex touch features in the probability templates based on the inlier-point matching correspondences, as the true evolutionary deviation; obtaining the registration timestamp and registration environment parameters corresponding to the verified convex touch features, as well as the verification timestamp and verification environment humidity, as evolutionary context features, and constructing model optimization sample pairs; and inputting the model optimization sample pairs into the convex touch evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model, and aging perturbation sub-model.

[0013] Secondly, a system for preventing counterfeiting of compressed tea based on image features is provided, comprising: a convex touch knowledge graph construction unit, used to acquire registered images of compressed tea, extract registered convex touch features from the registered images using the SIFT algorithm, and construct a convex touch knowledge graph; a possibility template generation unit, used to generate possibility templates based on the convex touch knowledge graph and a convex touch evolution model; a comparison and verification unit, used to acquire verification images of compressed tea, extract verification convex touch features from the verification images using the SIFT algorithm, and match and perform geometric consistency verification between the verification convex touch features and the possibility templates to obtain a matching verification result; and a authenticity determination unit, used to determine the authenticity of the compressed tea based on the number and proportion of inliers passing the matching verification result, and output the determination result.

[0014] In conjunction with the second aspect mentioned above, one possible implementation also includes a feedback module for feeding back the matching verification results to the convex touch evolution model to optimize the model. Specifically, the feedback module includes: receiving the matching verification results, which contain the verified convex touch features, the successfully matched probability templates, and the corresponding inlier-point matching relationships; calculating the difference between the verified convex touch features and their corresponding convex touch features in the probability templates based on the inlier-point matching relationships, as the actual evolutionary deviation; obtaining the registration timestamp and registration environment parameters corresponding to the verified convex touch features, as well as the verification timestamp and verification environment humidity, as evolutionary context features, and constructing model optimization sample pairs; and inputting the model optimization sample pairs into the convex touch evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model, and aging perturbation sub-model.

[0015] This application provides a method and system for anti-counterfeiting of compressed tea based on image features. By constructing a convex knowledge graph, SIFT key points on the surface of compressed tea are defined as registered convex features with lifecycles, and their spatial adjacency relationships are encoded. This allows for the structured expression and traceable management of the micro-texture features of the tea cake, solving the problem that traditional methods treat tea cake texture as a static and isolated feature, which cannot support evolutionary analysis. This lays a data foundation for subsequent dynamic modeling. Simultaneously, by introducing a convex evolution model, the changes in convex morphology are modeled and predicted through three parallel paths: time evolution, humidity response, and aging perturbation. This generates multi-possibility templates covering various possible states of the tea cake, effectively overcoming the matching failure problem caused by the evolution of physical morphology over time due to the post-fermentation characteristics of tea. This enables the verification system to adapt to tea aged for more than ten years. Simultaneously, a hierarchical matching architecture is adopted, performing sequential matching and geometric consistency verification between the convex features of the verification image and multiple possibility templates. The RANSAC algorithm is used to filter interior points and a secondary verification based on topological consistency is introduced to improve the robustness of matching under uncontrollable shooting conditions at the consumer end (such as insufficient lighting, tilted angles, and occlusion by cotton paper), increasing the angle tolerance. Finally, authenticity is determined by dual thresholds of the number and proportion of interior points, and a verification result feedback mechanism is established to achieve model self-optimization, improving the accuracy of identifying aged tea cakes. It also supports real-time processing and offline verification on the device side, creating a digital identity card for each tea cake that evolves over time. Attached Figure Description

[0016] Figure 1 A flowchart illustrating an anti-counterfeiting method for pressed tea based on image features of pressed tea, provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of obtaining a registered image of pressed tea, extracting registered convex features from the registered image using the SIFT algorithm, and constructing a convex knowledge graph in an anti-counterfeiting method based on pressed tea image features provided in this application embodiment. Figure 3 This is a flowchart illustrating the step of generating a probabilistic template based on a convex knowledge graph and a convex evolution model in an anti-counterfeiting method for pressed tea based on image features provided in this application embodiment. Figure 4 This is a flowchart illustrating the steps in an anti-counterfeiting method for pressed tea based on pressed tea image features provided in this application embodiment, which involves matching and geometrically consistent verifying the verification of convex features with a probability template to obtain the matching verification result. Figure 5 A flowchart illustrating the optimization process of the convex evolution model of an anti-counterfeiting method for pressed tea based on image features provided in this application embodiment; Figure 6This is a schematic diagram of the structure of an anti-counterfeiting system for pressed tea based on the image features of pressed tea, provided in an embodiment of this application. Detailed Implementation

[0017] like Figure 1 As shown in the embodiment of this application, a method for preventing counterfeiting of pressed tea based on the image features of pressed tea is provided, including: Step 101: Obtain the registration image of the pressed tea, extract the registered convex features in the registration image using the SIFT algorithm, and construct a convex knowledge graph.

[0018] Among them, convex touches refer to key points with uniqueness, stability, and repeatable detection extracted from the surface image of pressed tea using a scale-invariant feature transformation algorithm. Each convex touch corresponds to a microscopic physical protrusion or texture feature point on the surface of the tea cake and is regarded as an anti-counterfeiting unit with a life cycle. The convex touch knowledge graph is a graph-based data model. Each convex touch is a node, and the spatial adjacency relationships, potential evolutionary associations, and historical matching records between convex touches are edges. All convex touch information and their complex relationships are organized and stored in the form of an attribute graph.

[0019] In some implementations, high-resolution registered images of pressed tea are acquired using specialized image acquisition equipment under controlled lighting and standardized angles. A scale-invariant feature transform algorithm is then used to perform multi-scale spatial extremum detection on the image, precisely locating scale- and rotation-invariant convex keypoints in the image. This generates a 128-dimensional descriptor vector for each convex point, representing the gradient distribution information in its neighborhood.

[0020] Simultaneously, each convex is defined as a node in the knowledge graph, with attributes including coordinate position, scale, main direction, descriptor, and timestamp and environmental parameters at the time of registration. This allows for the direct calculation of the spatial Euclidean distance between any two convexes. If this distance is less than a preset spatial adjacency threshold, a spatial adjacency edge is constructed between them to reflect the local texture structure.

[0021] Ultimately, a complete and structured convex knowledge graph is constructed by combining all registered convex features and their attributes, as well as spatial adjacency edges, and stored in a database, thus establishing an evolvable digital identity for pressed tea.

[0022] Step 102: Generate possibility templates based on the convexity knowledge graph and convexity evolution model.

[0023] The convexity evolution model is a machine learning-based computational model used to simulate and predict the physical morphological changes of the convexities on the surface of compressed tea over time, due to changes in environmental humidity and natural aging. It typically includes three sub-models: time evolution, humidity response, and aging perturbation. The probability template refers to multiple sets of convexity features predicted by the convexity evolution model based on the initial convexity state in the convexity knowledge graph. Each template represents the possible convexity morphology of the tea cake at a specific time and under specific environmental conditions, and is used for matching with the verification image.

[0024] In some implementations, by obtaining the environmental parameters (including timestamp, ambient humidity, etc.) attached to the current verification request, a pre-built convex evolution model can be invoked to predict the evolution of each registered convex feature in the convex knowledge graph through three parallel paths: The temporal evolution path uses a long short-term memory network to predict the positional drift and scale change of the convex based on the difference between the registration time and the verification time. The humidity response path uses a multilayer sensor to adjust the descriptor vector of the convex according to the current humidity. The aging perturbation path employs a variational autoencoder to learn the probability distribution of convex changes and generate possible random perturbation patterns.

[0025] Finally, the outputs of the three paths are weighted and integrated through an attention fusion mechanism to generate multiple possible evolutionary states for each convex. Then, the template priorities are dynamically sorted according to the current environmental parameters to generate a list containing five to ten possible templates. Each template is a complete convex feature set obtained after evolutionary prediction of the original registered convex set, and is stored in the template library for subsequent matching decision layer to call.

[0026] Step 103: Obtain the verification image of the pressed tea, extract the verification convex features in the verification image using the SIFT algorithm, and perform matching and geometric consistency verification between the verification convex features and the probability template to obtain the matching verification result.

[0027] Among them, verifying convex features refers to the set of convex key points extracted from the pressed tea verification image taken by the consumer using a scale-invariant feature transformation algorithm. Each convex feature also includes position coordinates, scale, principal direction, and a 128-dimensional descriptor. Geometric consistency verification is a verification method based on the random sampling consistency algorithm and its improved algorithms. It is used to verify whether two sets of convex feature features originate from the same physical entity by calculating the geometric transformation model (such as the homography matrix) between matching point pairs based on the preliminary feature matching. This allows for the selection of interior point matching pairs that conform to the geometric transformation and the elimination of exterior points that do not conform to the geometric constraints.

[0028] In some implementations, a verification image of the pressed tea is first acquired using the user's mobile terminal's camera. Then, an integrated scale-invariant feature transform (SIN) acceleration chip is used to extract verification convex features from the image in real time, resulting in a set of verification convex features including position, scale, orientation, and descriptors. Subsequently, a multi-possibility template list is loaded, and matching and verification are performed sequentially according to priority.

[0029] For the currently selected potential template, the Fast Nearest Neighbor Search Library algorithm is used to perform feature matching between the template convex set and the validation convex set, and a ratio test threshold (e.g., 0.7) is applied to filter high-quality matching pairs and eliminate fuzzy matches.

[0030] After obtaining the initial matching pairs, the geometric consistency verification stage is entered: the progressive consistent sampling algorithm is used to first randomly sample four pairs of matching points from the high-quality matching pairs to calculate the candidate homography matrix. Then, the reprojection error of all matching pairs under the homography matrix is ​​calculated. Matching pairs with errors less than a preset number of pixels are marked as inliers. The Levenberg-Marquardt algorithm is used to locally optimize the inlier set to refine the homography matrix.

[0031] After completing the geometric verification, a secondary verification of the topological consistency of the convex touch graph is performed to check whether the spatial adjacency relationship of the interior point matching pairs remains consistent in the original convex touch knowledge graph.

[0032] After traversing all possible templates, record the number and proportion of interior points obtained in each verification as the final matching verification result.

[0033] Step 104: Based on the number and proportion of inner points that pass the matching verification result, determine the authenticity of the pressed tea and output the determination result.

[0034] In this context, interior points refer to matching point pairs that conform to the calculated geometric transformation model (such as homography matrix) in geometric consistency verification. The reprojection error of these point pairs is less than a preset threshold, representing a convex point that accurately matches the verification image and the probability template.

[0035] The determination process includes: obtaining the matching verification result and loading a preset dual determination threshold. The matching verification result includes the number of inliers and the proportion of inliers, while the dual determination threshold includes a minimum inlier number threshold and an inlier proportion threshold. The matching verification result and the dual determination threshold are compared and judged to obtain the determination result.

[0036] In some implementations, obtaining the matching verification results containing the number and proportion of inliers in this verification allows invoking preset dual judgment thresholds: a minimum inlier count threshold (preset to 15) and an inlier proportion threshold (preset to 0.35). The judgment logic is then executed as follows: Determine if the number of interior points is greater than or equal to the minimum threshold for the number of interior points; otherwise, directly determine it as a counterfeit. If the number of inliers meets the standard, then it is further determined whether the proportion of inliers is greater than or equal to the inlier proportion threshold.

[0037] The pressed tea is determined to be genuine only when the number of inner dots and the proportion of inner dots simultaneously meet or exceed the preset threshold. If the number of inner dots meets the standard but the proportion of inner dots is insufficient, or if the number of inner dots themselves is insufficient, then it is judged as a counterfeit product.

[0038] After the determination is completed, the determination result can be encapsulated and output to the application layer client. At the same time, the matching results of this verification (including the distribution of interior points and the actual matching convex contact correspondence) are recorded, ready to be fed back to the convex contact evolution model for subsequent optimization.

[0039] When outputting the judgment results, a visual verification report is also generated, which displays the distribution of matching intrapoints, the corresponding convex lines, and the final matching confidence score in the user interface.

[0040] Based on the above technical solution, by constructing a convex knowledge graph, SIFT key points on the surface of pressed tea are defined as registered convex features with lifecycles, and their spatial adjacency relationships are encoded. This enables the structured expression and traceable management of the micro-texture features of the tea cake, solving the problem that traditional methods treat tea cake texture as static and isolated features, which cannot support evolutionary analysis, and laying a data foundation for subsequent dynamic modeling. Simultaneously, by introducing a convex evolution model, the convex morphological changes are modeled and predicted through three parallel paths: time evolution, humidity response, and aging perturbation. This generates multi-possibility templates covering various possible states of the tea cake, effectively overcoming the matching failure problem caused by the physical morphology evolving over time due to the post-fermentation characteristics of tea, enabling the verification system to adapt to tea aged for more than ten years. Furthermore, a hierarchical matching architecture is adopted, performing sequential matching and geometric consistency verification between the convex features of the verification image and the multi-possibility templates. The RANSAC algorithm is used to filter interior points, and a secondary topological consistency verification is introduced to improve the matching robustness under uncontrollable shooting conditions at the consumer end (such as insufficient lighting, angle tilt, and cotton paper occlusion), increasing the angle tolerance. Ultimately, the authenticity of tea cakes is determined by a dual threshold of the number and proportion of internal points, and a verification result feedback mechanism is established to achieve model self-optimization, thereby improving the recognition accuracy of aged tea cakes. At the same time, it supports real-time processing and offline verification on the device side, creating a digital identity card for each tea cake that can evolve with time.

[0041] In another possible implementation of the embodiments of this application, combined with Figure 1-2As shown, obtaining the registration image of pressed tea and extracting the registered convex features from the registration image using the SIFT algorithm to construct a convex knowledge graph can be achieved through the following steps 201 to 206, which are explained in detail below: Step 201: Obtain the pressed tea registration image. Through the construction of parallel Gaussian pyramids and the detection of scale space extrema points using the SIFT acceleration chip, extract the key points of the pressed tea registration image and define the key points as convex primitive units with unique identifiers. The key points have scale invariance and rotation invariance.

[0042] The SIFT acceleration chip is an application-specific integrated circuit (ASIC) that integrates a parallel processing unit specifically designed for high-speed execution of each computational stage of the scale-invariant feature transform algorithm. The key point is that, based on extreme points, the final image feature points, after precise localization, edge response culling, and orientation assignment, possess scale and rotation invariance, ensuring repeated detection under different shooting conditions.

[0043] In some implementations, the pressed tea registration image is input into a SIFT acceleration chip. The chip then uses a parallelized hardware architecture to simultaneously initiate the construction of the Gaussian pyramid and the detection of scale-space extrema. Multiple computing units in the chip perform Gaussian blur and downsampling operations at different scales on the image in parallel to quickly generate a complete image Gaussian pyramid.

[0044] Another set of parallel detection units synchronously traverses each pixel in the pyramid, comparing it with 26 neighboring pixels in the same and adjacent layers above and below, filtering out all potential scale-space extrema. At this point, the extrema can be preliminarily defined as a uniquely identified convex primitive unit, ensuring that the extracted keypoints retain their position and descriptive information regardless of image scaling or rotation, thus providing reliable basic feature units for subsequent convex knowledge graph construction.

[0045] For example, after a Pu-erh tea cake is pressed in the factory, its surface is placed under a dedicated image acquisition device for its first high-definition photograph, generating a registration image. This image is then sent to an anti-counterfeiting system integrated with a SIFT acceleration chip.

[0046] The 128 computational cores inside the chip immediately begin working in parallel: some cores are responsible for constructing the Gaussian pyramid of the image, while others search for extreme points in parallel within each layer of the pyramid. For example, on the edge of a noticeably raised strip on the surface of a tea cake, a point is found at its corresponding pixel location. The brightness value of this point is significantly higher than that of its surrounding pixels across multiple scales, and therefore it is initially marked as a convex primitive unit. This point is assigned a unique identifier, and its location coordinates, scale, and principal direction calculated from the neighborhood gradient are all recorded, thus being designated as a convex primitive unit with scale and rotation invariance.

[0047] Step 202: Locate and remove edge responses from the original convex units, filter registered convex features whose stability exceeds the preset stability threshold, and generate registered convex features. The registered convex features include their position coordinates, scale factor, principal direction, and 128-dimensional SIFT descriptor.

[0048] Edge response culling involves using a Hessian matrix constructed based on the Harris corner detection principle to calculate the principal curvature ratio at keypoints. A threshold is then set to remove unstable points located at image edges with excessively high principal curvature ratios. The preset stability threshold is a pre-defined set of parameters used to filter keypoints, including a minimum contrast threshold and an edge principal curvature ratio threshold. This ensures that the final retained registered convex features have high repeatability and anti-interference capabilities. Registered convex features refer to the high-quality set of registered convex features retained after precise localization and edge response culling. Each node contains complete location coordinates, scale factor, principal direction, and 128-dimensional SIFT descriptor information.

[0049] In some implementations, for each initially detected convex primitive unit, its precise sub-pixel coordinates (x, y) in the image coordinate system and its precise scale value σ in the Gaussian pyramid are calculated using a three-dimensional quadratic function fitting. Simultaneously, the contrast value at that location is calculated: if the contrast is lower than a preset minimum contrast threshold (usually set to 0.03), the point is determined to be a low-contrast unstable point and is discarded.

[0050] The retained points can then be obtained, and the two eigenvalues ​​α and β of the Hessian matrix at those points can be calculated. The ratio of the square of the trace to the determinant can then be used to determine the eigenvalues. Measure the principal curvature ratio: When the ratio exceeds the preset edge threshold (usually set to 10), it indicates that the point is located in the edge area of ​​the image and is susceptible to noise interference, so it should be removed.

[0051] The final retained registered convex features, which meet the stability requirements, can be assigned a unique identifier to each feature point and record its complete attribute information, including the precise location coordinates (x,y), scale factor σ, principal direction θ obtained based on the neighborhood gradient histogram, and a 128-dimensional SIFT descriptor vector generated by calculating the gradient accumulation values ​​of 16 sub-regions in the neighborhood of the feature point and 8 directions in each sub-region.

[0052] It should be noted that the 3D quadratic function fitting is obtained by performing a Taylor expansion on the detected extreme points and their adjacent pixels, thus improving the localization accuracy of feature points from the pixel level to the sub-pixel level. The principal curvature ratio calculation in edge response culling is essentially a processing of the eigenvalues ​​of the Hessian matrix. A larger ratio indicates that the point is closer to a straight line edge and has poorer stability.

[0053] For example, suppose a protruding primitive unit located on the edge of the strip is initially detected in the tea cake registration image. Subpixel localization can be performed on this point. By fitting a three-dimensional quadratic function, its precise coordinates are found to be at (156.3, 89.7) pixels with a scale value of 4.2. However, the calculated contrast value is only 0.02, which is lower than the preset threshold of 0.03. Therefore, this point is rejected due to its low contrast.

[0054] Another point located at the top of the ridge has precise coordinates (234.6, 567.2), a scale of 3.8, and a contrast of 0.15, meeting the contrast requirements. Edge response culling was then performed on this point, and its Hessian matrix yielded a principal curvature ratio of 4.5, lower than the preset threshold of 10, indicating that the point is located in a stable texture region rather than an edge. This point was ultimately retained as a registered convex feature, and its precise coordinates (234.6, 567.2), scale of 3.8, and principal direction of 45° were recorded. Based on the gradient information of its surrounding 16×16 pixel neighborhood, a 128-dimensional descriptor vector [0.12, 0.05, 0.23, ...] was generated, consisting of 16 sub-regions, each with 8 directional gradient sums, to uniquely identify the local texture feature of this convex.

[0055] Step 203: Denote the original convex unit as a graph vertex, obtain the position coordinates of the graph vertex, and calculate the spatial Euclidean distance between any two graph vertices.

[0056] In some implementations, each convex primitive unit is instantiated in computer memory as a graph vertex in a knowledge graph, and each vertex is assigned a globally unique identifier and indexed and associated with its corresponding registered convex feature data. This allows traversal of all generated graph vertices, directly reading the precise position coordinates of each vertex from its associated data; these coordinates are typically floating-point (x, y) pixel coordinates.

[0057] Start a double-loop calculation module. For any two distinct graph vertices, for example, vertex A [coordinates ( , )] and vertex B [coordinates ( , [ ], through mathematical formulas The spatial Euclidean distance between them is calculated in real time, and the calculated distance value is used as the raw data for measuring the relationship between the two vertices and temporarily stored in the system's computing cache.

[0058] Step 204: Obtain the preset spatial adjacency threshold and spatial Euclidean distance, and construct spatial adjacency edges between the corresponding graph vertices. The spatial adjacency edges are used to characterize the micro-texture topology of the pressed tea surface.

[0059] The spatial adjacency threshold is a preset numerical parameter used to define whether two graph vertices are physically adjacent. Its value is usually set based on image resolution and the scale characteristics of the pressed tea surface texture. A spatial adjacency edge, in graph theory and knowledge graph construction, refers to an undirected edge established between two graph vertices when the spatial Euclidean distance between them is less than or equal to the preset spatial adjacency threshold. This edge represents the microscopic geometric proximity of two convex features on the pressed tea surface. The microtexture topology refers to the networked organization of numerous registered convex features and their spatial adjacency relationships, describing the distribution pattern and connection mode of the pressed tea surface texture features.

[0060] In some implementations, a pre-set spatial adjacency threshold parameter is first read from the configuration file (usually dynamically adjusted according to the resolution of the pressed tea registration image). For example, for a 10-megapixel tea cake image, the threshold can be preset to 50 pixels to reasonably reflect the local correlation range of micro-texture.

[0061] This involves iterating through all previously calculated graph vertex pairs and their corresponding Euclidean distance values, and performing a numerical comparison for each pair of graph vertices. If the calculated spatial Euclidean distance is less than or equal to the preset spatial adjacency threshold, a spatial adjacency edge is created between the two vertices in the knowledge graph's data structure, and a unique edge identifier is assigned to the edge, along with the IDs of the two connected vertices. Otherwise, if the distance is greater than the threshold, no connection is established.

[0062] Step 205: Using all graph vertices and all spatially adjacent edges as graph edges, and combining them with registered convex features, construct a convex knowledge graph.

[0063] In some implementations, an empty graph structure instance is created in memory or a graph database, ready to receive vertex and edge data. When traversing all defined graph vertices, each vertex and its associated unique identifier are inserted into the graph structure, and the corresponding registered convex feature data is appended to the vertex as a key-value pair.

[0064] After inserting all vertices, continue traversing all previously constructed spatial adjacency edges. For each edge connecting vertex A and vertex B, create an undirected edge (or two directed edges in opposite directions) from vertex A to vertex B in the graph structure and store the edge's unique identifier and any additional relational attributes (such as creation timestamps).

[0065] Through the above operations, all graph vertices and all spatially adjacent edges are fully integrated into the same graph structure, ultimately forming a complete convexity knowledge graph. At this point, each vertex in the graph carries rich convexity feature information, while each edge explicitly expresses the spatial topological relationship between vertices, representing the formal modeling and persistent storage of the micro-texture features and organizational structure of the pressed tea surface.

[0066] Step 206: Obtain the registration timestamp and registration environment parameters of the registered convex features, and embed them into the corresponding graph vertices in the convex knowledge graph.

[0067] Among them, the registration environment parameters refer to the set of environmental physical quantity data synchronously recorded by various sensors deployed on the acquisition device when collecting the registration image of pressed tea. These parameters usually include parameters such as ambient temperature, ambient humidity, and light intensity.

[0068] In some implementations, the precise registration timestamp and synchronously recorded environmental parameters such as ambient temperature, humidity, and light intensity are obtained from the system clock and sensor module of the image acquisition device. This allows for the traversal of all graph vertices in the convexity knowledge graph. For each completed graph vertex, the acquired registration timestamp is written as a new attribute key-value pair into the vertex's attribute set via the graph database's vertex update interface. Simultaneously, the acquired environmental parameters such as ambient temperature, humidity, and light intensity are also written as independent attribute key-value pairs into the same graph vertex's attribute region. By repeatedly performing this attribute embedding operation for each graph vertex, each vertex in the convexity knowledge graph is ultimately associated with its acquisition time information and environmental background information. These embedded attribute data, along with the original location coordinates, scale factors, descriptors, and other registered convexity features, constitute a complete lifecycle file for each registered convexity feature.

[0069] Based on the above technical solution, by utilizing a SIFT acceleration chip to extract scale- and rotation-invariant key points as convex touch primitive units in parallel, the problem of unstable and repetitive feature detection caused by tilted shooting angles and image scaling in consumer-end cameras is solved, improving the real-time performance and consistency of feature extraction. Combined with precise localization and edge response removal of the convex touch primitive units, registered convex touch features with stability exceeding a preset threshold are selected and generated, containing position, scale, orientation, and a 128-dimensional descriptor. This effectively eliminates unstable edge points susceptible to noise interference, ensuring the uniqueness and long-term reproducible recognition of the features in the database. Simultaneously, the registered convex touch features are abstracted as graph vertices, and the spatial Euclidean distance between them is calculated. Spatial adjacency edges are constructed based on a preset spatial adjacency threshold, thus organizing isolated convex touch feature points into a network relationship that can characterize the micro-texture topology of the pressed tea surface. This solves the technical deficiency of traditional methods that treat tea cake texture as an isolated set of points and cannot utilize its spatial structure information for constraint verification. Finally, based on all graph vertices and spatially adjacent edges, a convex touch knowledge graph is constructed by combining complete registered convex touch features. Registration timestamps and environmental parameters are embedded into corresponding vertices, ensuring that each registered convex touch feature is associated with the spatiotemporal background information at the time of its acquisition. This upgrades the knowledge graph from static image feature points to evolvable units carrying spatiotemporal attributes. This not only provides a data foundation and initial state benchmark for subsequent convex touch evolution modeling but also gives each tea cake dynamic digital data that can be updated over time. This solves the matching failure problem caused by the physical morphological evolution due to the post-fermentation characteristics of tea, achieving full lifecycle anti-counterfeiting management from source registration to consumer verification.

[0070] In another possible implementation of the embodiments of this application, combined with Figure 1-3As shown, based on the convex knowledge graph and convex evolution model, a possibility template is generated, which can be achieved through the following steps 301 to 306, as explained in detail below: The construction process of the convex touch evolution model specifically includes: acquiring a historical convex touch dataset, which contains registered convex touch features collected from the same pressed tea at different time points and under different environmental humidity levels. Based on the historical convex touch dataset, a convex touch evolution model is constructed, which includes a time evolution sub-model, a humidity response sub-model, and an aging perturbation sub-model. The time evolution sub-model adopts a long short-term memory network architecture, taking the initial state vector of the registered convex touch features in the historical convex touch dataset and the evolution time difference as input, to predict the positional drift and scale change within a preset window. The humidity response sub-model adopts a multilayer perceptron architecture, taking the original 128-dimensional SIFT descriptors of the registered convex touch features in the historical convex touch dataset and the current environmental humidity as input, to generate a humidity-adjusted descriptor vector. The aging perturbation sub-model adopts a variational autoencoder architecture to learn the uncertainty probability distribution of the registered convex touch features in the historical convex touch dataset during the natural aging process.

[0071] Step 301: Extract registered convex features, registration timestamps, and registration environment parameters from the convex knowledge graph, and obtain the verification timestamps and verification environment humidity.

[0072] The verification timestamp is the specific moment recorded by the mobile terminal system clock when the consumer initiates the verification request, used to quantify the time span from registration to verification of the tea cake. The verification environment humidity is the relative humidity value of the environment collected in real time by the terminal's built-in humidity sensor, reflecting the humidity status of the storage environment in which the tea cake is located at the time of verification.

[0073] In some implementations, when a consumer initiates a verification request via a mobile device, the system obtains a verification timestamp generated by the terminal's system clock and the real-time humidity of the verification environment collected by the terminal's humidity sensor. Subsequently, based on the unique identifier ID of the pressed tea, the system retrieves the convex knowledge graph constructed during the registration phase from the cloud database. By traversing all vertices in this knowledge graph, the system extracts the registration convex feature data associated with each vertex, including its precise location, scale, and 128-dimensional descriptor. Simultaneously, it extracts the pre-embedded registration timestamp and registration environment parameters (such as temperature and humidity at the time of registration) from each vertex's attributes. This allows for the aggregation of static registration baseline data and dynamic verification environment data into memory.

[0074] Step 302: Input the registered convex features, registration timestamp, and verification timestamp into the convex evolution model. Predict the positional drift and scale change of each registered convex feature within a preset time window using the time evolution sub-model, and output the time evolution state. The time evolution sub-model adopts a long short-term memory network architecture.

[0075] The temporal evolution sub-model is a core component of the convex feature evolution model. It primarily employs a long short-term memory (LSTM) network architecture to learn and predict the positional drift and scale changes of convex features over time. The preset time window refers to the maximum time span parameter set to control the prediction range, ensuring the model performs evolutionary predictions within a reasonable timeframe. Positional drift is the two-dimensional coordinate offset of the convex on the tea cake surface caused by physical changes such as post-fermentation, shrinkage, and expansion of the tea leaves. Scale change is the change in scale value in the Gaussian difference scale space caused by variations in texture coarseness. The temporal evolution state is the prediction result output by the temporal evolution sub-model, containing the predicted position and scale information of each convex after temporal evolution.

[0076] In some implementations, each registered convex feature is extracted from the convex knowledge graph, and its initial position coordinates (x, y) and initial scale value σ are combined into a three-dimensional initial state vector [x, y, σ], which is then used as the input to the Long Short-Term Memory network at the current time step.

[0077] Simultaneously, the time difference Δt between the verification timestamp and the registration timestamp is calculated, and this time difference Δt, after normalization, is used as the time interval parameter of the sequence and input into the Long Short-Term Memory (LSTM) network of the temporal evolution sub-model. Here, the network uses the initial state vector as the starting point of the sequence and iteratively calculates the positional drift (Δx, Δy) and scale change Δσ of each convex at the verification time within a preset time window (maximum prediction period of 10 years). Then, the network output layer maps the hidden state to a three-dimensional prediction vector [x+Δx, y+Δy, σ+Δσ] through a fully connected network, representing the temporal evolution state of that convex.

[0078] The temporal evolution sub-model adopts a stacked long short-term memory network architecture, which contains two hidden layers, each with 128 memory units. Each memory unit controls the flow of information through an input gate, a forget gate, and an output gate. The forget gate determines which historical state information to discard, the input gate determines which new information to update, and the output gate generates an output based on the current state.

[0079] The training process of the Long Short-Term Memory Network uses historical convexity datasets collected from the same tea cake in different years. The convexity state pairs at adjacent time points are used as training samples. The mean squared error loss function is used to supervise the learning of the changes in position and scale. The optimizer is Adam, and the initial learning rate is set to 0.001.

[0080] It should be noted that the time evolution sub-model treats each convex as an evolutionary unit with an independent life cycle, rather than modeling the entire tea cake as a whole. This allows for a more accurate capture of the different evolution rates in different areas of the tea cake surface caused by variations in strip density and fermentation degree.

[0081] For example, a Pu-erh tea cake was registered on March 10, 2019. At that time, a convex feature located at coordinates (234.6, 567.2) with a scale value of 3.8 was extracted from the surface of the tea cake. Five years later, on March 15, 2024, a consumer verified the tea cake. The time difference Δt = 5.0 years was calculated, and the initial state vector of the convex feature [234.6, 567.2, 3.8] was input into a pre-trained Long Short-Term Memory (LSTM) network. The forgetting gate in the network first evaluates and discards part of the state memory from 5 years ago. The input gate calculates the positional drift as (-2.3, +1.8) pixels and the scale change as +0.5 based on the learned tea aging patterns (such as the shrinkage of the tea leaves causing a slight shift towards the center of the tea cake, and the coarsening of the texture causing an increase in scale). The final network outputs a time-evolution state vector [232.3,569.0,4.3], which indicates that the model predicts that at the validation time, the convex should be located near (232.3,569.0), and the scale value becomes 4.3. This prediction result is then used for probability template generation.

[0082] Step 303: Input the original 128-dimensional SIFT description of the registered convex features into the verification environment humidity into the convex evolution model, and output the humidity response state through the humidity response sub-model. The humidity response sub-model adopts a multilayer perceptron architecture.

[0083] The humidity response sub-model is a core component of the convex evolution model. It employs a multilayer perceptron architecture to learn and simulate the nonlinear drift of convex descriptors as environmental humidity changes. This addresses the issue of discrepancies between the original descriptors and those extracted during verification caused by variations in tea cake texture—such as blurring due to expansion of the tea leaves when damp and sharpening due to contraction when dry. The humidity response state comprises a complete set of humidity-adjusted descriptor vectors for all convexities.

[0084] In some implementations, the original 128-dimensional SIFT descriptor vector for each registered convex feature is extracted from the convex knowledge graph. Simultaneously, it acquires and uploads the verification environment humidity data in real time from the terminal sensors. The humidity value needs to be normalized and mapped to the [0,1] interval.

[0085] The original 128-dimensional descriptor vector is concatenated with the normalized verification environment humidity to form a 129-dimensional input vector. | The data is fed into the humidity response sub-model. This sub-model uses a three-layer fully connected multilayer perceptron architecture. Its input layer receives a 129-dimensional vector, each of the two hidden layers contains 256 neurons, the activation function is ReLU to introduce non-linear transformation capability, and the output layer has 128 neurons, corresponding to the adjusted descriptor vector.

[0086] This allows the introduction of a Dropout mechanism after each hidden layer, setting a dropout probability to prevent overfitting and enhance the model's generalization ability.

[0087] As information propagates forward in the network, each layer calculates a weighted sum through a linear transformation, then introduces nonlinearity using the ReLU activation function f(x)=max(0,x), extracting the complex mapping relationship between humidity and descriptors layer by layer. Finally, the output layer generates a 128-dimensional humidity-adjusted descriptor vector. This represents the humidity response state of the convex contact.

[0088] The training process of the multilayer perceptron can be carried out using a convex dataset collected multiple times from the same tea cake under a controllable humidity environment (humidity range of 30%-90%): the original descriptor under the registered humidity and the actual descriptor under the target humidity constitute the training pair, and the learning is supervised by the mean square error loss function. The optimizer is Adam, the initial learning rate is set to 0.001, the batch size is 32, and the number of training iterations is 100 rounds until the loss converges.

[0089] For example, a Pu-erh tea cake is registered in an environment with a humidity of 60% RH. The first few dimensions of the original 128-dimensional descriptor extracted from a certain convex point have values ​​of [0.12, 0.05, 0.23, 0.08, ...]. Five years later, a consumer verifies the tea cake in a dry winter in Beijing. At this time, the humidity of the verification environment measured by the mobile phone sensor is 25% RH. Therefore, the original descriptor can be concatenated with the normalized humidity value of 0.25 to form a 129-dimensional vector [0.12, 0.05, 0.23, 0.08, ..., 0.25], and then input into a trained multilayer perceptron.

[0090] After a nonlinear transformation through a three-layer fully connected network, the output layer generates an adjusted 128-dimensional descriptor [0.09, 0.03, 0.28, 0.06, ...]. This adjustment conforms to physical laws: in a dry environment, the shrinkage of the tea cake makes the texture sharper, corresponding to an enhancement of the gradient in some directions (e.g., the third dimension increases from 0.23 to 0.28), while weakening in other directions where shrinkage leads to loss of detail (e.g., the first dimension decreases from 0.12 to 0.09). This humidity-adjusted descriptor will then be used for subsequent matching with the convexities of the verification image, achieving higher accuracy than directly using the original descriptor.

[0091] Step 304: Input the registered convex features into the convex evolution model, learn the probability distribution of natural aging uncertainty through the aging perturbation sub-model, and output the aging perturbation state. The aging perturbation sub-model adopts a variational autoencoder architecture.

[0092] The aging perturbation sub-model is a core component of the convex evolution model. It employs a variational autoencoder architecture to learn and simulate the randomness and uncertainty of convex feature changes during the natural aging of compressed tea, caused by factors such as post-fermentation, leaf shrinkage and expansion, and microbial activity. The variational autoencoder is a deep generative model consisting of an encoder and a decoder. The encoder maps the input data to probability distribution parameters (mean and log-variance) in the latent space, while the decoder samples and reconstructs the data from the latent space, learning the essential features of the data by minimizing reconstruction error and KL divergence. The probability distribution of natural aging uncertainty refers to the statistical regularity of convex morphological changes caused by the combined effects of complex factors such as temperature and humidity fluctuations and microbial fermentation during long-term storage of tea cakes. The aging perturbation state includes multiple possible convex perturbation morphologies sampled from the learned probability distribution, representing the range of random changes brought about by natural aging.

[0093] In some implementations, a complete state vector for each registered convex feature is extracted from the convex knowledge graph. (Including location coordinates, scale factor and 128-dimensional SIFT descriptor), which is then input into the encoder part of the aging perturbation submodel.

[0094] The encoder consists of a three-layer fully connected network. Through nonlinear transformation, it maps the high-dimensional convex state of the input to the mean vector μ and the logarithmic variance vector log(σ²) in the low-dimensional latent space. This can jointly define the probability distribution of the possible range of change of the convex during natural aging.

[0095] Subsequently, a reparameterization technique is used to randomly sample from the distribution: random noise ε is sampled from the standard normal distribution, and the latent variable z is obtained by transforming z=μ+σ⊙ε and input to the decoder.

[0096] The decoder also consists of a three-layer fully connected network that maps the low-dimensional latent representation back to the original data space, outputting multiple possible convex perturbation patterns. Each morphology represents a possible evolutionary outcome that conforms to the learned aging probability distribution.

[0097] For example, when a Pu-erh tea cake produced in 2009 was registered, the feature state of a convex point located at the top of the tea strands was (234.6, 567.2), with a scale of 3.8 and a descriptor vector. Fifteen years later, in 2024, when consumers conduct verification, they can input the state of the convex touch into the aging perturbation sub-model. The encoder analyzes the original characteristics of the convex touch, outputting the mean μ=[0.2,-0.3,0.1,...] and the log-variance log(σ²)=[-2.1,-1.8,-2.3,...], indicating that after long-term aging, the position of the convex touch may shift slightly, some dimensions of the descriptor change relatively definitely (small variance), while some dimensions change more significantly (large variance).

[0098] At this point, a reparameterization technique can be used to perform 10 random samplings, resulting in 10 different latent variables z. The decoder maps these back to the original space, generating 10 possible aging perturbation states: the first predicts coordinates shift to (235.1, 566.8) and the scale becomes 4.2; the second predicts coordinates shift to (234.0, 567.9) and the scale becomes 4.0; the third predicts that the descriptor changes significantly in some dimensions. This can be used to generate a multi-possibility template to cover various aging forms that the tea cake may exhibit, increasing the probability of successfully matching the actual state of a 15-year-old tea.

[0099] Step 305: Based on the verification timestamp and verification environmental humidity, perform a fusion analysis on the time evolution state, humidity response state and aging disturbance state to obtain the predicted convex features.

[0100] In some implementations, the output results of three evolution paths are obtained in parallel: Predicted location of each convex point output by the time evolution submodel and prediction scale .

[0101] Humidity-adjusted descriptor for each convex output by the humidity response submodel .

[0102] The set of K possible convex perturbation patterns output by the aging perturbation sub-model { , ,..., Each perturbation pattern includes a position perturbation ΔP, a scale perturbation ΔS, and a descriptor perturbation ΔD.

[0103] A dynamic weight fusion method based on an attention mechanism can be used, with the verification timestamp and verification environment humidity as query conditions, to calculate the confidence weights of the three evolution paths in the current verification scenario: For tea cakes with a longer aging time, the weights of the time evolution path and the aging disturbance path will be increased accordingly.

[0104] In scenarios where the humidity level differs significantly from that at registration, the humidity response path will have a dominant weight.

[0105] Its attention mechanism outputs a weight vector through a learnable mapping function f(t,H). and make it satisfy ,in As humidity response weight, As time evolution weight, The weighting is for aging perturbation.

[0106] This allows for multi-path state fusion to be performed, through... Calculate the final predicted location ,in The average positional offset of the K perturbation patterns; Then through Calculate the final prediction descriptor ; Finally passed Calculate the prediction scale .

[0107] This allows for the use of a weighted average strategy for K samples of the aging perturbation path, while retaining each perturbation pattern as an independent possible branch, laying the foundation for generating multiple possible templates in the future.

[0108] The weight function f(t,H) of the fusion mechanism is obtained through end-to-end training: using the actual matching convex state in historically verified successful cases as a supervision signal, the difference between the predicted state and the real state after fusion is optimized, and the optimal contribution ratio of each evolution path is learned under different combinations of time and humidity.

[0109] For example, a 10-year-aged Pu-erh tea cake is verified in a dry environment with a humidity of 25% RH. The difference between the verification timestamp and the registration timestamp, Δt = 10 years, and the verification humidity, H = 25%, can be calculated. The outputs of the three evolution paths are as follows: the time evolution state predicts a position offset of (+2.3, -1.5) pixels and a scale increase of 0.8; the humidity response state outputs that the descriptor is enhanced in some dimensions and weakened in others under dry conditions; and the aging perturbation state generates five possible perturbation forms, including small positional fluctuations (±0.5 pixels) and random changes in the descriptor.

[0110] At this point, the attention fusion mechanism will calculate weights based on the input (Δt=10, H=25): due to the long duration, the weights evolve over time. =0.5; The humidity level differs significantly from the initial humidity (60% RH), resulting in a higher humidity response weight. =0.3; Long-term aging uncertainty is significant, aging disturbance weight =0.2. After fusion, the final predicted convex position is the registered coordinates plus the time evolution offset plus the perturbation average offset, and the predicted descriptor is the humidity adjustment descriptor plus the perturbation average adjustment. At the same time, the five perturbation modes are fused with the time and humidity results respectively to generate five slightly different sets of predicted convex features, which serve as inputs for the construction of the probability template.

[0111] Step 306: Combine the predicted convex features with the graph vertices and spatial adjacent edges in the convex knowledge graph to construct possible templates for different evolutionary stages.

[0112] Among them, the evolution stage refers to the different time intervals or environmental condition intervals that the compressed tea goes through from the registration time to the current verification time. Each stage corresponds to a specific form that the tea cake may present. The possibility template is a complete set of convex features that the tea cake may present at a specific evolution stage, constructed based on the predicted convex features and the topological structure in the convex knowledge graph. Each template contains a set of convex nodes with specific spatial distribution and descriptor expression and their spatial adjacency relationships.

[0113] In some implementations, multiple sets of predicted convex features generated during the fusion analysis stage are obtained, where each set of predicted convex features corresponds to a possible evolutionary outcome: For the deterministic fusion results, a set of main prediction features is obtained; For the K branches sampled from the aging disturbance path, K sets of branch prediction feature sets with random disturbances are obtained, for a total of K+1 sets of prediction results.

[0114] Subsequently, each set of prediction results is traversed. For each predicted convex in the set, the corresponding graph vertex is found in the original convex knowledge graph. The unique identifier of the graph vertex is associated and bound with the current predicted position coordinates, scale factor and descriptor vector to generate an evolutionary copy of the vertex in the current evolutionary stage.

[0115] After creating the vertex evolution states of all predicted convexities, the topology of spatial adjacency edges can be copied from the original convexity knowledge graph. That is, for each spatial adjacency edge connecting graph vertex A and graph vertex B in the original graph, a corresponding edge is created in the new possibility template, connecting the evolution state copy of vertex A and the evolution state copy of vertex B. The attributes of these spatial adjacency edges (such as adjacency relationship type and establishment timestamp) remain unchanged, ensuring that the evolved convexity set still maintains the same microtexture topology as the original tea cake surface.

[0116] Repeat the above process to construct a complete probability template for each set of prediction results. Each template contains N evolutionary vertices (corresponding to N convexities) and M spatial adjacency edges. The vertex attributes have been updated to the evolutionary prediction values, and the topological structure of the edges completely retains the original spatial adjacency relationships.

[0117] Finally, these K+1 possible templates are sorted according to their matching probability with the current verification environment, based on the confidence weights of each evolution path calculated in the fusion analysis stage: the main prediction template has the highest priority, and the priority of each perturbation branch template is sorted according to its sampling probability density, with branches with higher probability densities being sorted earlier. The matching probability is then stored in the template cache according to the template priority sort, waiting to be called by the matching decision layer.

[0118] It should be noted that the essence of combining the predicted convex features with the graph vertices and spatial adjacency edges of the original knowledge graph is to ensure that, while maintaining the topological structure of the tea cake surface, the spatial proximity relationships (i.e., which convex is closest to which) of the vertex attributes remain essentially unchanged regardless of how the tea cake ages. Simultaneously, by reusing the topological structure of the original graph, each possible template inherits the micro-texture spatial relationships established during registration, ensuring that the evolved template still conforms to the unique texture distribution pattern of that tea cake.

[0119] Based on the above technical solution, by constructing a convex knowledge graph, SIFT key points on the surface of pressed tea are defined as registered convex features with lifecycles, and their spatial adjacency relationships are encoded. This solves the problem that traditional methods treat tea cake texture as static and isolated features, which cannot support evolutionary analysis. By combining a convex evolution model composed of a time evolution sub-model, a humidity response sub-model, and an aging perturbation sub-model, respectively, long short-term memory networks are used to predict time-varying drift of position and scale, multilayer perceptrons adjust the nonlinear response of descriptors to humidity, and variational autoencoders learn the random perturbation distribution of natural aging. This solves the matching failure problem caused by the changes in physical form over time and environment due to the post-fermentation characteristics of tea, enabling the verification system to adapt to tea aged for more than ten years. At the same time, by fusing and analyzing the outputs of the three evolutionary paths, multiple sets of predicted convex features covering various possible states of the tea cake are generated. These features are then combined with graph vertices and spatial adjacency edges in the original graph to construct multiple possible templates. This maintains the unique micro-texture topology of the tea cake and achieves comprehensive coverage of evolutionary uncertainties, solving the technical deficiency of single template matching in dealing with morphological diversity. Finally, during consumer verification, the most likely matching template can be dynamically called for comparison based on the verification environment, improving the robustness of matching and recognition accuracy under the dual interference of uncontrollable shooting conditions and natural aging of tea cakes, and building a digital ID card for each tea cake that can evolve with time.

[0120] In another possible implementation of the embodiments of this application, combined with Figure 1-4 As shown, the verification of the convex features and the probability template is matched and geometrically consistent to obtain the matching verification result. This can be achieved through the following steps 401 to 405, which are explained in detail below: Step 401: Obtain the verification convex features and load the probability templates in priority order.

[0121] In some implementations, once the verification convex features extracted from the verification image are obtained, a multi-template matching process is immediately initiated. First, the template priority sorter is called, using the verification timestamp and verification environment humidity attached to the current verification request as query conditions. The similarity or confidence between each template and the evolution stage parameters (such as target evolution time and target environment humidity) associated with each possible template in the template library is calculated one by one. This dynamically sorts all candidate possible templates, generating a template loading list arranged from high to low matching probability. According to this priority order, possible templates are loaded from the storage medium into the cache in sequence, with priority given to loading the template that best matches the current verification environment.

[0122] Step 402: Using the fast nearest neighbor search algorithm, calculate the Euclidean distance between each verification convex feature and the feature descriptor of the convex in the probability template, and filter candidate matching pairs.

[0123] The Fast Nearest Neighbor Search (FLANN) algorithm is used to efficiently find the nearest point to the query point in a high-dimensional space. In this invention, it specifically refers to the FLANN algorithm, which is used to accelerate the matching process between 128-dimensional SIFT descriptors. Candidate matching pairs refer to the correspondences between verification convexes and probable template convexes that are highly similar in the feature descriptor space, initially selected by the FLANN algorithm.

[0124] In some implementations, a 128-dimensional SIFT descriptor vector of a verification convex is read from memory, and a 128-dimensional descriptor vector of a template convex is read from the convex features of the probable template. Then, a distance calculation unit is activated to calculate the Euclidean distance between these two vectors, obtaining the Euclidean distance value (quantifying the similarity between the two convexes in the feature space). A pre-integrated FLANN fast nearest neighbor search algorithm is invoked to construct an efficient index structure (such as a KD-tree or a multi-random KD-tree) in the probable template. Then, the two template convexes with the closest Euclidean distance to their descriptors are searched within this index structure, and these two distances are recorded. The values ​​d1 and d2 (d1≤d2) are then used. Lowe's ratio test is applied to calculate the ratio of d1 to d2. If the ratio is less than the preset ratio test threshold (usually set to 0.7), it indicates that the nearest neighbor match is much better than the second nearest neighbor match. This match has high discriminative power and credibility, so it is accepted as a candidate match. Conversely, if the ratio is greater than or equal to 0.7, the match is considered ambiguous and prone to mismatch, so it is rejected. Finally, after performing the above search and filtering on all verification convexes, a set of several high-quality candidate match pairs is output as the input for subsequent geometric consistency verification.

[0125] For example, suppose a convex point A located on the edge of a tea cake is extracted from the verification image, with its 128-dimensional descriptor vector [0.11, 0.06, 0.22, ...]. After loading the current highest priority probability template, the FLANN algorithm is called. Among the 500 convex points contained in the template, the two convex points whose descriptors are closest are quickly found: the Euclidean distance d1 = 0.15 for convex point B1 and the Euclidean distance d2 = 0.25 for convex point B2. The system calculates d1 / d2 = 0.6, which is less than the preset threshold of 0.7. This indicates that the match between convex A and convex B1 is unique and significant. Therefore, (A, B1) is recorded as a candidate matching pair. Meanwhile, the nearest neighbor distance d1 = 0.18 and the second nearest neighbor distance d2 = 0.19 for another verification convex C, with a ratio of 0.95, which is greater than 0.7. This indicates that there are two convexes in the template that are very similar to convex C. The system determines that this match is ambiguous and removes it. All the matching pairs that pass the screening (such as A-B1) are gathered together to form a high-quality candidate matching pair set, which is ready for subsequent geometric consistency verification.

[0126] Step 403: Based on the candidate matching pairs, the progressive consistent sampling algorithm is used to calculate the geometric transformation model between the verification image and the probability template. By calculating the reprojection error of all candidate matching pairs under the geometric transformation model, the inliers are marked and the number and proportion of inliers are recorded.

[0127] The progressively consistent sampling algorithm is an improved form of the random sampling consistency algorithm. Its core lies in prioritizing sampling from candidate matching pairs with higher matching quality to accelerate convergence and improve robustness in scenarios with low interior point ratios. The geometric transformation model is a mathematical model describing the spatial mapping relationship between the verification image and the probable template. In the tea-pressing anti-counterfeiting scenario, a homography matrix is ​​typically used. It is a 3×3 non-singular matrix that describes the perspective transformation relationship between objects on the same plane in two images taken from different angles. The reprojection error refers to the Euclidean distance between the mapped points and the actual corresponding points after mapping feature points from one image to another image using the calculated geometric transformation model. The smaller this distance, the more accurate the transformation model and the better the matching pair conforms to geometric constraints.

[0128] In some implementations, after obtaining the candidate matching pairs selected by the ratio test, all matching pairs are sorted in descending order according to the matching quality of each candidate matching pair (such as the nearest neighbor distance ratio), with the pair with the highest matching quality placed at the front, and then the iterative sampling process begins.

[0129] In each iteration, four pairs of matching points are randomly selected from the top-ranked matching pairs. The initial homography matrix H is solved using the direct linear transformation algorithm. Then, all candidate matching pairs are projected through the homography matrix H. The reprojection error between the projection point of each verification convex position on the template image after H mapping and the actual position of the template convex is calculated. A preset error threshold (usually 5 pixels) is set. Matching pairs with errors less than the threshold are marked as inliers, and the current number and proportion of inliers are counted.

[0130] Repeat this iterative process until the preset confidence level (usually 0.99) or the maximum number of iterations is reached. In each iteration, record the homography matrix with the most interior points and its corresponding interior point set.

[0131] After the iteration, the Levenberg-Marquardt nonlinear optimization algorithm is used to locally optimize the homography matrix based on the current optimal set of interior points, so as to obtain the geometric transformation model. Finally, the number of interior points, the proportion of interior points and the optimized homography matrix obtained in this geometric consistency verification are output.

[0132] For example, assuming that after ratio testing, 50 candidate matching pairs are obtained, of which the top 10 pairs are of extremely high quality (nearest neighbor ratio less than 0.5) and the remaining 40 pairs are of medium quality, the progressive consistent sampling algorithm can be started. In the first iteration, 4 pairs are randomly selected from the top 10 high-quality matching pairs, and a homography matrix H1 is calculated. Then, the reprojection error of all 50 matching pairs under H1 is calculated. It is found that the error of 30 matching pairs is less than 5 pixels, which are marked as inliers, with an inlier ratio of 60%. In the second iteration, 4 pairs are randomly selected from the top 10 pairs again. Take another 4 pairs and calculate H2. At this point, only 25 pairs satisfy the inlier condition, with an inlier ratio of 50%. After multiple iterations, it is found that H5 calculated from a certain 4 pairs in the 5th iteration can make 32 matching pairs become inliers, with an inlier ratio of 64%. This is the optimal result found so far, so the iteration can be stopped. Based on these 32 pairs of inliers, Levenberg-Marquardt optimization is performed to obtain the refined homography matrix. Finally, the number of inliers is recorded as 32, and the inlier ratio is 64%, which is the matching result output for this geometric consistency verification.

[0133] Step 404: Extract the graph vertices corresponding to the interior points in the original convex knowledge graph and the spatial adjacency edges between the graph vertices to construct an interior point topological subgraph.

[0134] Among them, the interior point topological subgraph is a subset extracted from the original convexity knowledge graph. It contains only the graph vertices corresponding to all interior points and the original spatial adjacency edges between these vertices, reflecting the spatial distribution pattern and local adjacency relationship of the successfully matched convexities on the surface of the original tea cake.

[0135] In some implementations, the unique identifier ID of the template convex corresponding to each interior point is obtained. In this case, the ID is completely consistent with the identifier of the graph vertex in the original convex knowledge graph.

[0136] These IDs can be used as query keys to perform fast retrieval operations in the distributed graph database, locate and extract the original graph vertices corresponding to each interior point, and load all attribute information of these vertices, including their precise location coordinates, scale factor, principal direction, and registration timestamp.

[0137] Next, iterate through all the extracted graph vertices. For each pair of vertices, query the original convex knowledge graph to see if there is a spatial adjacency edge between them. The query is based on whether the two vertices established an edge relationship when they were registered because the spatial Euclidean distance was less than a preset threshold. If there is, the edge is also extracted, and the IDs of the two vertices it connects to and the attribute information of the edge are recorded.

[0138] Repeat this process, checking all possible vertex pairs, until all spatially adjacent edges that are covered by the set of interior vertices and originally existed in the original graph are found.

[0139] Finally, all extracted graph vertices and spatial adjacency edges are reorganized in memory to construct an independent subgraph structure containing only interior vertices and their adjacency relationships, namely the interior vertex topological subgraph.

[0140] For example, after RANSAC verification, eight interior points were marked, and their corresponding template convex contact IDs were C05, C12, C18, C23, C31, C42, C56, and C67. These eight IDs can be used as query conditions to retrieve the corresponding graph vertices in the original convex contact knowledge graph and find that their position coordinates are located in different areas on the surface of the tea cake.

[0141] We can then traverse these 8 vertices and query their spatial adjacency relationships. The results show that in the original graph at registration, the spatial distance between vertices C05 and C12 is 30 pixels (less than the 50-pixel adjacency threshold), therefore there is a spatial adjacency edge E05-12 between them. Similarly, the distance between vertices C12 and C18 is 45 pixels, also with an edge E12-18; the distance between vertices C23 and C31 is 28 pixels, with an edge E23-31. The distances between other vertex pairs are all greater than 50 pixels, and there are no connecting edges. Therefore, these vertices (C05, C12, C18, C23, C31) and edges (E05-12, E12-18, E23-31) are extracted and constructed in memory as an interior vertex topology subgraph containing 5 vertices and 3 edges. This subgraph accurately reflects the two local texture clusters formed by these 5 interior points on the surface of the original tea cake.

[0142] Step 405: Based on the position coordinates of the verification convex corresponding to the interior point, construct the verification topology subgraph, verify the topological similarity between the verification topology subgraph and the interior point topology subgraph, and obtain the matching verification result.

[0143] Among them, the verification topology subgraph refers to the local graph structure dynamically constructed among these verification convexes based on the position coordinates of all interior point convexes in the verification image and according to the same spatial adjacency threshold as the original convex knowledge graph. It is used to characterize the current spatial layout and adjacency relationship of the successfully matched convexes on the surface of the tea cake at the verification moment.

[0144] In some implementations, the actual position coordinates of all interior points in the verification image are obtained, with each coordinate corresponding to a verification convex. The correspondence between these verification convexes and the template convexes is recorded to ensure that the vertices in the verification topology subgraph correspond one-to-one with the vertices in the interior point topology subgraph.

[0145] Using the same spatial adjacency threshold as in the registration phase (preset to 50 pixels), all vertex pairs of verification convexities are traversed. The spatial Euclidean distance of each pair of vertices in the verification image coordinate system is calculated. If the distance is less than or equal to the preset spatial adjacency threshold, a spatial adjacency edge is constructed between the corresponding two verification vertices. This process is repeated until all possible vertex pairs have been checked, thereby constructing a complete verification topology subgraph. At this point, the subgraph accurately reflects the spatial adjacency relationship of successfully matched convexities in the verification image at the current moment.

[0146] The topology similarity verification module is then restarted. It compares the verification topology subgraph with the interior topology subgraph edge by edge, checking each spatially adjacent edge in the interior topology subgraph and verifying whether there is also an edge between the corresponding two vertices in the verification topology subgraph. The number of identical edges between the two subgraphs is counted, and the proportion of identical edges to the total number of edges in the interior topology subgraph is calculated as the topology similarity score. If this similarity score is higher than a preset topology consistency threshold (e.g., 0.8), the two subgraphs are considered to have highly consistent topology, and the verification passes. Otherwise, even if the geometric verification passes, the topology does not match, and the verification fails. Finally, the results of the geometric verification (number of interior vertices, proportion of interior vertices) and the topology verification are combined to output the final matching verification result.

[0147] For example, assuming the interior topological subgraph contains 5 vertices C05, C12, C18, C23, and C31, and 3 edges E05-12, E12-18, and E23-31, the coordinates of the verification convex points corresponding to these vertices can be obtained. If C05 corresponds to verification convex point V05 located at (100, 200), C12 corresponds to V12 located at (105, 205), C18 corresponds to V18 located at (110, 210), C23 corresponds to V23 located at (300, 150), and C31 corresponds to V31 located at (305, 155).

[0148] The verification topology subgraph can be constructed using an adjacency threshold of 50 pixels: the distance between V05 and V12 is approximately 7.07 pixels, which is less than 50, so edge EV05-12 is established; the distance between V12 and V18 is approximately 7.07 pixels, which is less than 50, so edge EV12-18 is established; the distance between V23 and V31 is approximately 7.07 pixels, which is less than 50, so edge EV23-31 is established; while the distance between other cross-cluster vertex pairs (such as V05 and V23) is much greater than 50, so no edge is established. At this point, the verification topology subgraph contains exactly 3 edges that are completely consistent with the interior vertex topology subgraph.

[0149] Calculate the topological similarity: the number of consistent edges is 3, the total number of edges in the interior topological subgraph is 3, and the similarity score is 1.0, which is higher than the preset threshold of 0.8. This indicates that the successfully matched convex touches in the verification image maintain the same micro-texture topological structure as during registration. Based on this, it is determined that this verification has also passed completely at the topological level. Combining the 32 interior points and 64% interior point ratio from the previous geometric verification, the final verification result of successful matching is output.

[0150] Based on the above technical solution, by loading possible templates in priority order, the most matching evolution template can be intelligently selected according to the current verification environment (time, humidity), solving the problem that traditional single templates cannot cover multiple possible forms of tea cakes, and maximizing the utilization efficiency of verification resources. Secondly, a fast nearest neighbor search algorithm combined with ratio testing is used to screen candidate matching pairs, efficiently eliminating fuzzy matches caused by texture repetition in the high-dimensional feature space, solving the problem of high mismatch rate when verification image quality deteriorates, and ensuring that matching pairs entering subsequent verification are highly discriminative. Next, a progressively consistent sampling algorithm is used to calculate the geometric transformation model and mark interior points, prioritizing sampling from high-quality matching pairs to quickly estimate the true geometric relationship between images, solving the technical challenge of accurate alignment in low-quality images, and improving the convergence speed and robustness of geometric verification. Meanwhile, its dual topology verification structure extracts the graph vertices and spatial adjacent edges corresponding to the interior points in the original knowledge graph to construct an interior point topology subgraph, tracing the geometric verification results back to the inherent physical structure of the tea cake; on the other hand, it constructs a verification topology subgraph based on the verification convex position and calculates the similarity between the two, verifying from a structural level whether the adjacency relationship between the convex positions is consistent with that at the time of registration. This solves the technical deficiency of relying solely on point matching, which cannot resist local feature forgery. Even if the aging of the tea cake causes the position of a single convex position to drift, as long as its adjacency relationship network remains stable, the authenticity can be determined, upgrading the anti-counterfeiting anchor point from volatile point features to stable structural features.

[0151] In another possible implementation of the embodiments of this application, combined with Figure 1-5 As shown, the optimization process of the convex evolution model can be achieved through the following steps 501 to 504, which are explained in detail below: Step 501: Receive the matching verification result. The matching verification result includes the verified convex feature, the possible template of successful matching, and the corresponding interior point matching relationship.

[0152] In some implementations, after successfully determining that the pressed tea is genuine, the matching verification result is received. The correspondence between interior points can be obtained from the matching decision layer. At this time, the relationship will clearly identify the unique identifier of each verification convex and its corresponding convex in the probability template.

[0153] Step 502: Based on the correspondence of interior point matching, calculate the difference between the verification convex feature and its corresponding convex feature in the probability template, as the true evolutionary bias.

[0154] Among them, the actual evolutionary bias refers to the quantitative difference between the actual physical morphological changes of the surface convex features of pressed tea during the period from registration to verification, due to the combined effects of factors such as the passage of time, environmental changes, and natural aging, and the changes predicted by the model. Specifically, this manifests as numerical differences in multiple dimensions. For example, the positional drift of the convex in the image coordinate system, the scale change reflecting texture coarseness in scale space, and the offset of the SIFT descriptor vector composed of 128-dimensional floating-point numbers. These biases collectively constitute the true evidence of the evolution of the convex from its initial state to its current state.

[0155] In some implementations, each matching pair is traversed from the inlier matching correspondence. For one matching pair, the predicted state data of its corresponding convex point is read from the probability template. At the same time, the actual state of the inlier point in the verification image is read from the verification convex point features.

[0156] The deviations in the three dimensions were then calculated separately: The positional deviation is obtained by calculating the Euclidean distance between the two points to obtain a two-dimensional vector (Δx, Δy); Scale bias is obtained as a scalar Δσ by calculating the difference between the actual scale and the predicted scale; Descriptor bias is calculated by taking the cosine or Euclidean distance between two 128-dimensional vectors to obtain a scalar similarity value or a 128-dimensional offset vector ΔD.

[0157] The multidimensional deviation values ​​calculated for each interior point are aggregated and averaged to generate a true evolutionary deviation set that comprehensively reflects the overall evolutionary trend of the convex during this verification. This deviation set accurately quantifies the difference between the actual value and the model prediction value of the physical morphological changes experienced by the convex on the surface of the tea cake from the registration time to the verification time.

[0158] Step 503: Obtain the registration timestamp, registration environment parameters, verification timestamp, and verification environment humidity corresponding to the verification convex features, and use them as evolutionary context features to construct model optimization sample pairs.

[0159] Among them, evolutionary context features refer to the complete set of parameters describing all environmental conditions and time elements throughout the entire process of pressed tea from registration to verification. Model optimization sample pairs are structured data units composed of evolutionary context features and actual evolutionary biases, used to train and optimize the convex evolution model.

[0160] In some implementations, the unique identifier ID of the currently verified pressed tea is used to retrieve the convex knowledge graph stored during its registration phase from the cloud database. The registration timestamp of the tea cake during registration is read from the metadata area of ​​the graph. At the same time, the attributes of all graph vertices in the graph are traversed to extract the ambient temperature, ambient humidity and light intensity recorded synchronously at the time of registration, and combined into complete registration environment parameters.

[0161] Subsequently, from the context of this verification request, the verification timestamp generated by the mobile terminal's system clock and the verification environment humidity collected in real time by the terminal's built-in humidity sensor are obtained. These timestamps and environmental parameters can then be structurally encapsulated to form evolutionary context features.

[0162] Finally, the actual evolutionary bias calculated in the previous steps is associated and aligned with the currently constructed evolutionary context features to generate a complete model optimization sample pair, which is stored in the system cache as a key-value pair.

[0163] Step 504: Input the model optimization sample pair into the convex evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model and aging perturbation sub-model.

[0164] In some implementations, evolutionary context features are parsed from model optimization sample pairs. In this case, the features include the time difference Δt calculated from the registration timestamp and the verification timestamp, the humidity difference ΔH calculated from the registration humidity and the verification humidity in the registration environment parameters, and the initial state vector of the registered convex. Simultaneously, it analyzed the actual evolutionary deviations, including positional deviations. Scale bias and descriptor deviation .

[0165] The system combines the time difference Δt and the initial state vector The predicted positional drift is calculated by inputting the data into the time evolution sub-model and performing forward propagation. and scale variation Then, through the mean squared error loss function Calculate time loss .

[0166] Register the original 128-dimensional descriptor of the convex. The humidity difference ΔH is input into the humidity response sub-model, and the predicted descriptor offset is calculated through forward propagation. Then, through the cosine distance loss function Calculate distance loss .

[0167] The complete state vector of the registered convex The encoder, which inputs the aging perturbation sub-model, maps it to the mean μ and log-variance log(σ²) of the latent space through forward propagation of a three-layer fully connected network. The latent variable z is obtained by sampling through a reparameterization technique. The decoder maps z back to the original space to obtain the reconstructed convex state. The aging perturbation loss is calculated by minimizing the sum of the reconstruction error and the KL divergence. .

[0168] Finally, the loss functions of the three sub-models are weighted and summed according to preset weights to obtain the total loss. The total loss is calculated using the backpropagation algorithm. For the gradients of all trainable parameters in each sub-model, the Adam optimizer is used to update the weight parameters of each sub-model with an initial learning rate of 0.001, so that when the model faces similar evolutionary context features in the next time, its predicted true evolutionary bias can be closer to the actual observation.

[0169] Based on the above technical solution, by receiving the matching verification results containing verification convex features, possible templates for successful matching, and correspondences of interior point matching, the precise correspondences in each successful verification are captured, solving the deficiency of traditional anti-counterfeiting technologies that only output judgment results and lose intermediate process data. Simultaneously, based on the interior point matching correspondences, the multidimensional differences between the verification convex and the template convex are calculated to generate real evolutionary deviations. This transforms the abstract authenticity judgment results into quantifiable physical change values, enabling precise perception of the actual morphological changes of tea cakes caused by factors such as time and humidity in the actual storage environment. This solves the technical problem of unquantifiable errors between model predictions and actual evolution. Furthermore, evolutionary context features containing complete spatiotemporal backgrounds are constructed, and together with the real evolutionary deviations, form model optimization sample pairs, providing precise input and output labeled data for each real evolution, addressing the industry pain point of lacking real labeled samples in supervised learning. Finally, the model optimization sample pairs are input into the convex evolution model, and the parameters of the three sub-models of time evolution, humidity response, and aging disturbance are jointly optimized. This enables the model to continuously learn the common evolutionary laws and individual storage characteristics of tea cakes from a large number of real-world verification cases, thus solving the problem of performance degradation of static models when faced with diverse actual storage environments.

[0170] The above primarily describes the solutions of the embodiments of this application from the perspective of device implementation. It is understood that each device, for example, a pressed tea anti-counterfeiting system based on pressed tea image features, includes at least one of the hardware structures and software modules corresponding to each function in order to achieve the above-mentioned functions. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0171] This application embodiment can divide a pressed tea anti-counterfeiting system based on pressed tea image features into functional units according to the above method example. For example, each function can be divided into separate functional units, or two or more functions can be integrated into the same processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents a logical functional division; other division methods may be used in actual implementation.

[0172] When using integrated units, Figure 6 This illustration demonstrates an anti-counterfeiting system for compressed tea based on image features, as described in the above embodiments. A probability template generation unit generates probability templates based on a convexity knowledge graph and a convexity evolution model. A comparison and verification unit acquires a verification image of the compressed tea, extracts verification convexity features from the verification image using the SIFT algorithm, and matches and verifies the geometric consistency of the verification convexity features with the probability template to obtain a matching verification result. A authenticity determination unit determines the authenticity of the compressed tea based on the number and proportion of inliers passing the matching verification result and outputs the determination result.

[0173] In one possible implementation, a feedback module is also included to feed the matching verification results back to the convex touch evolution model for optimization. Specifically, the feedback module includes: receiving the matching verification results, which contain the verified convex touch features, the successfully matched probability templates, and the corresponding inlier-point matching correspondences; calculating the difference between the verified convex touch features and their corresponding convex touch features in the probability templates based on the inlier-point matching correspondences, as the true evolutionary bias; obtaining the registration timestamp and registration environment parameters corresponding to the verified convex touch features, as well as the verification timestamp and verification environment humidity, as evolutionary context features, and constructing model optimization sample pairs; and inputting the model optimization sample pairs into the convex touch evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model, and aging perturbation sub-model.

[0174] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and variations.

Claims

1. A method for preventing counterfeiting of pressed tea based on image features of pressed tea, characterized in that, include: Obtain a registered image of compressed tea, extract the registered convex features from the registered image using the SIFT algorithm, and construct a convex knowledge graph to characterize the convex features on the surface of compressed tea and their spatial adjacency relationships. Based on the convexity knowledge graph and convexity evolution model, a possibility template is generated. The convexity evolution model is used to simulate the physical morphological changes of convexities over time, humidity and aging process. A verification image of pressed tea is obtained, and the verification convex features in the verification image are extracted using the SIFT algorithm. The verification convex features are then matched and geometrically consistent with the probability template to obtain the matching verification result. Based on the number and proportion of inner points that pass the matching verification result, the authenticity of the pressed tea is determined and the determination result is output.

2. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 1, characterized in that, The process of extracting the registered convex features from the registered image using the SIFT algorithm specifically includes: The pressed tea registration image is obtained, and key points of the pressed tea registration image are extracted by constructing a parallel Gaussian pyramid and detecting scale space extrema points through a SIFT acceleration chip. The key points are defined as convex primitive units with unique identifiers, and the key points have scale invariance and rotation invariance. The original convex unit is located and edge response is eliminated. Registered convex features with stability exceeding a preset stability threshold are selected and registered convex features are generated. The registered convex features include their position coordinates, scale factor, principal direction, and 128-dimensional SIFT descriptor.

3. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 2, characterized in that, The process of constructing the convex knowledge graph specifically includes: The original unit of the convex contact is denoted as a graph vertex. The position coordinates of the graph vertex are obtained, and the spatial Euclidean distance between any two graph vertices is calculated. Obtain a preset spatial adjacency threshold and the spatial Euclidean distance, and construct spatial adjacency edges between the corresponding graph vertices. The spatial adjacency edges are used to characterize the micro-texture topology of the pressed tea surface. Using all the graph vertices and all spatially adjacent edges as graph edges, and combining the registered convex features, a convex knowledge graph is constructed. The registration timestamp and registration environment parameters of the registered convex feature are obtained and embedded into the corresponding graph vertices in the convex knowledge graph.

4. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 1, characterized in that, The construction process of the convex evolution model specifically includes: Obtain a historical convexity dataset, which contains the registered convexity features collected from the same pressed tea at different time points and under different environmental humidity conditions; Based on the historical convexity dataset, a convexity evolution model is constructed, which includes a time evolution sub-model, a humidity response sub-model, and an aging perturbation sub-model. The time evolution sub-model adopts a long short-term memory network architecture, and takes the initial state vector of the registered convex features in the historical convex dataset and the evolution time difference as input to predict the position drift and scale change within a preset window. The humidity response sub-model adopts a multilayer perceptron architecture, taking the original 128-dimensional SIFT descriptor of the registered convex features in the historical convex dataset and the current ambient humidity as input to generate a humidity-adjusted descriptor vector. The aging perturbation sub-model employs a variational autoencoder architecture to learn the uncertainty probability distribution of registered convex features in the historical convex dataset during the natural aging process.

5. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 1, characterized in that, The process of generating the possibility template specifically includes: Extract the registered convex features, registration timestamp, and registration environment parameters from the convex knowledge graph, and obtain the verification timestamp and verification environment humidity; The registered convex features, registration timestamp, and verification timestamp are input into the convex evolution model. The temporal evolution sub-model predicts the positional drift and scale change of each registered convex feature within a preset time window and outputs the temporal evolution state. The temporal evolution sub-model adopts a long short-term memory network architecture. The original 128-dimensional SIFT descriptor of the registered convex feature and the verification environment humidity are input into the convex evolution model, and the humidity response state is output through the humidity response sub-model, which adopts a multilayer perceptron architecture. The registered convex features are input into the convex evolution model, and the probability distribution of natural aging uncertainty is learned through the aging perturbation sub-model. The aging perturbation sub-model adopts a variational autoencoder architecture. Based on the verification timestamp and the verification environment humidity, the time evolution state, humidity response state and aging disturbance state are fused and analyzed to obtain the predicted convex features. By combining the predicted convex features with the graph vertices and spatial adjacent edges in the convex knowledge graph, possible templates for different evolutionary stages are constructed.

6. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 1, characterized in that, The process of matching and geometrically verifying the verification convex features with the probability template specifically includes: Obtain the verification convex features and load the possibility templates in priority order; The fast nearest neighbor search algorithm is used to calculate the Euclidean distance between each verification convex feature and the feature descriptor of the convex in the probability template, and to filter candidate matching pairs. Based on the candidate matching pairs, the progressive consistent sampling algorithm is used to calculate the geometric transformation model between the verification image and the probability template. By calculating the reprojection error of all candidate matching pairs under the geometric transformation model, inliers are marked and the number and proportion of inliers are recorded. Extract the graph vertices corresponding to the interior points in the original convex knowledge graph and the spatial adjacency edges between the graph vertices to construct an interior point topological subgraph; Based on the position coordinates of the verification convex corresponding to the interior point, a verification topology subgraph is constructed, and the topological similarity between the verification topology subgraph and the interior point topology subgraph is verified to obtain the matching verification result.

7. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 1, characterized in that, The process of determining the authenticity of pressed tea based on the number and proportion of inner points that pass the matching verification result, and outputting the determination result, specifically includes: Obtain the matching verification result and load the preset dual judgment threshold. The matching verification result includes the number of inliers and the proportion of inliers. The dual judgment threshold includes a minimum inlier number threshold and an inlier proportion threshold. The matching verification result and the dual judgment threshold are compared and judged to obtain the judgment result.

8. The method for preventing counterfeiting of pressed tea based on image features of pressed tea according to claim 6, characterized in that, It also includes the optimization process of the convex evolution model, specifically including: Receive the matching verification result, which includes the verified convex feature, the possible template of successful matching, and the corresponding interior point matching correspondence. Based on the in-point matching correspondence, the difference between the verification convex feature and its corresponding convex feature in the possible template is calculated as the true evolution deviation. The registration timestamp and registration environment parameters corresponding to the verification convex feature, as well as the verification timestamp and verification environment humidity, are obtained as evolutionary context features to construct model optimization sample pairs. The model optimization sample pairs are input into the convex evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model, and aging perturbation sub-model.

9. A system for preventing counterfeiting of pressed tea based on image features of pressed tea, characterized in that, The method for preventing counterfeiting of pressed tea based on image features of pressed tea, applicable to any one of claims 1-8, specifically includes: The convex touch knowledge graph construction unit is used to acquire the registered image of pressed tea, extract the registered convex touch features in the registered image through the SIFT algorithm, and construct the convex touch knowledge graph. The possibility template generation unit is used to generate possibility templates based on the convexity knowledge graph and the convexity evolution model; The comparison verification unit is used to acquire a pressed tea verification image, extract the verification convex features in the verification image using the SIFT algorithm, and match and verify the geometric consistency of the verification convex features with the probability template to obtain the matching verification result. The authenticity determination unit is used to determine the authenticity of the pressed tea based on the number and proportion of inner points that pass the matching verification result, and output the determination result.

10. A pressed tea anti-counterfeiting system based on pressed tea image features according to claim 9, characterized in that, It also includes the feedback module, used to feed the matching verification result back to the convex touch evolution model for optimization. The feedback module specifically includes: Receive the matching verification result, which includes the verified convex feature, the possible template of successful matching, and the corresponding interior point matching correspondence. Based on the in-point matching correspondence, the difference between the verification convex feature and its corresponding convex feature in the possible template is calculated as the true evolution deviation. The registration timestamp and registration environment parameters corresponding to the verification convex feature, as well as the verification timestamp and verification environment humidity, are obtained as evolutionary context features to construct model optimization sample pairs. The model optimization sample pairs are input into the convex evolution model to optimize the parameters of the time evolution sub-model, humidity response sub-model, and aging perturbation sub-model.