Cosmetic anti-counterfeiting traceability verification method based on blockchain and dynamic two-dimensional code

CN122948525APending Publication Date: 2026-10-20SHANGHAI QIYU DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611241936.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

这样即使多条结果相互一致,也可能只是重复了同一个原始识别错误

Benefits of technology

本发明通过保留满足物理可达约束和实体观测结果的可行身份排列,并在身份排列未唯一时实施独立复核,可避免先入先出或单次识别造成的身份错配,使入口数字身份与出口化妆品实体保持唯一对应,提高不可连续识别输送过程中的单件身份恢复准确性和溯源一致性。通过对象标识符关联入口数字身份、入口位置及原始物理观测来源,并依据输送机构实际连接关系形成物理可达约束,可在产品身份尚未最终确定时保持实体状态连续,排除机械结构上不能成立的身份对应关系,减少无效候选排列并提高后续身份排列处理的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure REF-OBJ-1786944551521-000002
    Figure REF-OBJ-1786944551521-000002
  • Figure REF-OBJ-1786944551521-000006
    Figure REF-OBJ-1786944551521-000006
  • Figure REF-OBJ-1786944551521-000020
    Figure REF-OBJ-1786944551521-000020
Patent Text Reader

Abstract

This invention provides a cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes. The method includes: acquiring the digital identity and entry location of cosmetics entering a discontinuously identifiable transport area; establishing an object identifier; and forming physical reachability constraints and initial observation source relationships based on the transport mechanism connection relationships; acquiring the observation results of the exported cosmetic entities; establishing and reducing the set of feasible identity permutations between the object identifier and the exported cosmetic entities; and, when multiple identity permutations exist, determining the target verification product and candidate identity divergence relationships based on the differences in the object identifiers corresponding to the same exported cosmetic entity in different permutations. By retaining feasible identity permutations that satisfy physical reachability constraints and entity observation results, identity mismatches caused by first-in-first-out or single-identification are avoided, ensuring that the entry digital identity corresponds to the exported cosmetic entity, and improving the accuracy of single-item identity recovery and traceability consistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of product anti-counterfeiting and traceability technology and production process data processing technology, and in particular to a cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes. Background Technology

[0002] In the cosmetics manufacturing process, to ensure continuous tracking of individual products, dynamic QR codes are typically affixed to the bottle or packaging. These codes are read before the product enters the buffer transport, consolidation, distribution, or transfer areas, identifying its digital identity at the entry point. After the product leaves this area, the exit cosmetic is re-assigned to its original digital identity based on the exit location, transit order, and QR code reading results. This mapping is then written to the blockchain for subsequent packaging, warehousing, and anti-counterfeiting verification. When the transport path is fixed and the products maintain their original order, this method can easily maintain the correspondence between individual products and their digital identities.

[0003] However, in actual production lines, buffer zones, confluence channels, diversion mechanisms, or transfer mechanisms may cause multiple cosmetic items to exchange positions within discontinuously identifiable transport areas. For example, if two products enter the area in the order A and B, after side-by-side accumulation, partial congestion, or cross-transfer, their actual exit order may become B and A. At this point, the number of products remains unchanged, and products can still be detected at each exit location. However, relying solely on first-in-first-out, entry time, or exit order is insufficient to determine which entry digital identity corresponds to the exiting product. If the system still directly selects a mapping, it might assign the digital identity of A to B, and this error would continue to be written into subsequent detection records, blockchain status, and dynamic QR codes, allowing the erroneous identity to persist along the subsequent process.

[0004] Furthermore, while multiple results may be obtained during the exit identification or verification process, these results do not necessarily originate from independent entity observations. For example, multiple records from different control nodes may all originate from the same QR code read or the same imaging device, only to be formed into different records after being forwarded or reprocessed. Thus, even if multiple results are consistent, they may simply be repeating the same original identification error.

[0005] Therefore, the problem to be solved by this invention is: after cosmetics have passed through a transport area where positional rearrangement is allowed and continuous identification is not possible, how to reliably restore the unique correspondence between the entry digital identity and the exit cosmetic entity when existing observations cannot uniquely determine the identity correspondence and multiple observations may have the same source, so as to avoid incorrect identities from continuing to enter the blockchain and subsequent dynamic QR code verification process. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing a cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes, thereby solving the technical problems mentioned in the background section.

[0007] To achieve the above objectives, the present invention provides the following technical solution: The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes includes the following steps: S1. Obtain the digital identities and entry locations of multiple cosmetic items entering the discontinuously identifiable transport area from the edge computing node, establish object identifiers, form physical reachability constraints based on the connection relationship of the transport mechanism, and establish the relationship between entry observation and the source of original physical observation; S2. Obtain the observation results of exported cosmetic entities, establish a set of feasible identity permutations of object identifiers and exported cosmetic entities based on constraints, delete identity permutations that contradict constraints or entity observations, and form observation source dependency relationships. S3. When there are multiple identity permutations, compare the object identifiers corresponding to the same exported cosmetic entity in each identity permutation to determine the target review product and the candidate identity discrepancy relationship. S4. Trace the common original physical observation source, determine the path from the mechanically accessible and independent verification path, control the target verification product to the verification station to obtain independent entity observation, and delete inconsistent identity arrangements until a unique identity arrangement or an identity undetermined state is formed. S5. When a unique identity is formed, the one-to-one correspondence between the entry digital identity and the exit cosmetic entity is written into the blockchain and a dynamic QR code subsequent state is generated; when an identity is in an undetermined state, the generation of a dynamic QR code subsequent state is prohibited and the corresponding product is controlled to enter the isolation path.

[0008] The beneficial effects of this invention are as follows: This invention avoids identity mismatches caused by first-in-first-out (FIFO) or single-time identification by retaining feasible identity arrangements that satisfy physical reachability constraints and entity observation results, and by implementing independent verification when identity arrangements are not unique. This ensures a unique correspondence between the entry digital identity and the exit cosmetic entity, improving the accuracy of single-item identity recovery and traceability consistency in discontinuous identification and transportation processes. By associating the entry digital identity, entry location, and original physical observation source with an object identifier, and forming physical reachability constraints based on the actual connection relationship of the transportation mechanism, the invention maintains the continuity of the entity state even before the product identity is finalized, eliminates identity correspondences that cannot be established mechanically, reduces invalid candidate arrangements, and improves the stability of subsequent identity arrangement processing.

