Anesthesia cabinet taking, returning and residual drug registration optimization method based on cloud edge collaborative computing

CN122552064APending Publication Date: 2026-08-11JIANGSU PROVINCE HOSPITAL (THE FIRST AFFILIATED HOSPITAL OF NANJING MEDICAL UNIVERSITY)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]因此,现有麻醉药品柜在网络不稳定、云端响应延迟或多人员连续操作的情况下,容易出现领用事件、退回事件和残余登记事件分散记录、引用关系不清、同一退回事件被重复登记、登记残余量与退回数量不对应、异常数据事后才被发现等问题

Benefits of technology

[0017]This invention generates drug object data through a cloud server and distributes it to the edge computing node of the anesthetic drug cabinet. This enables the cabinet to perform consistency verification on the matching relationship between the identity of the person receiving the drug, the drug object, the time of receipt, and the surgical task when responding to the receipt request. Only after the verification is successful will a receipt event be generated. This gives the initial receipt of anesthetic drugs a clear object identifier and business association basis, reducing the risk of receipt without a task, incorrect receipt, and inconsistencies in manual registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122552064A_ABST
    Figure CN122552064A_ABST
Patent Text Reader

Abstract

This invention relates to an optimized method for the requisition, return, and residual drug registration of anesthetic drug cabinets based on cloud-edge collaborative computing. The method includes: a cloud server generating drug object data and distributing it to the edge computing nodes of the anesthetic drug cabinet; the edge computing nodes responding to requisition requests, performing consistency verification on the matching relationship between the requisitioning personnel's identity, the drug object, the requisition time, and the surgical task, generating a requisition event upon successful verification; the edge computing nodes responding to return requests, generating a return event associated with the requisition event, receiving residual drug registration data, and generating a residual registration event; the edge computing nodes performing correlation verification on the return event and the residual registration event, allowing the drug object to enter a pending confirmation state upon successful verification, and prohibiting it from entering a closed-loop completion state and uploading an abnormal event upon failed verification, thereby improving the security and accuracy of the anesthetic drug requisition, return, and residual registration process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical drug information management technology, specifically to an optimized method for the requisition, return, and residual drug registration of anesthetic drug cabinets based on cloud-edge collaborative computing. Background Technology

[0002] Existing technologies for anesthetic drug cabinets and psychotropic drug management systems typically focus on functions such as drug storage, identity verification, location identification, electronic lock control, and inventory display. For example, publication number CN119181474A describes a psychotropic drug management system, a psychotropic drug data processing method, and a psychotropic drug cabinet. This system, in conjunction with a refrigerator, controls the unlocking of refrigerated drugs based on the requester's access rights, thus addressing the issues of categorizing and storing room-temperature and refrigerated drugs and authorizing access. While this approach can improve drug storage security and reduce the risk of unauthorized drug retrieval to some extent, its technological focus remains on drug access rights assessment and storage environment management. It does not yet address the closed-loop constraints on the continuous event relationships of the same drug in a surgical setting, from requisition to return and residual drug registration.

[0003] For example, CN119400377A describes an intelligent management system for anesthesiology operating room resources. This system monitors and manages anesthesia and surgical supplies and equipment through equipment tags, storage cabinets, transmission units, and a central control unit. The background section points out that the high volume and frequency of use of anesthetic and psychotropic drugs in anesthesiology departments, coupled with issues such as handwritten prescriptions, empty ampoule returns, and incomplete records of residual liquid disposal, can easily increase the risk of errors. While this type of solution improves the efficiency of equipment location, item tracking, and information display from the perspective of operating room resource and supply management, it still lacks a strong, consistent verification mechanism that is executed in real-time at the cabinet level to verify the causal relationship between the quantity of returned anesthetic drugs, residual quantities, registration documents, and status changes after actual use.

[0004] Therefore, existing anesthetic drug cabinets are prone to problems such as scattered recording of requisition events, return events, and residual registration events, unclear reference relationships, duplicate registration of the same return event, discrepancies between registered residual quantities and returned quantities, and abnormal data only being discovered after the fact, especially given the highly regulated nature of anesthetic drugs. Relying solely on manual review, post-event reconciliation, or centralized cloud verification is insufficient to prevent drug items from entering a closed-loop completion state in a timely manner, and it is also difficult to promptly generate traceable abnormal events. Therefore, an optimized method is needed that can locally complete the correlation verification of identity, drug item, requisition time, surgical task, return event, and residual registration event at the edge computing node of the anesthetic drug cabinet, and collaborate with the cloud server for data distribution, abnormality uploading, and status management. Summary of the Invention

[0005] The purpose of this invention is to provide an optimized method for the requisition, return, and residual drug registration of anesthetic drug cabinets based on cloud-edge collaborative computing, thereby addressing some of the drawbacks and shortcomings pointed out in the background art.

[0006] The present invention adopts the following technical solution to solve the above-mentioned technical problems:

[0007] The cloud server generates drug object data and distributes it to the edge computing nodes of the anesthetic drug cabinet. The edge computing nodes respond to the requisition request, performing a consistency check on the matching relationship between the requisitioning personnel's identity, the drug object, the requisition time, and the surgical task. Upon successful verification, a requisition event is generated. The edge computing nodes respond to the return request, generating a return event associated with the requisition event. The edge computing nodes receive residual drug registration data and generate a residual registration event when preset registration conditions are met. The edge computing nodes perform an association check on the return event and the residual registration event. This association check includes determining whether the corresponding drug objects are consistent, whether the residual registration event references the return event, and whether the registered residual quantity corresponds to the returned quantity according to a preset quantity relationship. When the association check passes, the drug object is allowed to enter a pending confirmation state. When the association check fails, the drug object is prohibited from entering a closed-loop completion state, and the abnormal event is uploaded to the cloud server.

[0008] Furthermore, after generating the rollback event, the edge computing node generates a one-time registration credential corresponding to the rollback event, and verifies the usage status, validity period, and correspondence between the one-time registration credential and the rollback event before generating the residual registration event. If the verification passes, the generation of the residual registration event is allowed, and the one-time registration credential is marked as used. If the verification fails, the generation of the residual registration event is rejected.

