A drug supervision implementation method and device based on a blockchain and a medium

By partitioning drug storage cabinets and utilizing blockchain and smart contracts for oversight, the problem of abnormal drug storage environments in pharmacies has been solved, enabling real-time monitoring and automatic adjustment of drug quality and reducing the burden of manual oversight.

CN114549255BActive Publication Date: 2026-05-01浪潮工业互联网股份有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
浪潮工业互联网股份有限公司
Filing Date
2022-01-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The pharmacy has a wide variety of medicines, and regular inspections by higher authorities cannot detect abnormalities in the storage environment in a timely manner, which can affect the efficacy of the medicines.

Method used

The medicine storage cabinet is divided into multiple storage areas. Environmental and medicine information is collected, and real-time monitoring is carried out using blockchain and smart contracts. Environmental differences are detected and early warnings are issued, and environmental controllers are adjusted accordingly.

Benefits of technology

It enables real-time monitoring of the drug storage environment, timely detection and correction of abnormalities, reduces the workload of regulatory personnel, and ensures drug quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114549255B_ABST
    Figure CN114549255B_ABST
Patent Text Reader

Abstract

This specification discloses a method, device, and medium for drug supervision based on blockchain. The method includes: dividing a drug storage cabinet into multiple storage areas and collecting current environmental information and current drug information from each storage area; the current environmental information includes current temperature, current humidity, and current light conditions; determining whether the drug is stored in a pre-defined storage area based on the correspondence between drug type identifiers and multiple storage areas; if the drug is placed in a pre-defined storage area, storing the current environmental information corresponding to the storage area on the blockchain for monitoring the current environmental information within the storage area; issuing an early warning message; and determining the environmental control object to be adjusted based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning message, and sending environmental control instructions to the environmental control object to be adjusted to achieve drug supervision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, device and medium for implementing drug regulation based on blockchain. Background Technology

[0002] With social development and technological advancements, people are paying more attention to healthy living and are becoming increasingly cautious about the use of medicines. A crucial aspect of the drug distribution process is storage and preservation. Medical institutions at all levels, as the first point of contact for medicines, play a vital role in ensuring medication safety. To guarantee drug quality, hospitals, pharmacies, and other institutions must take effective measures to properly store medicines and prevent problems from occurring when they are distributed to patients.

[0003] Different types of medicines have different requirements for storage environments. For example, some medicines need to be stored at sub-zero temperatures, while others need to be stored at room temperature. Changes in the storage environment will affect the efficacy of the medicine. Monitoring the storage environment of medicines requires on-site comparison of the current environment with the suitable environment for each type of medicine to determine if any improper storage has occurred. However, pharmacies carry a wide variety of medicines, and regular inspections by higher-level departments are insufficient to promptly identify potential problems. Summary of the Invention

[0004] This specification provides one or more embodiments of a blockchain-based drug supervision method, device, and medium to address the following technical problem: pharmacies carry a wide variety of drugs, and regular inspections by higher-level departments cannot promptly detect potential problems, thus affecting drug efficacy.

[0005] One or more embodiments of this specification employ the following technical solutions:

[0006] This specification provides one or more embodiments of a blockchain-based drug supervision method. The method includes: dividing a drug storage cabinet into multiple storage areas, and collecting current environmental information and current drug information from each of the multiple storage areas. The current environmental information within each storage area includes the current temperature, current humidity, and current light conditions. The drug information includes a drug type identifier and storage conditions. Based on the correspondence between the drug type identifier and the multiple storage areas, it is determined whether the current drug is stored in a pre-defined storage area. If the current drug is placed in a pre-defined storage area, the current environmental information corresponding to that storage area is stored on the blockchain for monitoring via a compliant smart contract. When the current environmental information... When the difference between the current temperature in the storage area and the storage temperature in the drug storage conditions exceeds a preset temperature threshold, and / or when the difference between the current humidity in the storage area in the current environmental information and the storage humidity in the drug storage conditions exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information differs from the storage illumination in the drug storage conditions, an early warning message is issued. The early warning message includes the target storage area to be adjusted and the environmental information to be adjusted. Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning message, an environmental control object to be adjusted is determined, and an environmental control command is sent to the environmental control object to be adjusted to achieve drug supervision. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller.

