Method and system for managing drug inventory

By combining a blockchain system with multi-level verification analysis using smart storage boxes and sensors, the challenge of real-time monitoring in recombinant protein drug inventory management has been solved, enabling accurate and timely assessment of drug status and improving the efficiency and security of inventory management.

CN121279925BActive Publication Date: 2026-03-24SHANGHAI INNOGEN PHARM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the current technology, it is difficult to monitor the status of recombinant protein drugs in non-refrigerated environments in real time, which may lead to drug failure without being detected, resulting in safety hazards and economic losses, as well as frequent supply chain disputes.

Method used

By employing a blockchain system combined with smart storage boxes and sensors, multi-level verification analysis is performed using temperature and storage data to monitor the dynamic effectiveness status of drugs in real time. Encryption and decentralization mechanisms are used to ensure data privacy and drug efficacy evaluation.

Benefits of technology

It has improved the accuracy and efficiency of drug inventory management, reduced the impact of human error, and ensured timely analysis of the effectiveness and quantity of drugs throughout their entire life cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121279925B_ABST
    Figure CN121279925B_ABST
Patent Text Reader

Abstract

The application provides a medicine inventory management method and system, and belongs to the technical field of medicine information management. The medicine inventory management method can realize accurate mapping of boxes, pens, storage positions, events and states through the construction of a chain-on trusted closed loop from production to use, can timely and accurately analyze the quantity and effectiveness of medicines, can balance the data privacy and the drug efficacy evaluation demand of the master node through encryption and decentralization, can enhance the authenticity of digital records by using the physical data of intelligent storage boxes, can reduce the influence of human errors on judgment, and can realize the improvement of the accuracy and efficiency of medicine inventory management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pharmaceutical information management technology, and in particular to a pharmaceutical inventory management method and system. Background Technology

[0002] Recombinant protein drugs are characterized by high value, limited supply, and stringent storage conditions, such as requiring refrigeration at 2℃-8℃ and strictly prohibiting freezing. This presents significant challenges to traditional drug distribution and inventory management. Due to the limited supply of these drugs, manufacturers cannot obtain real-time information on the actual consumption rate and inventory levels at hospitals, and can only passively supply them based on periodic purchase orders from hospitals. Once the drugs arrive at the hospital, their storage environment (such as refrigerator malfunctions or storage alongside thawing ice packs) becomes almost a blind spot for manufacturers, potentially leading to undetected drug deterioration, safety hazards, and economic losses. When problems arise, it is difficult to determine whether the issue occurred during transportation or in hospital storage, resulting in disputes and resource waste.

[0003] Therefore, there is an urgent need for a new solution that can effectively manage the status of pharmaceutical inventory in other, less regulated locations. Summary of the Invention

[0004] This invention provides a drug inventory management method and system to address the shortcomings of existing technologies in the difficulty of monitoring the inventory status of drugs with high storage requirements, thereby improving the accuracy and efficiency of drug inventory management.

[0005] This invention provides a drug inventory management method applied to a target blockchain system, the target blockchain system comprising at least one master node as a drug supplier and multiple slave nodes as drug users, the method comprising:

[0006] The master node creates an initial drug record for each drug unit on the target blockchain system. The initial drug record includes a drug identifier and an initial valid status. The drug identifier includes a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier. The smart storage box includes multiple compartments, each compartment is used to hold an injection pen, and is equipped with a compartment sensor and a temperature sensor.

[0007] The master node continuously receives temperature data and storage location data generated by the smart storage box associated with the slave node from the target blockchain system, and both the temperature data and storage location data are associated with the drug identifier;

[0008] The master node receives encrypted usage data submitted by the slave node from the target blockchain system. The encrypted usage data includes a drug identifier, usage period, and injection dosage, and is encrypted using a key associated with the master node.

[0009] The master node decrypts the encrypted usage data and performs multi-level verification analysis based on the temperature data and the warehouse location data to determine the dynamic effectiveness status of the drug unit;

[0010] Based on the results of the multi-level verification analysis, the master node updates the dynamic validity status of the drug unit on the target blockchain system.

[0011] According to a drug inventory management method provided by the present invention, the step of performing multi-level validation analysis includes:

[0012] Based on the first use period in the usage data, the main node starts the validity period of the drug unit corresponding to the drug identifier after opening.

[0013] The temperature data, the storage location data, and the usage data are analyzed, and the dynamic effectiveness status of the drug unit is updated based on the initial usage period.

[0014] According to a drug inventory management method provided by the present invention, the analysis of the temperature data, the storage location data, and the usage data includes:

[0015] When it is determined that the temperature data is within the preset effective temperature threshold and there are abnormal periods in the usage data, the timestamps of the abnormal periods in the usage data are corrected with reference to the temperature fluctuation event points in the temperature data, and a corrected usage data sequence is generated.

[0016] The dynamic validity status is determined based on the corrected usage data sequence.

[0017] According to a drug inventory management method provided by the present invention, the step of correcting the timestamps of abnormal periods in the usage data by taking temperature fluctuation event points in the temperature data as a reference includes:

