Laboratory consumable tracing method and system based on RFID
By constructing an RFID-based laboratory consumables traceability system, the status of consumables is dynamically updated, solving the problem of record omissions in traditional laboratory consumables traceability methods. This achieves automated traceability and precise status control of consumables throughout the entire process, improving data consistency and management reliability.
Patent Information
- Application Number
- CN202511696579.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2025-12-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional laboratory consumables traceability methods rely on manual registration or barcode scanning, which are prone to record omissions, and barcodes are easily damaged or obscured, resulting in incomplete consumable status information, affecting usage compliance and inventory data accuracy, increasing the burden on management personnel, and reducing the reliability of the traceability system.
An RFID-based laboratory consumables traceability method is adopted, which constructs a finite state machine for the consumables lifecycle. The sub-tag identification codes are collected by an RFID reader to generate the parent-child tag logical relationship. Combined with a decision tree algorithm and a hash verification function, the consumable status is dynamically updated to achieve automated traceability and precise status control.
Ensure that consumables have a clear traceability path throughout the entire process, reduce the static nature of information records, improve data consistency and management reliability, and reduce record loss and delays caused by human intervention.
Smart Images

Figure CN121146718A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of non-contact identification technology, in particular to a laboratory consumable traceability method and system based on RFID. BACKGROUND
[0002] The field of non-contact identification technology involves the use of wireless radio frequency to achieve information identification and reading. Its core includes interacting with electronic tags carrying stored information through wireless radio frequency signals to complete data collection. In this process, it usually relies on non-contact communication between radio frequency transmitting and receiving devices and tags to achieve unique identification and reading of item identity information. This technology is widely used in identity authentication, item tracking, inventory management, and traceability supervision, and has the characteristics of convenient data acquisition and automated operation. The traditional laboratory consumable traceability method refers to the identification and recording of the flow and use of reagents, consumables and other items in the laboratory environment. It usually uses manual registration or barcode scanning to complete the traceability of consumable warehouse in and out and use process. Information identification and reading are achieved with the help of barcode printing and scanning equipment, and the flow of consumables is tracked and managed by management personnel according to the relevant recording method.
[0003] The traditional method relies on manual registration or barcode scanning to record the flow of consumables, which is prone to registration omissions or scanning omissions in operation, resulting in incomplete state information for some consumables. Barcodes rely on manual scanning, which is difficult to maintain efficiency when a large number of consumables are in and out of the warehouse. In addition, barcode labels are prone to damage or obstruction. Once the label is not identifiable, the consumable will lose the traceability record, making it impossible to confirm its real flow in subsequent management links. In the process of consumable separation or disposal, the record is often delayed or missing, affecting the use compliance and accuracy of inventory data, and increasing the workload of management personnel, reducing the reliability of the traceability system. SUMMARY
[0004] The purpose of the present application is to solve the problems existing in the prior art, and to provide a laboratory consumable traceability method and system based on RFID.
[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical scheme: a laboratory consumable traceability method based on RFID, comprising the following steps: S1: constructing a consumable life cycle finite state machine, defining the logical state and jump condition of the consumable, assigning a function role identifier to the RFID reader, and generating a consumable life cycle rule library binding the jump condition and the function role identifier; S2: collecting the unique identification code of the sub-tag in the container through the near-field RFID reader of the container, generating a parent-child tag logical relationship associating the parent tag identification code of the container with the unique identification code; S3: when the state anchor RFID reader detects the parent tag identification code of the container, the consumable life cycle rule base and the parent-child tag logical relationship are called, the logical state of the container is judged through a decision tree algorithm, and the target logical state is assigned to the associated child tag; S4: when the child tag identification code list of the near-field RFID reader changes, the child tag that deviates from the container is identified through a hash check function, and the parent-child tag logical relationship is released, and after the child tag is detected by the abandoned anchor RFID reader, the consumable life cycle rule base is called to adjust its logical state to a life cycle termination state.
[0006] As a further scheme of the application, the consumable life cycle rule base specifically includes a pre-state identifier, an anchor role code and a post-state identifier, the parent-child tag logical relationship includes a parent tag index, a child tag identification code set and a relationship establishment timestamp, the target logical state specifically refers to a state value, a state effective time and a state change trigger source, and the life cycle termination state includes a disposal location code, a tag dormancy instruction and a life cycle termination timestamp.
[0007] As a further scheme of the application, the S1 step specifically includes: obtaining laboratory standard operating procedure data, analyzing the data to identify key nodes in the consumable flow process; According to the key nodes, a set of logical states of consumables is defined, and the set of logical states at least includes in-stock, taken, in-use, and to-be-abandoned states; The physical operation or environmental change that triggers the switching between the logical states is extracted and quantified as executable jump conditions; The RFID readers deployed at different key nodes are assigned unique function role identifiers corresponding to the physical operation; The current logical state of the consumable is taken as the pre-state identifier, the function role identifier is taken as the anchor role code, and the switched logical state is taken as the post-state identifier, and a plurality of state transition rules are generated; All state transition rules are aggregated to establish the consumable life cycle rule base.
[0008] As a further scheme of the application, the S2 step specifically includes: triggered by a central control system, activating the near-field RFID reader of the container to execute an area scanning instruction; The near-field RFID reader collects the unique identification codes of all child tags within its effective communication range in a high-frequency polling manner, and performs a deduplication process on the collection results to obtain a child tag identification code set; The parent tag identification code of the container's own RFID tag is read; Get the current system time of the server and generate a relationship establishment timestamp; Using the parent tag identification code as the parent tag index, the set of child tag identification codes is integrated with the relationship to establish a timestamp, the parent-child tag logical relationship is established and stored in the database.
[0009] As a further aspect of the present invention, step S3 specifically includes: when the status anchor RFID reader detects the parent tag identification code, immediately obtaining the functional role identifier of the reader and obtaining the current timestamp; Based on the parent tag identification code, the parent-child tag logical relationship is invoked to obtain the unique identification code of all associated child tags; For each associated sub-tag, query its current logical state and use that state as the previous state identifier; The consumable lifecycle rule base is invoked to filter out all candidate subsequent status identifiers that match the preceding status identifier and the functional role identifier; Using the state transition confidence formula Calculate the score for each candidate post-state identifier; in, This represents the confidence score for state transitions. This indicates the anchor role weight determined by the aforementioned functional role identifier. This represents the time validity factor since the last state change. and These represent the preset weighting coefficients for the anchor role weight and the time validity factor, respectively. The candidate subsequent state identifier with the highest state transition confidence score is selected as the final state value. The target logical state is generated by integrating the state value, the current timestamp as the state effective time, and the functional role identifier as the state change trigger source.
[0010] As a further aspect of the present invention, step S4 specifically includes: the near-field RFID reader periodically collecting the sub-tag identification code list inside the container and calling a hash verification function to generate a real-time hash value; The real-time hash value is compared with the pre-stored hash value of the previous period. If the two are inconsistent, it is determined that the sub-tag identification code list has changed. By performing a difference operation on the two sub-label identification code lists before and after the change, the sub-label that has been removed from the container can be accurately located. Delete the associated records between the located detached child tags and the parent tag identification code from the parent-child tag logical relationship database; When the detached sub-tag enters the detection range of the abandoned anchor RFID reader, the functional role identifier of the abandoned anchor RFID reader is obtained; The consumable lifecycle rule base is invoked to adjust the logical state of the sub-tag to the preset lifecycle termination state; Generate a disposal location code that includes the location code of the abandoned anchor RFID reader, write a tag sleep command, and record the life cycle termination status with a life cycle end timestamp of the current time.
[0011] As a further aspect of the present invention, the anchor point role weight The weight is obtained by querying a preset functional role-weight mapping table. The mapping table assigns values based on the degree of impact of the physical operation represented by different functional role identifiers on the consumable life cycle. The weight value corresponding to the key conversion node is higher than that of the regular circulation node. The time validity factor The time validity factor is calculated based on the interval between the current time and the time of the most recent status change of the sub-tag, and is inversely proportional to the time interval. The preset weighting coefficient and The sum of these values is 1, and their specific values are determined through regression analysis of historical data.
[0012] As a further aspect of the present invention, the hash verification function calculates the hash verification value using the following formula. : ; in, The hash check value for the sub-tag set. The value corresponding to the unique identification code of the i-th sub-label. A preset prime number associated with the position information of the i-th sub-label. This represents the total number of sub-tags within the current container. It is a preset global prime number; The difference operation is performed on the central server. Before performing the operation, the central server needs to lock the read and write operations related to the parent tag identification code.
[0013] As a further aspect of the present invention, the logical states defined by the consumable lifecycle finite state machine include pending entry into the warehouse, in stock, already issued, pending disposal, and already disposed of. The triggering of the jump condition, in addition to verifying the functional role identifier, also requires verification of the operator's encrypted digital signature and the project code of the current experiment. The state jump is only allowed when the functional role identifier, digital signature and project code all match the preset rules. The functional role identifier is permanently written into the read-only memory area of the RFID reader before leaving the factory, and a cyclic redundancy check code is attached.
[0014] An RFID-based laboratory consumables traceability system is provided. The system is used to implement the above-mentioned RFID-based laboratory consumables traceability method. The system includes: a rule base construction module, which is used to construct a consumables lifecycle finite state machine, define the logical state and jump conditions of consumables, assign functional role identifiers to RFID readers, and generate a consumables lifecycle rule base that binds the jump conditions and the functional role identifiers. The logical relationship generation module is used to collect the unique identification code of the sub-tag inside the container through the near-field RFID reader of the container, and generate a parent-child tag logical relationship between the parent tag identification code of the container and the unique identification code. The state decision and allocation module is used to call the consumable life cycle rule base and the logical relationship between the parent and child tags when the state anchor RFID reader detects the parent tag identification code of the container, determine the logical state of the container through the decision tree algorithm, generate the target logical state, and assign the target logical state to the associated child tag. The relationship termination and status termination module is used to identify the child tag that has left the container by using a hash verification function when the child tag identification code list of the near-field RFID reader changes, terminate the logical relationship between the parent and child tags, and call the consumable life cycle rule base to adjust its logical status to life cycle termination status after the child tag is detected by the discarded anchor-point RFID reader.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by constructing a consumable lifecycle status logic and combining it with a rule base setting, the identity information of consumables can be dynamically changed at different stages, avoiding the static nature of information records. The hierarchical tracking between containers and consumables is achieved through the association relationship between parent and child tags, ensuring a clear traceability path for batch consumables during circulation and separation. When containers or consumables are identified by readers in different scenarios, the consumable status is automatically updated through decision-making, enabling precise marking of the entire process of circulation, use, and disposal. When the relationship between consumables and containers changes, the binding can be quickly identified and removed, ensuring the lifecycle status remains true and valid. This achieves automated traceability and precise status control of consumables throughout the entire process, reducing record loss and information delays caused by manual intervention, and improving data consistency and management reliability. Attached Figure Description
[0016] Figure 1 This is the overall flowchart of the consumable traceability method of the present invention; Figure 2 Flowchart for constructing a consumable lifecycle rule base for this invention; Figure 3 A flowchart illustrating the logical relationship between parent and child tags is provided for this invention. Figure 4 This is a flowchart illustrating how the present invention determines the logical state of a container and assigns sub-labels. Figure 5 This is a flowchart illustrating the process of handling detached sub-tags and their disposal in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the software-based technical solution is described in detail below with reference to system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only for explaining the technical solutions of this invention and do not constitute a limitation on the scope of protection.
[0018] In the description of this invention, the system architecture relationships or data processing flows indicated by terms such as "layer," "module," "interface," "data flow," "client," and "server" are all defined based on the architecture diagram or flowchart corresponding to the embodiments. This way of describing is only used to clearly illustrate the logical relationships between the elements in the technical solution, and not to limit the physical deployment form. The term "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances, or functional components and other scalable elements. The specific number is determined according to the actual business scenario and needs to be specifically stated.
[0019] Please see Figure 1 and Figure 2 This invention provides a technical solution: an RFID-based method for tracing laboratory consumables, comprising the following steps: S1: Construct a finite state machine for the consumable lifecycle, define the logical state and transition conditions of the consumables, assign functional role identifiers to RFID readers, and generate a consumable lifecycle rule base that binds transition conditions and functional role identifiers. The consumable lifecycle rule base specifically includes pre-state identifiers, anchor role codes, and post-state identifiers; Step S1 specifically includes: acquiring laboratory standard operating procedure data and analyzing the data to identify key nodes in the consumables circulation process; Based on key nodes, define a set of logical states for consumables. The set of logical states should include at least the following states: in stock, requisitioned, in use, and awaiting disposal. Extract the physical operations or environmental changes that trigger the switching between logical states and quantify them into executable jump conditions; Assign unique functional role identifiers corresponding to physical operations to RFID readers deployed at different key nodes; The current logical state of the consumables is used as the preceding state identifier, the functional role identifier is used as the anchor role code, and the switched logical state is used as the following state identifier to generate multiple state transition rules. Aggregate all state transition rules to establish a consumable lifecycle rule library; The logical states defined by the finite state machine for the lifecycle of consumables include pending receipt, in stock, already issued, pending disposal, and already disposed of. In addition to verifying the functional role identifier, the jump condition also needs to be combined with the encrypted digital signature of the operator and the project code of the current experiment. The state jump is only allowed when the functional role identifier, digital signature and project code all match the preset rules. Functional role identifiers are permanently written into the read-only memory area of the RFID reader before leaving the factory, and a cyclic redundancy check code is attached.
[0020] This embodiment first acquires and analyzes laboratory standard operating procedure (SOP) data to identify key operational nodes in the actual flow of consumables. For example, SOP data for a certain laboratory's sterile culture medium was collected. This data records in detail every step of the process, from supplier delivery, warehousing, storage, operator requisition, preparation and cultivation in experiments, to final disposal. The data received by the system includes timestamps, operator IDs, location information, and records of consumable type and quantity. Through text analysis and event sequence pattern recognition of this historical data, the system identifies "receiving / warehousing," "storage," "requisition," "experimental operation," and "disposal" as key nodes.
[0021] Based on the identified key nodes, the system clearly defines the logical state set of consumables. For sterile culture media, the logical state set includes: pending receipt, in stock, issued, in use, pending disposal, and disposed of. For example, when the culture medium first enters the laboratory, its logical state is pending receipt; after acceptance and placement in the storage area, the state changes to in stock; when the laboratory technician retrieves the culture medium through a specific procedure, the state changes to issued; when the culture medium is actually used to prepare culture dishes or for cell culture, its state is updated to in use.
[0022] Subsequently, the system extracts the physical operations or environmental changes that trigger the switching between logical states and quantifies them into executable jump conditions. Taking culture medium as an example: 1. From pending warehousing to in-warehouse: The jump condition is "warehousing scan and confirmation," meaning the RFID reader scans the consumable tag, and the warehousing personnel confirm the transaction in the system. 2. From in-warehouse to issued: The jump condition is "issue scan and authorization," meaning the RFID reader scans the consumable tag in the issuance area, and the lab technician completes the issuance authorization via biometrics or password. 3. From issued to in use: The jump condition is "laboratory table scan activation," meaning the consumable is scanned again by the RFID reader in the experimental operation area, combined with the start of the experimental project. 4. From in use to pending disposal: The jump condition is "experiment completion mark or expiration date," where the system marks the experiment as completed, or the system calculates the expiration date based on the consumable's production date and shelf life. 5. From pending disposal to disposed of: The jump condition is "disposal scan", that is, the consumable is scanned by an RFID reader at the waste disposal point and the disposal is confirmed by the disposal personnel.
[0023] Each RFID reader deployed at a different critical node is assigned a unique functional role identifier corresponding to its physical operation. For example, an RFID reader deployed at a laboratory entrance is assigned the functional role identifier R_INBOUND (inbound reader), a reader deployed in the central warehouse shelving area is assigned R_STORAGE (storage reader), a reader deployed at the requisition window is assigned R_CHECKOUT (requisition reader), a reader deployed near a biosafety cabinet or fume hood is assigned R_EXPERIMENT (experiment reader), and a reader deployed at a waste collection point is assigned R_DISPOSAL (disposal reader). These functional role identifiers are permanently written into the read-only memory area of the RFID reader before leaving the factory, along with a cyclic redundancy check (CRC16) code. For example, the read-only memory area of R_INBOUND stores the binary sequence 00010010, and its CRC16 checksum is 10110001, to ensure data integrity and prevent tampering.
[0024] The system generates multiple state transition rules by using the current logical state of the consumable as the preceding state identifier, the functional role identifier as the anchor role code, and the switched logical state as the following state identifier. For example, one rule states: the current state is "awaiting entry into the warehouse," and when the R_INBOUND reader detects the consumable tag and completes the entry confirmation, the consumable state should switch to "in stock." A specific example of the rule set is as follows: Pre-installation status: Pending import; Anchor role code: R_INBOUND; Post-installation status: In the database. Pre-state: In the library; Anchor role code: R_CHECKOUT; Post-state: Already used. Pre-approval status: Already claimed; Anchor role code: R_EXPERIMENT; Post-approval status: In use. Current status: In use; Anchor role code: R_EXPERIMENT (associated with experiment completion marker); Post-status: To be deprecated. Pre-existing status: To be deprecated; Anchor role code: R_DISPOSAL; Post-existing status: Deprecated.
[0025] By aggregating all state transition rules, the system establishes a consumable lifecycle rule base, which is stored in a central database. The logical states defined by the consumable lifecycle finite state machine include: pending entry into inventory, in stock, already issued, in use, pending disposal, and disposed of.
[0026] The triggering of the transition condition, in addition to verifying the functional role identifier, also requires verifying the operator's encrypted digital signature and the project code of the current experiment. For example, when a consumable attempts to transition from the "in stock" state to the "received" state, the R_CHECKOUT reader detects the consumable. At this time, the system not only verifies whether the reader's functional role identifier is R_CHECKOUT, but also requires the operator (e.g., experimenter Alice) to perform fingerprint recognition or enter a PIN code, generate and submit their encrypted digital signature. Simultaneously, the operator must enter the code of their currently ongoing experiment project, such as EXP-2023-001. Only when the R_CHECKOUT functional role identifier is recognized as valid, Alice's digital signature is verified (e.g., matches Alice's pre-registered public key, and the signature itself has not been tampered with), and the EXP-2023-001 project code matches a project in Alice's authorized project list, is the state transition (i.e., from "in stock" to "received") allowed to proceed. If any verification fails, such as Alice's digital signature verification failing or project coding mismatch, the consumable status will remain unchanged, and an abnormal attempt will be recorded.
[0027] Please see Figure 1 and Figure 3 S2: Collect the unique identification code of the sub-tag inside the container through the near-field RFID reader of the container, and generate the parent tag identification code associated with the container and the parent-child tag logical relationship of the unique identification code; The parent-child tag logical relationship includes the parent tag index, the child tag identification code set, and the relationship establishment timestamp; The S2 step specifically includes: triggered by the central control system, activating the near-field RFID reader of the designated container to execute the area scanning command; The near-field RFID reader collects the unique identification codes of all sub-tags within its effective communication range using a high-frequency polling method, and performs deduplication on the collected results to obtain a set of sub-tag identification codes; Read the parent tag identification code of the container's own RFID tag; Get the current system time of the server and generate a relationship establishment timestamp; Using the parent tag identifier as the parent tag index, integrate the child tag identifier set and relationship timestamp to establish the logical relationship between parent and child tags and store it in the database.
[0028] In this embodiment, the central control system triggers the activation of a near-field RFID reader on a designated container (e.g., a plastic crate for holding multiple reagent bottles, or a small refrigerated box containing multiple vaccine samples) to execute an area scanning command. For example, the central control system sends an activation command to a near-field RFID reader (numbered RFID-NT-001) located on a shelf in the secondary storage area of the laboratory. This shelf contains multiple crates, and crate A (parent tag identification code BOX-A-001) is designated for scanning.
[0029] The RFID-NT-001 near-field RFID reader continuously transmits radio frequency signals in a high-frequency (e.g., 13.56MHz) polling mode, collecting the unique identification codes of all sub-tags within its effective communication range. Its effective communication range is set to a radius of 10 cm, sufficient to cover the interior of the turnover box A. The reader polls this area 50 times per second, and the received tag identification code sequence may contain duplicates in each poll. For example, the reader may collect SUB-1001, SUB-1002, and SUB-1003 multiple times in different polling cycles. The reader deduplicates the collected results to obtain the sub-tag identification code set. If the original collected data within a 1-second polling cycle is [SUB-1001, SUB-1002, SUB-1001, SUB-1003, SUB-1002], after deduplication, the resulting sub-tag identification code set is {SUB-1001, SUB-1002, SUB-1003}.
[0030] Subsequently, the reader reads the parent tag identification code of the container's own RFID tag. On the outside of container A, there is an RFID tag with the parent tag identification code BOX-A-001. The reader successfully read BOX-A-001 using its near-field communication function.
[0031] The system obtains the current system time of the server and generates a timestamp for establishing the relationship. For example, if the current system time of the server is 2023-10-27 10:30:45 UTC, this time will be used as the timestamp for establishing the relationship.
[0032] The system uses the parent label identifier BOX-A-001 as the parent label index, integrates the previously obtained set of child label identifiers {SUB-1001, SUB-1002, SUB-1003} with the relationship establishment timestamp 2023-10-27 10:30:45UTC, establishes a parent-child label logical relationship, and stores it in the database. This logical relationship is stored in the form of a data structure. For example, a record will be created in the database: {Parent Label Index: "BOX-A-001", Child Label Identifier Set: ["SUB-1001", "SUB-1002", "SUB-1003"], Relationship Establishment Timestamp: "2023-10-27 10:30:45UTC"}. This operation ensures that at a specific point in time, which container contains which specific sub-consumable labels, laying the foundation for subsequent traceability and status management.
[0033] Please see Figure 1 and Figure 4 S3: When the status anchor RFID reader detects the parent tag identification code of the container, it calls the consumable life cycle rule base and the logical relationship between the parent and child tags, judges the logical state of the container through the decision tree algorithm, and assigns the target logical state to the associated child tag. The target logical state specifically refers to the state value, the state effective time, and the source of the state change trigger; The S3 step specifically includes: when the status anchor RFID reader detects the parent tag identification code, it immediately obtains the functional role identifier of the reader and obtains the current timestamp; Based on the parent tag identification code, the logical relationship between parent and child tags is invoked to obtain the unique identification code of all associated child tags; For each associated sub-tag, query its current logical state and use that state as the previous state identifier; Call the consumable lifecycle rule base to filter out all candidate subsequent status identifiers that match the previous status identifier and the functional role identifier; Using the state transition confidence formula Calculate the score for each candidate post-state identifier; in, This represents the confidence score for state transitions. This indicates the anchor role weight determined by the functional role identifier. This represents the time validity factor since the last state change. and These represent the preset weighting coefficients for the anchor role weight and the time validity factor, respectively. The candidate post-state identifier with the highest state transition confidence score is selected as the final state value. Integrate the status value and current timestamp as the status effective time, and the functional role identifier as the status change trigger source to generate the target logical state; Anchor role weight The mapping table is obtained by querying the preset "functional role-weight" mapping table. The mapping table assigns values based on the degree of impact of the physical operation represented by different functional role identifiers on the life cycle of consumables. The weight value corresponding to the key conversion node is higher than that of the regular circulation node. Time validity factor The time validity factor is calculated based on the interval between the current time and the time of the most recent status change of the sub-tag. The time validity factor is inversely proportional to the time interval. Preset weighting coefficients and The sum of these values is 1, and their specific values are determined through regression analysis of historical data.
[0034] In this embodiment, when a state anchor RFID reader (e.g., an RFID reader deployed in front of the experimental workbench, with a functional role identifier of R_EXPERIMENT) detects the parent tag identification code of a container, it immediately obtains the functional role identifier of the reader and the current timestamp. For example, when an experimenter places a container containing a reagent bottle (parent tag identification code CONT-005) in front of the experimental workbench, the R_EXPERIMENT reader (whose read-only memory-based functional role identifier F_ROLE_EXP) successfully detects CONT-005. The system immediately obtains the functional role identifier F_ROLE_EXP of R_EXPERIMENT and the current system time, such as 2023-10-27 11:15:30 UTC.
[0035] Based on the parent tag identifier CONT-005, the system calls the parent-child tag logical relationship database to retrieve the unique identifiers of all associated child tags. Assume the query results show that the set of child tag identifiers currently associated with CONT-005 is {REAGENT-A-001,REAGENT-B-002,CONSUMABLE-C-003}.
[0036] For each associated sub-tag, such as REAGENT-A-001, the system queries its current logical status. Assuming that the current logical status of REAGENT-A-001 is "already used," this status serves as the previous status identifier.
[0037] The system calls the consumable lifecycle rule base to filter out all candidate subsequent status indicators that match the preceding status indicator "received" and the functional role indicator "F_ROLE_EXP". The matching rules in the consumable lifecycle rule base include: Rule 1: Pre-requisite status: Already claimed; Anchor role code: F_ROLE_EXP; Post-requisite status: In use.
[0038] Rule 2: Pre-requisite status: Already issued; Anchor role code: F_ROLE_DISPENSE; Post-requisite status: Already packaged (does not match the current functional role F_ROLE_EXP).
[0039] Rule 3: Pre-state: In the library; Anchor role code: F_ROLE_EXP; Post-state: In use (does not match the current pre-state already claimed).
[0040] Therefore, the only candidate post-state identifier selected is "in use".
[0041] Using the state transition confidence formula Calculate the score for each candidate post-state identifier. In this formula, This represents the confidence score for state transition, and its calculation result ranges from 0 to 1. The higher the value, the greater the probability of state transition. This indicates the anchor role weight determined by the functional role identifier, and its value is obtained by querying a preset "functional role-weight" mapping table. This mapping table assigns values based on the degree of impact of the physical operation represented by different functional role identifiers on the consumable lifecycle. For example, F_ROLE_EXP, as a key experimental operation node, has a higher weight value than regular circulation nodes such as F_ROLE_STORAGE.
[0042] Table 1 Anchor Point Role Weight Mapping Table As shown in Table 1, the anchor role weights corresponding to F_ROLE_EXP It is 0.95. This represents the time validity factor since the last state change. This factor is calculated based on the interval between the current time and the time of the sub-tag's most recent state change; the time validity factor is inversely proportional to the time interval. The specific calculation is as follows: .in, It is the time interval between the current time and the last status change time (in hours). This is the preset maximum valid time interval, which is 48 hours. For example, if the last status (used) change time for REAGENT-A-001 was 2023-10-27 09:00:00 UTC, and the current time is 2023-10-27 11:15:30 UTC, then the time interval is 2 hours, 15 minutes, and 30 seconds. Hours. So, . and These represent the preset weighting coefficients for the anchor role weight and the time validity factor, respectively. Their sum is 1, and their specific values are determined through regression analysis of historical traceability data. For example, through multiple linear regression analysis of consumable circulation data from the past year (including actual status changes, RFID reader trigger events, time intervals, etc.), the system found that the anchor role weight has a stronger predictive ability for state transitions, while the time validity factor is second best. The experimental procedure is as follows: 10,000 historical state transition records are selected as the training set. Each record includes: previous state, anchor role, actual subsequent state, and the time of the last state change. The system will... and The initial values are set to 0.5. The values are iteratively adjusted by minimizing the prediction error (e.g., mean squared error). and The value was determined. Finally, after 1000 iterations, the optimal value was obtained. It is 0.65. The value is 0.35. These two coefficients are used to balance the influence of functional role authority and time validity. Therefore, for the use of candidate post-states, the score is calculated as follows: .
[0043] The candidate subsequent state identifier with the highest state transition confidence score is selected as the final state value. Since there is only one candidate state in use in this example, its score is the highest, so the final state value is "in use".
[0044] The system integrates the status value "In Use", the current timestamp "2023-10-27 11:15:30 UTC" as the status effective time, and the functional role identifier "F_ROLE_EXP" as the status change trigger source to generate a target logical status. This target logical status will be applied to REAGENT-A-001 and stored in the consumable traceability database. For REAGENT-A-001, its target logical status will be recorded as: {Status value: "In Use", Status effective time: "2023-10-27 11:15:30 UTC", Status change trigger source: "F_ROLE_EXP"}. This result indicates that reagent REAGENT-A-001 has successfully transitioned from the "Received" status to the "In Use" status, which reflects the consumable's current actual presence and activity in the experiment. This process will be executed one by one on all associated sub-tags within the CONT-005 container to ensure the synchronous update of the status of all consumables within the container.
[0045] Please see Figure 1 and Figure 5S4: When the sub-tag identification code list of the near-field RFID reader changes, the hash verification function is used to identify the sub-tag that has left the container and remove the parent-child tag logical relationship. After the sub-tag is detected by the abandoned anchor RFID reader, the consumable life cycle rule base is called to adjust its logical state to the life cycle termination state. The lifecycle termination status includes the disposal location code, tag dormancy instruction, and lifecycle termination timestamp; Step S4 specifically includes: the near-field RFID reader periodically collecting the list of sub-tag identification codes inside the container and calling the hash verification function to generate a real-time hash value; The real-time hash value is compared with the pre-stored hash value of the previous period. If the two are inconsistent, it is determined that the sub-tag identification code list has changed. By performing a difference operation on the two sub-label identification code lists before and after the change, the sub-label that has been removed from the container can be accurately located. Delete the records that have been located and are associated with the parent tag identification code from the parent tag logical relationship database; When the detached sub-tag enters the detection range of the abandoned anchor RFID reader, the functional role identifier of the abandoned anchor RFID reader is obtained. Call the consumable lifecycle rule library to adjust the logical state of the sub-tag to the preset lifecycle termination state; Generate a disposal location code that includes the location code of the abandoned anchor RFID reader, write a tag sleep command, and record the life cycle termination status with a life cycle end timestamp of the current time; The hash check function calculates the hash check value using the following formula. : ; in, The hash check value for the sub-tag set. This is the value corresponding to the unique identifier of the i-th sub-label. A preset prime number associated with the position information of the i-th sub-label. This represents the total number of child tags within the current container. It is a preset global prime number; The difference operation is performed on the central server. Before performing the operation, the central server needs to lock the read and write operations related to the parent tag identification code.
[0046] In this embodiment, a near-field RFID reader (e.g., RFID-NT-001 deployed on a shelf in the secondary storage area of the laboratory) periodically (e.g., every 10 seconds) collects a list of sub-tag identification codes within the container (parent tag identification code BOX-A-001). For example, in a certain period T1, RFID-NT-001 collects a list of sub-tag identification codes L1={SUB-1001,SUB-1002,SUB-1003}. The system then calls a hash verification function. Generate real-time hash values.
[0047] In this hash verification function This is the hash check value of the sub-tag set, used to quickly compare whether two tag sets are consistent. For the first The unique identifier of each sub-tag corresponds to a numerical value. To quantify the non-numerical unique identifier into a numerical value, the system uses the decimal representation of the hash code encoded in UTF-8. For example, the hash code of SUB-1001 is A1B2C3D4, which is 2710373332 in decimal. SUB-1002 is E5F6A7B8, which is 3857327032 in decimal. SUB-1003 is C9D0E1F2, which is 3385732594 in decimal. In order to be with the first Each sub-tag's location information is associated with a predefined prime number. These prime numbers are a predefined sequence of prime numbers; for example, the first position (e.g., the top left corner inside the container) corresponds to prime number 2, the second position (e.g., the middle left corner) corresponds to prime number 3, the third position (e.g., the bottom left corner) corresponds to prime number 5, and so on. Inside the container, the sub-tag's location information refers to the logical order determined when it is first identified by a near-field RFID reader. This logical order determines the predefined prime number assigned to the sub-tag. index For example, in L1, if SUB-1001 is the first one identified, then... If SUB-1002 is the second one, then... If SUB-1003 is the third one, then... . This represents the total number of child tags within the current container, in this example... . It is a preset system global prime number used for modulo operations to control the size of the hash value. The value is usually chosen to be a large prime number, such as 1000000007, to reduce the probability of hash collisions.
[0048] Within the container, the location information of the sub-tags refers to their logical order determined when they are first identified by a near-field RFID reader. This logical order determines the preset prime number assigned to the sub-tags. index This refers to the system recording the order in which the near-field RFID reader first identifies each sub-tag within a scanning cycle, and then assigning incremental prime numbers based on this order. The value ensures that each sub-tag obtains a unique location-associated prime number within a specific scanning cycle, making the hash check value sensitive to the addition, deletion, and order changes of sub-tags, and able to accurately reflect the real-time status of the list of items in the container.
[0049] Now we calculate the real-time hash value for period T1: ; ; ; The system will display the real-time hash value. The hash value is compared with the pre-stored hash value from the previous period (e.g., T0). Assuming that the list of sub-tags in the container is the same as in T1 during period T0, the pre-stored hash value from the previous period is also 921390710. Since they are identical, the system determines that the sub-tag identification code list has not changed. In the next period T2, assuming SUB-1002 is retrieved, RFID-NT-001 collects the sub-tag identification code list L2={SUB-1001, SUB-1003}. At this time... Recalculate the hash value.
[0050] at this time Based on the identification order in L2, SUB-1001 is the first one. ; SUB-1003 is the second one. .
[0051] ; The system will display the real-time hash value. (577944405) and the pre-stored hash value from the previous cycle (921390710) is compared. Since the two are inconsistent, the system determines that the sub-tag identification code list has changed. The advantage of this hash verification function is that by multiplying, accumulating, and then moduloing the unique identification code of the sub-tag with a preset prime number associated with the logical order within the container, it can efficiently detect the increase or decrease of the number of elements or specific elements in the set, as well as changes in the order of sub-tags.
[0052] By performing a difference operation on the two sub-tag identification code lists (L1={SUB-1001,SUB-1002,SUB-1003} and L2={SUB-1001,SUB-1003}) before and after the change, the sub-tags that have been removed from the container are accurately located. The difference operation is performed on the central server. Before performing the operation, the central server needs to lock read and write operations related to the parent tag identification code BOX-A-001 to ensure data consistency. The specific operation is as follows: Therefore, SUB-1002 was precisely located as a sub-label that had been removed from the container.
[0053] From the parent-child tag logical relationship database, the system deletes the associated record between the located detached child tag SUB-1002 and the parent tag identifier BOX-A-001. The set of child tag identifiers associated with BOX-A-001 in the original record will be updated to {SUB-1001, SUB-1003}.
[0054] When the detached sub-tag SUB-1002 enters the detection range of the abandoned anchor RFID reader (e.g., deployed at a laboratory waste collection point, with a functional role identifier of R_DISPOSAL), the system obtains the functional role identifier of the abandoned anchor RFID reader, namely R_DISPOSAL.
[0055] The system invokes the consumable lifecycle rule base to adjust the logical state of the sub-tag SUB-1002 to the preset lifecycle termination state. In the rule base, the following rule is matched: Pre-state: In Use (assuming SUB-1002 was in use before being deactivated); Anchor Role Code: R_DISPOSAL; Post-state: Obsolete. The system then changes the logical state of SUB-1002 from In Use to Obsolete.
[0056] The system generates a disposal location code containing the location code of the discarded anchor RFID reader, a tag sleep command, and a lifecycle termination status recording the current time and a lifecycle termination timestamp. For example, the location code of the discarded anchor RFID reader R_DISPOSAL is LAB-WEST-DISP-001. The system will generate {Disposal Location Code: "LAB-WEST-DISP-001", Tag Sleep Command: "0x0A", Lifecycle Termination Timestamp: "2023-10-27 12:05:10UTC"}. Here, 0x0A is a preset hexadecimal command instructing the RFID tag to enter a low-power sleep mode to save power and avoid unnecessary reads. This termination status information will be associated with the unique identifier of SUB-1002 and stored in the database to ensure the complete traceability of the consumable throughout its entire lifecycle.
[0057] An RFID-based laboratory consumables traceability system is used to execute the aforementioned RFID-based laboratory consumables traceability method. The system includes: The rule base construction module is used to build a finite state machine for the consumable lifecycle, define the logical state and transition conditions of consumables, assign functional role identifiers to RFID readers, and generate a consumable lifecycle rule base that binds transition conditions and functional role identifiers. The logical relationship generation module is used to collect the unique identification code of the sub-tag inside the container through the near-field RFID reader of the container, and generate the parent tag identification code and the parent-child tag logical relationship associated with the container and the unique identification code. The state decision and allocation module is used to call the consumable life cycle rule base and the logical relationship between parent and child tags when the RFID reader at the state anchor point detects the parent tag identification code of the container, determine the logical state of the container through the decision tree algorithm, generate the target logical state, and assign the target logical state to the associated child tag. The relationship termination and status termination module is used to identify child tags that have left the container by using a hash verification function when the child tag identification code list of the near-field RFID reader changes, terminate the logical relationship between parent and child tags, and call the consumable lifecycle rule base to adjust the logical status of the child tag to the lifecycle termination state after the child tag is detected by the discarded anchor-point RFID reader.
[0058] The above embodiments illustrate preferred embodiments of the present invention. Any equivalent adjustments to the technical solution based on software engineering methods are within the scope of protection, including but not limited to: implementing algorithm logic using different programming languages, refactoring functional modules into services, adjusting data interaction protocols, and optimizing resource scheduling strategies. Any implementation scheme derived from reasonable modifications to the data processing flow, service call chain, or system architecture layer without departing from the core technology of the present invention should be considered within the scope of protection defined by the claims of the present invention.
Claims
1. A method for RFID-based laboratory consumable traceability, characterized in that, The method comprises the following steps: S1: constructing a consumable life cycle finite state machine, defining logical states of consumables and jump conditions, assigning function role identifiers to RFID readers, and generating a consumable life cycle rule base binding the jump conditions and the function role identifiers; S2: collecting unique identification codes of sub-tags in a container through a near-field RFID reader of the container, and generating a parent-child tag logical relationship associating a parent tag identification code of the container with the unique identification codes; S3: when a state anchor point RFID reader detects the parent tag identification code of the container, calling the consumable life cycle rule base and the parent-child tag logical relationship, judging the logical state of the container through a decision tree algorithm, and assigning a target logical state to the associated sub-tag; S4: when a sub-tag identification code list of the near-field RFID reader changes, identifying a sub-tag that has left the container through a hash check function, and canceling the parent-child tag logical relationship, and after the sub-tag is detected by a discarded anchor point RFID reader, calling the consumable life cycle rule base to adjust the logical state of the sub-tag to a life cycle termination state.
2. The RFID-based laboratory consumable traceability method of claim 1, wherein, The consumable life cycle rule base specifically comprises a pre-state identifier, an anchor point role code, and a post-state identifier, the parent-child tag logical relationship comprises a parent tag index, a sub-tag identification code set, and a relationship establishment time stamp, the target logical state specifically refers to a state value, a state effective time, and a state change trigger source, and the life cycle termination state comprises a disposal location code, a tag dormancy instruction, and a life cycle termination time stamp.
3. The RFID-based laboratory consumable tracking method of claim 1, wherein, The S1 step specifically comprises: obtaining laboratory standard operating procedure data, analyzing the data to identify key nodes in the consumable flow process; According to the key nodes, a set of logical states of consumables is defined, and the set of logical states at least comprises in-stock, taking, in-use, and to-be-discarded states; Physical operations or environmental changes that trigger switching between the logical states are extracted and quantified as executable jump conditions; RFID readers deployed at different key nodes are assigned unique function role identifiers corresponding to the physical operations; The current logical state of the consumable is taken as the pre-state identifier, the function role identifier is taken as the anchor point role code, and the switched logical state is taken as the post-state identifier, and a plurality of state transition rules are generated; All state transition rules are aggregated to establish the consumable life cycle rule base.
4. The RFID-based laboratory consumable tracking method of claim 1, wherein, The S2 step specifically comprises: being triggered by a central control system, activating the near-field RFID reader of the container to execute a region scanning instruction; The near-field RFID reader collects, in a high-frequency polling manner, the unique identification codes of all the sub-tags within its effective communication range, and performs deduplication processing on the collection results to obtain a sub-tag identification code set; The parent tag identification code of the container itself RFID tag is read; The system time of the current server is obtained to generate a relationship establishment time stamp; The parent tag identification code is taken as a parent tag index, the sub-tag identification code set and the relationship establishment time stamp are integrated, the parent-child tag logical relationship is established, and is stored in a database.
5. The RFID-based laboratory consumable tracking method of claim 1, wherein, The S3 step specifically comprises: when the state anchor RFID reader detects the parent tag identification code, immediately acquiring the function role identification of the reader and acquiring the current timestamp; Based on the parent tag identification code, the parent-child tag logical relationship is called to acquire the unique identification codes of all associated child tags; For each associated child tag, the current logical state is queried and the state is taken as a pre-state identification; The consumable life cycle rule library is called to filter out all candidate post-state identifications matching the pre-state identification and the function role identification; By state transition confidence formula Computing scores for each candidate successor state identification; wherein, represents a state transition confidence score, represents an anchor role weight determined by the function role identity, represents a time validity factor since the last state change, and respectively represent preset weighting coefficients of the anchor role weight and the time validity factor. The candidate post-state identification with the highest state transition confidence score is selected as the final state value; The state value, the current timestamp, the state effective time, and the function role identification as the state change trigger source are integrated to generate the target logical state.
6. The RFID-based laboratory consumable tracking method of claim 1, wherein, The S4 step specifically comprises: the near-field RFID reader periodically acquires the child tag identification code list in the container and calls a hash check function to generate a real-time hash value; The real-time hash value is compared with the pre-stored last-cycle hash value, and if they are inconsistent, it is determined that the child tag identification code list has changed; The difference set operation is performed on the two child tag identification code lists before and after the change to accurately locate the child tag that has left the container; The associated record of the located child tag that has left the container and the parent tag identification code is deleted from the parent-child tag logical relationship database; When the child tag that has left the container enters the detection range of the waste anchor RFID reader, the function role identification of the waste anchor RFID reader is acquired; The consumable life cycle rule library is called to adjust the logical state of the child tag to a preset life cycle termination state; The life cycle termination state containing the disposal location code of the waste anchor RFID reader location code, the write tag dormancy instruction, and the life cycle termination timestamp recording the current time is generated.
7. The RFID-based laboratory consumable tracking method of claim 5, wherein, The anchor role weight The anchor role weight is obtained by querying a preset "function role-weight" mapping table, the mapping table is based on the influence degree of different physical operations represented by the function role identification on the consumable life cycle, and the weight value of the key conversion node is higher than that of the regular flow conversion node. the time validity factor The time validity factor is inversely proportional to the interval of time from the current time to the last time of state change of the sub-tag. The preset weighting coefficient The sum of the coefficients of the terms of the polynomial is 1, the specific values of which are calibrated by regression analysis of historical data. The sum of the coefficients of the terms of the polynomial is 1, the specific values of which are calibrated by regression analysis of historical data.
8. The RFID-based laboratory consumable tracking method of claim 6, wherein, The hash check function obtains a hash check value by the following formula : ; wherein, is a hash check value of a sub-tag set, is a numerical value corresponding to the unique identification code of the i-th sub-tag, is a predetermined prime number associated with the i-th sub-tag position information, is the total number of sub-tags in the current container, is a predetermined system global prime number; The difference set operation is performed on the central server, and the central server needs to lock read and write operations related to the parent tag identification code before performing the operation.
9. The RFID-based laboratory consumable tracking method of claim 1, wherein, The logical state defined by the consumable life cycle finite state machine includes to-be-warehoused, in-warehouse, already-issued, to-be-discarded, and already-discarded; In addition to verifying the function role identification, the trigger of the jump condition also needs to verify the encrypted digital signature of the operator and the project code of the current experiment. Only when the function role identification, digital signature, and project code all match the preset rules, is the state jump allowed; The function role identification is written into the read-only memory area of the RFID reader before leaving the factory and is additionally attached with a cyclic redundancy check code.
10. An RFID-based laboratory consumable traceability system, characterized in that, The system is used to implement the RFID-based laboratory consumable traceability method of any one of claims 1-9, and the system comprises: a rule library construction module configured to construct a consumable life cycle finite state machine, define logical states of consumables and jump conditions, assign function role identifications to RFID readers, and generate a consumable life cycle rule library binding the jump conditions and the function role identifications. a logic relationship generation module for collecting unique identification codes of sub-tags within a container by a near field RFID reader of the container, and generating a parent-child tag logic relationship associating a parent tag identification code of the container with the unique identification codes; a state decision and assignment module for calling the consumable life cycle rule library and the parent-child tag logic relationship when a parent tag identification code of the container is detected by a state anchor RFID reader, judging a logic state of the container by the decision tree algorithm, generating a target logic state, and assigning the target logic state to the associated sub-tag; a relationship release and state termination module for identifying a sub-tag that is separated from the container by a hash check function when a sub-tag identification code list of the near field RFID reader is changed, releasing the parent-child tag logic relationship, and adjusting a logic state of the sub-tag to a life cycle termination state by calling the consumable life cycle rule library after the sub-tag is detected by a discarded anchor RFID reader.