[0007] Furthermore, the detection of the current environmental information within the storage area via a compliant smart contract specifically includes: determining the storage temperature, humidity, and lighting conditions of the current medicine based on its storage conditions; determining, via the compliant smart contract, whether the difference between the current temperature of the storage area and the storage temperature in the current medicine's storage conditions is within a preset temperature threshold; if the difference between the current temperature of the storage area and the storage temperature is within the preset temperature threshold, then via the compliant smart contract, determining whether the difference between the current humidity of the storage area and the storage humidity in the current medicine's storage conditions is within a preset humidity threshold; if the difference between the humidity information of the storage area and the storage humidity is within the preset humidity threshold, then via the compliant smart contract, determining whether the current lighting conditions of the storage area are the same as the storage lighting conditions in the current medicine's storage conditions; if the current lighting conditions are the same as the storage lighting conditions, then it is determined that there are no abnormalities in the current environmental information.

[0008] Further, after issuing the warning information, the method includes: obtaining the location information of the drug storage cabinet, and setting a monitoring range with the location information of the drug storage cabinet as the center and a preset distance as the radius; determining multiple monitoring and enforcement points within the monitoring range, including one primary monitoring and enforcement point and at least one secondary monitoring and enforcement point, wherein the position level of the primary monitoring and enforcement point is higher than that of the secondary monitoring and enforcement point; sending warning information to the multiple monitoring and enforcement points within the monitoring range, wherein the warning information includes the location information of the drug storage cabinet with abnormal environment and a randomly generated designated secondary monitoring and enforcement point; and penalizing the abnormal environmental condition of the drug storage cabinet based on the actual environmental collection results of the designated secondary monitoring and enforcement point and the primary monitoring and enforcement point, and generating a penalty result.

[0009] Furthermore, before performing anomaly detection on the current environmental information in the storage area using a qualified smart contract, the method further includes: parsing the initial smart contract to obtain the initial contract code; splitting the initial contract code according to a preset syntax structure to obtain multiple functional codes in the initial contract code; identifying a specific functional code related to a threshold comparison among the multiple functional codes; using the initial smart contract to perform anomaly detection on the current environmental information to obtain a predicted penalty result; and adjusting the comparison threshold of the functional code in the initial smart contract based on the difference between the predicted penalty result and the actual penalty result to obtain the qualified smart contract.

[0010] Furthermore, before determining whether a drug is currently stored in a pre-defined storage area based on the correspondence between the drug type identifier and the multiple storage areas, the method further includes: obtaining the drug storage conditions of all drugs to be stored; classifying all drugs to be stored according to the drug storage temperature, drug storage humidity, and drug storage light conditions; assigning the same designated color identifier to drugs belonging to the same category; placing multiple drugs with the designated color identifier in the same storage area; establishing a mapping relationship between each storage area and the designated color identifier; and constructing the relationship mapping table based on the mapping relationship between each storage area identifier and the designated color identifier, and the information of multiple drugs corresponding to the designated color identifier.

[0011] Further, the drug type identifier is a color identifier; the step of determining whether the current drug is stored in a pre-defined storage area based on the correspondence between the drug type identifier and the multiple storage areas specifically includes: obtaining multiple drugs to be stored in the storage area, and obtaining the color identifiers to be stored corresponding to the multiple drugs to be stored according to the relationship mapping table; comparing the current color identifiers corresponding to the multiple current drugs stored in the storage area with the color identifiers to be stored; if there is a first color identifier among the multiple current color identifiers that is different from the color identifiers to be stored, then it is determined that the drug corresponding to the first color identifier is not placed in the pre-defined storage area.

[0012] Furthermore, storing the current environmental information corresponding to the storage area to the blockchain specifically includes: performing a hash calculation on the current environmental information corresponding to the storage area to obtain the environmental hash value corresponding to the storage area; performing a hash calculation on the current drug information corresponding to the storage area to obtain the drug hash value corresponding to the storage area; generating a collection timestamp based on the collection time of the current environmental information and the current drug information; and encoding the environmental hash value, the drug hash value, and the collection timestamp together and uploading them to the blockchain for storage.

[0013] Further, the step of determining the environmental control object to be adjusted based on the environmental information to be adjusted and the target storage area to be adjusted in the warning information specifically includes: determining multiple storage areas adjacent to the target storage area based on the target storage area in the warning information; determining the environmental information to be adjusted in the warning information; calculating the ratio of the temperature in the environmental information to the drug storage temperature in the multiple storage areas as the influence factor of the environmental information on the multiple storage areas; determining the environmental control object in the target storage area based on the environmental information to be adjusted and the target storage area, the environmental control object in the target storage area being used to perform current environmental control on the target storage area; determining the control object of the multiple storage areas based on the type of the environmental control object in the target storage area, and performing specified environmental control on each storage area according to the influence factor of the multiple storage areas.

[0014] This specification provides one or more embodiments of a blockchain-based drug regulatory implementation device, the device comprising:

[0015] At least one processor; and,

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0018] The medicine storage cabinet is divided into multiple storage areas, and current environmental information and current medicine information are collected from each of these areas. The current environmental information includes the current temperature, humidity, and lighting conditions within the storage area. The medicine information includes the medicine type identifier and storage conditions. Based on the correspondence between the medicine type identifier and the multiple storage areas, it is determined whether the medicine is currently stored in a pre-defined storage area. If the medicine is placed in a pre-defined storage area, the corresponding current environmental information is stored on the blockchain for monitoring via a compliant smart contract. When the difference in storage temperature in the storage area exceeds a preset temperature threshold, and / or when the difference in current humidity in the storage area in the current environmental information exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information differs from the storage illumination in the drug storage conditions, an early warning message is issued. The early warning message includes the target storage area to be adjusted and the environmental information to be adjusted. Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning message, an environmental control object to be adjusted is determined, and an environmental control command is sent to the environmental control object to be adjusted to achieve drug supervision. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller.

[0019] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0020] The medicine storage cabinet is divided into multiple storage areas, and current environmental information and current medicine information are collected from each of these areas. The current environmental information includes the current temperature, humidity, and lighting conditions within the storage area. The medicine information includes the medicine type identifier and storage conditions. Based on the correspondence between the medicine type identifier and the multiple storage areas, it is determined whether the medicine is currently stored in a pre-defined storage area. If the medicine is placed in a pre-defined storage area, the corresponding current environmental information is stored on the blockchain for monitoring via a compliant smart contract. When the difference in storage temperature in the storage area exceeds a preset temperature threshold, and / or when the difference in current humidity in the storage area in the current environmental information exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information differs from the storage illumination in the drug storage conditions, an early warning message is issued. The early warning message includes the target storage area to be adjusted and the environmental information to be adjusted. Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning message, an environmental control object to be adjusted is determined, and an environmental control command is sent to the environmental control object to be adjusted to achieve drug supervision. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller.

[0021] The above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects: the drug storage cabinet is divided into multiple areas, and the correspondence between drug types and multiple storage areas is pre-set. When supervising drugs, it is first determined whether the drugs are placed in the designated areas. If all drugs are placed in the designated areas, the collected environmental information is uploaded to the blockchain and stored. The environmental information is then detected. After an abnormality is found, the environmental information in the corresponding storage area is adjusted. Improper storage of drugs can be detected in a timely manner. The drug storage conditions are set in the drug information, and the current storage conditions of the drugs can be obtained without on-site inspection, reducing the workload of supervisors. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0023] Figure 1 A flowchart illustrating a blockchain-based drug regulation implementation method provided in the embodiments of this specification;

[0024] Figure 2 This is a schematic diagram of a blockchain-based drug regulatory implementation device provided in the embodiments of this specification. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0026] With social development and technological advancements, people are paying more attention to healthy living and are becoming increasingly cautious about the use of medicines. A crucial aspect of the drug distribution process is storage and preservation. Medical institutions at all levels, as the first point of contact for medicines, play a vital role in ensuring medication safety. To guarantee drug quality, hospitals, pharmacies, and other institutions must take effective measures to properly store medicines and prevent problems from occurring when they are distributed to patients.

[0027] Different types of medicines have different requirements for storage environments. For example, some medicines need to be stored at sub-zero temperatures, while others need to be stored at room temperature. Changes in the storage environment will affect the efficacy of the medicine. Current technology for monitoring the storage environment of medicines requires on-site comparison of the current environment with the suitable environment for each type of medicine to determine if any improper storage has occurred. Pharmacies carry a wide variety of medicines, and regular inspections by higher-level departments cannot promptly identify potential problems that could affect the efficacy of the medicines.

[0028] This specification provides a blockchain-based method for drug regulation. It should be noted that the implementing entity in this specification can be a drug regulation system or any device with data processing capabilities, such as a server. Figure 1 A flowchart illustrating a blockchain-based drug regulation implementation method provided in this specification is shown below. Figure 1 As shown, the method mainly includes the following steps:

[0029] Step S101: Divide the medicine storage cabinet into multiple storage areas and collect the current environmental information and current medicine information in each of the multiple storage areas.

[0030] Whether it's a pharmacy or various medical institutions, they need to store a wide variety of medicines, and different medicines require different storage environments. Current technology places all types of medicines in the same storage cabinet, such as placing all refrigerated medicines in a refrigerator. However, some medicines have high requirements for their storage environment; changes in temperature, humidity, etc., can increase the possibility of chemical reactions, leading to drug inactivation. Furthermore, when regulatory personnel conduct on-site inspections, they need to check the applicable temperatures for numerous types of medicines individually, increasing their workload.