[0018] Based on the warehouse data, events involving opening and retrieving medication boxes are identified;

[0019] Based on the first timestamp of the temperature data caused by the opening of the medicine box and the rapid temperature rise event with a slope exceeding a predetermined value, abnormal time periods close to the first timestamp are correlated and corrected.

[0020] According to a drug inventory management method provided by the present invention, the abnormal period of usage data includes at least one of the following:

[0021] The usage period corresponding to the interval between two usage records being less than the minimum safety interval, the usage period when the reported cumulative injection dose exceeds the total capacity of the drug unit, and the usage period during the non-working time of the slave node.

[0022] According to a drug inventory management method provided by the present invention, the analysis of the temperature data, the storage location data, and the usage data includes:

[0023] When it is determined that both the temperature data and the usage data contain abnormal time periods, cross-validation is performed to compare the timestamps of the temperature data and the usage data to determine the conflicting time periods between the temperature data and the usage data on the timeline.

[0024] On the target blockchain system, the dynamic validity status of the drug unit is updated to pending verification, and a smart contract request is sent to the slave node to request supplementary proof including the conflict time period.

[0025] According to a drug inventory management method provided by the present invention, after associating and correcting the abnormal time period close to the first timestamp, the method further includes: generating a verification transaction containing the correction record on the target blockchain system.

[0026] According to a drug inventory management method provided by the present invention, after the master node updates the dynamic validity status of the drug unit on the target blockchain system, the method further includes:

[0027] The master node monitors in real time the total number of valid injection pens under the jurisdiction of the slave node.

[0028] When the total number is lower than the dynamic safety stock level corresponding to the slave node, a notification message is sent to the drug supplier and the drug user corresponding to the slave node.

[0029] The present invention also provides a drug inventory management system, comprising:

[0030] A creation module is used by the master node to create an initial drug record for each drug unit on the target blockchain system. The initial drug record includes a drug identifier and an initial valid status. The drug identifier includes a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier. The smart storage box includes multiple compartments, each compartment is used to hold an injection pen, and is equipped with a compartment sensor and a temperature sensor.

[0031] The first receiving module is used by the master node to continuously receive temperature data and storage location data generated by the smart storage box associated with the slave node from the target blockchain system, wherein the temperature data and storage location data are both associated with the drug identifier;

[0032] The second receiving module is used by the master node to receive encrypted usage data submitted by the slave node from the target blockchain system. The encrypted usage data includes a drug identifier, usage period and injection dosage, and is encrypted using a key associated with the master node.

[0033] The first processing module is used to decrypt the encrypted usage data by the master node, and perform multi-level verification analysis based on the temperature data and the warehouse location data to determine the dynamic effectiveness status of the drug unit;

[0034] The second processing module is used to update the dynamic validity status of the drug unit on the target blockchain system by the master node based on the results of the multi-level verification analysis.

[0035] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the drug inventory management method as described above.

[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the drug inventory management method as described above.

[0037] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the drug inventory management method as described above.

[0038] The drug inventory management method and system provided by this invention can achieve precise mapping of boxes, pens, warehouse locations, events, and states by constructing a trusted closed loop on the chain from production to use. It can analyze the quantity and effectiveness of drugs in a timely and accurate manner. Through encryption and decentralization, it takes into account both data privacy and the drug efficacy evaluation needs of the master node. It uses the physical data of smart storage boxes to enhance the authenticity of digital records, reduce the impact of human error on judgment, and improve the accuracy and efficiency of drug inventory management. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram of the structure of the target blockchain system provided by the present invention;

[0041] Figure 2 This is a flowchart illustrating the drug inventory management method provided by the present invention;

[0042] Figure 3 This is a schematic diagram of the structure of the drug inventory management system provided by the present invention;

[0043] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0045] The following is combined Figures 1-4 This invention describes a drug inventory management method and system. The following is a brief explanation of the various terms and concepts used in the embodiments of this invention.

[0046] The target blockchain system refers to the consortium blockchain network used in this method. Participants include a master node acting as a drug supplier and multiple slave nodes acting as drug users. It possesses the capabilities for on-chain data storage, transaction consensus, access control, and smart contract execution. The on-chain data it stores is immutable and traceable.

[0047] The master node is run by the drug supplier (such as the manufacturer) and has the authority and ability to manage keys, create initial drug records, decrypt sensitive usage data, perform multi-level verification analysis, and update the dynamic validity status authoritatively.

[0048] The slave node is run by the drug user (such as a hospital) and is responsible for binding and receiving data into the warehouse, aggregating and uploading data from smart storage boxes to the blockchain, encrypting and reporting usage data, responding to the master node's verification requests and inventory warnings, etc.

[0049] A drug unit refers to a box or set of pre-filled injection pens that is linked to a smart storage box. Each drug unit contains both a smart storage box identifier and at least one injection pen identifier associated with it.

[0050] The smart storage box identifier is a code used to uniquely identify a specific physical storage box. It can be implemented by QR code, RFID or other methods and corresponds one-to-one with the on-chain record of the blockchain.