[0009] This invention uses edge computing nodes to form a feasible identity permutation set based on export entity observations, and merges multiple records derived from the same acquisition event into the same original physical observation source. This avoids duplicate records being mistaken for independent evidence, providing a clear physical basis for the retention and deletion of identity permutations, and improving the consistency and reliability of candidate identity constraint results. By comparing the differences in object identifiers corresponding to the same export cosmetic entity in different identity permutations, and determining the target verification product based on the permutation divergence, new entity observations can directly act on the current identity ambiguity position, reducing repeated verification of products that have already been partially determined, and improving the effective utilization of limited verification resources for identity permutation reduction.

[0010] This invention eliminates verification paths that still rely on a common original physical observation source by identifying the dependency relationship of the observation source. It then utilizes reinforcement learning to select from candidate paths that meet the conditions of independence and mechanical reachability, reducing the probability of the same original identification error being repeatedly confirmed. Furthermore, it improves the consistency of subsequent verification path selection by reducing the feedback of identity ranking results after verification. By generating a dynamic QR code subsequent state only after the identity ranking is unique and the blockchain write is confirmed, and by implementing isolation control for products with undetermined identities, failed verifications, or unconfirmed on-chain states, it prevents erroneous identities from continuing to enter the testing, packaging, and warehousing stages. This ensures that the blockchain's individual product identity state is consistent with the actual exported cosmetic entity, improving the reliability of subsequent anti-counterfeiting and traceability verification. Attached Figure Description

[0011] Figure 1 This is a flowchart of the cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to the present invention. Detailed Implementation

[0012] 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.

[0013] Example: Figure 1 As shown, this embodiment provides a cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes, including the following steps: S1. Obtain the digital identities and entry locations of multiple cosmetic items entering the discontinuously identifiable transport area from the edge computing node, establish object identifiers, form physical reachability constraints based on the connection relationship of the transport mechanism, and establish the relationship between entry observation and the source of original physical observation; S2. Obtain the observation results of exported cosmetic entities, establish a set of feasible identity permutations of object identifiers and exported cosmetic entities based on constraints, delete identity permutations that contradict constraints or entity observations, and form observation source dependency relationships. S3. When there are multiple identity permutations, compare the object identifiers corresponding to the same exported cosmetic entity in each identity permutation to determine the target review product and the candidate identity discrepancy relationship. S4. Trace the common original physical observation source, determine the path from the mechanically accessible and independent verification path, control the target verification product to the verification station to obtain independent entity observation, and delete inconsistent identity arrangements until a unique identity arrangement or an identity undetermined state is formed. S5. When a unique identity is formed, the one-to-one correspondence between the entry digital identity and the exit cosmetic entity is written into the blockchain and a dynamic QR code subsequent state is generated; when an identity is in an undetermined state, the generation of a dynamic QR code subsequent state is prohibited and the corresponding product is controlled to enter the isolation path.

[0014] S1 specifically includes the following sub-steps: S110. Establish the identification and entry identity association for individual cosmetic items. Taking individual cosmetic items entering the non-continuously identifiable conveying area as the processing object, a QR code reading device capable of reading dynamic QR codes one by one and a position detection device for confirming the product's passing position and passing time are set up on the entry side of this area. The QR code reading device and the position detection device are connected to the edge computing node of the production line through the device communication interface.

[0015] Non-discontinuously identifiable transport areas refer to transport areas where the location or passage order of a product may change after entering the area due to buffering, merging, splitting, accumulation, or transfer, and it is impossible to continuously obtain physical observations within the area sufficient to uniquely maintain the correspondence between individual products.

[0016] An object identifier is a unique identifier established by an edge computing node for a single cosmetic product when it enters a discontinuously identifiable transport area. It is used to continuously associate the entry digital identity, entry location, candidate mapping with the exit entity record, observation source, and subsequent dynamic QR code status while the product's final identity has not been restored. The object identifier is different from the entry digital identity in the dynamic QR code. The entry digital identity represents the traceability identity that has been confirmed before the product enters the area. The object identifier is only used for entity status management during this discontinuous identification process and does not replace the entry digital identity.

[0017] Whenever the entrance location detection device generates a valid product passage trigger signal, the edge computing node establishes an entrance acquisition event and receives the QR code reading result corresponding to the trigger signal time. The QR code reading result includes at least the entrance digital identity and the QR code verification result. The entrance location is represented by a discrete entrance number consistent with the device configuration, and the acquisition time is represented by a timestamp under the unified clock of the production line.

[0018] After the equipment is installed, the allowable time range for the two types of equipment is determined by calibrating the same product sequentially through the entrance trigger position and the QR code reading position. This range serves as the basis for synchronizing the collected events. If the same trigger event corresponds to multiple QR code reading frames during operation, the frames that cannot complete the QR code verification are deleted first. Then, the one with the smallest time difference from the entrance trigger time is retained in the remaining frames. The remaining frames are recorded as duplicate data from the same original physical observation source and are not used as independent evidence.

[0019] If the QR code cannot be decoded, the entry number exceeds the device configuration range, the entry detection result is missing, or the QR code result cannot match the entry trigger event within the calibrated time range, then the product will not be added to the normal entry product identity set, but an entry observation abnormal state will be established and it will be controlled to enter the existing abnormal handling path.

[0020] For products that pass the verification, the edge computing node generates a unique object identifier based on the entry event and forms an entry identity record of "object identifier - entry digital identity - entry location - collection time"; where the same object identifier corresponds to only 1 entry digital identity and 1 entry location.

[0021] Once completed, all valid entry identity records will be combined into an entry product identity set, which will be used by S120 to determine the reachable exit range of each object identifier based on its entry location, and will serve as the identity basis for S210 when constructing a feasible identity arrangement set.

[0022] S120. Based on the actual mechanical connection relationships of the discontinuously identifiable conveying area, physical reachability constraints from the inlet to the outlet are formed. The production line edge computing node reads the fixed connection relationships between each inlet, buffer channel, merging channel, diversion channel, transfer mechanism, and outlet within the discontinuously identifiable conveying area from the equipment configuration interface, and reads the channel opening / closing status, conveying direction, diversion position, and mechanical interlock status that are actually effective during the current product passage from the corresponding actuator status interface.

[0023] Fixed connections are reconfigured after adjustments to the equipment structure or channel connections, while the operational status is continuously updated during the product's entry into the area and the formation of the exit entity. Related paths are updated only when the operational status changes, and historical probabilities or past product passage patterns do not replace the on-site mechanical state. The physical reachability constraint from entry to exit refers to which exit locations a product at a given entry location can reach via continuously accessible paths, given the current actual mechanical structure and actuator state.

[0024] Establish physical reachability matrices for edge computing nodes:

[0025] in, It represents the physical reachability from inlet p to outlet q, is dimensionless, and only takes the values ​​0 or 1; p is the inlet position number, and q is the outlet position number, both of which are derived from the production line equipment configuration.

[0026] During calculation, adjacent mechanical units are checked sequentially from the entrance position according to the actual conveying direction. A value of 1 is used only when all necessary mechanical units between the entrance and the target exit are connected and in a passable state; a value of 0 is used when any necessary passage is closed, the diversion mechanism is locked to another direction, the conveying direction is reversed, or mechanical interlocks prohibit passage. This formula does not have issues with denominators or out-of-bounds values. If a section of equipment has missing status, communication is abnormal, or the configuration status conflicts with the actuator feedback, the passability of that section is not presumed. Instead, the entrance-to-exit relationship involving that section is marked as an abnormal reachability, and the establishment of a normal identity arrangement using the corresponding path is prohibited.

[0027] For cache or confluence structures that allow product swapping internally, only the set of exits that products can reach is limited, without artificially imposing first-in-first-out constraints. For physically isolated structures that do not allow cross-swapping, the corresponding identity swapping is excluded by the unreachable elements in the matrix. The edge computing node then reads the corresponding entry position sequence number from S110 for each object identifier i, based on the entry position corresponding to each object identifier in S110. Extract all that meet the requirements The exit position q with =1 forms the set of exits allowed by this object identifier.

[0028] The physical reachability matrix and the set of exits for each object identifier together constitute the physical reachability constraint from entry to exit. This constraint is a hard constraint that cannot be relaxed when S220 forms a set of feasible identity permutations. Subsequent reinforcement learning can only work between the verification paths that satisfy this constraint and cannot modify the physical reachability relationship.

[0029] In this embodiment, reinforcement learning refers to a path selection method that uses the number of currently feasible identities, the current position of the target product to be reviewed, the occupancy status of candidate independent review paths, the status of the review workstation, and the ranking reduction results after historical reviews of the same path as state information, and uses candidate independent review paths as optional actions, and updates the state-action value based on the ranking reduction results of identities before and after review.

[0030] S130: Establish the original physical observation source relationship of the entry observation results and form the unified output of stage S1. The production line edge computing node takes the entry identity record formed in S110 and the corresponding equipment acquisition event as input, and establishes a source record for each valid observation used to confirm the entry digital identity, entry location and product entry event.

[0031] The original physical observation source refers to the specific detection equipment and acquisition event that directly acts on the current single cosmetic product and generates the corresponding observation result for the first time. Results obtained through database forwarding, network copying, field format conversion, blockchain reading, or recalculation based on existing observations are derived data and do not constitute a new original physical observation source. Each source record must include at least the source device identifier, observation type, acquisition event identifier, acquisition interface, acquisition time, corresponding object identifier, and direct entity observation marker.

[0032] Edge computing nodes trace the formation process of entry identity records forward according to data interface call relationships: when the entry QR code result comes directly from the entry QR code reading device, the single acquisition event corresponding to that device is taken as the original physical observation source of the QR code identity; when another control node only receives and forwards the same QR code result, even if it has different device numbers or digital signatures, it is still classified as the same source mentioned above; when the entry location is directly obtained by a location detection device that is physically independent of the QR code reading device, it is recorded as another original physical observation source.

[0033] If the source device identifier is missing, the acquisition event cannot be traced, or the derived record cannot find its direct upstream entity observation, the corresponding source will be marked as unconfirmed and will not be considered independent physical evidence. This establishes the initial observation source relationship.

[0034] In the S1 stage, edge computing nodes do not invoke reinforcement learning to verify path selection. Instead, they save a clear mapping between object identifiers, original physical observation sources, and device status, enabling subsequent determination of whether different digital records actually originate from the same entity observation.

[0035] The final unified output name of S1 is fixed as "Entry Product Identity Set, Entry-to-Exit Physical Reachability Constraints, and Initial Observation Source Relationship". Among them, the entry product identity set stores the entry digital identity and entry location using the object identifier as an index; the entry-to-exit physical reachability constraints store the physical reachability matrix and the set of exits allowed by the object identifier; and the initial observation source relationship stores the mapping from the entry observation results to the original physical observation sources.

[0036] The three results maintain the same object identifier index and are used as direct input to S210; if any object identifier lacks an entry digital identity, entry location, or a verifiable valid entry event, it will not enter the normal feasible identity arrangement construction process.

[0037] S2 specifically includes the following sub-steps: S210: Obtain the observation results of exported cosmetic entities and establish export entity records. The production line edge computing node takes the "entry product identity set, entry-to-exit physical reachability constraints, and initial observation source relationship" output by S130 as the pre-input, and receives the observation results output by the non-continuously identifiable transport area exit location detection device, QR code reading device, or imaging detection device that can directly obtain product entity constraints through the exit-side device interface.

[0038] The exit inspection equipment is placed at a position where products can be separated and inspected one by one after leaving the non-continuously identifiable conveying area. Each time the exit position inspection equipment generates a product passage trigger signal, an exit acquisition event is established. The exit position, the order of occurrence, and the QR code or image observation are all recorded using the production line's unified clock to record the acquisition time.

[0039] After production or maintenance, the time synchronization range of each piece of equipment on the export side is determined through the calibration process of the same product passing through different detection positions. During operation, only observations within this range that correspond to the same export trigger event are merged. The export entity record is a temporary record established for a single cosmetic item that has actually left the discontinuously identifiable transport area but whose corresponding entry object identifier has not yet been confirmed. It includes the export entity sequence number, export location, order of occurrence, collection time, and valid entity observation results. The export entity sequence number only distinguishes export events and does not indicate entry identity.

[0040] When the QR code reading device can completely read the digital identity of the entrance, the reading result is used as the exit identity constraint; when the QR code cannot be completely decoded due to product posture, obstruction or reading conditions, the identity is not inferred based on the entry order, but only the exit location, the order of appearance and other entity observations that have been reliably obtained are retained.

[0041] For multiple frames generated from the same exit acquisition event, abnormal frames that cannot form technical constraints are first deleted based on validity. Then, the remaining duplicate frames are classified into the same original physical observation source and are not counted as independent evidence. If the exit number does not exist in the equipment configuration, the exit location detection is missing, or the acquisition time cannot be synchronized with the triggering event, the corresponding exit entity record is marked as an exit observation anomaly, and the entry identity is not directly determined using this anomaly record.

[0042] Upon completion, a set of exit entity records is formed, arranged in the order of their appearance at the exit. For each valid exit entity record, the direct observation equipment, acquisition event, and original physical observation source are registered, so that S220 can establish a candidate mapping between the entry object identifier and the exit entity.

