Relay sales closed loop traceability method based on housing injection molding streak features
By constructing an encrypted feature map and dynamic challenge code on the surface of the relay housing, the problem of the fragile binding between the relay's digital identity and physical entity is solved, enabling precise control of sales channels and highly secure product authentication, thereby improving the reliability and traceability of business management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SIHE (SHENZHEN) TECHNOLOGY INNOVATION CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, the weak binding relationship between the digital identity of a relay and the physical entity of the product results in fragile data credibility, making it difficult to effectively prevent counterfeit and substandard products and cross-selling activities, and posing data reliability problems in business management.
By extracting multiple feature regions with scale and rotation invariance from the surface of the relay housing, an encrypted initial feature map is constructed. Combined with dynamic challenge codes and state offsets, a verification response code is generated, realizing a dynamic chain-like strong binding between product physical characteristics and commercial circulation behavior. Cryptographic credentials are used to ensure data authenticity.
It enables precise control over sales channels, establishes a highly secure product anti-counterfeiting and authenticity authentication mechanism, resists image copying and forgery and replay attacks, provides cryptographic one-time key security authentication, enhances brand value and consumer trust, and records the physical state changes of the product throughout its entire life cycle.
Smart Images

Figure CN122367489A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of commodity circulation and supply chain management technology, and relates to a closed-loop traceability method for relay sales based on the flow pattern characteristics of the injection molding shell. Background Technology
[0002] As a core control component widely used in various electronic devices, the quality and reliability of relays are crucial to the stability of the entire industry chain. In commercial practice, in order to maintain market order, ensure product quality, and protect consumer rights, brands typically need to track and manage the entire process of relay production, warehousing, distribution, and final sales. This constitutes an important part of product traceability and supply chain management in the commercial circulation field.
[0003] In existing technologies, a common approach is to attach digital identification tags, such as barcodes, QR codes, RFID tags, or serial numbers, to relay products or their packaging. During the product's commercial distribution, participants at each stage scan or read these digital identification tags to record product entry / exit, logistics, and sales information in their respective back-end management systems, thereby constructing a digital traceability path. This method achieves a certain degree of tracking of the flow of goods.
[0004] However, the aforementioned existing technologies have inherent flaws in commercial applications. Because the digital identity identifiers they rely on are separable from the physical entity of the relay product, this weak binding relationship leads to fragile data credibility. For example, genuine digital identities can be illegally copied and applied to counterfeit products, rendering QR code-based anti-counterfeiting verification ineffective. Furthermore, in multi-level distribution systems, distributors can scan product identifiers without actually shipping the goods, falsifying compliant circulation records in the system while selling the goods to unauthorized areas, making it difficult to effectively monitor and prevent cross-selling issues in business management. Summary of the Invention
[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above objectives, the present invention proposes the following technical solution: a closed-loop traceability method for relay sales based on the flow pattern characteristics of the injection molding shell, comprising: S1, when the relay is off the production line, acquiring an initial flow pattern image of the surface of its shell, and extracting multiple feature regions with scale and rotation invariance from the initial flow pattern image as initial feature anchor points, and constructing an encrypted initial feature map based on all initial feature anchor points and their spatial topological relationships.
[0006] S2. In response to the verification request from the previous node to the current node, obtain and issue a dynamic challenge code generated based on the current feature map recorded in the previous node, according to the unique identity code bound to the product.
[0007] S3. At the current node, acquire the flow pattern image of the relay housing, and locate the target feature anchor point from the flow pattern image based on the dynamic challenge code, and calculate the state offset of the target feature anchor point relative to the corresponding feature anchor point recorded in the current feature map.
[0008] S4. Based on the dynamic challenge code and state offset, generate a verification response code to prove possession of the target physical entity without revealing image details.
[0009] S5. Determine the validity of the verification response code, and if it is determined to be valid, perform a collaborative update of the current feature map based on the state offset to generate the next feature map.
[0010] S6. Generate a chain-linked transfer certificate and store it based on the current feature map summary, dynamic challenge code, verification response code and the next feature map summary.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) The present invention achieves precise control of the sales channel by dynamically and strongly binding the physical characteristics of the product with each commercial transaction. This method requires that each transaction must be verified on-site based on the physical goods and generate cryptographic credentials closely related to the previous link, making it technically impossible to enter any false data that is detached from the actual movement of goods. This ensures that the sales data flow seen by the brand in the business management system is completely consistent with the actual physical flow of the goods, effectively preventing the distributors from engaging in cross-selling.
[0012] (2) This invention establishes a highly secure product anti-counterfeiting and authenticity authentication mechanism. By adopting a dynamic challenge and response mechanism and combining it with a continuously updated feature map, the system can not only resist simple image copying forgery, but also effectively prevent replay attacks using historical photos. This method of deeply integrating a product's unique physical fingerprint with a dynamic cryptographic protocol provides secure authentication for every commodity in commercial circulation based on a one-time cryptographic key mechanism, enhancing brand value and consumer trust.
[0013] (3) This invention records the state offset quantified from the change in physical state at each stage of the process and forms a complete chain, thus constructing a full life cycle evolution history of the product's physical state. When customer complaints such as product damage occur, the specific business stage where the damage occurred can be located directly by analyzing this data chain, changing the ambiguous situation of relying on paper documents for liability determination and providing objective data support for commercial claims and liability division. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of the implementation steps of the method of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 As shown, the relay sales closed-loop traceability method based on the flow pattern features of the housing injection molding proposed in this invention includes: S1, when the relay is off the production line, acquiring the initial flow pattern image of its housing surface, and extracting multiple feature regions with scale and rotation invariance from the initial flow pattern image as initial feature anchor points, and constructing an encrypted initial feature map based on all initial feature anchor points and their spatial topological relationships.
[0018] In a preferred embodiment, an encrypted initial feature map is constructed based on all initial feature anchor points and their spatial topological relationships, including: calculating the feature response value of each local region through a feature point detection algorithm, and identifying local regions whose feature response values exceed a preset response threshold as candidate anchor points; Extract the local image feature vector of each candidate anchor point and record its coordinate position in the initial flow pattern image; Initial feature anchors are selected from candidate anchors according to the screening rules that ensure spatial uniformity and feature uniqueness, and the relative positional relationship between each initial feature anchor is established to form a spatial topological relationship. The local image feature vectors, coordinate positions, and spatial topological relationships corresponding to the selected initial feature anchor points are combined and encrypted to generate an initial feature map.
[0019] Specifically, to transform the physical surface features of the relay into a structured digital identity—an initial feature map—that can be used for security verification, this system first acquires a high-resolution initial flow pattern image of the relay's housing surface using an industrial camera when the relay comes off the production line. Subsequently, the system performs a series of image processing and data construction steps, including: Step 1: Candidate Anchor Point Identification: Feature point detection is performed on the input initial flow pattern image. In this embodiment, the Scale Invariant Feature Transform (SIFT) algorithm is used. This algorithm constructs a Gaussian difference pyramid by applying Gaussian blurs to the image at different scales and calculating the differences between images at adjacent scales. Subsequently, local extrema are searched in the image space of this pyramid. Local extrema are points whose pixel values are greater than or less than their 26 neighboring points in all three-dimensional neighborhoods.
[0020] For each identified local extremum, the absolute value of its pixel value in the difference-of-Gaussian image is used as the feature response value for that point. This feature response value directly reflects the local contrast of that point. Subsequently, this feature response value is compared with a preset response threshold (e.g., 0.01). If the feature response value is greater than the threshold, the local extremum passes the contrast test and is preliminarily identified as a candidate anchor point to filter out unstable features with low contrast. Each candidate anchor point that passes the test corresponds, in engineering terms, to an image sub-region centered on that extremum point and with a size of 32x32 pixels.
[0021] The second step, feature vector extraction and coordinate recording, involves iterating through each candidate anchor point, calculating its corresponding local image feature vector, and recording its center coordinates in the initial flow pattern image coordinate system. The local image feature vector is a 128-dimensional floating-point array, generated by statistically analyzing the gradient direction histograms of each sub-region within the candidate anchor point area, used to quantify the texture information of that region. Simultaneously, its coordinates are recorded in pixels, providing a foundation for establishing subsequent geometric relationships.
[0022] Step 3: Initial Feature Anchor Point Selection and Spatial Topological Relationship Construction: From a massive pool of candidate anchor points, a set of optimal initial feature anchor points is selected, and their spatial topological relationships are constructed. To achieve this, the system applies preset selection rules. These rules include spatial uniformity selection and feature uniqueness selection. Spatial uniformity selection divides the initial flow pattern image into an A×B grid (e.g., a 4x4 grid), retaining only the candidate anchor points with the strongest local image feature vector response within each grid, ensuring that the selected anchor points are distributed across the entire image surface. Feature uniqueness selection aims to remove candidate anchor points with overly similar texture features. This rule is achieved by calculating the Euclidean distance D between the local image feature vectors corresponding to any two different candidate anchor points. The calculation formula is as follows:
[0023] in, The Euclidean distance between two local image feature vectors is calculated as a scalar value. and These represent the local image feature vectors of the i-th and j-th candidate anchor points, respectively, and are both 128-dimensional floating-point arrays; This is the dimension index of the vector, with values ranging from 1 to 128; and They represent vectors respectively and The component value in the k-th dimension. This formula quantifies the similarity between two 128-dimensional feature vectors in multidimensional space. The smaller the value of distance D, the more similar the local image textures represented by the two candidate anchor points are.
[0024] like If the distance is less than a preset threshold, it indicates that the two candidate anchor points are too similar, and the system will discard the one with the weaker response. The points that pass the screening become the initial feature anchor points. Then, the system calculates the direction and distance between each initial feature anchor point and all other initial feature anchor points, forming a vector set describing the relative positional relationships of each point. This set constitutes the spatial topological relationship.
[0025] Step 4: Generation and Encryption of the Initial Feature Map: The local image feature vectors, coordinate positions, and spatial topological relationships corresponding to all selected initial feature anchor points are serialized according to a preset data structure. Then, the serialized data is encrypted using the Advanced Encryption Standard (AES-256) algorithm and a key stored internally by the system, generating an encrypted data packet. This encrypted data packet serves as the unique initial feature map for the relay, acting as the benchmark for verification in all subsequent processing stages.
[0026] S2. In response to the verification request from the previous node to the current node, obtain and issue a dynamic challenge code generated based on the current feature map recorded in the previous node, according to the unique identity code bound to the product.
[0027] In a preferred embodiment, the generation of the dynamic challenge code includes: obtaining the current feature map corresponding to the identity code; From the multiple feature anchor points contained in the current feature map, a subset of feature anchor points is selected using a random algorithm that combines the current time and identity code as seeds; Generate a set of geometric transformation simulation parameters to simulate pose deviations during on-site shooting; The identification information of the feature anchor subset is combined and encoded with the geometric transformation simulation parameters to generate a dynamic challenge code.
[0028] Specifically, to generate a dynamic challenge code that effectively prevents replay attacks and is unique for each verification, this system executes the following dynamic and randomized task generation process after receiving a verification request containing a relay identification code: Step 1: Obtain the current feature map: Using the received identification code as an index, retrieve the latest version of the current feature map corresponding to the relay from the database of the backend server. The current feature map is a complete dataset containing local image feature vectors and coordinate positions of all valid feature anchor points (e.g., 25 to 40 anchor points), updated and stored after the product was successfully verified at the previous process node. It represents the latest physical state record of the product.
[0029] The second step involves randomly selecting a subset of feature anchor points: To introduce unpredictability, the system selects a subset of N (e.g., N ranges from 3 to 7) feature anchor points from all feature anchor points contained in the current feature map using a preset random algorithm. This random algorithm employs a pseudo-random number generator seeded by the hash value of the current server timestamp and identity code to generate N unique anchor point indices. The list of these indices constitutes the subset of feature anchor points of interest for this verification task, ensuring the randomness of each challenge.
[0030] Step 3: Generating Geometric Transformation Simulation Parameters: To improve the tolerance of the verification process to slight attitude deviations that may occur during on-site shooting, the system generates a set of geometric transformation simulation parameters. Specifically, the system generates a random rotation angle within the range of [-5°, +5°]. A random scaling factor in the range [0.95, 1.05]. And a random translation amount in the horizontal and vertical directions, each within the range of [-10, +10] pixels. This set of parameters Together, they constitute the geometric transformation simulation parameters used to guide subsequent image registration.
[0031] Step 4: Combining and Encoding to Generate Dynamic Challenge Codes: The index list of the feature anchor point subset generated in Step 2 and the geometric transformation simulation parameters generated in Step 3 are serialized according to a preset data structure (e.g., JSON format). Subsequently, the serialized data is Base64 encoded to generate the final dynamic challenge code. This encoded string does not contain any original feature information; it serves only as a set of instructions issued to the verification terminal of the current node to guide it in completing subsequent on-site physical feature acquisition and response calculation.
[0032] S3. At the current node, acquire the flow pattern image of the relay housing, and locate the target feature anchor point from the flow pattern image based on the dynamic challenge code, and calculate the state offset of the target feature anchor point relative to the corresponding feature anchor point recorded in the current feature map.
[0033] In a preferred embodiment, calculating the state offset of the target feature anchor point relative to the corresponding feature anchor point recorded in the current feature map includes: searching for the corresponding target feature anchor point data in the current feature map based on the identification information of the feature anchor point subset carried in the dynamic challenge code, wherein the target feature anchor point data includes a local image feature reference value vector and coordinate reference values. In the flow pattern image, image registration is performed based on the coordinate reference value and the geometric transformation simulation parameters in the dynamic challenge code to locate the target feature anchor point; Extract real-time local image feature vectors from target feature anchor points; Calculate the difference between the real-time local image feature vector and the local image feature reference value vector, and use the difference as the state offset.
[0034] Specifically, to quantify the microscopic changes on the physical surface of the relay since the last verification at the current node, after acquiring the flow pattern image, the system executes a precise feature localization and difference calculation process guided by a dynamic challenge code, which includes the following steps: Step 1: Parse the challenge and retrieve benchmark data: The verification terminal first parses the dynamic challenge code received from the server, extracting the identification information of the feature anchor subset (i.e., a set of anchor indexes) and the geometric transformation simulation parameters. Based on this identification information, the target feature anchor point data corresponding to each target anchor point is retrieved from the current feature map stored locally or obtained via a secure channel. The target feature anchor point data comprises two parts: first, its coordinate reference value in a standard reference coordinate system. Secondly, it is a local image feature reference value vector used to describe its texture. (A 128-dimensional feature vector).
[0035] Step 2, Image Registration and Localization of Target Feature Anchor Points: To accurately locate target feature anchor points in real-time captured flow pattern images that may have angular and distance deviations, the system performs a two-stage image registration process: 1) Initial Position Estimation: The system applies geometric transformation simulation parameters to the coordinate reference value of each target anchor point. The predicted position of the flow pattern in the on-site flow pattern image is calculated by affine transformation. This transformation compensates for preset rotation, scaling, and translation deviations. 2) Precise position matching: based on the estimated position. A search window of a preset size (e.g., 64x64 pixels) is defined centered on the flow pattern image. Within this window, a normalized cross-correlation (NCC) algorithm is used to perform sliding matching between the reference image template corresponding to the target anchor point and all sub-regions within the window. The center of the region with the highest correlation score is determined as the final precise location of the target feature anchor point in the flow pattern image. .
[0036] Step 3: Extract Real-Time Local Image Features: For each successfully located target feature anchor point, define a standard-sized image region around its precise location. Within this region, perform the same feature extraction algorithm (e.g., scale-invariant feature transformation) used in the initial map construction in Step S1 to generate a new 128-dimensional vector for each target feature anchor point. This vector is its real-time local image feature vector. .
[0037] Step 4: Calculate the state offset: To quantify the state changes of the physical surface, the system compares the real-time local image feature vector with the corresponding local image feature reference value vector for the target feature anchor point in the dynamic challenge code. Specifically, the system quantifies the difference by calculating the Euclidean distance between these two vectors and uses it as the state offset of that anchor point. The calculation formula is as follows:
[0038] in, This represents the state offset of the target feature anchor point. In practical applications, a smaller... A value (e.g., less than 0.1) usually indicates that the characteristic change is small and within the normal range; while a larger value (e.g., greater than 0.5) may indicate that the area has been worn, scratched or contaminated. This is the dimension index of the vector. and They represent vectors respectively and The component value in the k-th dimension. This formula derives a single numerical value that quantifies the change in the physical state of a single feature anchor point by calculating the straight-line distance between two feature points (one representing the current state and the other representing the baseline state) in a 128-dimensional feature space. .
[0039] For a subset of feature anchor points containing N anchor points, the system will perform the above calculation independently for each anchor point to obtain a set of state offsets. This set of values together constitutes the state offset vector. ,Right now .
[0040] S4. Based on the dynamic challenge code and state offset, generate a verification response code to prove possession of the target physical entity without revealing image details.
[0041] In a preferred embodiment, generating a verification response code to prove possession of the target physical entity without revealing image details includes: obtaining a current feature map summary corresponding to the previous node state on which this verification is based from a verification task issued by the server. Generate a local random number at the current node to ensure the uniqueness of a single verification; The current feature map summary, dynamic challenge code, state offset, and local random number are combined to form a temporary byte sequence; A one-way cryptographic function that maps inputs of arbitrary length to outputs of fixed length is used to compute temporary byte sequences and generate verification response codes.
[0042] Specifically, to generate a cryptographic credential that can prove to the server that the current node has contacted the target physical entity without revealing any visual details about the entity's surface, the system performs a key privacy-preserving computation process on the terminal device, which includes the following steps: Step 1: Obtain Verification Elements: The terminal device first parses the complete verification task package sent from the server. This task package contains not only a dynamic challenge code to guide on-site operations, but also a current feature map summary representing the status of the previous product flow node, which is essential for this verification. This summary serves as the "state anchor" for this verification, ensuring that the proof behavior is tied to a specific historical state of the product.
[0043] Step 2: Generating a local random number: To ensure the uniqueness of each verification request and to resist replay attacks, the encryption module on the terminal device first generates a local random number. The random number is a 256-bit number generated by a cryptographically secure pseudo-random number generator. This random number is only valid for this verification session, ensuring that the generated verification response code is unique each time, even if all other inputs are exactly the same.
[0044] Step 3: Combining the input data to form a temporary byte sequence: To cryptographically bind all proof elements—the server's challenge, the local measurement results, and the local randomness—the terminal device combines the following three pieces of data in a preset, deterministic order: Dynamic challenge code: A complete dynamic challenge code issued from the server.
[0045] State offset vector : Includes the state offsets of all challenged anchor points The vector.
[0046] Local random number: A 256-bit random number generated in the first step of this process.
[0047] The combination method involves concatenating the byte representations of these three data sets end-to-end to form a temporary, single byte sequence.
[0048] Step 4: Calculate the verification response code: To compress this temporary byte sequence into the final verification response code through an irreversible computation process, the system employs a pre-defined one-way cryptographic function that maps inputs of arbitrary length to fixed-length outputs. In this embodiment, this function is the secure hash algorithm SHA-256. Its calculation process can be represented as follows:
[0049] In the formula, The final generated verification response code is a 256-bit hash value. It is a dynamic challenge code obtained from the server. It is a fixed-length byte sequence generated by converting the state offset vector obtained by local calculation according to a preset normalization protocol; the normalization protocol includes numerical quantization, string formatting and ordered concatenation steps. This is a locally generated random number. (Symbol) This function represents a byte sequence concatenation operation. SHA-256() represents the execution of the Secure Hash Algorithm 256. This function is one-way and collision-resistant, ensuring that even small changes in the input data will result in significant differences in the output.
[0050] Due to the one-way nature of hash functions, the output verification response code... The reverse engineering can be used to deduce any input information, especially the key state offset vector containing physical state information. This is computationally infeasible. Therefore, this verification response code, while encapsulating physical verification evidence, also hides sensitive information such as the flow pattern image, the current feature map, and the specific degree of wear.
[0051] S5. Determine the validity of the verification response code, and if it is determined to be valid, perform a collaborative update of the current feature map based on the state offset to generate the next feature map.
[0052] In a preferred embodiment, the validity determination of the verification response code includes: receiving the verification response code, state offset, and local random number from the current node; Obtain the current feature map summary corresponding to the identity code and the dynamic challenge code sent to the current node; Using the same one-way cryptographic function as the one-way cryptographic function used to generate the verification response code, the current feature map digest, dynamic challenge code, state offset, and local random number are verified and calculated to generate the expected verification code. Compare the expected verification code with the verification response code. If the two are completely identical, the verification response code is deemed valid.
[0053] Specifically, to make a final determination on the validity of the verification credentials submitted by the current node and to ensure that the product's digital identity evolves in sync with its physical state, the system's backend server will execute a process that includes two phases: verification and update. Step 1: Verifying the validity of the response code: To confirm that the credentials indeed originated from on-site operations on a real physical entity, the server performs a strict cryptographic check: Retrieve verification data: The server receives a data packet uploaded from the current node, which contains the verification response code. State offset vector and local random numbers At the same time, the server performs the following operations based on the identity code in the request: 1) Retrieve the current feature map of the product from the database before the start of this verification, and calculate its SHA-256 hash value to obtain the current feature map summary. This summary serves as a unique digital fingerprint of the product's physical state at that moment, binding the client's proof behavior to the determined historical state of the product.
[0054] 2) Based on the records of this verification session, retrieve the complete dynamic challenge code that was previously issued to this node. .
[0055] Verification of the expected verification code: The server uses the exact same one-way cryptographic function (e.g., SHA-256) as the client when generating the response code to verify and calculate all the received data to generate the expected verification code. The calculation process can be expressed as follows: The calculation inputs and their order here must be consistent with the verification response code generated in step S4. The timing is completely consistent.
[0056] Comparison and Adjudication: The server compares the calculated expected verification code. With the verification response code received from the client Perform a bit-by-bit comparison. If the two are completely identical ( If the verification is successful, the process proceeds to the second step. If the verification is not successful, the verification is considered invalid, the system will reject the record of this workflow operation and return an error message.
[0057] Step 2, Collaborative Update of Feature Map: After successful verification, to ensure the feature map reflects the gradual changes in the physical state of the product due to normal circulation (such as slight wear), the system performs a collaborative update to generate the next feature map. Targeting the update: Based on the dynamic challenge code used in this verification, determine the subset of feature anchors to be challenged. The update operation only applies to these anchors that have been measured on-site.
[0058] Perform weighted updates: For each target anchor point in the subset, the system uses a weighted average to calculate its local image feature reference value vector in the current feature map. Update to the new baseline vector Its update formula is:
[0059] In the formula, This represents the updated feature baseline value vector, which will replace the old values and be stored in the next feature map. This represents the old feature baseline value vector before the update, i.e., the values stored in the current feature map. This represents the real-time local image feature vector about the anchor point extracted from the on-site image. This is the update weighting factor, a preset scalar value between (0,1). This factor controls the update rate and is set according to the system's sensitivity and stability requirements. A larger one... A value (e.g., set to 0.95) means that updates are more gradual, the system can better filter out noise from single measurements, and maintain the stability of historical states; a smaller value... The value allows the map to adapt to actual changes in features more quickly.
[0060] Generate the next feature map: Create a new feature reference vector for all updated anchor points. Replace the corresponding old values in the current feature map, while the feature data of unchallenged anchor points remain unchanged. The new feature map formed after this operation is the next feature map. This map will be stored and used as the "current feature map" for the next cycle verification of this relay.
[0061] S6. Generate a chain-linked transfer certificate and store it based on the current feature map summary, dynamic challenge code, verification response code and the next feature map summary.
[0062] In a preferred embodiment, generating and storing chained transfer vouchers includes: obtaining the hash digest of the current feature map before the current verification operation as a state digest before verification. After obtaining the hash digest of the next feature map after this verification operation, the hash digest of the next feature map will be used as the post-verification state digest. The pre-verification state digest, dynamic challenge code, verification response code, and post-verification state digest are concatenated into a byte sequence in a preset fixed order, and the cryptographic hash value of the sequence is calculated to generate a chain-like circulation credential. The generated chain transfer certificate, the state offset calculated in this verification, and the operation information of the current node are combined to form a transfer record and stored in a tamper-proof storage medium.
[0063] Specifically, in order to solidify a successful physical verification operation into an immutable and traceable record, this system executes a rigorous credential generation and data storage process on the backend server, aggregating various independent verification elements into a logically closed-loop chain structure.
[0064] The first step is to obtain two key state anchor points before and after this verification: The system calculates the hash value of the current feature map (i.e., the map before verification) to obtain the state summary before verification. This summary can be viewed as a digital snapshot of the product's physical state prior to this transfer event. Simultaneously, the system performs the same hash calculation on the next feature map (i.e., the verified map) generated through collaborative updates, obtaining the verified state summary. This is a digital snapshot of the product's new state after this incident.
[0065] The second step is to cryptographically bind the core data elements of this verification process. Specifically, this involves cryptographically binding the pre-verification state digest obtained in the previous step. The dynamic challenge code used in this verification The verification response code uploaded and verified by the terminal. and the post-verification state summary These four data items are combined in a predetermined fixed order. This combination involves concatenating their byte sequences end to end to form a single, longer data block.
[0066] The third step is to perform final compression and solidification on this aggregated data block to generate the final chain-linked transfer certificate. The system applies the SHA-256 hash function to this combined data block, and the formula can be expressed as:
[0067] The key feature of this chain-linked certificate is that it takes the digest of the previous state as input and generates the digest of the next state, thus establishing an indivisible chain relationship at the cryptographic level.
[0068] The fourth step is to archive all relevant information from this transaction. The system packages the chained transaction voucher generated in the previous step, the state offset calculated during this verification process for updating the feature map, and operation information such as the geographical location, timestamp, and operator identity of the current node in this operation into a structured data record. This complete record is written to a tamper-proof storage medium, such as a distributed ledger or a centralized database with strict access control and audit logs, ensuring data integrity, non-repudiation, and long-term availability.
[0069] In a preferred embodiment, the method further includes a source tracing audit step: receiving an audit request containing the target relay identification code; Based on the identification code, retrieve all historical transfer records associated with the target relay from the storage medium. Each historical transfer record contains a chain transfer certificate and the pre-verification status summary, dynamic challenge code, verification response code, and post-verification status summary on which the certificate was generated. The internal data association consistency of cryptographic hash values in each historical chain of transfer vouchers and the continuity of state digests between adjacent vouchers are verified sequentially. If all verifications pass, the target relay's circulation chain is determined to be complete and authentic.
[0070] Specifically, in response to a traceability audit request for a specific relay, this system will initiate an automated verification process to check whether the entire circulation record of the product since it left the factory constitutes a logically rigorous and cryptographically complete chain.
[0071] The first step is to retrieve and organize the complete historical record of the product from the tamper-proof storage medium. When the system receives an audit request containing the unique identifier of the target relay, it uses this identifier as the query key to initiate a data retrieval operation to the storage backend. The goal of the retrieval is to obtain all historical chain-like transaction documents associated with this identifier, arranged in chronological order. These documents are extracted one by one in the form of data records, forming a sequence of documents to be verified. ,in The record contains its hash value And the four fields that make it up: , where n represents the sequence number of the currently processed or referenced stage in the historical flow record sequence.
[0072] The second step involves verifying the internal logic and external links of this document sequence one by one to ensure that the chain has not been tampered with or broken. The system will iteratively perform verification starting from the first document in the sequence, i.e., the document generated during the first circulation after the product leaves the factory. For any chain-linked document in the sequence... The system will perform two core checks. The first is an internal data consistency check, in which the system will recalculate the hash value of the credential. The calculation formula is as follows:
[0073] in, This represents the recalculated verification hash value for internal consistency verification, based on the nth historical record. vouchers The system records the pre-verification state digest, dynamic challenge code, verification response code, and post-verification state digest. The system will calculate... The hash value recorded by the credential itself Perform a comparison. If... If this is the case, it indicates that the internal data of the voucher has been tampered with, and the audit has failed.
[0074] The second step is the continuity check of the cryptographic hash values, which is crucial to ensuring the chain is intact. For the first... Chain of circulation vouchers The system will extract the post-verification status summary from its internal records. Then, the system will retrieve the next element in the sequence, i.e., the [nth element]. Chain of circulation vouchers And extract its pre-verification state summary from it. The system will rigorously compare these two summaries to determine... Is it equal to In engineering terms, this means that the "ending state" of the previous stage must be exactly equal to the "starting state" of the next stage. If this equation does not hold for any stage in the sequence, that is... This indicates that the circulation chain is in the first... and the The audit failed because of a break or data falsification between different stages.
[0075] The third step is to output the final audit conclusion. The system will repeatedly execute the above two checks until the entire voucher sequence has been traversed. Only when all chained transfer vouchers in the sequence have passed the internal consistency check, and the state summaries between all adjacent vouchers have achieved continuous connection, will the system determine that the transfer chain of the target relay is complete and authentic. At this time, the system will return a successful audit report to the audit requester, which may contain complete and verified transfer node information, timestamps, and other data for the product. If any check fails, the process will be immediately terminated and an audit failure report containing error details will be returned.
[0076] In a further preferred embodiment, in the source tracing audit step, if a quality anomaly analysis request is received, the following is performed: based on the identification code, obtain all historically stored state offset sequences related to the target relay, the sequences consisting of multiple state offset vectors arranged in chronological order; For each state offset vector in the state offset sequence, calculate its vector magnitude as the damage index of the corresponding flow link; Identify whether there are any abnormal values in the damage index that exceed the preset damage threshold, and mark the corresponding flow link as a suspected physical damage occurrence link.
[0077] Specifically, after confirming the authenticity and effectiveness of the circulation chain, if a request for quality anomaly analysis of the relay is received, the system will initiate a dedicated data analysis process, aiming to accurately locate the specific link where physical damage may occur from abstract numerical changes.
[0078] The first step involves retrieving and organizing complete data reflecting the evolution of the product's physical state from tamper-proof storage media. Based on the identification code provided in the request, the system queries and retrieves all historical state offset sequences related to the target relay, arranged in chronological order. Each This is the state offset vector calculated during the nth iteration of the verification. Since each verification may involve multiple feature anchors, what is obtained is a sequence of state offset vectors, each vector... It contains the specific offset values of all the challenged anchor points in this verification.
[0079] The second step is to calculate the damage index for a single flow step: Since the dynamic challenge code (feature anchor subset) used for each verification is different, and the feature map is dynamically updated as verification passes, adjacent state offset vectors do not have direct algebraic subtraction meaning. Therefore, the system instead uses a modulus-based anomaly detection algorithm. For each state offset vector in the sequence... The system calculates its L2 norm (Euclidean norm) as the damage index for this flow link. The calculation formula is as follows: ,in, It is the state offset vector The z-th component in the equation. Damage index. It directly reflects the degree of deviation of the product's physical surface from the previous node record (i.e., the expected state) when it reaches the current node in the nth flow.
[0080] Step 3: Identify sudden damage: The system sets an empirical threshold for sudden damage. (For example This threshold is significantly higher than the state offset range caused by normal wear or differences in ambient light (typically <0.15). The system iterates through the calculated damage index sequence. If a damage index is found in a certain link... Greater than the sudden injury threshold If the product has suffered physical damage (such as impact, scratches or corrosion) beyond the normal aging range during the transfer process from node u-1 to node u, then it is determined that the product has suffered physical damage (such as impact, scratches or corrosion) during the transfer process.
[0081] Step 4: Generate an analysis report: The system will generate all reports exceeding the threshold. The corresponding circulation link is marked as "suspected physical damage occurrence link", and combined with the timestamp, geographical location and handling party information of the link, a quality anomaly tracing analysis report is generated, thereby achieving accurate positioning of the responsible party.
[0082] The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, and all such modifications and additions should fall within the protection scope of the present invention.
Claims
1. A closed-loop traceability method for relay sales based on the flow pattern characteristics of the housing injection molding, characterized in that, include: S1. When the relay is off the production line, the initial flow pattern image of its housing surface is obtained, and multiple feature regions with scale and rotation invariance are extracted from the initial flow pattern image as initial feature anchor points. Based on all the initial feature anchor points and their spatial topological relationships, an encrypted initial feature map is constructed. S2. In response to the verification request from the previous node to the current node, obtain and issue a dynamic challenge code generated based on the unique identity code bound to the product and the current feature map recorded in the previous node. S3. At the current node, acquire the flow pattern image of the relay housing, and locate the target feature anchor point from the flow pattern image based on the dynamic challenge code, and calculate the state offset of the target feature anchor point relative to the corresponding feature anchor point recorded in the current feature map. S4. Based on the dynamic challenge code and state offset, generate a verification response code to prove possession of the target physical entity without revealing image details; S5. Determine the validity of the verification response code, and after determining that it is valid, perform collaborative updates on the current feature map based on the state offset to generate the next feature map. S6. Generate a chain-linked transfer certificate and store it based on the current feature map summary, dynamic challenge code, verification response code and the next feature map summary.
2. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 1, characterized in that, Construct an encrypted initial feature map based on all initial feature anchors and their spatial topological relationships, including: The feature response value of each local region is calculated by the feature point detection algorithm, and the local region whose feature response value exceeds the preset response threshold is identified as a candidate anchor point. Extract the local image feature vector of each candidate anchor point and record its coordinate position in the initial flow pattern image; Initial feature anchors are selected from candidate anchors according to the screening rules that ensure spatial uniformity and feature uniqueness, and the relative positional relationship between each initial feature anchor is established to form a spatial topological relationship. The local image feature vectors, coordinate positions, and spatial topological relationships corresponding to the selected initial feature anchor points are combined and encrypted to generate an initial feature map.
3. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 1, characterized in that, The generation of dynamic challenge codes includes: Obtain the current feature map corresponding to the identity code; From the multiple feature anchor points contained in the current feature map, a subset of feature anchor points is selected using a random algorithm that combines the current time and identity code as seeds; Generate a set of geometric transformation simulation parameters to simulate pose deviations during on-site shooting; The identification information of the feature anchor subset is combined and encoded with the geometric transformation simulation parameters to generate a dynamic challenge code.
4. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 3, characterized in that, Calculate the state offset of the target feature anchor point relative to the corresponding feature anchor point recorded in the current feature map, including: Based on the identification information of the feature anchor subset carried in the dynamic challenge code, the corresponding target feature anchor data is searched in the current feature map. The target feature anchor data includes a local image feature reference value vector and coordinate reference values. In the flow pattern image, image registration is performed based on the coordinate reference value and the geometric transformation simulation parameters in the dynamic challenge code to locate the target feature anchor point; Extract real-time local image feature vectors from target feature anchor points; Calculate the difference between the real-time local image feature vector and the local image feature reference value vector, and use the difference as the state offset.
5. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 1, characterized in that, Generate a verification response code to prove possession of the target physical entity without revealing image details, including: From the verification task issued by the server, obtain the current feature map summary corresponding to the state of the previous node on which this verification is based; Generate a local random number at the current node to ensure the uniqueness of a single verification; The current feature map summary, dynamic challenge code, state offset, and local random number are combined to form a temporary byte sequence; A one-way cryptographic function that maps inputs of arbitrary length to outputs of fixed length is used to compute temporary byte sequences and generate verification response codes.
6. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 5, characterized in that, Determine the validity of the verification response code, including: Receive the verification response code, status offset, and local random number from the current node; Obtain the current feature map summary corresponding to the identity code and the dynamic challenge code sent to the current node; Using the same one-way cryptographic function as the one-way cryptographic function used to generate the verification response code, the current feature map digest, dynamic challenge code, state offset, and local random number are verified and calculated to generate the expected verification code. Compare the expected verification code with the verification response code. If the two are completely identical, the verification response code is deemed valid.
7. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 1, characterized in that, Generate and store chain-linked transaction vouchers, including: Before obtaining this verification operation, the hash digest of the current feature map is used as the state digest before verification; After obtaining the hash digest of the next feature map after this verification operation, the hash digest of the next feature map will be used as the post-verification state digest. The pre-verification state digest, dynamic challenge code, verification response code, and post-verification state digest are concatenated into a byte sequence in a preset fixed order, and the cryptographic hash value of the sequence is calculated to generate a chain-like circulation credential. The generated chain transfer certificate, the state offset calculated in this verification, and the operation information of the current node are combined to form a transfer record and stored in a tamper-proof storage medium.
8. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 7, characterized in that, It also includes source tracing audit steps: Receive an audit request containing the target relay identification code; Based on the identification code, retrieve all historical transfer records associated with the target relay from the storage medium. Each historical transfer record contains a chain transfer certificate and the pre-verification status summary, dynamic challenge code, verification response code, and post-verification status summary on which the certificate was generated. The internal data association consistency of cryptographic hash values in each historical chain of transfer vouchers and the continuity of state digests between adjacent vouchers are verified sequentially. If all verifications pass, the target relay's circulation chain is determined to be complete and authentic.
9. The relay sales closed-loop traceability method based on the flow pattern characteristics of the housing injection molding according to claim 8, characterized in that, In the source tracing audit step, if a quality anomaly analysis request is received, the following steps are performed: based on the identification code, obtain all historically stored state offset sequences related to the target relay, the sequences consisting of multiple state offset vectors arranged in chronological order; For each state offset vector in the state offset sequence, calculate its vector magnitude as the damage index of the corresponding flow link; Identify whether there are any abnormal values in the damage index that exceed the preset damage threshold, and mark the corresponding flow link as a suspected physical damage occurrence link.