[0051] The injection pen identifier is a code used to uniquely identify a single injection pen and can be mapped to a storage box location event.

[0052] Each compartment is a physical recess or slot inside the smart storage box for holding a single injection pen. Each compartment has independent sensing capabilities. Compartment sensors are installed in each compartment to detect the presence or absence of a pen, changes in weight, or changes in NFC recognition status, generating data for physical events such as removal / replacement. Compartment sensors can be microswitches, pressure sensors, or NFC reader coils mounted on the bottom or side wall of each compartment. When a pen is inserted or removed, the sensor status changes, precisely sensing which compartment's pen has undergone physical movement.

[0053] The temperature sensor is a high-precision temperature detection element installed in the smart storage box, which can continuously or trigger-basedly collect ambient temperature data inside the box.

[0054] Temperature data consists of a sequence of timestamped ambient temperature readings collected by temperature sensors and uploaded to the blockchain.

[0055] Position data consists of a sequence of physical events collected by position sensors and uploaded to the blockchain, including timestamps, position numbers, event types (removal / replacement), and inferential pen identifiers.

[0056] The usage data consists of data manually entered and encrypted by node operators, containing the injection pen identifier, usage period, and injection dosage. It should be noted that the usage data does not contain patient identity information or any personally identifiable information.

[0057] Dynamic validity status is a status field on the chain for the pen identifier, used to characterize the real-time utility status of the pen throughout its entire lifecycle, such as unopened, in stock and valid, opened and in use, pending verification, temperature-sensitive, expired, insufficient dosage, etc.

[0058] The post-opening validity period tracking is a logic timer that counts down in real time from the date of first confirmed use to manage the shelf life of the injection pen after opening. For example, an injection pen pre-filled with a certain recombinant protein drug can be set to be refrigerated for 56 days.

[0059] The effective temperature threshold is a range set according to the instruction manual or quality standard, such as 2°C to 8°C. It can be fine-tuned according to different specific products. Time periods outside this range will affect the dynamic effectiveness assessment.

[0060] Abnormal periods refer to time periods in the usage data that do not conform to business and pharmacological rules, such as too short intervals between two uses, cumulative doses exceeding the total capacity, or usage periods occurring outside of working hours.

[0061] Temperature fluctuation events refer to characteristic points in temperature data caused by short-term, rapid temperature changes due to opening of medicine boxes or refrigerated containers. They are usually characterized by a temperature rise or fall that exceeds a set value and lasts for a short period of time.

[0062] The slope preset value refers to the numerical threshold used to identify events of rapid temperature rise, which can be preset by the system or dynamically adjusted.

[0063] A smart contract request is a structured request that the master node automatically sends to the slave node through an on-chain smart contract when it discovers a data conflict or needs to provide supplementary proof, requiring the slave node to provide the hash and explanation of the relevant proof materials.

[0064] Transaction verification refers to the record generated on the chain after the master node completes the correction or verification. It is used to disclose the basis, scope and results of the correction, and to ensure that the process is auditable.

[0065] Dynamic safety stock level refers to the safety stock threshold set for each slave node, taking into account the effective status and remaining dose. An alert is triggered when the level falls below this threshold.

[0066] like Figure 1 As shown, the overall architecture of the target blockchain system of the present invention includes a blockchain network layer, a master node business layer, a slave node business layer, and an Internet of Things (IoT) device layer.

[0067] The blockchain network layer, through its consensus module, ensures the orderliness, non-repudiation, and immutability of transactions. The notarization module can assign different permissions to master and slave nodes and perform notarization and authentication on smart storage boxes and operator terminals. The smart contract module can handle on-chain process logic such as automatic verification triggers, supplementary proof requests, and inventory alerts.

[0068] The master node's business layer can create initial drug records, hierarchical identifiers for allocation boxes and pens, and establish binding relationships through the drug digitization initialization module. The key and decryption module can manage the master node's key pairs and decrypt usage data. Furthermore, the multi-level verification and analysis module corresponding to the smart contract (i.e., the verification module) can cross-verify, time-series correct, and locate conflicts between temperature data, warehouse data, and decrypted usage data. Finally, the state calculation and update module calculates the dynamic validity status, remaining dosage, and the start and end dates of the validity period after opening, and writes the results on-chain. Based on this, the alert and notification module monitors the dynamic safety stock, triggering on-chain alerts and off-chain notifications.

[0069] From the node's business layer, the receiving and binding module can scan the storage box and injection pen identifiers to complete the receipt and delivery, and confirm the mapping of the box, pen, and ward. The sensor data gateway module can aggregate temperature and ward event data from the smart storage box, perform basic verification, and then upload it to the blockchain. Before this, a data entry and encryption module is needed to provide a human-machine interface for entering the injection time period and dosage, using public key encryption to form ciphertext for uploading to the blockchain. A supplementary proof response module can also be set up to receive verification smart contract requests from the master node, and upload hashes and descriptions of manual inventory records, photos, system logs, etc.