[0043] S220: Based on the physical reachability constraints from entry to exit and the observation of exit entities, form and reduce the current feasible identity permutation set. The production line edge computing node takes the set of exit entity records formed in S210, the set of entry product identities in S130, and the physical reachability constraints from entry to exit formed in S120 as input.

[0044] Feasible identity arrangement refers to a complete identity correspondence that, after mapping the object identifiers in the current set of entry product identities to be restored to the corresponding exit entity records, simultaneously satisfies the following conditions: physical reachability from entry to exit, no duplicate allocation of the same object identifier, no duplicate occupation of the same exit entity, and no contradiction in existing entity observations.

[0045] Edge computing nodes do not directly determine their identities based on first-in-first-out, most recent time, or largest single matching value. Instead, they first extract the allowed exit set formed by S120 for each object identifier, and then combine it with the exit entity observations of S210 to form a candidate mapping.

[0046] The current set of feasible identity permutations is represented as follows:

[0047] in, This represents the set of currently feasible identity permutations; This represents a complete permutation of candidate identities; i and k represent the object identifier indices of different entry products; Represents arrangement The exit entity sequence number corresponding to object identifier i in the middle; This indicates the entry position number corresponding to object identifier i in S110; This indicates the export location number corresponding to the export entity m in S210, therefore Represents arrangement The exit location of the exit entity corresponding to object identifier i; The physically reachable state determined by S120 can only be 0 or 1; This represents the entry identity and exit entity corresponding to object identifier i. Whether the existing observations are compatible is determined by taking either 0 or 1.

[0048] If an exit QR code can be fully read and matches a digital identity at an entrance, the C value of that mapping is 1; mappings corresponding to different entrance digital identities are 0. If existing observations at the exit are insufficient to distinguish multiple entrance identities, the corresponding candidate mapping is set to 1, provided there is no explicit contradiction, and probability is not used to replace actual observations. If input data is missing but there are no existing entity observations that can explicitly negate the candidate mapping, then the corresponding... Set the value to 1, and simultaneously mark the candidate mapping as having missing observation data; at this time =1 only indicates that the candidate mapping cannot be excluded by existing entity observations, and does not indicate that its identity correspondence has been confirmed.

[0049] Edge computing nodes progressively expand candidate mappings according to constraints. Each time an object identifier is added, permutations containing physically unreachable elements, duplicate exits, or explicit observational conflicts are deleted to avoid unconstrained enumeration. If an object identifier has no reachable exits, an exit entity has no possible corresponding object identifier, or the number of valid entry points and valid exit points cannot form a one-to-one mapping, an identity association anomaly state is formed, and the permutation is not forcibly supplemented. S220 outputs a pre-reduced set of currently feasible identity permutations, where each permutation stores a complete "object identifier-exit entity sequence number" mapping, which S230 uses to establish the observation source dependencies for each candidate mapping.

[0050] S230: Establish the observation source dependencies of the current feasible identity permutation set and form the unified output of stage S2. The production line edge computing node takes the current feasible identity permutation set obtained in S220, the original physical observation sources of the exit recorded in S210, and the initial observation source relations formed in S130 as inputs, and traces the entry and exit observations on which the establishment of each candidate identity permutation depends.

[0051] The observation source dependency relationship is the correspondence between the specific identity mapping in the candidate identity ranking and the original physical observation source supporting the mapping. It is used to determine whether a certain review has truly obtained entity observations that are different from the existing evidence sources.

[0052] For each candidate mapping between an object identifier and an exit entity, the edge computing node sequentially registers the entry QR code reading event, entry location detection event, exit location detection event, and exit QR code or other direct entity observation event when they exist, and identifies the original physical observation source in accordance with the source tracing rules determined in S130.

[0053] When different system nodes, different data interfaces, or different digital signatures reference the same device's data collection event, they are still classified as originating from the same source; observations obtained independently and directly by different physical devices are retained separately. If the source path is interrupted or a candidate mapping has an unconfirmed source, the original determination of whether the candidate mapping satisfies the S220 hard constraint is retained, but the source is explicitly marked as unconfirmed in the source dependency relationship, and subsequent verification paths cannot be deemed to have independence based on this.

[0054] Then, each candidate permutation is checked again to see if any mappings have been negated by explicit entity observations. Once confirmed, it is removed from the current set of feasible identity permutations. If the set is empty after deletion, an identity association anomaly status is output; if only one permutation remains, the permutation along with its observation source dependencies is still output, and S310 confirms that the identity permutation is unique; if two or more permutations remain, all of them are retained, and one is not pre-selected by edge computing nodes or reinforcement learning.

[0055] The final unified output of S2 is fixed as "Current Feasible Identity Permutation Set and Observation Source Dependencies". The former stores all complete identity permutations that cannot be excluded by physical reachability constraints and existing exit observations, while the latter stores the dependency chains that map each candidate to the original physical observation source. Both results serve as the direct input to S310. If S220 or S230 results in an identity association anomaly, the anomaly is used as the anomaly input for S310, and empty identity permutations are no longer forcibly constructed.

[0056] S3 specifically includes the following sub-steps: S310. Determine if the current feasible identity permutation is unique, and extract export cosmetic entities with ambiguous identities. The production line edge computing node takes the "current feasible identity permutation set and observation source dependency relationship" output by S230 as input, first checks the structural integrity of the current feasible identity permutation set, including whether the number of permutations is greater than 0, whether the object identifier involved in each permutation is consistent with the entry product identity set, whether there is duplicate occupation of export entities within the same permutation, and whether there is a corresponding valid export entity record for the export entity referenced by the permutation.

[0057] If an empty permutation set, missing object identifier, duplicate occupation, or non-exit entity record is detected, or if an identity association anomaly status is received from S230, an identity association anomaly status is established or maintained. S320-S420 are not executed, and the identity association anomaly status is directly passed to S430. When the structure is complete, the number of currently feasible identity permutations is counted.

[0058] When the number equals 1, it indicates that under the combined constraints of the physical reachability constraint formed in S1 and the entity observation obtained in S2, there exists only one complete identity mapping. The edge computing node marks this permutation as a unique identity permutation, no further verification is performed, and the unique identity permutation, along with the observation source dependency, is passed to S410 as the output of S3. When the current permutation number is greater than 1, the edge computing node reads the object identifier assigned to the same exit entity for each permutation using the exit entity sequence number as an index, forming a "set of exit entity sequence number - candidate object identifier".