[0031] In one embodiment of this specification, the medicine storage cabinet can be divided into multiple storage areas according to the type of medicine, and current environmental information and current medicine information can be collected in each of the multiple storage areas. The current environmental information in the storage area includes the current temperature, current humidity, and current lighting conditions in the storage area, while the medicine information in the storage area includes the medicine type identifier and the medicine storage conditions.

[0032] In one embodiment of this specification, the medicine storage cabinet is divided into multiple storage areas according to its controllable temperature and humidity ranges, and area labels are set. In practical applications, medicine storage cabinets generally have adjustable temperature or humidity ranges. The medicine storage cabinet is divided into multiple storage areas according to these controllable temperature and humidity ranges, and the area labels can be set according to the temperature and humidity at which the medicines are stored.

[0033] Temperature, humidity, and illumination information for each storage area are collected, and corresponding area identifiers are added to these data. It should be noted that environmental sensors can be installed in each storage area to periodically collect temperature, humidity, and illumination data, which are then uploaded. During the upload process, the storage area's identifier is added to the collected environmental information, ensuring simultaneous monitoring of the entire current environment within the storage cabinet. Multiple designated area identifiers are identified for the current medicine storage cabinet, and multiple temperature, humidity, and illumination data points under these designated area identifiers are used as the current environmental information for the current medicine storage cabinet.

[0034] Step S102: Based on the correspondence between drug type identifiers and multiple storage areas, determine whether the current drug is stored in a pre-defined storage area.

[0035] In one embodiment of this specification, the storage conditions of all drugs to be stored are obtained in advance. Based on the storage temperature, humidity, and light exposure conditions, all drugs are classified, and drugs belonging to the same category are assigned the same designated color identifier. Drugs with the same storage temperature can be classified into categories A and B. Drugs in category A with the same humidity are then grouped into categories A1 and A2. Category A1 drugs are further classified, and drugs stored away from light are grouped into category A11, and so on, until all drugs are classified. Corresponding color identifiers are assigned to drugs belonging to the same category; for example, category A11 is designated as red.

[0036] In one embodiment of this specification, multiple drugs to be stored, each with a specified color identifier, are placed in the same storage area. A mapping relationship is established between each storage area and the specified color identifier; for example, all drugs with red identifiers are placed in the first-level storage area. A relationship mapping table is constructed based on the mapping relationship between each storage area identifier and the specified color identifier, and the information of the multiple drugs corresponding to the specified color identifiers. That is, the relationship mapping table includes the identifier of the first-level storage area, the red identifier corresponding to class A11, and the information of all drugs with red identifiers.

[0037] In one embodiment of this specification, drug type identifiers can be set as color identifiers. Based on the correspondence between the drug type identifiers and multiple storage areas, it is determined whether the current drug is stored in a pre-defined storage area. Specifically, this includes: obtaining multiple drugs to be stored in the storage area, and obtaining the corresponding color identifiers for each drug according to a relationship mapping table. The relationship mapping table stores the color identifiers of the drugs and the drug information under the current identifier. The corresponding color identifier is determined in the relationship mapping table based on the drug information of the multiple drugs to be stored, serving as a reference item. For example, the correct placement corresponds to a red color identifier. If multiple current drugs exist in the storage area, it is necessary to determine whether all current drugs belong to that storage area. The current color identifiers corresponding to the multiple current drugs stored in the storage area are compared with the color identifiers to be stored. If a first color identifier exists that differs from the color identifier to be stored, it is determined that the drug corresponding to the first color identifier is not placed in the pre-defined storage area. That is, if the color identifiers corresponding to multiple current drugs are red, blue, and yellow, and the drug identifier to be stored is red, it means that drugs with yellow and blue color identifiers should not be stored in the current storage area; therefore, the current drug is not stored in the pre-defined storage area.

[0038] Step S103: If the medicine is placed in a pre-defined storage area, the current environmental information corresponding to the storage area is stored in the blockchain so that the current environmental information in the storage area can be detected through a smart contract that meets the requirements.

[0039] In the current technology, regulatory personnel regularly visit pharmacies, drugstores and other medical institutions for monitoring, but they cannot detect improper storage in a timely manner, resulting in poor regulatory effectiveness.