[0070] The IoT device layer can include smart storage boxes, refrigerators, and terminal devices. Smart storage boxes contain multiple compartments, independent compartment sensors, temperature sensors, communication and power supply units, and are capable of event-triggered data collection and timed uploads. Terminal devices, such as departmental computers or workstations, connect to the smart storage boxes via Bluetooth or Wi-Fi and can act as data uplink gateways.

[0071] like Figure 2 As shown, the drug inventory management method of this invention mainly includes steps 210, 220, 230, 240 and 250.

[0072] Step 210: The master node creates an initial drug record for each drug unit on the target blockchain system;

[0073] Step 220: The master node continuously receives temperature data and storage location data generated by the smart storage boxes associated with the slave nodes from the target blockchain system;

[0074] Step 230: The master node receives encrypted usage data submitted by the slave node from the target blockchain system;

[0075] Step 240: The master node decrypts the encrypted usage data and performs multi-level verification analysis based on temperature data and storage location data to determine the dynamic effectiveness status of the drug unit.

[0076] Step 250: Based on the results of the multi-level verification analysis, the master node updates the dynamic validity status of the drug unit on the target blockchain system.

[0077] The initial medication record includes a medication identifier and an initial effective status; the medication identifier includes a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier; the smart storage box includes multiple compartments, each for holding one injection pen, and is equipped with a compartment sensor and a temperature sensor. Temperature data and compartment data are both associated with the medication identifier.

[0078] The encrypted usage data includes the drug identifier, usage period, and injection dosage, and is encrypted using a key associated with the master node.

[0079] The master node creates an initial drug record for each drug unit. This record includes a smart storage box identifier and multiple injection pen identifiers associated with that box, and sets the initial valid status to "in stock—unopened." When a drug is received from a slave node, the binding relationship is confirmed by scanning the storage box and injection pen identifiers. After the injection pen is placed in the corresponding compartment, the compartment sensor automatically establishes a "compartment-injection pen" correspondence. At this point, the mapping relationship between the box, pen, and compartment on the blockchain is confirmed and solidified.

[0080] The smart storage box collects temperature data at a set frequency; when a compartment is removed or returned, compartment data is immediately generated. Both are signed and uploaded to the blockchain via a slave node gateway. Both temperature and compartment data are associated with drug identifiers (box and pen level). After using the injection pen, healthcare workers enter the injection pen identifier, usage period, and dosage on the slave node. The slave node encrypts this usage data using the master node's public key, signs it as a slave node, and submits it to the blockchain.

[0081] After detecting a new transaction on the chain, the master node decrypts it and performs multi-level verification analysis on the data used, along with corresponding temperature and position data, including consistency, timing rationality, and business rule checks. Based on the conclusions of the multi-level verification analysis, the master node updates the dynamic validity status of the injection pen, including but not limited to initiating validity timing after opening, updating the remaining dosage, marking it as pending verification or temperature failure, etc.; the update record is written to the chain as a transaction and shared by all participants.

[0082] The drug inventory management method provided by the embodiments of the present invention can achieve precise mapping of boxes, pens, warehouse locations, events, and states by constructing a trusted closed loop on the chain from production to use. It can analyze the quantity and effectiveness of drugs in a timely and accurate manner. By encryption and decentralization, it takes into account both data privacy and the drug efficacy evaluation needs of the master node. It uses the physical data of smart storage boxes to enhance the authenticity of digital records, reduces the impact of human error on judgment, and improves the accuracy and efficiency of drug inventory management.

[0083] In some embodiments, multi-level verification analysis is performed, including: starting the validity timer for the drug unit corresponding to the drug identifier after opening on the master node based on the first use period in the usage data; analyzing temperature data, storage location data, and usage data, and updating the dynamic validity status of the drug unit based on the first use period.

[0084] When the master node first confirms on the chain that a certain injection pen has a reliable usage record (the usage data matches the position event within a preset time window, and the temperature data is within a valid threshold), it starts the post-opening validity timer for that injection pen. The post-opening validity timer starts from the earlier and more reliable timestamp of the first matching extraction event or the start time of the usage period.

[0085] Once the timing begins, each subsequent use and each temperature anomaly will trigger a status update, such as "Opened - In Use," "Opened - Expired," or "Temperature Expiration." The timestamp of the warehouse retrieval event takes precedence over the manually reported start point of the usage period. If the difference between the two is within an acceptable window, the warehouse event timestamp will prevail. The temperature before and after the first use must be within the valid threshold; otherwise, a risk flag will be added when the timing is started, or the start will be delayed until the temperature returns to the valid range. In this way, the starting point of the timing can be ensured to be objectively verifiable, avoiding human delays or misrecording. Moreover, synchronizing the dynamic status with the actual environment and usage can improve the scientific nature of the effectiveness assessment.

[0086] In some embodiments, the analysis of temperature data, warehouse data, and usage data includes: when it is determined that the temperature data is within a preset effective temperature threshold and there are abnormal periods in the usage data, the timestamps of the abnormal periods in the usage data are corrected with reference to the temperature fluctuation event points in the temperature data, and a corrected usage data sequence is generated; and the dynamic validity status is determined based on the corrected usage data sequence.