[0059] When the same export entity always corresponds to the same object identifier in all permutations, the entity has been partially determined and will not participate in the review object screening; when the same export entity corresponds to more than two object identifiers in different permutations, it will be determined as an identity divergence entity.

[0060] A divergent entity is a product entity whose exit entity has been observed to exist, but whose corresponding entry object identifier cannot be uniquely determined by existing physical constraints and entity observations. This is different from an abnormal entity observed at the exit. S310 outputs the uniqueness judgment result of the identity arrangement, all divergent entities, and the set of candidate object identifiers for each divergent entity. The divergent entity is then entered into S320 to calculate its distinguishing effect on the global identity arrangement.

[0061] S320: Determine the target verification product based on the object identifier divergence among different identity arrangements. The production line edge computing node takes the identity divergence entity obtained in S310, the candidate object identifier set corresponding to each identity divergence entity, and the current feasible identity arrangement set continued in S230 as input. Instead of directly selecting the target product based on image clarity, QR code reading confidence, random sampling, or reinforcement learning, it calculates how many current identity arrangements can be distinguished after reconfirming the identity of a certain export entity.

[0062] For entity j with conflicting identities, its permutation conflict is calculated as follows:

[0063] in, The dimensionless value represents the permutation divergence of export entity j; a and b represent the indices of two different permutations in the current feasible identity permutations. This represents the object identifier assigned to the export entity j in the a-th identity permutation; This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise.

[0064] All data comes from the current feasible identity permutation set formed by S230, and there are no issues with measurement units or denominators of 0; if the candidate object identifier field of an export entity is missing, then the entity's [data] will not be calculated. They are then marked as missing data to prevent missing values ​​from being included in the selection of target review products. The larger the value, the more conflicts there are between the different identities currently arranged in the identity of the exit entity. If the object identifier of the entity is confirmed through a single entity observation, there are more candidate permutation pairs that can be distinguished.

[0065] Edge computing node selection The entity with the largest identity discrepancy is selected as the target verification product; if multiple entities obtain the same maximum value, the entity that first forms a valid export entity record is selected according to the order of appearance of export entities determined in S210, so that the tie situation has a definite attribution rule and does not increase the weight of unsourced entities.

[0066] After selection, the candidate object identifiers of the target verification product in all current identity permutations are read, forming a candidate identity set for the target verification product. This process ensures that the target verification product is generated by global identity permutation divergences, rather than by the detection quality of a single product itself. S320 outputs the target verification product, the candidate identity set, and the permutation divergence, which S330 uses to construct candidate identity divergence relationships that can be directly used for subsequent independent verifications.

[0067] S330: Form the candidate identity divergence relationship of the target verification product and prepare the verification input for S4. The production line edge computing node takes the target verification product and candidate identity set determined in S320, the current feasible identity permutation set output in S230, and the observation source dependency relationship as input, locates each candidate object identifier in which identity permutation it appears, and establishes the association of "target verification product - candidate object identifier - corresponding identity permutation subset - original physical observation source".

[0068] Candidate identity divergence relationship is a clear relationship between which current identity permutations correspond to different candidate object identifiers and the original physical observation sources supporting these candidate identities when the target verification product is not unique at present. The difference between it and the candidate identity set is that the candidate identity divergence relationship further gives the range of identity permutations that should be retained and deleted after obtaining a certain independent verification result.

[0069] Edge computing nodes will group all permutations that assign the same object identifier to the target verification product into the same permutation subset; if the object identifier is subsequently verified independently, the permutation subset will be retained and permutations that assign other object identifiers to the target verification product will be deleted, without regenerating all permutations.

[0070] The edge computing node simultaneously extracts the original physical observation sources supporting each candidate identity from the observation source dependency relationship in S230, and maintains the merged state of records with the same source; if the source of a candidate identity cannot be confirmed, the permutation subset corresponding to the candidate identity is retained, but it is marked as having an unconfirmed source, and S410 shall not use this state as the basis for proving the independence of the candidate verification path.

[0071] Subsequently, the number of currently feasible identity permutations, candidate object identifiers, subsets of permutations corresponding to each candidate identity, and the original physical observation sources are compiled into a unified verification status field. Reinforcement learning does not participate in the selection of the target verification product in S3; it only receives these verification status fields as state inputs for subsequent path selection in S410.

[0072] The final output name of S3 is fixed as "Target Review Product and Candidate Identity Disagreement Relationship"; if S310 has obtained a unique identity arrangement, the unique identity arrangement mark is output at the same time and unnecessary reviews are skipped by S410; if there is identity ambiguity, the output and the current set of feasible identity arrangements are used as the direct input of S410.

[0073] S4 specifically includes the following sub-steps: S410: Select independent verification paths based on observation source dependencies, and determine the actual verification path among multiple independent verification paths that meet the conditions through reinforcement learning. When there is identity ambiguity in the current feasible identity arrangement, the production line edge computing node takes the "target verification product and candidate identity divergence relationship" output by S330, the current feasible identity arrangement set and observation source dependencies continued by S230 as input, and reads the current position of the target verification product, the verification workstations that can be reached from the position, the QR code reading device or independent identity detection device corresponding to each verification workstation, the current position of the diversion mechanism, and the availability status of the conveying path from the equipment control interface.

[0074] If S410 receives the unique identity arrangement marker output by S310, it will not perform independent verification path filtering and reinforcement learning path selection, and will skip S420, directly passing the unique identity arrangement and corresponding observation source dependency to S430.

[0075] An independent verification path is an actual executable transport path from the current location of the target verification product to a certain verification station, and the original physical observation source used by the verification station to confirm the identity of the target product does not inherit the common physical observation source supporting the current candidate identity.

[0076] The edge computing node first traces the original physical observation sources upon which each candidate identity in S330 depends, identifying the sources that multiple candidate identities commonly depend on. Then, it examines the data sources and calling relationships of the verification devices at the end of each candidate verification path. If a verification device can directly reread the current target verification product, and its results do not call, copy, or calculate existing identity results from a common source, it satisfies the independence of observation sources. If a verification device, although located on another node, still directly references data from a common source, it does not satisfy the independence requirement.

[0077] If any necessary mechanical bypass mechanism malfunctions, locks, or is currently unconnectable, the corresponding path is also deleted. If, after screening, there is no independent verification path that simultaneously satisfies both the mechanical reachability condition and the observation source independence condition, a state of "no executable independent verification path" is formed and directly passed to S430. S430 then forms an "identity undetermined" state, and S420 is not executed. If only one independent verification path remains, it is directly adopted. If two or more remain, reinforcement learning selects the actual verification path from the set of paths that already satisfy independence and mechanical reachability.

