Drug weighing and counting method based on adaptive compensation

Through the adaptive compensation method, the measurement data of the Magrin cabinet weighing sensor is adjusted using temperature, humidity and aging correction functions, solving the problem that the sensor measurement accuracy is affected by the environment and aging, and improving the accuracy of drug counting and automated management.

CN120403826APending Publication Date: 2025-08-01ZHENGZHOU RUIFU INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510524406.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The measurement accuracy of the weighing sensor in the Majing cabinet is susceptible to environmental factors and long-term use. The existing calibration methods cannot adapt to environmental changes in real time and rely on manual intervention, resulting in accumulated measurement errors and insufficient long-term stability.

Method used

Adaptive compensation method is adopted to adjust the weighing data in real time through temperature, humidity and aging correction functions, and dynamically compensate sensor offsets for sensor deviation through temperature correction functions, humidity correction functions and aging correction functions to achieve accurate counting of the number of drugs.

Benefits of technology

It improves the long-term measurement accuracy and automation management level of the magnolia cabinet, monitors environmental factors and sensor status in real time, reduces measurement errors, and improves the accuracy and efficiency of drug management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120403826A_ABST
    Figure CN120403826A_ABST
Patent Text Reader

Abstract

The invention discloses a medicine weighing and counting method based on self-adaptive compensation. The method comprises the following steps: acquiring a weight value val of a medicine put into a medicine box through a weighing sensor mounted at the bottom of the medicine box; respectively acquiring a temperature value and a humidity value through a temperature sensor and a humidity sensor which are arranged in the sesame seed cabinet, and acquiring the service time of a weighing sensor; obtaining a temperature compensation value, a humidity compensation value and an aging compensation value through a temperature correction function, a humidity correction function and an aging correction function according to the obtained values of the temperature, the humidity and the use time; obtaining a corrected weight value; the medicine quantity is obtained by dividing the corrected weight value by the weight of a single medicine. According to the invention, environmental factors such as temperature and humidity and sensor states such as zero drift and sensitivity change can be monitored in real time, weighing data can be dynamically adjusted, and the long-term measurement precision and the automatic management level of the toxic and anesthetic medicine cabinet are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of weight measurement, and particularly relates to a medicine weighing and counting method based on adaptive compensation. Background Art

[0002] The narcotic and psychotropic cabinet is an intelligent storage device for strictly managing narcotic drugs and psychotropic drugs (referred to as "narcotic drugs" for short), and is usually applied to medical places such as hospital pharmacies and operating rooms. To ensure the accurate dispensing and inventory management of drugs, the narcotic and psychotropic cabinet is usually equipped with high-precision weighing sensors for real-time monitoring of the weight change of drugs. These weighing sensors are usually installed at the bottom of the medicine box. The medicine box can store boxed medicines (such as medicine plates in aluminum-plastic packaging) or bulk medicines (such as tablets, capsules, etc.), and the number of medicines taken or returned is calculated by measuring the change in the total weight of the medicine box. However, in the actual use process, the measurement accuracy of the weighing sensor is easily affected by various factors, mainly including: 1. Environmental temperature and humidity changes: Temperature fluctuations will cause the resistance value of the metal strain gauge of the sensor to change, and humidity may affect the circuit stability, thereby introducing weighing errors. 2. Long-term mechanical fatigue: After long-term use of the sensor, the elastomer may undergo micro-deformation, resulting in zero drift or decreased sensitivity, affecting the measurement accuracy.

[0003] At present, the weighing sensors of narcotic and psychotropic cabinets usually use fixed calibration or manual periodic calibration methods for error correction, such as using standard weights for calibration or setting static compensation parameters. However, these methods have the following limitations: Unable to adapt to environmental changes in real time: The drift caused by temperature and humidity fluctuations cannot be dynamically compensated, resulting in the accumulation of measurement errors. Relying on manual intervention: Regular manual calibration is required, with low efficiency and possible introduction of new errors due to improper operation. Insufficient long-term stability: The slow drift caused by sensor aging is difficult to detect and correct in a timely manner. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that the measurement accuracy of the weighing sensor in the narcotic and psychotropic cabinet is easily affected by various factors. To solve the above problems, a medicine weighing and counting method based on adaptive compensation is provided.

[0005] The purpose of the present invention is achieved in the following way: A medicine weighing and counting method based on adaptive compensation, the method includes: S1: Obtain the weight value val of the medicine placed in the medicine box through the weighing sensor installed at the bottom of the medicine box; S2: Obtain the temperature value and humidity value respectively through the temperature sensor and humidity sensor installed in the narcotic and psychotropic drug cabinet, and obtain the usage time of the weighing sensor; S3: According to the obtained values of temperature, humidity and usage time, respectively obtain the temperature compensation value offset1, humidity compensation value offset2, and aging compensation value offset3 through the temperature correction function, humidity correction function and aging correction function; S4: Obtain the corrected weight value weight_val = val + offset1 + offset2 + offset3; S5: The number of drugs = the corrected weight value weight_val divided by the weight of a single drug; S6: If the decimal part of the number of drugs in S5 is greater than the first preset value, then add 1 to the integer part of the number of drugs and take the integer part to obtain the final number of drugs; If the decimal part of the number of drugs is less than the second preset value, then directly take the integer part of the number of drugs to obtain the final number of drugs; If the decimal part of the number of drugs is greater than the second preset value and less than the first preset value, then the weight of this time is invalid.

[0006] The sum of the first preset value and the second preset value is 1.

[0007] The first preset value is 0.7 and the second preset value is 0.3.

[0008] The temperature correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different ambient temperatures, obtain the weight offset of the sensor at different temperatures, and fit the offset into one or more offset formulas.