[0087] It is understandable that abnormal time periods may include: time periods when the interval between two uses is less than the minimum safety interval; time periods when the reported cumulative injection dose exceeds the total capacity of the injection pen; and usage periods occurring during non-working periods of the slave node.

[0088] The minimum safe interval between two uses can be preset by pharmacological and clinical guidelines, and the system can automatically compare the time difference between two adjacent use records. The total volume of the injection pen is determined by the initial record; if the cumulative dose exceeds the total volume, it is marked as abnormal. The non-working hours of the node can be defined by the hospital (e.g., nighttime); any usage reports during this time are marked as abnormal periods.

[0089] In some embodiments, these rules are used not only for anomaly identification, but also for triggering alerts, blocking inappropriate use, and prompting manual review.

[0090] In this approach, experience and regulations are formalized into automated rules, which can significantly reduce the risk of human violations.

[0091] In some embodiments, the timestamps of abnormal periods in the data are corrected with reference to temperature fluctuation event points in the temperature data, including: identifying drug opening and taking events based on warehouse data; and associating and correcting abnormal periods close to the first timestamp based on the first timestamps of the drug opening and taking events and the rapid temperature rise event with a slope exceeding a predetermined slope value in the temperature data.

[0092] When temperature data remains within the valid threshold, it indicates that the refrigeration environment is compliant. Simultaneously, if abnormal periods are detected in the usage data, the master node may not immediately reject the usage record, but instead look for temperature fluctuation events as supporting evidence. When selecting temperature fluctuation events, the "take-out / put-back" event timestamps in the storage location data can be combined to calibrate the time range of abnormal periods, narrowing the inaccurately reported periods to a window consistent with physical events. Rapid temperature increases can be identified by a slope exceeding a predetermined value and a short duration, thus distinguishing between the difference between simply opening a refrigerator or freezer door and prolonged exposure.

[0093] Furthermore, corrected usage data sequences can be generated for subsequent effectiveness assessments, thereby improving fault tolerance and data reliability, and reducing the accidental disposal of expensive drugs.

[0094] The following is a specific identification process as an example. First, based on the position data, we can identify a "withdrawal" event that occurred in a certain position at a certain time, and then pinpoint the specific injection pen identifier through the position-injection pen mapping. Next, we search for rapid temperature rise events adjacent to this "withdrawal" event in the temperature data and extract their first timestamp as a key reference point. Then, we associate the time periods marked as abnormal in the usage data with this reference point, and compress and correct the abnormal time periods according to time windows.

[0095] It should be noted that position events are highly reliable physical signals and are prioritized as anchor points for event occurrence. Rapid temperature rise events are used to enhance the reliability of anchor points, especially in scenarios with multiple withdrawal events or continuous operations. This allows for the convergence of ambiguous and lengthy abnormal periods into precise event windows, improving the accuracy and consistency of validity determination.

[0096] In some embodiments, the analysis of temperature data, storage data, and usage data includes: when it is determined that both temperature data and usage data contain abnormal periods, performing cross-validation to compare the timestamps of temperature data and usage data to determine conflicting time periods in the timeline between temperature data and usage data; updating the dynamic validity status of the drug unit to pending verification on the target blockchain system, and issuing a smart contract request to the slave node to request supplementary proof containing the conflicting time periods.

[0097] When abnormal curves in temperature data (such as irregular abrupt changes or missing data) and abnormal periods in usage data occur simultaneously, the master node cross-compares the timestamps of the two types of data. Further, it identifies the contradictory intervals (conflicting time periods) on the timeline. For example, the usage data may claim use in a low-temperature environment, but the temperature data shows prolonged exceedances of the threshold.

[0098] Furthermore, the dynamic validity status of the injection pen is updated to pending verification, and a smart contract request is automatically triggered. The node needs to provide supplementary proof for the conflicting time period, such as hashes and descriptions of manual inventory records, photos, internal system logs, etc. This enables automated dispute freezing and evidence chain collection, forming a transparent and auditable verification loop.

[0099] In some embodiments, after associating and correcting abnormal periods close to the first timestamp, the drug inventory management method further includes generating a verification transaction containing the correction record on the target blockchain system.

[0100] The revised verification transaction record can include: the abnormal period range before the revision, the reference basis used (position event timestamp, temperature fluctuation event point), the new period after the revision, and an explanation of the reason. After the verification transaction is uploaded to the blockchain, all authorized parties can review it to ensure that the revision process is compliant and transparent.

[0101] In some embodiments, after the master node updates the dynamic validity status of the drug unit on the target blockchain system, the drug inventory management method further includes: the master node monitoring in real time the total number of injection pens under the slave node that are in a valid state;

[0102] When the total number falls below the dynamic safety stock level corresponding to the slave node, a notification message is sent to the drug supplier and the drug user corresponding to the slave node.

[0103] The system can count only injection pens with a valid status (e.g., in stock—unopened, opened—in use and not expired, temperature-sensitive failure not yet determined), and calculate their remaining dose. The dynamic safety stock level for each slave node can be a fixed value or dynamically adjusted based on season, departmental load, and historical consumption rate. When the number of valid injection pens or their equivalent remaining dose falls below a threshold, the system sends a notification to the drug supplier and the corresponding hospital; the notification can be stored on the blockchain and can trigger a supply chain replenishment recommendation process.