[0009] Furthermore, after receiving the residual drug registration data, the edge computing node first writes the residual drug registration data into an isolated temporary storage record, and determines whether the return event referenced by the residual drug registration data is in a registrable state; if the return event does not exist, has been referenced by a valid residual registration event, or the corresponding drug object has entered a closed-loop completion state, the drug object state is not changed and an abnormal event is generated; if the return event is in a registrable state, the isolated temporary storage record is converted into a residual registration event.

[0010] Furthermore, after receiving the requisition event, return event, residual registration event, and abnormal event, the cloud server performs a status replay verification on the same drug object according to the event sequence number. When the status replay result is inconsistent with the association verification result of the edge computing node, or when there is a missing, duplicate, or reversed event sequence number, the cloud server sends a compensation processing instruction to the edge computing node to cause the corresponding drug object to enter an abnormal locking state.

[0011] Furthermore, the edge computing node generates a temporary storage number for the isolated temporary storage record and binds the temporary storage number to the residual drug registration data, the current state of the drug object, and the referenced return event; before the isolated temporary storage record is converted into a residual registration event, if the current state of the drug object has changed compared to when it was written to the isolated temporary storage record, the conversion is refused and an abnormal event is generated.

[0012] Furthermore, after generating the isolation temporary storage record, the edge computing node merges and judges the residual drug registration data received after the generation of the isolation temporary storage record for the same drug object; when the residual drug registration data and the isolation temporary storage record reference the same return event, the isolation temporary storage record with the earlier writing time is retained as a convertible record, and the remaining isolation temporary storage records are marked as duplicate temporary storage records.

[0013] Furthermore, after the edge computing node converts the isolated temporary record into a residual registration event, it uploads the temporary storage number, conversion time, and corresponding residual registration event of the isolated temporary record to the cloud server. The cloud server determines whether the same isolated temporary record has been converted repeatedly based on the temporary storage number. If there is a repeated conversion, it returns a residual registration event reversal instruction to the edge computing node to invalidate the duplicated residual registration event.

[0014] Furthermore, when performing the state replay verification, the cloud server replays the requisition event, return event, residual registration event, and abnormal event of the same drug object in sequence according to the event number, and records the drug object status corresponding to each event during the replay process; when the drug object status corresponding to any event does not satisfy the preset state transition relationship with the drug object status corresponding to the previous event, the state replay verification is determined to fail.

[0015] Furthermore, when the cloud server discovers that there are missing, duplicate, or reversed event sequence numbers, it first sends an event retransmission request to the edge computing node. If the edge computing node fails to return the event corresponding to the event retransmission request within a preset time or the returned event still does not meet the event sequence number continuity requirement, the cloud server sends a compensation processing instruction to the edge computing node, causing the corresponding drug object to enter an abnormal locking state.

[0016] Furthermore, when the event sequence number is missing, the cloud server sends an event retransmission request along with the identifiers of the preceding and following events adjacent to the missing event sequence number. After the edge computing node returns a candidate retransmission event, the cloud server determines whether the candidate retransmission event references the identifier of the preceding event and whether the following event references the event identifier of the candidate retransmission event. If any reference relationship is not established, the candidate retransmission event is not written into the cloud state sequence, and a compensation processing instruction is sent to the edge computing node.

[0017] This invention generates drug object data through a cloud server and distributes it to the edge computing node of the anesthetic drug cabinet. This enables the cabinet to perform consistency verification on the matching relationship between the identity of the person receiving the drug, the drug object, the time of receipt, and the surgical task when responding to the receipt request. Only after the verification is successful will a receipt event be generated. This gives the initial receipt of anesthetic drugs a clear object identifier and business association basis, reducing the risk of receipt without a task, incorrect receipt, and inconsistencies in manual registration.

[0018] This invention establishes an event-driven closed-loop relationship between return requests, residual drug registration data, and drug object status. Edge computing nodes generate return events associated with requisition events and generate residual registration events when preset registration conditions are met. Simultaneously, the return events and residual registration events are correlated and verified to determine if the drug objects are consistent, if the residual registration event references the return event, and if the registered residual quantity corresponds to the return quantity according to a preset quantity relationship. Therefore, drug objects are only allowed to enter the pending confirmation state when the correlation verification passes; if the verification fails, they are prohibited from entering the closed-loop completion state and an abnormal event is uploaded. This allows for immediate blocking of incomplete, inconsistent, or incorrectly referenced residual drug registrations at the counter, improving the safety, accuracy, and traceability of the anesthetic drug requisition, return, and residual registration process. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the closed-loop optimization process for cloud-edge collaborative anesthetic drug issuance and residual drug registration in this invention.

[0020] Figure 2 This is a verification diagram of the validity period of a one-time registration certificate in Embodiment 1 of the present invention.

[0021] Figure 3 This is a verification chart showing the deviation between the returned quantity and the registered residual quantity in Embodiment 1 of the present invention.

[0022] Figure 4 This is a duplicate filtering diagram of isolated temporary records in Embodiment 1 of the present invention.

[0023] Figure 5 This is a diagram for determining missing event numbers in Embodiment 2 of the present invention.

[0024] Figure 6 This is the state replay consistency verification diagram in Embodiment 2 of the present invention.

[0025] Figure 7 This is a verification diagram of the event reference relationship in Embodiment 2 of the present invention. Detailed Implementation

[0026] As attached Figure 1As shown, in one specific implementation, the optimized method for the requisition, return, and residual drug registration of anesthetic drug cabinets based on cloud-edge collaborative computing can be executed collaboratively by a cloud server, an anesthetic drug cabinet, and edge computing nodes located on the side of the anesthetic drug cabinet. The cloud server pre-generates drug object data, which may include drug identification, batch number, specifications, inventory status, cabinet location, requisition permissions, and information associated with the surgical task. The cloud server distributes the drug object data to the edge computing nodes, enabling them to perform real-time verification during the requisition, return, and residual drug registration process locally, reducing registration interruptions caused by network latency. When distributing drug object data, the cloud server can simultaneously distribute the data version, distribution time, and applicable cabinet identification. After receiving the data, the edge computing nodes write the drug object data to their local cache and return a receipt confirmation to the cloud server. When the edge computing nodes are offline or in a weak network state, they can still complete local verification based on the confirmed data version and synchronize locally generated events to the cloud server after the network is restored.