[0040] In one embodiment of this specification, if it is determined that all medicines are placed within a pre-defined storage area, the current environmental information corresponding to the storage area is stored on the blockchain. This technical solution allows for monitoring of the storage environment even when there is no error in the medicine's storage location. Generally, drug regulation requires penalties for improper drug storage. For example, private pharmacies may adjust the temperature of drug storage cabinets to energy-saving settings, leading to impaired drug efficacy due to improper storage. Storing the storage environment on the blockchain ensures the authenticity of the environmental data through its immutability, facilitating the supervision of drug storage cabinets by regulatory personnel.

[0041] In one embodiment of this specification, when storing environmental data on the blockchain, the environmental data needs to be processed to ensure its security. First, a hash calculation is performed on the current environmental information corresponding to the storage area to obtain the environmental hash value. Then, a hash calculation is performed on the current drug information corresponding to the storage area to obtain the drug hash value. Since environmental and drug information are generated each time data is collected, a collection timestamp is generated based on the collection time of the current environmental and drug information. The environmental hash value, drug hash value, and collection timestamp are then encoded together and uploaded to the blockchain for storage.

[0042] In one embodiment of this specification, the smart contract also needs to be optimized. The initial smart contract is parsed to obtain the initial contract code. This initial contract code is then split according to a preset syntax structure to obtain multiple functional codes. Among these functional codes, the specified functional code related to the threshold comparison is identified. The initial smart contract is used to detect anomalies in the current environment information to obtain a predicted penalty result. Based on the difference between the predicted penalty result and the actual penalty result, the comparison threshold of the functional codes in the initial smart contract is adjusted to obtain a smart contract that meets the requirements.

[0043] Step S104: When the difference between the current temperature in the storage area in the current environmental information and the storage temperature in the drug storage conditions exceeds a preset temperature threshold, and / or when the difference between the current humidity in the storage area in the current environmental information and the storage humidity in the drug storage conditions exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information is different from the storage illumination in the drug storage conditions, a warning message is issued.

[0044] In one embodiment of this specification, the storage temperature, humidity, and light conditions of the current drug are determined based on its current storage conditions. A compliant smart contract is used to determine whether the difference between the current temperature of the storage area and the storage temperature specified in the current drug storage conditions is within a preset temperature threshold. Generally, the preset temperature threshold can be set at 2 degrees Celsius, or it can be determined based on the storage temperature range specified in the drug storage conditions.

[0045] If the difference between the current temperature of the storage area and the storage temperature is within a preset temperature threshold, the ambient humidity is detected. Through a compliant smart contract, it is determined whether the difference between the current humidity of the storage area and the storage humidity specified in the drug's storage conditions is within a preset humidity threshold. If so, the current ambient humidity meets the storage humidity requirements for the drug's storage conditions.

[0046] If the difference between the humidity information of the storage area and the storage humidity is within the preset humidity threshold, the lighting conditions are detected. Through a smart contract that meets the requirements, it is determined whether the current lighting conditions of the storage area are the same as the storage lighting conditions in the current drug storage conditions. If the current lighting conditions are the same as the storage lighting conditions, it is determined that the storage lighting conditions in the current environment meet the requirements.

[0047] In one embodiment of this specification, if the temperature, humidity, and light intensity information all meet the requirements, it is determined that there are no abnormalities in the current environmental information. If any one or more of the temperature, humidity, and light intensity information do not meet the requirements, it is determined that there are abnormalities in the current environmental information.

[0048] In one embodiment of this specification, if there is an abnormality in the current environmental information, an early warning message is issued. The early warning message includes the target storage area to be adjusted and the environmental information to be adjusted. For example, if the temperature in the current environmental information of the first storage area does not meet the requirements, the identifier or location of the first storage area and the word "temperature" are added to the issued early warning message.

[0049] In one embodiment of this specification, after an early warning is issued, the location information corresponding to the drug storage cabinet is obtained based on the target storage area in the warning information. A monitoring range is then set with the location information of the drug storage cabinet as the center and a preset distance as the radius. This preset range can be 1 kilometer, or it can be set according to actual conditions. However, it should be set as close as possible to the area of ​​the drug storage cabinet to ensure that law enforcement personnel within this area can reach the pharmacy for actual testing as quickly as possible. Multiple monitoring and enforcement points are determined within the monitoring range. Among these multiple monitoring and enforcement points, there is one primary monitoring and enforcement point and at least one secondary monitoring and enforcement point. The primary monitoring and enforcement point has a higher rank than the secondary monitoring and enforcement point.