[0104] The following examples illustrate several typical scenarios involved in the embodiments of the present invention.

[0105] Scenario A: Normal first use and timer start. The storage box temperature is confirmed to be consistently between 2°C and 8°C; a retrieval event occurred in compartment 3 at 9:30 AM; the nurse reported that 0.25mg of PEN03 was used between 9:30 and 9:35 AM. The slave node uploads the above three types of data to the blockchain; the master node decrypts the usage data and verifies consistency. The compartment event and usage time period match within a reasonable window, and the temperature is compliant. The master node starts the post-opening effectiveness timer for PEN03, starting with the timestamp of the compartment "retrieval" around 9:30 AM, and updates the status to "opened—in use," with the remaining dose being the total dose minus 0.25mg. The status switch is confirmed to be correct, and the countdown begins.

[0106] Scenario B: Using time-series correction for data anomalies but compliant temperatures. Nurses vaguely report the abnormal exposure period as 14:00-15:00; however, the actual event shows the ward was withdrawn at 14:15 and returned at 14:25; the temperature curve shows a rapid rise at 14:15 and a drop at 14:25. The master node marks the period with abnormal data but compliant temperatures and typical fluctuation events. This allows the exposure period to be corrected to 14:15-14:25 using the ward withdrawal and temperature rise events as anchor points, generating a verification transaction specifying the basis and result of the correction. This avoids excessive scrapping or erroneous downgrades caused by vaguely reported periods, and the dynamic effectiveness assessment can be more closely aligned with reality.

[0107] Scenario C: Conflict and Verification Regarding Abnormal Temperature and Usage. It is confirmed that temperature data exceeded the threshold for an extended period, while usage data recorded two uses outside of working hours, with no corresponding withdrawal events observed. The master node determines a data conflict, locates the conflicting time period, updates its status to "Pending Verification," and requests supplementary evidence from slave nodes via a smart contract, such as freezer repair work orders, on-site photo hashes, and inventory records. It can also conduct a review based on the supplementary materials from slave nodes, adjusting the status if necessary. For example, if a temperature sensor malfunction caused a false alarm, its validity is retained; if the evidence is insufficient, the temperature sensor can be deemed invalid or the data unreliable.

[0108] Scenario D: Dynamic Safety Stock Warning. If it is determined that the remaining equivalent dose of an effective injection pen in a certain department is rapidly decreasing and is expected to fall below the safety threshold within three days, the master node initiates an inventory warning notification on the blockchain and simultaneously pushes it to both the supplier and the hospital. The hospital can use this information to place orders in advance, and the supplier can optimize delivery to avoid supply disruptions. This improves supply and demand coordination efficiency and ensures the continuity of medication for patients.

[0109] It should be noted that the dosage form characteristics of the recombinant protein drugs involved in the embodiments of the present invention are based on a pre-filled injection pen and a dedicated smart storage box as the core physical carriers, which fully meets the requirements for refrigeration, shelf life after opening, and single-dose control. The usage data in the aforementioned embodiments does not contain patient identity information, which meets the privacy protection requirements; commercially sensitive data is encrypted and protected, with only ciphertext stored on the chain, and the master node decrypts it for efficacy evaluation, which can avoid unnecessary leakage.

[0110] This implementation constructs an end-to-end trusted data loop around the "injection pen - smart storage box - blockchain" framework. Through multi-level verification analysis and time-series correction mechanisms, it elevates the dynamic effectiveness of drugs from experience-based judgment to data-driven objective assessment, and applies the semantics of available inventory to verified data. Through on-chain processes via smart contracts, the system possesses self-explanatory and self-verifying capabilities in the face of anomalies and disputes, significantly enhancing its practicality and compliance.

[0111] The drug inventory management system provided by the present invention is described below. The drug inventory management system described below can be referred to in correspondence with the drug inventory management method described above.

[0112] like Figure 3 As shown, the drug inventory management system of this embodiment includes a creation module 310, a first receiving module 320, a second receiving module 330, a first processing module 340, and a second processing module 350.

[0113] The creation module 310 is used by the master node to create an initial drug record for each drug unit on the target blockchain system. The initial drug record contains a drug identifier and an initial valid status. The drug identifier contains a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier. The smart storage box includes multiple compartments, each compartment is used to hold an injection pen, and is equipped with a compartment sensor and a temperature sensor.

[0114] The first receiving module 320 is used by the master node to continuously receive temperature data and storage location data generated by the smart storage box associated with the slave node from the target blockchain system. Both the temperature data and storage location data are associated with drug identifiers.

[0115] The second receiving module 330 is used by the master node to receive encrypted usage data submitted by the slave node from the target blockchain system. The encrypted usage data includes the drug identifier, usage period and injection dosage, and is encrypted using a key associated with the master node.

[0116] The first processing module 340 is used to decrypt encrypted usage data by the master node and perform multi-level verification analysis based on temperature data and storage location data to determine the dynamic effectiveness status of the drug unit.