[0027] When a user initiates a drug requisition request from the anesthesia drug cabinet, the edge computing node reads the user's identity, the intended drug recipient, the requisition time, and the surgical task information contained in the request, and performs a consistency check against the drug recipient data sent from the cloud server. The user's identity can be read by the identification module on the anesthesia drug cabinet; the intended drug recipient can be determined by the cabinet compartment, drug barcode, drug electronic tag, or drug recipient identifier; and the surgical task information can be selected by the user or pre-sent to the edge computing node by the cloud server. This consistency check includes determining whether the user has the necessary permissions to requisition the corresponding drug, whether the drug is available for requisition, whether the requisition time matches the medication time required for the surgical task, and whether the drug matches the medication requirements of the surgical task. After successful verification, the edge computing node generates a requisition event and uses this event as the basis for associating subsequent return events and residual registration events. The requisition event can record the event sequence number, drug object identifier, requisition personnel identity, requisition time, surgical task identifier, drug object status before requisition, and drug object status after requisition. After generating the requisition event, the edge computing node updates the local status of the corresponding drug object to the requisitioned status and writes the requisition event to the local event log.

[0028] After medication is used, the edge computing node responds to a return request, generating a return event associated with the requisition event. The return request can be initiated by the person returning the medication by selecting the corresponding requisition event on the anesthetic drug cabinet, or by the edge computing node querying requisition events that haven't completed the closed loop based on the medication object identifier and prompting the person returning the medication for confirmation. The return event can record the medication object identifier, returned quantity, return time, the identity of the person returning the medication, and the corresponding requisition event identifier. The returned quantity can be entered by the person returning the medication, or generated by the anesthetic drug cabinet after reading the medication packaging identifier, cabinet information, or weighing information, and then confirmed by the person returning the medication. After receiving residual medication registration data, the edge computing node determines whether to generate a residual registration event based on preset registration conditions. Residual medication registration data can include the medication object identifier, registered residual quantity, registrant identity, registration time, and the referenced return event identifier. Preset registration conditions can include the existence of a return event, the medication object not having entered the closed-loop completion state, the return event referenced by the residual medication registration data corresponding to the medication object, and the registrant having residual medication registration authority. When the preset registration conditions are met, the edge computing node generates a residual registration event.

[0029] Edge computing nodes further perform correlation verification on return events and residual registration events. Correlation verification includes determining whether the drug objects corresponding to the return event and residual registration event are consistent, whether the residual registration event references the return event, and whether the registered residual quantity meets the preset quantity correspondence with the returned quantity. The preset quantity correspondence can be set according to the management rules of the anesthetic drug cabinet, such as the registered residual quantity matching the returned quantity, or the registered residual quantity, actual usage, and returned quantity meeting a pre-configured closed-loop medication relationship. The preset quantity correspondence can be distributed to the edge computing nodes by the cloud server in the form of rule configurations. These rule configurations can include drug specifications, units of measurement, permitted registration methods, requirements for residual drug registration personnel, and abnormal prompts, enabling the edge computing nodes to perform corresponding quantity verifications for different drug objects. When the correlation verification passes, the edge computing node allows the drug object to enter a pending confirmation state for subsequent confirmation by management personnel or the cloud server. When the correlation verification fails, the edge computing node prevents the drug object from entering the closed-loop completion state and generates an abnormal event, which is uploaded to the cloud server, allowing the cloud server to handle abnormal registrations, incorrect references, or quantity mismatches. Abnormal events can record the abnormal type, the event identifier that triggered the abnormality, the time of the abnormality, the local data version at the time of the abnormality, and the edge computing node identifier, which facilitates traceability by the cloud server.

[0030] Based on the above specific implementation, after generating a return event, the edge computing node can synchronously generate a one-time registration credential corresponding to the return event. This one-time registration credential is used to limit subsequent residual drug registration events to only those based on generated and valid return events, thereby preventing the same return event from being registered repeatedly, or preventing residual drug registration data from forming separate registration records detached from return events. The one-time registration credential may include a credential identifier, a corresponding return event identifier, a drug object identifier, a generation time, an expiration date, a usage status, and edge computing node signature information. The credential identifier can be generated by the edge computing node based on the local event sequence number, the return event identifier, and local random data. The edge computing node signature information is used to indicate that the one-time registration credential was generated by the corresponding edge computing node, preventing external forgery of credentials. The edge computing node binds and saves the one-time registration credential to the return event and sets the initial usage status of the credential to unused. The edge computing node can also display the one-time registration credential as a scannable credential or write it into the residual drug registration interface, allowing registration personnel to reference the credential when registering residual drugs.

[0031] When an edge computing node receives residual drug registration data and prepares to generate a residual registration event, it first reads the one-time registration credential carried or referenced in the residual drug registration data and verifies it. The verification includes determining whether the one-time registration credential is unused, whether the current registration time is within the validity period, and whether the return event corresponding to the one-time registration credential matches the return event referenced in the residual drug registration data. The edge computing node can further determine whether the drug object identifier in the one-time registration credential matches the drug object identifier in the residual drug registration data to prevent the credential from being used for residual drug registration of other drug objects. When verifying the one-time registration credential, the edge computing node can first read the credential status corresponding to the credential identifier from the local credential record, then read the event content of the corresponding return event, and compare the two with the residual drug registration data to confirm the binding relationship between the credential, the return event, and the drug object.

[0032] When the usage status, validity period, and correspondence with the return event of a one-time registration credential all pass verification, the edge computing node allows the generation of a residual registration event based on the residual drug registration data. After the residual registration event is generated, the usage status of the one-time registration credential is marked as used. Therefore, the same one-time registration credential cannot be used again to generate a new residual registration event. The edge computing node can complete the generation of the residual registration event and the update of the one-time registration credential status within the same local transaction to avoid the credential being referenced again before its status has been updated. If the one-time registration credential has been marked as used, has expired, or the correspondence between the one-time registration credential and the return event is invalid, the edge computing node refuses to generate the residual registration event and can generate an exception event and upload it to the cloud server so that the cloud server can record and process cases of credential expiration, duplicate registration, or incorrect reference.