[0050] In one embodiment of this specification, early warning information is sent to multiple regulatory enforcement points within the regulated area. This early warning information includes the location information of the drug storage cabinet with abnormal environmental conditions and randomly generated designated secondary regulatory enforcement points. It should be noted that, to ensure the impartiality of the enforcement process, secondary regulatory enforcement points need to be randomly designated. These secondary enforcement points, under the supervision of primary regulatory enforcement points, conduct actual environmental information collection. Based on the actual environmental data collected by the designated secondary and primary regulatory enforcement points, penalties are imposed on the abnormal environmental conditions of the drug storage cabinet, generating penalty results. Through this method, after the system detects abnormal conditions in the current environment, regulatory enforcement personnel can conduct actual supervision at pharmacies and other institutions, avoiding potential delays in supervision that might occur with periodic visits to pharmacies. Furthermore, penalties are imposed on improper drug storage based on actual environmental monitoring results, generating penalty results.

[0051] Step S105: Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning information, determine the environmental control object to be adjusted, and send environmental control instructions to the environmental control object to be adjusted to realize the supervision of drugs.

[0052] In one embodiment of this specification, issuing a warning indicates an abnormal situation within the current storage area. To prevent the drug's efficacy from being affected by storage in an abnormal environment, environmental control is necessary. Based on the environmental information to be adjusted and the target storage area to be adjusted in the warning information, the environmental control object to be adjusted is determined. This environmental control object includes any one or more of a temperature regulator, humidity regulator, and light controller. Different storage areas correspond to different environmental control objects. The type of environmental control object is determined based on the environmental information to be adjusted in the warning information. For example, if the environmental information to be adjusted is temperature, the corresponding environmental control object is a temperature regulator; if the environmental information to be adjusted is humidity, the corresponding environmental control object is a humidity regulator; if the environmental information to be adjusted is light, the corresponding environmental control object is a light controller. Since there are multiple storage areas, it is necessary to determine the temperature regulator, humidity regulator, and light controller within the target storage area based on the target storage area to be adjusted in the warning information.

[0053] In one embodiment of this specification, based on the target storage area in the warning information, multiple storage areas adjacent to the target storage area are determined. If the target storage area is located at a non-vertical position around the perimeter of the medicine storage cabinet, there are 5 storage areas; if the target storage area is located at the vertex position of the medicine storage cabinet, there are 3 storage areas; if the target storage area is located at the center of the medicine storage cabinet, there are 8 storage areas.

[0054] The environmental information to be adjusted in the early warning information is identified. Based on the degree of influence of the environmental information to be adjusted on the drug storage conditions in multiple storage areas, the influence factor of the environmental information on the multiple storage areas is calculated. For example, if the environmental information to be adjusted is temperature, and the temperature in the target storage area does not meet the drug storage conditions, it is necessary to adjust the temperature in the target area to the temperature value corresponding to the drug storage conditions. Multiple storage areas adjacent to the target storage area will be affected by the temperature. The ratio of the drug storage temperature in the storage area to the temperature value to be adjusted can be calculated, and this ratio is used as an influence factor. If the influence factor is large, the temperature in the storage area needs to be controlled to mitigate the impact of the target storage area. Similarly, the humidity influence factor and the light condition influence factor in the environmental information are calculated using the same method as the temperature influence factor.

[0055] In other words, based on the environmental information to be adjusted and the target storage area, environmental control objects within the target storage area are determined. These environmental control objects are used to perform current environmental control on the target storage area. Based on the type of environmental control objects within the target storage area, control objects for multiple storage areas are determined. Then, according to the influence factors of multiple storage areas, specific environmental controls are applied to each storage area, where the specific environmental controls are relative to the current environmental controls. For example, if the target storage area involves an operation to increase its temperature, which has a significant impact on the storage area, then a operation to decrease its temperature is performed to reduce the impact of the target storage area on that storage area.

[0056] In one embodiment of this specification, after identifying the environmental control object to be regulated, an environmental control instruction is sent to the environmental control object to achieve the supervision of the drug.

[0057] The above technical solution divides the drug storage cabinet into multiple areas and pre-sets the correspondence between drug types and multiple storage areas. When supervising drugs, it first determines whether the drugs are placed in the designated areas. If all drugs are placed in the designated areas, the collected environmental information is uploaded to the blockchain and stored. The environmental information is then monitored, and if any abnormalities are found, the environmental information in the corresponding storage area is adjusted. This allows for the timely detection of improper drug storage. By setting the drug storage conditions in the drug information, the current storage conditions of the drugs can be obtained without on-site inspection, reducing the workload of supervisors.