[0117] The second processing module 350 is used to update the dynamic validity status of the drug unit on the target blockchain system by the master node based on the results of multi-level verification analysis.

[0118] The drug inventory management system provided by the present invention can achieve precise mapping of boxes, pens, warehouse locations, events, and states by constructing a trusted closed loop on the chain from production to use. It can analyze the quantity and effectiveness of drugs in a timely and accurate manner. Through encryption and decentralization, it takes into account both data privacy and the drug efficacy evaluation needs of the master node. It uses the physical data of smart storage boxes to enhance the authenticity of digital records, reduce the impact of human error on judgment, and improve the accuracy and efficiency of drug inventory management.

[0119] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can invoke logical instructions in the memory 430 to execute a drug inventory management method, which includes: a master node creating an initial drug record for each drug unit on the target blockchain system, the initial drug record containing a drug identifier and an initial validity status; the drug identifier containing a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier; the smart storage box including multiple compartments, each compartment for holding an injection pen, and equipped with a compartment sensor and a temperature sensor; the master node continuously receiving temperature data and compartment data generated by the smart storage boxes associated with the slave nodes from the target blockchain system, both of which are associated with the drug identifier; the master node receiving encrypted usage data submitted by the slave nodes from the target blockchain system, the encrypted usage data containing the drug identifier, usage period, and injection dosage, and encrypted using a key associated with the master node; the master node decrypting the encrypted usage data and performing multi-level verification analysis based on the temperature data and compartment data to determine the dynamic validity status of the drug unit; and the master node updating the dynamic validity status of the drug unit on the target blockchain system based on the results of the multi-level verification analysis.

[0120] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0121] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the drug inventory management method provided by the above-described methods. The method includes: a master node creating an initial drug record for each drug unit on a target blockchain system, the initial drug record including a drug identifier and an initial valid state; the drug identifier including a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier; the smart storage box including multiple compartments, each compartment for holding one injection pen, and equipped with compartment transmission... The system includes temperature and temperature sensors; the master node continuously receives temperature and storage location data generated by smart storage boxes associated with slave nodes from the target blockchain system, both of which are associated with drug identifiers; the master node receives encrypted usage data submitted by slave nodes from the target blockchain system, which includes drug identifiers, usage periods, and injection dosages, and is encrypted using a key associated with the master node; the master node decrypts the encrypted usage data and performs multi-level verification analysis based on the temperature and storage location data to determine the dynamic effectiveness status of the drug unit; based on the results of the multi-level verification analysis, the master node updates the dynamic effectiveness status of the drug unit on the target blockchain system.

[0122] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the drug inventory management method provided by the methods described above. This method includes: a master node creating an initial drug record for each drug unit on a target blockchain system; the initial drug record containing a drug identifier and an initial valid state; the drug identifier including a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier; the smart storage box including multiple compartments, each compartment for holding one injection pen, and equipped with a compartment sensor and a temperature sensor; the master node retrieving the drug inventory from the target blockchain system... The target blockchain system continuously receives temperature and storage location data generated by smart storage boxes associated with slave nodes. Both temperature and storage location data are associated with drug identifiers. The master node receives encrypted usage data submitted by slave nodes from the target blockchain system. This encrypted usage data includes the drug identifier, usage period, and injection dosage, and is encrypted using a key associated with the master node. The master node decrypts the encrypted usage data and performs multi-level verification analysis based on the temperature and storage location data to determine the dynamic effectiveness status of the drug unit. Based on the results of the multi-level verification analysis, the master node updates the dynamic effectiveness status of the drug unit on the target blockchain system.