[0078] Reinforcement learning adopts a discrete state-action value approach. The state field includes the number of currently feasible identity permutations, the current location of the target review product, the occupancy status of each candidate independent review path, the availability status of the review workstation, and the permutation reduction result after historical review of the same path. The action is simply to select one path from the current set of candidate independent review paths.

[0079] When selecting a path, the edge computing node reads the status-action value of each candidate independent review path under the current state, and determines the candidate independent review path with the highest status-action value as the actual review path; when multiple candidate paths have the same maximum status-action value, one path is determined according to the fixed number order of the corresponding review station in the device configuration.

[0080] Feedback after a review is defined as follows:

[0081] in, The identity ranking reduction feedback value for the t-th review is dimensionless. This represents the number of currently feasible identities before the review. The remaining number of permutations after verification, both are maintained by edge computing nodes, and only when... Reinforcement learning is invoked during the process, therefore there are no denominators of 0; feedback is set to 0 when no valid independent observations are generated during the verification. Reinforcement learning must not change the physical reachability constraints of S120, the target verification product determined by S320, or the observation source independence rules. S410 outputs the target verification product, the actual verification path, and the corresponding verification station, for S420 to perform actual routing and re-observation.

[0082] S420: Control the target verification product to enter the actual verification path and obtain independent entity observation. The production line edge computing node uses the target verification product and the actual verification path output by S410 as control inputs, and generates a diversion or transfer control command corresponding to the path based on the exit entity number of the target verification product, its current position, and the diversion node leading to the actual verification path.

[0083] Control commands are issued only when the target verification product enters the effective range of the actuator, the actual verification path is still in a conductive state, and the verification station can receive the current product. When the actuator reports a fault, the path becomes unavailable before the command is executed, or the verification station is occupied, the edge computing node cancels the execution of this path, updates the corresponding path to be currently unavailable, and returns to S410 to reselect from the remaining candidate paths that meet the independence condition. Paths that have not been actually executed are not recorded as effective action results of reinforcement learning.

[0084] Once the target product arrives at the verification station, the physical product is directly re-observed by the station's independent QR code reading device or independent identity verification device. Verification data collection begins with the product arrival trigger signal and completes one valid data collection event when the target product is in a state where it can be observed separately from adjacent products. Multiple duplicate frames generated by the same arrival event are merged according to the same-source rule in S110 and are not considered as multiple independent pieces of evidence.

[0085] The verification device outputs an observation result that can be used to distinguish the identity of the S330 candidate object identifier, and transmits the verification device identifier, acquisition time, acquisition event, original physical observation source, and identified candidate object identifier to the edge computing node.

[0086] If the review result cannot distinguish any candidate identity in S330, the identification result does not belong to the candidate object identifier set, or the data source of the review device is inconsistent with the independence judgment result of S410, then the review is invalid and the original identity arrangement is not deleted.

[0087] When a valid candidate object identifier is obtained, the edge computing node determines the subset of permutations to be retained based on the "candidate object identifier - identity permutation subset" relationship of S330, and marks the remaining permutations as permutations to be deleted. S420 outputs the actual independent review results, permutations to be deleted, actual review paths, and review execution status, which are used by S430 to update the identity permutations and reinforcement learning strategies.

[0088] S430: Based on the independent review results, reduce the current feasible identity permutation set, update the reinforcement learning state-action value, and form the output of stage S4. For the actual execution of the independent review process in S420, the production line edge computing node takes the actual independent review results formed in S420, the permutations to be deleted, the actual review path and review execution status, the current feasible identity permutation set continued in S230, and the reinforcement learning state recorded in S410 as inputs.

[0089] If S430 receives the unique identity arrangement directly from S410, it does not perform identity arrangement reduction and enhanced learning state-action value update, but directly outputs the unique identity arrangement as the S4 stage output and proceeds to S510. If S430 receives the identity association abnormal state from S310, it skips the identity arrangement reduction and enhanced learning state-action value update, outputs the identity association abnormal state as an identity undetermined state, and proceeds to the abnormal identity processing branch of S510.

[0090] If S430 receives the state of no executable independent verification path from S410, it keeps the current set of feasible identity permutations and the dependency relationship of observation sources unchanged, does not perform identity permutation reduction and enhanced learning state-action value update, takes the state of no executable independent verification path as the cause of the identity undetermined state, and directly outputs the identity undetermined state to S510.

[0091] If S420 outputs an invalid verification status, the current set of feasible identity permutations remains unchanged, identity permutation deletion is not performed, and S410 is returned to select again from other executable independent verification paths that have not yet been executed in this round; if there are no other executable independent verification paths, an identity undetermined status is formed, and the subsequent identity permutation reduction processing of S430 is stopped.

[0092] First, delete all identity permutations that map the target verification product to object identifiers inconsistent with the current independent entity observation results. Then, re-perform object identifier non-duplication, exit entity non-duplication, and S120 inlet-to-exit physical reachability constraint checks on the remaining permutations. Permutations that fail to meet any hard constraints are simultaneously deleted. For identity permutations retained after this valid independent entity observation, add the original physical observation source corresponding to this independent entity observation to the observation source dependency of the corresponding identity mapping.

[0093] After obtaining the updated set of currently feasible identity permutations, the edge computing nodes proceed according to the definition in S410. Calculate the feedback from this identity ranking reduction, and update the state-action value corresponding to the actual review path according to the following formula:

[0094] in, State before update Select the actual review path action below State-action value, dimensionless; For the updated state-action value, This represents the reinforcement learning state before the t-th review; This indicates the actual review path action selected during the t-th review. Representing state Candidate actions in the next set of independent review paths; For the learning rate, satisfy ; As a discount factor, satisfying ; Reduce the feedback value for this identity ranking; This is the status field after verification.

[0095] The learning rate and discount factor are determined by the historical independent review records of the same production line or the pre-launch verification records. The selection criteria are the final uniqueness rate of identity ranking, the number of invalid reviews, and the success rate of path execution. When historical records are missing, each executable path adopts the same initial state-action value and is updated sequentially through actual independent review results, without fabricating fixed initial values.

[0096] If the updated set of feasible identity permutations contains only one permutation, mark it as the unique identity permutation and stop the verification process. If there are still two or more permutations, feed back the updated set of feasible identity permutations and the corresponding observation source dependencies to S310, redetermine the next identity divergence entity and the target verification product, and continue to perform independent verification according to S410-S430. If the set of feasible identity permutations is empty, an identity association anomaly state is formed, and this identity association anomaly state is output as an identity undetermined state. If, after redetermining the target verification product through the above loop, there is no executable independent verification path that simultaneously satisfies the mechanical reachability condition and the observation source independence condition, and the set of feasible identity permutations still contains two or more identity permutations, an identity undetermined state is formed. In all the above cases, reinforcement learning is not allowed to bypass the physical reachability constraint or the observation source independence rule to forcibly determine the identity.