[0033] Based on the above specific implementation method, after receiving residual drug registration data, the edge computing node does not directly change the state of the drug object, but first writes the residual drug registration data into an isolated temporary storage record. The isolated temporary storage record is used to save the registration content before the formal generation of residual registration events and to verify the association between the registration content and the return event. The isolated temporary storage record can record the drug object identifier, registered residual quantity, registration personnel identity, registration time, the referenced return event identifier, and the current state of the drug object at the time of writing. The isolated temporary storage record can also record the one-time registration credential identifier, data source, writing edge computing node identifier, and data version at the time of writing, so as to be traceable when subsequently converted into a residual registration event. The edge computing node queries whether the corresponding return event exists based on the return event identifier referenced by the residual drug registration data and determines whether the return event is in a registrable state. A registrable state indicates that the return event has been generated, not referenced by a valid residual registration event, and the corresponding drug object has not yet entered the closed-loop completion state.

[0034] If the edge computing node determines that a return event does not exist, it indicates that the residual drug registration data lacks valid return basis. If the return event has been referenced by a valid residual registration event, it indicates that the same return event has already completed residual drug registration. If the corresponding drug object has entered a closed-loop completion state, it indicates that the drug object's requisition, return, and residual registration process has ended. In any of the above situations, the edge computing node does not change the drug object's state but generates an exception event. The exception event can record the exception type, residual drug registration data, the referenced return event identifier, the drug object's current state, and the exception occurrence time. If the return event is in a registerable state, the edge computing node converts the isolated temporary record into a residual registration event, establishing a clear reference relationship between the residual registration event and the return event. During the conversion, the edge computing node can write the drug object identifier, registered residual quantity, registration personnel identity, registration time, referenced return event identifier, and one-time registration voucher identifier from the isolated temporary record into the residual registration event and mark the isolated temporary record as converted.

[0035] When generating isolated temporary records, edge computing nodes also generate temporary sequence numbers for these records and bind these numbers to residual drug registration data, the current state of the drug object, and the referenced rollback events. The temporary sequence number identifies the source and conversion process of the isolated temporary record, enabling edge computing nodes and the cloud server to track changes in residual drug registration data from temporary storage to formal events. Before converting an isolated temporary record into a residual registration event, the edge computing node reads the current state of the drug object again and compares it with the state bound when writing the isolated temporary record. If they are inconsistent, it indicates that the drug object has undergone rollback, confirmation, locking, or other state changes after the temporary record was written. In this case, the edge computing node refuses to convert the isolated temporary record into a residual registration event and generates an exception event to avoid generating incorrect registration results based on an expired state. Edge computing nodes can also set a local processing lock on the corresponding drug object when converting isolated temporary records. This lock is released after the residual registration event is generated, the credential state is updated, and the drug object state is updated to prevent inconsistencies caused by concurrent registration requests.

[0036] After generating isolated temporary records, edge computing nodes can also merge and judge residual drug registration data received after the generation of the isolated temporary records for the same drug object. The edge computing node determines whether subsequently received residual drug registration data references the same return event as an existing isolated temporary record. If it references the same return event, the edge computing node retains the isolated temporary record with the earlier write time as a convertible record and marks the remaining isolated temporary records as duplicate temporary records. Data marked as duplicate temporary records can continue to be stored in the local event log or exception log, but will no longer be used to generate valid residual registration events. Through this process, multiple registration requests for the same return event can be avoided from generating multiple residual registration events, thereby improving the uniqueness and accuracy of the residual drug registration process.

[0037] After converting isolated temporary records into residual registration events, edge computing nodes upload the temporary storage number, conversion time, and corresponding residual registration event of the isolated temporary storage record to the cloud server. During upload, edge computing nodes can simultaneously upload the corresponding return event identifier, one-time registration credential identifier, and local event number, and save the data to be uploaded in the local upload queue until confirmation is received from the cloud server. Upon receiving the above data, the cloud server determines whether the same isolated temporary storage record has been converted repeatedly based on the temporary storage number. If the cloud server finds that the same temporary storage number corresponds to multiple residual registration events, it determines that a duplicate conversion has occurred. The cloud server returns a residual registration event reversal command to the edge computing node, invalidating the duplicated residual registration events. After the residual registration events are invalidated, the cloud server and edge computing nodes retain the residual registration events with the earliest write time and that meet the verification conditions as valid events, thus ensuring that the same isolated temporary storage record corresponds to only one valid residual registration result. After receiving the residual registration event reversal command, the edge computing node can mark the reversed residual registration event as invalid and restore the corresponding drug object to the state before reversal where continued verification was allowed or the abnormally locked state.

[0038] Based on the above specific implementation method, after receiving the requisition events, return events, residual registration events, and abnormal events uploaded by the edge computing nodes, the cloud server can perform status replay verification on the same drug object according to the event sequence number. The event sequence number is used to indicate the order of events occurring for the same drug object during the requisition, return, residual drug registration, and abnormal handling processes. The event sequence number can be generated locally by the edge computing nodes for each drug object and written into the event content along with the edge computing node identifier and the event generation time, enabling the cloud server to identify the event sequence relationship of the same drug object in different edge computing nodes or different upload batches. The cloud server extracts the corresponding events according to the drug object identifier and forms a cloud status sequence according to the event sequence number. Then, based on this cloud status sequence, it reconstructs the change process of the drug object from the requisitionable state, requisitioned state, returned state, pending confirmation state, closed-loop completion state, or abnormal lock state. Through the above status replay verification, the cloud server can determine whether the event sequence and status changes reported by the edge computing nodes conform to the preset management rules.