[0058] This specification also provides an embodiment of a blockchain-based drug regulatory device, such as... Figure 2As shown, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: divide a medicine storage cabinet into multiple storage areas, and collect current environmental information and current medicine information in each of the multiple storage areas, wherein the current environmental information in the storage area includes the current temperature, current humidity, and current light conditions in the storage area, and the medicine information in the storage area includes a medicine type identifier and medicine storage conditions; determine whether the current medicine is stored in a pre-defined storage area based on the correspondence between the medicine type identifier and the multiple storage areas; if the current medicine is placed in a pre-defined storage area, store the current environmental information corresponding to the storage area to a blockchain, so as to facilitate smart transactions that meet the requirements. The system monitors the current environmental information within the storage area. When the difference between the current temperature in the storage area and the storage temperature in the drug storage conditions exceeds a preset temperature threshold, and / or, when the difference between the current humidity in the storage area and the storage humidity in the drug storage conditions exceeds a preset humidity threshold, and / or, when the current light conditions in the current environmental information differ from the storage light conditions in the drug storage conditions, an early warning is issued. This early warning information includes the target storage area to be adjusted and the environmental information to be adjusted. Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning information, the system determines the environmental control object to be adjusted, and sends environmental control instructions to the environmental control object to achieve drug supervision. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller.

[0059] This specification also provides a non-volatile computer storage medium storing computer-executable instructions. These instructions are configured to: divide a medicine storage cabinet into multiple storage areas, and collect current environmental information and current medicine information from each of the multiple storage areas. The current environmental information within each storage area includes the current temperature, humidity, and light conditions. The medicine information includes a medicine type identifier and storage conditions. Based on the correspondence between the medicine type identifier and the multiple storage areas, determine whether the current medicine is stored in a pre-defined storage area. If the current medicine is placed in a pre-defined storage area, store the current environmental information corresponding to that storage area to a blockchain, so that the current environmental information within the storage area can be detected through a compliant smart contract. When the difference between the current temperature in the storage area in the current environmental information and the storage temperature in the drug storage conditions exceeds a preset temperature threshold, and / or when the difference between the current humidity in the storage area in the current environmental information and the storage humidity in the drug storage conditions exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information differs from the storage illumination in the drug storage conditions, an early warning message is issued. The early warning message includes the target storage area to be adjusted and the environmental information to be adjusted. Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning message, the environmental control object to be adjusted is determined, and an environmental control command is sent to the environmental control object to achieve drug supervision. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller.

[0060] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0061] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0062] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.

Claims