[0097] The final output name of S4 is fixed as "Unique identity arrangement or identity undetermined state". The unique identity arrangement retains the object identifier, the entry digital identity and the exit entity sequence number. If independent review has been carried out, the source of the final independent review is also retained as the direct input of S510.

[0098] S5 specifically includes the following sub-steps: S510 establishes the final identity correspondence of a single cosmetic item based on the output of S430 and performs a consistency check before writing to the chain. The edge computing node of the production line takes the "unique identity arrangement or identity undetermined state" output by S430 as direct input, and simultaneously calls the set of entry product identities saved by S110, the exit entity record formed by S210, and the final independent review source retained by S430 when independent review was performed.

[0099] If the S430 outputs a unique identity sequence, the edge computing node reads the object identifier, the entry digital identity, and the exit entity sequence number item by item according to this sequence, establishing a one-to-one correspondence between "object identifier - entry digital identity - exit cosmetic entity". The object identifier continues to serve as the association index during this discontinuous identification and transportation process, the entry digital identity retains its original product traceability identity, and the exit cosmetic entity represents the actual product that uniquely corresponds to the entry digital identity after identity disambiguation.

[0100] Then, the following checks are performed in sequence: whether each object identifier appears only once, whether each entry digital identity is assigned to only one exit entity, whether each exit entity accepts only one entry digital identity, whether the correspondence satisfies the S120 physical reachability constraint, and when an independent review has been performed, whether the final independent review result is consistent with the corresponding object identifier.

[0101] When all conditions are met, a final identity record for a single item is formed; if any condition is not met, the partial correspondence is not split and written into the blockchain, but the current processing set involved is converted to an identity-undetermined state. If S430 has already output an identity-undetermined state, normal identity mapping and solidification are not performed, and the state, the identifier of the involved object, the exit entity sequence number, and the reason for the uncertainty are directly passed to S530.

[0102] Each final identity record includes at least an object identifier, an entry digital identity, an exit entity serial number, and a unique identity arrangement marker. For records that have undergone independent verification, the final independent verification source is also included. This final independent verification source only records the physical observation source that directly obtained the verification result, and does not repeatedly store derived records from the same source. The S510 outputs either a final identity record or an undetermined identity state that has undergone pre-write chain consistency verification. The former serves as the sole data basis for S520 blockchain writing and the generation of subsequent dynamic QR code states, while the latter serves as the direct trigger condition for S530 isolation control.

[0103] S520: Write the final identity record of a single item to the blockchain and generate a dynamic QR code subsequent status. After receiving the final identity record of a single item output by S510, the edge computing node of the production line generates a single item identity status write request through the data interface connected to the blockchain node. The write request includes at least the entry digital identity, object identifier, exit entity sequence number, unique identity arrangement result, and identity recovery completion time; for processes that have actually undergone independent review, the write request also includes the final independent review source identifier. All fields are directly derived from S510 or the aforementioned processing results, without further speculation.

[0104] After receiving a request, the blockchain node queries the previous valid on-chain state of the existing digital identity of the current product. The new single identity state is only received when the previous state can be continuously matched with the current identity recovery record and the current record has not yet been written. If the record corresponding to the same object identifier and the digital identity of the current entry has been successfully written, the existing write result is returned to avoid duplicate states caused by communication retries.

[0105] After an edge computing node sends a write request, it keeps the corresponding product in a pending on-chain confirmation state. Only after receiving a successful confirmation result that matches the current object identifier, entry digital identity, and this write request will it generate a normal dynamic QR code subsequent state.

[0106] The subsequent status of a dynamic QR code refers to the next valid QR code status used for subsequent testing, packaging, warehousing, logistics, and consumer verification after a product has passed through a discontinuously identifiable transport area and completed its unique identity restoration. Specifically, the entry digital identity, the confirmed blockchain current status identifier, and the status sequence number after this unique identity restoration can be used as the payload fields of the subsequent QR code. The QR code generation interface generates new readable QR code content according to the product's existing QR code encoding rules, making it different from the QR code status before entering this area.

[0107] If blockchain communication is interrupted, write request fields are missing, nodes refuse to write, or the returned result cannot uniquely correspond to the current product, the edge computing node maintains the previous valid QR code state for the product, does not generate a new normal dynamic QR code successor state, and transmits the unconfirmed result on the chain to S530. The path value of reinforcement learning is not written into the product authenticity conclusion; only the result confirmed by the unique identity arrangement and completed on-chain writing can drive the dynamic QR code into the successor state. S520 ultimately outputs either the "blockchain single-item identity state and dynamic QR code successor state" or an unconfirmed on-chain state. The former is used by subsequent processes as a valid digital identity for the product, while the latter enters the S530 anomaly handling process.

[0108] S530 executes release or isolation control based on the unique identity and blockchain confirmation results, and completes the feedback of this identity restoration process. The production line edge computing node uses the undetermined identity state formed by S510, the blockchain write result of S520, and the subsequent state of the normal dynamic QR code as input to form a normal release state or isolation control state for the current product.

[0109] For products that have obtained a unique identity, passed the S510 consistency verification, successfully written the blockchain single-item identity status, and completed the generation of the dynamic QR code subsequent status, the edge computing node sends a normal passage instruction to the current production line release mechanism, allowing the product to continue to enter the subsequent testing, packaging, or warehousing workstation, and at the same time sends the dynamic QR code subsequent status to the corresponding subsequent equipment interface.

[0110] For products where S430 fails to form a unique identity arrangement, S510 consistency verification fails, or S520 on-chain status is not confirmed, the edge computing node shall not arbitrarily select one of the remaining candidate identities as the final identity, nor shall it generate a normal dynamic QR code successor status. Instead, it shall send an isolation control instruction to the diversion or isolation mechanism to import the corresponding single product or product group that still has ambiguous identity relationships into the existing isolation workstation.

[0111] After the control command is issued, the edge computing node reads the position feedback of the actuator or the product arrival feedback. Only when the feedback confirms that the target product has entered the designated release path or isolation path will the control action be recorded as completed. If the execution feedback is missing, the target product has not reached the designated path, or the command is inconsistent with the execution feedback, the abnormal state is maintained and the normal identity status is stopped from being sent to subsequent devices, so as to avoid assuming that the product has been properly handled based solely on the successful sending of the software command.