[0039] When performing state replay verification, the cloud server replays the requisition, return, residual registration, and exception events for the same drug object sequentially according to their event numbers, recording the drug object state corresponding to each event during the replay process. For example, a requisition event can change a drug object from an available-for-requisition state to a requisitioned state; a return event can change a drug object from a requisitioned state to a returned state; a residual registration event can change a drug object from a returned state to a pending-confirmation state; and an exception event can put a drug object into an exception-locked state. The cloud server compares the drug object state corresponding to each event with the drug object state corresponding to the previous event. If the drug object state corresponding to any event does not satisfy the preset state transition relationship with the drug object state corresponding to the previous event, the cloud server determines that the state replay verification fails. The preset state transition relationship can be pre-configured by the cloud server and distributed to the edge computing nodes. The preset state transition relationship can limit the allowed pre-states, post-generation states, and prohibited state changes for various events.

[0040] When the state replay result is inconsistent with the association verification result of the edge computing node, it indicates a discrepancy between the verification conclusion formed locally by the edge computing node and the state conclusion obtained by the cloud server based on the complete event sequence reconstruction. This discrepancy may be caused by event upload delays, missing events, duplicate registrations, incorrect references to returned events, or untimely synchronization of local state. In this case, the cloud server sends a compensation processing instruction to the edge computing node, causing the corresponding drug object to enter an abnormal locking state. The abnormal locking state is used to prevent the drug object from continuing to undergo requisition, return, residual registration, or closed-loop confirmation operations until the abnormal event is confirmed or compensation processing is completed. Compensation processing instructions can include state locking instructions, event retransmission instructions, event reversal instructions, or re-verification instructions. After receiving the compensation processing instruction, the edge computing node can first verify the drug object identifier, event identifier, and instruction generation time in the compensation processing instruction, then update the local drug object state, retransmit the event, or perform a reversal according to the instruction content, and return the processing result to the cloud server.

[0041] When the cloud server detects missing, duplicate, or reversed event numbers for the same drug object, it first sends an event retransmission request to the edge computing node. A missing event number indicates that an intermediate event that should exist is missing from the cloud state sequence. Duplicate event numbers indicate that two or more events use the same event number. Reversed event numbers indicate that the event number of a later event is earlier than the event number of a previous event. Upon receiving the event retransmission request, the edge computing node queries the corresponding event based on its locally stored event log and returns the event matching the request to the cloud server. The locally stored event log can include uploaded events, events awaiting upload, reversed events, and abnormal events. The edge computing node can query candidate events based on the drug object identifier, event number, event type, and event generation time. If the edge computing node fails to return the event corresponding to the event retransmission request within a preset time, or if the returned event still does not meet the event number continuity requirement, the cloud server sends a compensation processing instruction to the edge computing node, causing the corresponding drug object to enter an abnormal locking state.

[0042] When the cloud server detects a missing event sequence number, it sends an event retransmission request along with the identifiers of the preceding and following events adjacent to the missing event sequence number. The preceding event identifier indicates an event that was received and acknowledged by the cloud server before the missing event, and the following event identifier indicates an event that was received by the cloud server after the missing event. After the edge computing node returns a candidate retransmission event, the cloud server determines whether the candidate retransmission event references the preceding event identifier and whether the following event references the event identifier of the candidate retransmission event. If both references are valid, it means the candidate retransmission event can connect the preceding and following events, and the cloud server can write the candidate retransmission event into the cloud state sequence and re-execute the state replay verification. If any reference is invalid, it means the candidate retransmission event cannot prove its correct position in the event chain, the cloud server does not write the candidate retransmission event into the cloud state sequence, and sends a compensation processing instruction to the edge computing node. After the cloud server successfully re-executes the state replay verification, it can return the verification result to the edge computing node, allowing the edge computing node to release the temporary abnormal lock triggered by the missing event, or continue to wait for confirmation from the administrator before releasing the abnormal lock.

[0043] Example 1:

[0044] This embodiment provides an optimized method for the requisition, return, and residual drug registration of anesthetic drug cabinets based on cloud-edge collaborative computing. It is applied to an anesthetic drug cabinet in a hospital operating room. The anesthetic drug cabinet is communicatively connected to a cloud server, and an edge computing node E01 is installed on the side of the anesthetic drug cabinet. The cloud server pre-generates drug object data and distributes it to the edge computing node E01. The drug object data includes drug object identifier D20260527001, drug name fentanyl injection, specification 0.1mg / 2mL, batch number B20260501, inventory status, cabinet location, requisition permissions, and associated surgical task number OP20260527001.

[0045] At 08:30, person A initiates a request to collect anesthesia medication through the anesthetic drug cabinet. Edge computing node E01 reads the person's identity, the intended medication, the collection time, and the surgical task information, and performs a consistency check against the locally stored medication object data. Edge computing node E01 determines that person A has the authority to collect the corresponding medication object, that medication object D20260527001 is in a collectable state, that the collection time matches the medication time of surgical task OP20260527001, and that the medication object matches the medication requirements in the surgical task. Therefore, it generates a collection event L20260527001 and updates the local status of medication object D20260527001 to "collected".

[0046] At 10:05, person A initiated a return request based on the requisition event L20260527001. Edge computing node E01 queried the unclosed requisition event L20260527001 based on the drug object identifier D20260527001 and generated a return event R20260527001 associated with this requisition event. Return event R20260527001 records the drug object identifier D20260527001, the returned quantity 1.20mL, the return time 10:05, the identity of the person returning the drug A, and the corresponding requisition event identifier L20260527001.

[0047] After generating a return event R20260527001, edge computing node E01 synchronously generates a one-time registration credential P20260527001 corresponding to that event. This one-time registration credential P20260527001 includes a credential identifier P20260527001, a corresponding return event identifier R20260527001, a drug object identifier D20260527001, a generation time of 10:05:10, a validity period of 10 minutes, a usage status of unused, and the edge computing node's signature information. Edge computing node E01 binds and stores the one-time registration credential P20260527001 with the return event R20260527001 to ensure that subsequent residual drug registration events can only be generated based on this valid return event.