[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for managing drug inventory, characterized in that, Applied to a target blockchain system, the target blockchain system comprising at least one master node as a drug supplier and multiple slave nodes as drug users, the method includes: The master node creates an initial drug record for each drug unit on the target blockchain system. The initial drug record includes a drug identifier and an initial valid status. The drug identifier includes a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier. The smart storage box includes multiple compartments, each compartment for holding one injection pen, and is equipped with a compartment sensor and a temperature sensor. The compartment sensor is used to generate physical event data for removal / replacement. The master node continuously receives temperature data and storage location data generated by the smart storage box associated with the slave node from the target blockchain system. Both the temperature data and storage location data are associated with the drug identifier. The storage location data includes physical event data of the removal / replacement. The master node receives encrypted usage data submitted by the slave node from the target blockchain system. The encrypted usage data includes a drug identifier, usage period, and injection dosage, and is encrypted using a key associated with the master node. The master node decrypts the encrypted usage data and performs multi-level verification analysis based on the temperature data and the warehouse location data to determine the dynamic effectiveness status of the drug unit; Based on the results of the multi-level verification analysis, the master node updates the dynamic validity status of the drug unit on the target blockchain system; The multi-level verification analysis includes: Based on the first use period in the usage data, the main node starts the validity period of the drug unit corresponding to the drug identifier after opening. The temperature data, the storage location data, and the usage data are analyzed, and the dynamic effectiveness status of the drug unit is updated based on the initial usage period. The analysis of the temperature data, the storage space data, and the usage data includes: When it is determined that the temperature data is within the preset effective temperature threshold and there are abnormal periods in the usage data, the timestamps of the abnormal periods in the usage data are corrected with reference to the temperature fluctuation event points in the temperature data, and a corrected usage data sequence is generated. The dynamic validity status is determined based on the corrected usage data sequence; The step of correcting the timestamps of abnormal periods in the used data, using temperature fluctuation event points in the temperature data as a reference, includes: Based on the warehouse data, events involving opening and retrieving medication boxes are identified; Based on the first timestamp of the temperature data caused by the opening of the medicine box and the rapid temperature rise event with a slope exceeding a predetermined value, abnormal time periods close to the first timestamp are correlated and corrected. The abnormal periods of data usage include at least one of the following: The usage period corresponding to the interval between two usage records being less than the minimum safety interval, the usage period during which the reported cumulative injection dose exceeds the total capacity of the drug unit, and the usage period during the non-working time of the slave node; The analysis of the temperature data, the storage space data, and the usage data includes: When it is determined that both the temperature data and the usage data contain abnormal time periods, cross-validation is performed to compare the timestamps of the temperature data and the usage data to determine the conflicting time periods between the temperature data and the usage data on the timeline. On the target blockchain system, the dynamic validity status of the drug unit is updated to pending verification, and a smart contract request is sent to the slave node to request supplementary proof including the conflict time period. After associating and correcting the abnormal time period close to the first timestamp, the method further includes: generating a verification transaction containing the correction record on the target blockchain system.

2. The drug inventory management method according to claim 1, characterized in that, After the master node updates the dynamic validity status of the drug unit on the target blockchain system, the method further includes: The master node monitors in real time the total number of valid injection pens under the jurisdiction of the slave node. When the total number is lower than the dynamic safety stock level corresponding to the slave node, a notification message is sent to the drug supplier and the drug user corresponding to the slave node.

3. A drug inventory management system, characterized in that, The system includes: A creation module is used by the master node to create an initial drug record for each drug unit on the target blockchain system. The initial drug record includes a drug identifier and an initial valid status. The drug identifier includes a smart storage box identifier and multiple injection pen identifiers associated with the smart storage box identifier. The smart storage box includes multiple compartments, each compartment for holding one injection pen, and is equipped with a compartment sensor and a temperature sensor. The compartment sensor is used to generate physical event data for retrieval / replacement. The first receiving module is used by the master node to continuously receive temperature data and storage location data generated by the smart storage box associated with the slave node from the target blockchain system. The temperature data and storage location data are both associated with the drug identifier. The storage location data includes physical event data of the removal / replacement. The second receiving module is used by the master node to receive encrypted usage data submitted by the slave node from the target blockchain system. The encrypted usage data includes a drug identifier, usage period and injection dosage, and is encrypted using a key associated with the master node. The first processing module is used to decrypt the encrypted usage data by the master node, and perform multi-level verification analysis based on the temperature data and the storage location data to determine the dynamic validity status of the drug unit; the first processing module is also used to start the validity timer of the drug unit corresponding to the drug identifier after opening on the master node based on the first usage period in the usage data; analyze the temperature data, the storage location data, and the usage data, and update the dynamic validity status of the drug unit based on the first usage period; when it is determined that the temperature data is within a preset effective temperature threshold, and the usage data has an abnormal period, the first processing module is also used to correct the timestamp of the abnormal period of the usage data with reference to the temperature fluctuation event point in the temperature data, and generate a corrected usage data sequence; determine the dynamic validity status based on the corrected usage data sequence; the first processing module is also used to identify the opening and taking out of the medicine based on the storage location data; based on the temperature data, the opening and taking out of the medicine and the slope exceeding The first processing module is used to correlate and correct abnormal periods close to the first time stamp of the rapid temperature rise event exceeding the predetermined slope value; the abnormal periods of the usage data include at least one of the following: usage periods where the interval between two usage records is less than the minimum safe interval, usage periods where the reported cumulative injection dose exceeds the total capacity of the drug unit, and usage periods during the non-working hours of the slave node; the first processing module is also used to perform cross-validation to compare the timestamps of the temperature data and the usage data when it is determined that both the temperature data and the usage data contain abnormal periods, and to determine the conflicting time periods on the time axis between the temperature data and the usage data; update the dynamic validity status of the drug unit to pending verification on the target blockchain system, and send a smart contract request to the slave node to request supplementary proof containing the conflicting time periods; the first processing module is also used to generate a verification transaction containing the correction record on the target blockchain system after the correlation and correction of the abnormal periods close to the first time stamp; The second processing module is used to update the dynamic validity status of the drug unit on the target blockchain system by the master node based on the results of the multi-level verification analysis.

4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the program, it implements the drug inventory management method as described in claim 1 or 2.

Citation Information

Patent Citations

  • Medicine state monitoring method, device and equipment and storage medium

    CN110766324A

  • Intelligent supply chain management method and system for front warehouse of chain drugstore

    CN120875762A