[0112] For the S4 process that has undergone independent verification, the edge computing node uses the actual verification path, the number of feasible identity permutations before and after verification, whether the verification obtained valid independent observations, and whether a unique identity permutation was ultimately formed as subsequent historical samples for reinforcement learning. These samples are used to update the path state-action value under the same device topology and verification resource conditions in the future. This feedback only affects the selection between subsequent candidate independent verification paths and does not retroactively change the unique identity state already written to the blockchain. The object identifier is retained as a process traceability association index after the end of this discontinuous identification transmission process and does not replace the entry digital identity in the subsequent dynamic QR code.

[0113] At this point, a unique identity status and a dynamic QR code subsequent status are formed for each product with a unique identity confirmed by the blockchain. For products whose unique identity cannot be restored or whose on-chain confirmation cannot be completed, an actual isolation control result is formed, thus ending the S110-S530 identity restoration and anti-counterfeiting traceability verification process.

[0114] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.

[0115] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0116] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for anti-counterfeiting and traceability verification of cosmetics based on blockchain and dynamic QR codes, characterized in that, Includes the following steps: S1. Obtain the digital identities and entry locations of multiple cosmetic items entering the discontinuously identifiable transport area from the edge computing node, establish object identifiers, form physical reachability constraints based on the connection relationship of the transport mechanism, and establish the relationship between entry observation and the source of original physical observation; S2. Obtain the observation results of exported cosmetic entities, establish a set of feasible identity permutations of object identifiers and exported cosmetic entities based on constraints, delete identity permutations that contradict constraints or entity observations, and form observation source dependency relationships. S3. When there are multiple identity permutations, compare the object identifiers corresponding to the same exported cosmetic entity in each identity permutation to determine the target review product and the candidate identity discrepancy relationship. S4. Trace the common original physical observation source, determine the path from the mechanically accessible and independent verification path, control the target verification product to the verification station to obtain independent entity observation, and delete inconsistent identity arrangements until a unique identity arrangement or an identity undetermined state is formed.

2. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 1, characterized in that, Also includes: S5. When forming a unique identity arrangement, the one-to-one correspondence between the entry digital identity and the exit cosmetic entity is written into the blockchain and a dynamic QR code subsequent state is generated. When an unidentified state is formed, the generation of a dynamic QR code subsequent state is prohibited, and the corresponding product is controlled to enter the isolation path.

3. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 1, characterized in that, S1 specifically includes: In the non-continuously identifiable delivery area, the digital identity, location, and collection time of a single cosmetic item are obtained. An edge computing node establishes a unique object identifier corresponding to it, forming a set of entry product identities. Read the mechanical connection relationships and current conduction status of the inlet, buffer channel, convergence channel, diversion channel, transfer mechanism and outlet within the transport area, determine the set of outlets that can be reached by the inlet corresponding to each object identifier, and form the physical reachability constraint from inlet to outlet.

4. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 3, characterized in that, Also includes: Tracing the data collection devices and events that correspond to the digital identity and location of the entry point, records obtained by forwarding or calculating observations from the same entity are grouped into the same original physical observation source, forming an initial observation source relationship, and outputting it together with the entry point product identity set and physical reachability constraints.

5. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 1, characterized in that, S2 specifically includes: In the discontinuously identifiable transport area, the exit location, occurrence order, and entity observation results are obtained. An exit entity record is established according to the exit trigger event, and the original physical observation source corresponding to each exit observation is recorded. Using the object identifier as the entry identity index, candidate mappings between the object identifier and the exit entity are established based on the physical reachability constraints from the entry to the exit. Candidate mapping combinations that are physically unreachable, have duplicate exits, or conflict with existing entity observations are deleted, forming the current feasible identity permutation set. For each candidate mapping in the identity permutation, trace the original physical observation source corresponding to the entry observation and exit observation, merge records derived from the same acquisition event into the same source, and form an observation source dependency relationship corresponding to the current feasible identity permutation set.

6. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 1, characterized in that, S3 specifically includes: Count the number of identity permutations in the current set of feasible identity permutations; when there is only one identity permutation, form a unique identity permutation mark; when there are multiple identity permutations, extract the export cosmetics entities that correspond to different object identifiers in different identity permutations as identity divergence entities; Compare the differences in object identifiers corresponding to each identity-disagreeing entity in different identity permutations, determine the permutation disagreement based on the number of distinguishable identity permutation pairs, and select the identity-disagreeing entity with the largest permutation disagreement as the target verification product.

7. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 6, characterized in that, Also includes: Each candidate object identifier of the target verification product is associated with its corresponding identity permutation subset and its original physical observation source to form a candidate identity divergence relationship, which, together with the current feasible identity permutation set, serves as the input for subsequent independent verification.

8. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 1, characterized in that, S4 specifically includes: Based on the divergence relationship of candidate identities and the dependence relationship of observation sources, the common original physical observation sources supporting each candidate identity are determined. The verification paths that are mechanically inaccessible or still depend on common sources are deleted. Among the remaining multiple independent verification paths, reinforcement learning determines the actual verification path based on the current number of identity permutations, path occupancy status, verification station status, and historical permutation reduction results. The edge computing node controls the target review product to enter the actual review path, obtains independent entity observations at the corresponding review workstation, and determines the order of the identities to be deleted based on the observed object identifiers; Delete identity permutations that are inconsistent with independent entity observations, update the reinforcement learning state based on the number of identity permutations before and after verification, and output a unique identity permutation if the remaining permutations are unique; otherwise, continue to disambiguate or form an undetermined identity state.

9. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 2, characterized in that, S5 specifically includes: When S4 outputs a unique identity arrangement, it establishes a one-to-one correspondence between the object identifier, the entry digital identity, and the exit cosmetic entity, and verifies that the object identifier, the entry digital identity, and the exit cosmetic entity are not duplicated and meet the physical reachability constraints, thus forming a single final identity record. The final identity record of a single item is submitted to the blockchain node. After the on-chain writing is successful and a confirmation result consistent with the object identifier and the entry digital identity is returned, a dynamic QR code subsequent state corresponding to the current blockchain single item identity state is generated.

10. The cosmetic anti-counterfeiting and traceability verification method based on blockchain and dynamic QR codes according to claim 9, characterized in that, Also includes: For products that have already formed a dynamic QR code successor state, the output release control is implemented. For products whose identity arrangement is not unique, whose consistency verification fails, or whose on-chain state is not confirmed, the generation of a normal dynamic QR code successor state is prohibited, and the edge computing node controls their entry into the isolation path.