1. A blockchain-based method for drug regulation, characterized in that, The method includes: The medicine storage cabinet is divided into multiple storage areas, and the current environmental information and current medicine information of each storage area are collected. The current environmental information of the storage area includes the current temperature, current humidity and current light conditions of the storage area, and the medicine information of the storage area includes the medicine type identification and medicine storage conditions. Based on the correspondence between the drug type identifier and the multiple storage areas, it is determined whether the current drug is stored in the pre-defined storage area; If the medicine is currently placed in a pre-defined storage area, the current environmental information corresponding to the storage area will be stored in the blockchain so that the current environmental information in the storage area can be detected through a qualified smart contract. When the difference between the current temperature in the storage area in the current environmental information and the storage temperature in the drug storage conditions exceeds a preset temperature threshold, and / or when the difference between the current humidity in the storage area in the current environmental information and the storage humidity in the drug storage conditions exceeds a preset humidity threshold, and / or when the current illumination in the current environmental information is different from the storage illumination in the drug storage conditions, an early warning message is issued, wherein the early warning message includes the target storage area to be adjusted and the environmental information to be adjusted; Based on the environmental information to be adjusted and the target storage area to be adjusted in the early warning information, the environmental control object to be adjusted is determined, and an environmental control command is sent to the environmental control object to be adjusted to realize the supervision of the drug. The environmental control object includes any one or more of a temperature regulator, a humidity regulator, and a light controller. After issuing the warning information, the method includes: Obtain the location information of the medicine storage cabinet, and set a monitoring range with the location information of the medicine storage cabinet as the center and a preset distance as the radius; Multiple regulatory enforcement points are identified within the regulatory scope. Among these multiple regulatory enforcement points, there is one primary regulatory enforcement point and at least one secondary regulatory enforcement point. The position level of the primary regulatory enforcement point is higher than that of the secondary regulatory enforcement point. Send early warning information to multiple regulatory enforcement points within the regulatory scope, wherein the early warning information includes the location information of the drug storage cabinet with abnormal environment and a randomly generated designated secondary regulatory enforcement point; Based on the actual environmental data collected from the designated secondary regulatory enforcement point and the primary regulatory enforcement point, penalties are imposed on the abnormal environmental conditions of the drug storage cabinet, and penalty results are generated. Before performing anomaly detection on the current environmental information within the storage area using a compliant smart contract, the method further includes: The initial smart contract is parsed to obtain the initial contract code within the initial smart contract; The initial contract code is split according to a preset syntax structure to obtain multiple functional codes in the initial contract code; Among the plurality of functional codes, a specific functional code related to the threshold comparison is identified; The initial smart contract is used to detect anomalies in the current environment information to obtain a predicted penalty result. Based on the difference between the predicted penalty result and the actual penalty result, the comparison threshold of the functional code in the initial smart contract is adjusted to obtain the smart contract that meets the requirements. The detection of current environmental information within the storage area via a compliant smart contract specifically includes: Based on the current storage conditions of the medicine, determine the storage temperature, storage humidity, and storage light conditions of the medicine. The smart contract that meets the requirements determines whether the difference between the current temperature of the storage area and the storage temperature in the current drug storage conditions is within a preset temperature threshold. If the difference between the current temperature of the storage area and the storage temperature is within a preset temperature threshold, then through the qualified smart contract, it is determined whether the difference between the current humidity of the storage area and the storage humidity in the current drug storage conditions is within a preset humidity threshold. If the difference between the humidity information of the storage area and the storage humidity is within a preset humidity threshold, then through the qualified smart contract, it is determined whether the current lighting conditions corresponding to the storage area are the same as the storage lighting conditions in the current drug storage conditions. If the current lighting conditions are the same as the storage lighting conditions, it is determined that there are no abnormalities in the current environmental information. Before determining whether the current drug is stored in a pre-defined storage area based on the correspondence between the drug type identifier and the multiple storage areas, the method further includes: Obtain the storage conditions of all drugs to be stored, classify all drugs to be stored according to the drug storage temperature, drug storage humidity and drug storage light conditions, and set the same designated color label for drugs belonging to the same category. Multiple medicines to be stored with the specified color identifier are placed in the same storage area, and a mapping relationship is established between each storage area and the specified color identifier; Based on the mapping relationship between each storage area identifier and the specified color identifier, and the multiple drug information corresponding to the specified color identifier, a relationship mapping table is constructed; The step of determining the environmental control object to be adjusted based on the environmental information to be adjusted in the early warning information and the target storage area to be adjusted in the early warning information specifically includes: Based on the target storage area in the warning information, determine multiple storage areas adjacent to the target storage area; The environmental information to be adjusted in the early warning information is determined, and the ratio of the temperature in the environmental information to the drug storage temperature in the multiple storage areas is calculated as the influence factor of the environmental information on the multiple storage areas. Based on the environmental information to be adjusted and the target storage area, an environmental control object within the target storage area is determined; the environmental control object within the target storage area is used to perform current environmental control on the target storage area. Based on the type of environmental control object within the target storage area, determine the control objects of the multiple storage areas, and specify environmental control for each storage area according to the influence factors of the multiple storage areas.

2. The method for implementing drug regulation based on blockchain according to claim 1, characterized in that, The drug types are identified by color coding. The step of determining whether the current drug is stored in a pre-defined storage area based on the correspondence between the drug type identifier and the multiple storage areas specifically includes: Obtain multiple medicines to be stored in the storage area, and obtain the storage color identifiers corresponding to the multiple medicines to be stored according to the relationship mapping table; The current color identifiers corresponding to the multiple current drugs stored in the storage area are compared with the color identifiers to be stored. If, among the multiple current color identifiers, there is a first color identifier that is different from the color identifier to be stored, it is determined that the medicine corresponding to the first color identifier is not placed in the pre-defined storage area.

3. The method for implementing drug regulation based on blockchain according to claim 1, characterized in that, The step of storing the current environment information corresponding to the storage area to the blockchain specifically includes: Perform a hash calculation on the current environment information corresponding to the storage area to obtain the environment hash value corresponding to the storage area; Perform hash calculation on the current drug information corresponding to the storage area to obtain the drug hash value corresponding to the storage area; Generate a collection timestamp based on the collection time of the current environment information and the current drug information; The environmental hash value, the drug hash value, and the collection timestamp are mixed and encoded, and then uploaded to the blockchain for storage.

4. A blockchain-based drug supervision device, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-3.

5. A non-volatile computer storage medium storing computer-executable instructions, the computer-executable instructions being configured to perform the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Traffic violation vehicle alarming method and device and system

    CN106355874A

  • Environment adjusting method and related products

    CN109856979A

  • Warehouse management method and device based on blockchain, and medium

    CN111027900A

  • Systems and methods for extendable smart contracts in distributed ledger technology

    US20210149880A1