[0048] like Figure 2 As shown, the generation time, residual registration time, and expiration time of the one-time registration credential P20260527001 can be presented along the same time axis. In the figure, 0 min represents the credential generation time, 2.83 min represents the residual registration time, and 10 min represents the expiration time. This diagram can intuitively reflect that the registration behavior occurs within the credential's validity period, and that the credential is still in an unused state at the time of registration. This illustrates that before the residual registration event is generated, the edge computing node E01 does not only determine whether a return event exists, but also further combines the credential's validity period and usage status for constraints.

[0049] At 10:08, registrant B submitted residual drug registration data, registering a residual volume of 1.20 mL. The registration data referenced return event R20260527001 and included a one-time registration voucher P20260527001. Edge computing node E01 first reads the usage status, validity period, and correspondence with the return event of the one-time registration voucher. It determines that the voucher is unused, the current registration time is within the validity period, and the return event identifier R20260527001 in the voucher matches the return event identifier referenced in the residual drug registration data. Simultaneously, the drug object identifier D20260527001 in the voucher matches the drug object identifier in the residual drug registration data.

[0050] After receiving residual drug registration data, edge computing node E01 does not directly change the drug object's state. Instead, it first writes the residual drug registration data into the isolation temporary storage record S001. The isolation temporary storage record S001 records the temporary storage number S001, the drug object identifier D20260527001, the registered residual volume 1.20 mL, the registrant's identity B (person), the registration time 10:08:15, the referenced return event identifier R20260527001, the one-time registration voucher identifier P20260527001, and the drug object's current state at the time of writing (returned). By writing to the isolation temporary storage record first, association verification can be completed before the actual generation of the residual registration event, preventing the registration data from changing the drug object's state without verification.

[0051] Edge computing node E01 performs quantity correspondence verification on the residual drug registration data in return event R20260527001 and isolation temporary storage record S001. Let the registered residual quantity be... The number of returns in the return event is The allowable deviation threshold is The deviation between the registered residual quantity and the returned quantity is Then the deviation judgment formula is:

[0052]

[0053] in, This indicates the quantity of residual medication entered or confirmed by the registration personnel. This indicates the number of returns recorded in the return event log. This indicates the allowable measurement error threshold of the system. This indicates the absolute deviation between the two. When At that time, edge computing node E01 determines that the registered residual quantity and the returned quantity meet the preset quantity correspondence relationship.

[0054] Substitute the data from this embodiment into the above deviation judgment formula. , , ,get:

[0055]

[0056] because Edge computing node E01 verifies the quantity correspondence and then proceeds to determine whether the return event R20260527001 exists, whether it is not referenced by a valid residual registration event, and whether drug object D20260527001 has not entered the closed-loop completion state. Figure 3 As shown, the number of returned items and registered residual amount All values ​​fall within the allowable deviation range formed by using 1.20 mL as the return baseline value and 0.02 mL as the allowable deviation threshold. The upper and lower limits in the figure are used to show the judgment boundary of the quantity correspondence of the edge computing node E01, so that the quantity verification result corresponds to the calculation result in the embodiment.

[0057] When the rollback event R20260527001 is in a registrable state, edge computing node E01 reads the current state of drug object D20260527001 again and compares the current state with the rollback state bound when writing the isolation temporary record S001. If the two match, it means that the drug object has not undergone confirmation, locking, or other state changes after the temporary record was written. Edge computing node E01 converts the isolation temporary record S001 into a residual registration event W20260527001, making the residual registration event W20260527001 explicitly reference the rollback event R20260527001, and marks the usage status of the one-time registration credential P20260527001 from unused to used.

[0058] If, after the isolation temporary record S001 is generated, the edge computing node E01 receives another residual drug registration data for the same drug object D20260527001 and forms an isolation temporary record S002 with a write time of 10:08:20, and S002 also references the rollback event R20260527001, then the edge computing node E01 will perform a duplicate temporary record check. Let... This indicates the number of quarantined temporary records under the same rollback event. Indicates the first A temporary isolation record, Indicates the referenced bounce event identifier, when multiple Quoted If they are the same, the one with the earliest time will be written. The records identified as convertible are classified as duplicate temporary records.

[0059] In this embodiment, both isolation temporary record S001 and isolation temporary record S002 reference rollback event R20260527001, therefore they can be represented as:

[0060]

[0061] Because the write time of S001 (10:08:15) is earlier than the write time of S002 (10:08:20), edge computing node E01 retains S001 as a convertible record and marks S002 as a duplicate temporary record. S002 is not used to generate valid residual registration events. Figure 4 As shown, S001 and S002 are expanded along the relative write time. S001 is located in the reserved area and corresponds to the convertible processing result, while S002 is located in the duplicate area and corresponds to the duplicate temporary storage processing result. This diagram further illustrates that the edge computing node E01 does not generate multiple residual registration events according to the number of receptions, but rather selects a unique convertible record based on the same return event identifier and the order of write time.

[0062] After edge computing node E01 converts the isolated temporary record S001 into a residual registration event W20260527001, it allows drug object D20260527001 to enter the pending confirmation state and uploads the temporary sequence number S001, conversion time 10:08:30, corresponding residual registration event W20260527001, return event identifier R20260527001, and one-time registration voucher identifier P20260527001 to the cloud server. After receiving the above data, the cloud server determines whether the same isolated temporary record has been converted repeatedly based on the temporary sequence number S001. If it finds that the same temporary sequence number corresponds to multiple residual registration events, it returns a residual registration event reversal instruction to edge computing node E01 to invalidate the duplicated residual registration events.

[0063] Through the above processing, edge computing node E01 locally completes the processes of requisition, return, verification of one-time registration vouchers, isolation and temporary storage, quantity correspondence verification, and duplicate registration identification. This ensures that residual drug registration events must be generated based on valid return events, and that each return event corresponds to only one valid residual registration result. This method can complete real-time verification at the anesthetic drug cabinet side even with network latency or pending confirmation from the cloud server, reducing the occurrence of residual drug registrations detached from return events, duplicate registrations, or erroneous loops.

[0064] Example 2:

[0065] This embodiment provides a method for replaying and compensating the event status of an anesthetic drug cabinet based on cloud-edge collaborative computing, applied to the management scenario of an anesthetic drug cabinet in a hospital operating room. An edge computing node E01 is set up on the side of the anesthetic drug cabinet. The cloud server receives the requisition events, return events, residual registration events, and abnormal events uploaded by the edge computing node E01, and performs status replay verification according to the event sequence number of the same drug object.

[0066] In this embodiment, the drug object is identified as D20260527001. Under network fluctuations, edge computing node E01 sequentially generates a requisition event L20260527001, a return event R20260527001, a residual registration event W20260527001, and an anomaly event A20260527001. These events correspond to event numbers 1, 2, 3, and 4, respectively. The drug object status sequentially includes: available for requisition, requisitioned, returned, pending confirmation, and anomaly locked.

[0067] After receiving the batch data uploaded by edge computing node E01 at 11:00, the cloud server extracts the corresponding event based on the drug object identifier D20260527001 and forms a cloud status sequence according to the event sequence number. If the cloud server actually receives event sequence number 1 and event sequence number 3, but does not receive event sequence number 2, the cloud server first checks the continuity of adjacent event sequence numbers.

[0068] Let the sequence number of the k-th event be... The previous event number is If the interval between two adjacent event numbers is G, then the formula for determining the continuity of event numbers is:

[0069]

[0070] in, This indicates the event sequence number of the currently verified event in the cloud status sequence. This represents the event sequence number of the previous event in the cloud state sequence, and G represents the interval between the current event sequence number and the previous event sequence number. If G equals 1, it means the event sequence numbers are consecutive; if G is greater than 1, it means there is a missing event sequence number; if G equals 0, it means there is a duplicate event sequence number; if G is less than 0, it means there is an inverted event sequence number.

[0071] Substituting the data from this embodiment into the above judgment formula, the cloud server receives the previous event sequence number as 1 and the current event sequence number as 3, resulting in:

[0072]

[0073] Since G equals 2 and is greater than 1, the cloud server determines that event sequence number 2 is missing between event sequence number 1 and event sequence number 3, corresponding to the missing event R20260527001. At this point, the cloud server does not directly write the residual registration event W20260527001 corresponding to event sequence number 3 as a valid event into the final closed-loop result, but instead sends an event retransmission request to the edge computing node E01. For example... Figure 5 As shown, the cloud receiving link forms a span between event sequence number 1 and event sequence number 3. The missing sequence number interval corresponds to the rollback event R20260527001. The result of G equaling 2 in the figure is used to indicate that this span is not a normal continuous upload, but an event chain breakpoint that needs to be triggered to retransmit.

[0074] When the cloud server sends an event retransmission request, it simultaneously carries the preceding event identifier L20260527001 and the following event identifier W20260527001 adjacent to the missing event sequence number 2. The preceding event identifier L20260527001 indicates that the cloud server has received and confirmed the requisition event, and the following event identifier W20260527001 indicates that the cloud server has received the residual registration event, but the link position still needs to be verified. After receiving the event retransmission request, the edge computing node E01 queries the local event log for the candidate retransmission event corresponding to event sequence number 2 and returns the candidate retransmission event R20260527001.

[0075] After receiving the candidate retransmission event R20260527001, the cloud server determines whether the candidate retransmission event references the preceding event identifier L20260527001, and whether the following event W20260527001 references the event identifier of the candidate retransmission event R20260527001. If the candidate retransmission event R20260527001 references the adoption event L20260527001, and the residual registration event W20260527001 references the return event R20260527001, it indicates that the candidate retransmission event can connect the preceding and following events. The cloud server writes the candidate retransmission event R20260527001 into the cloud state sequence and re-executes the state replay verification.

[0076] When the cloud server performs state replay verification, it replays the events of the same drug object D20260527001 sequentially according to the event number. The requisition event L20260527001 changes the drug object from a requisitionable state to a requisitioned state; the return event R20260527001 changes the drug object from a requisitioned state to a returned state; the residual registration event W20260527001 changes the drug object from a returned state to a pending confirmation state; and the abnormal event A20260527001 puts the drug object into an abnormal locked state.

[0077] Let the state before the event occurs be... The status after the event is If the preset set of state transition relationships is T, and the state transition verification result is C, then the consistency judgment formula for state replay is:

[0078]

[0079] in, This indicates the state of the drug object before a certain event is executed. This indicates the state that the drug object should enter after the event is executed. T represents the set of allowed state transition relationships pre-configured by the cloud server. C represents the state transition verification result. C equals 1, indicating that the verification passed. C equals 0, indicating that the verification failed.

[0080] Substituting the state data from this embodiment into the above judgment formula, if the state change corresponding to the requisition event L20260527001 is from the requisitionable state to the requisitioned state, and this state change belongs to the preset state transition relationship set T, then the state transition verification result is passed. If, in the absence of the return event R20260527001, the cloud server directly replays the residual registration event W20260527001, causing the drug object to change from the requisitioned state to the pending confirmation state, then this state change does not belong to the preset state transition relationship set T, and the state transition verification result is failed. The cloud server determines that the state replay verification fails. Figure 6 As shown, the replay path before retransmission jumps directly from event number 1 to event number 3, and the corresponding state jumps from the "already used" state to the "pending confirmation" state. In the figure, C equals 0, indicating that the path does not meet the preset state transition relationship. After the return event is added, the state replay path passes through the "already used", "returned", "pending confirmation" state and "abnormal lock" state in sequence. In the figure, C equals 1, indicating that the state chain after retransmission can be accepted by the cloud server.

[0081] If the reference relationships between candidate retransmission event R20260527001 and its preceding event L20260527001 and its following event W20260527001 are all valid, the cloud server writes the candidate retransmission event into the cloud state sequence and re-executes state replay verification according to event numbers 1, 2, 3, and 4. If the candidate retransmission event does not reference its preceding event L20260527001, or the following event W20260527001 does not reference candidate retransmission event R20260527001, the cloud server does not write the candidate retransmission event into the cloud state sequence and sends a compensation processing instruction to edge computing node E01. Figure 7As shown, the preceding event, the candidate retransmission event, and the subsequent event form an event chain from L to R to W in the same reference verification branch. When the chain is valid, the candidate retransmission event is written into the state sequence. When the reference is invalid, the processing path switches to the compensation processing branch, causing the drug object D20260527001 to enter an abnormal locking state.