[0009] The humidity correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different ambient humidities, obtain the weight offset of the sensor at different humidities, and fit the offset into one or more offset formulas.

[0010] The aging correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different usage times of the weighing sensor, obtain the weight offset of the sensor at different usage times, and fit the offset into one or more offset formulas.

[0011] Advantages of the present invention: It can monitor environmental factors (temperature and humidity) and sensor status (such as zero drift, sensitivity change) in real time, and dynamically adjust the weighing data, improving the long-term measurement accuracy and automated management level of the narcotic and psychotropic drug cabinet. Description of the Drawings

[0012] Figure 1 It is a flow chart of the present invention.

[0013] Figure 2 It is a schematic diagram showing the influence of temperature of the present invention on the weight of the weighing sensor.

[0014] Figure 3 It is an actual test effect diagram of the present invention. Specific embodiments

[0015] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0016] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same technical meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.

[0017] As Figures 1 - 3 shown, a medicine weighing and counting method based on adaptive compensation, the method comprising: S1: Obtain the weight value val of the medicine placed in the medicine box through the weighing sensor installed at the bottom of the medicine box; S2: Respectively obtain the temperature value and humidity value through the temperature sensor and humidity sensor installed in the narcotic and psychotropic drug cabinet, and obtain the usage time of the weighing sensor; S3: Respectively obtain the temperature compensation value offset1, humidity compensation value offset2, and aging compensation value offset3 through the temperature correction function, humidity correction function, and aging correction function according to the obtained values of temperature, humidity, and usage time; S4: Obtain the corrected weight value weight_val = val + offset1 + offset2 + offset3; S5: The number of medicines = the corrected weight value weight_val divided by the weight of a single medicine; S6: If the decimal part of the number of medicines in S5 is greater than the first preset value, then the integer part of the number of medicines is incremented by 1, and the integer part is taken to obtain the final number of medicines; If the decimal part of the number of medicines is less than the second preset value, then the integer part of the number of medicines is directly taken to obtain the final number of medicines; If the decimal part of the number of medicines is greater than the second preset value and less than the first preset value, then the weight of this time is invalid.

[0018] Preferably, the sum of the first preset value and the second preset value is 1.

[0019] Preferably, the first preset value is 0.7 and the second preset value is 0.3.

[0020] The temperature correction function measures the weight information read by a load cell for a 1KG weight at different ambient temperatures, obtains the weight offset of the sensor at different temperatures, and fits the offset into one or more offset formulas. For example, taking 25 degrees Celsius as the standard, for every 1 degree Celsius increase in temperature, the weight information read by the sensor decreases by 300 milligrams. The formula is: offset = (current temperature - 25 degrees Celsius) * 300mg.

[0021] The humidity correction function measures the weight information read by a load cell for a 1KG weight at different ambient humidities, obtains the weight offset of the sensor at different humidities, and fits the offset into one or more offset formulas.

[0022] The aging correction function measures the weight information read by a load cell for a 1KG weight at different usage times of the load cell, obtains the weight offset of the sensor at different usage times, and fits the offset into one or more offset formulas.

[0023] The present invention can monitor environmental factors (temperature and humidity) and sensor status (such as zero drift and sensitivity change) in real time, and dynamically adjust the weighing data, improving the long-term measurement accuracy and automated management level of the narcotic drug cabinet.

[0024] The above are only the preferred embodiments of the present invention. It should be noted that for those skilled in the art, without departing from the overall concept of the present invention, several changes and improvements can still be made, and these should also be regarded as the protection scope of the present invention.

Claims

1. A medicine weighing and counting method based on adaptive compensation, characterized in that: The method includes: S1: Obtain the weight value val of the medicine placed in the medicine box through the weighing sensor installed at the bottom of the medicine box; S2: Obtain the temperature value and humidity value respectively through the temperature sensor and humidity sensor installed in the narcotic and psychotropic drug cabinet, and obtain the usage time of the weighing sensor; S3: Respectively obtain the temperature compensation value offset1, humidity compensation value offset2, and aging compensation value offset3 through the temperature correction function, humidity correction function, and aging correction function according to the obtained values of temperature, humidity, and usage time; S4: Obtain the corrected weight value weight_val = val + offset1 + offset2 + offset3; S5: The number of medicines = the corrected weight value weight_val divided by the weight of a single medicine; S6: If the decimal part of the number of medicines in S5 is greater than the first preset value, then add 1 to the integer part of the number of medicines and take the integer part to obtain the final number of medicines; If the decimal part of the number of medicines is less than the second preset value, then directly take the integer part of the number of medicines to obtain the final number of medicines; If the decimal part of the number of medicines is greater than the second preset value and less than the first preset value, then the weight of this time is invalid.

2. The method for weighing and counting medicines based on adaptive compensation according to claim 1, wherein: The sum of the first preset value and the second preset value is 1.

3. The method for weighing and counting medicines based on adaptive compensation according to claim 1, wherein: The first preset value is 0.7, and the second preset value is 0.

3.

4. The method for weighing and counting medicines based on adaptive compensation according to claim 1, wherein: The temperature correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different ambient temperatures, obtain the weight offset of the sensor at different temperatures, and fit the offset into one or more offset formulas.

5. The method for weighing and counting medicines based on adaptive compensation according to claim 1, wherein: The humidity correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different ambient humidities, obtain the weight offset of the sensor at different humidities, and fit the offset into one or more offset formulas.

6. The method for weighing and counting medicines based on adaptive compensation according to claim 1, wherein: The aging correction function is to use the weighing sensor to measure the weight information read by a 1KG weight at different usage times of the weighing sensor, obtain the weight offset of the sensor at different usage times, and fit the offset into one or more offset formulas.