[0082] Compensation processing instructions can include state lock instructions, event retransmission instructions, event reversal instructions, or re-verification instructions. Upon receiving a compensation processing instruction, edge computing node E01 sets drug object D20260527001 to an abnormal lock state, preventing further requisition, return, residual registration, or closed-loop confirmation operations for that drug object, and returns the local processing result to the cloud server. After receiving the processing result from edge computing node E01, the cloud server writes the abnormal processing procedure into the cloud event log.

[0083] In this way, after receiving events uploaded by edge computing node E01 in batches, the cloud server can perform state replay verification on the same drug object based on the continuity of event sequence number, event reference relationship and preset state transition relationship. When it finds missing, duplicate, reversed or inconsistent state transitions of events, it will trigger event retransmission and compensation processing, so that the drug objects in the anesthetic drug cabinet enter the abnormal locking state under abnormal link, thereby reducing the closed-loop confirmation error caused by event upload delay, event omission or incorrect reference.

Claims

1. The method for optimizing the registration of anesthetic cabinet taking, returning and residual drug based on cloud edge collaborative computing, characterized in that, include: The cloud server generates drug object data and distributes it to the edge computing node of the anesthetic drug cabinet; The edge computing node responds to the requisition request and performs a consistency check on the matching relationship between the requisitioning personnel's identity, the drug recipient, the requisition time, and the surgical task. Once the check is successful, a requisition event is generated. The edge computing node responds to the return request and generates a return event associated with the requisition event; Edge computing nodes receive residual drug registration data and generate residual registration events when preset registration conditions are met; The edge computing node performs correlation verification on the return event and the residual registration event. The correlation verification includes determining whether the corresponding drug objects are consistent, whether the residual registration event references the return event, and whether the registered residual quantity meets the preset quantity correspondence with the return quantity. When the association verification passes, the drug object is allowed to enter the pending confirmation state; If the association verification fails, the drug object is prohibited from entering the closed-loop completion state, and the abnormal event is uploaded to the cloud server.

2. The optimization method of claim 1, wherein, Generate a one-time registration credential corresponding to the return event, and verify the usage status, validity period, and correspondence between the one-time registration credential and the return event before generating the residual registration event; If the verification passes, the generation of a residual registration event is allowed, and the one-time registration credential is marked as used. If the verification fails, the generation of a residual registration event is rejected.

3. The optimization method of claim 1, wherein, The residual drug registration data is written into the isolation temporary storage record, and it is determined whether the return event referenced by the residual drug registration data is in a registrable state. If the return event does not exist, has been referenced by a valid residual registration event, or the corresponding drug object has entered the closed-loop completion state, the drug object state is not changed and an abnormal event is generated. If the return event is in a registrable state, the isolation temporary storage record is converted into a residual registration event.

4. The optimization method of claim 1, wherein, After receiving the requisition event, return event, residual registration event, and abnormal event, the cloud server performs a status replay verification on the same drug object according to the event sequence number. When the state replay result is inconsistent with the association verification result of the edge computing node, or when there is a missing, duplicate, or reversed event sequence number, the cloud server sends a compensation processing instruction to the edge computing node, causing the corresponding drug object to enter an abnormal locking state.

5. The optimization method of claim 3, wherein, Edge computing nodes generate temporary storage numbers for the isolated temporary storage records and bind the temporary storage numbers to residual drug registration data, the current status of the drug object, and the referenced return events; Before the isolation temporary record is converted into a residual registration event, if the current state of the drug object has changed compared to when it was written into the isolation temporary record, the conversion is rejected and an abnormal event is generated.

6. The optimization method of claim 3, wherein, The residual drug registration data received after the generation of the isolation temporary storage record for the same drug object is merged and judged; when the residual drug registration data and the isolation temporary storage record refer to the same return event, the isolation temporary storage record with the earlier writing time is retained as a convertible record, and the remaining isolation temporary storage records are marked as duplicate temporary storage records.

7. The optimization method of claim 3, wherein, The temporary storage number, conversion time, and corresponding residual registration event of the isolated temporary storage record are uploaded to the cloud server. The cloud server determines whether the same isolated temporary storage record has been converted repeatedly based on the temporary storage number. If repeated conversion exists, a residual registration event reversal instruction is returned to the edge computing node to invalidate the duplicated residual registration event.

8. The optimization method according to claim 4, characterized in that, When performing the state replay verification, the cloud server replays the requisition event, return event, residual registration event, and abnormal event of the same drug object in sequence according to the event number, and records the state of the drug object corresponding to each event during the replay process; when the state of the drug object corresponding to any event does not meet the preset state transition relationship with the state of the drug object corresponding to the previous event, the state replay verification is determined to fail.

9. The optimization method according to claim 4, characterized in that, When the cloud server detects missing, duplicate, or reversed event sequence numbers, it first sends an event retransmission request to the edge computing node. If the edge computing node fails to return the event corresponding to the event retransmission request within the preset time, or if the returned event still does not meet the event sequence number continuity requirement, the cloud server sends a compensation processing instruction to the edge computing node, causing the corresponding drug object to enter an abnormal locking state.

10. The optimization method according to claim 9, characterized in that, When the event sequence number is missing, the cloud server sends an event retransmission request along with the identifiers of the preceding and following events adjacent to the missing event sequence number. After the edge computing node returns a candidate retransmission event, the cloud server determines whether the candidate retransmission event references the identifier of the preceding event and whether the following event references the event identifier of the candidate retransmission event. If any reference relationship is not established, the candidate retransmission event is not written into the cloud state sequence, and a compensation processing instruction is sent to the edge computing node.

Citation Information

Patent Citations

  • Semen cannabinae medicine management system, semen cannabinae medicine data processing method and semen cannabinae medicine cabinet

    CN119181474A

  • Intelligent management system for anesthesiology department operating room resources

    CN119400377A