Insulin pen medicine bottle automatic identification device and method

By using a spring-loaded identification component and circuit feedback design, the device automatically identifies the type of the electric insulin pen cartridge and switches the dosage calculation mode accordingly. This solves the problem of dosage errors caused by users manually switching programs, and improves the safety and convenience of injection.

CN121819087APending Publication Date: 2026-04-10SHENZHEN PHRAY MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

When using different sizes of cartridges, users of existing electric insulin pens need to manually switch programs, which can easily lead to dosage calculation errors, affect treatment effectiveness, and pose medical risks.

Method used

The device employs a spring-loaded identification component to trigger the circuit circuit based on the physical pressure difference of pen refills of different diameters. This automatically identifies the pen refill type and switches the dosage calculation mode. Combining mechanical contact and circuit feedback design, it is compatible with two mainstream pen refill specifications.

Benefits of technology

It achieves accurate identification of pen refill type without manual user intervention, automatically matches dosage calculation parameters, improves injection safety and ease of operation, and is especially suitable for elderly or visually impaired patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121819087A_ABST
    Figure CN121819087A_ABST
Patent Text Reader

Abstract

The invention discloses an insulin pen medicine bottle automatic identification device and method.The device comprises an inner frame structure, a medicine storage bin is arranged on the upper portion of the inner frame structure, a rectangular battery bin is arranged on the lower portion of the inner frame structure, and an elastic piece identification assembly and a circuit control module are arranged in the inner frame structure; the power module and the elastic piece recognition assembly are electrically connected with the circuit control module through corresponding flexible flat cables, the circuit control module is connected with an intelligent terminal through wireless signals, a needle hiding device is arranged at the front end of the insulin pen body, an inner shell of the needle hiding device is slidably arranged in an outer shell, and the top end of a reset spring is connected with the inner wall of the top of the outer shell. The bottom end of the reset spring is connected with the outer wall of the top of the inner shell, the center of the outer shell and the center of the inner shell are vertically and coaxially provided with a first penetrating hole and a second penetrating hole, and the soft elastic piece is arranged in the second penetrating hole. And misjudgment is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical device technology. Specifically, it relates to an automatic insulin pen vial identification device and method, which is used to automatically identify insulin pen cartridges of different diameters and switch the corresponding dosage calculation program to ensure the accuracy of insulin injection dosage. Background Technology

[0002] With the advancement of medical technology, the emergence of electric insulin pens has further improved the accuracy and intelligence of insulin administration. Modern electric insulin pens can not only precisely control the dosage but also record medication data, with some high-end products even supporting Bluetooth connectivity and mobile management. However, in practical use, insulin pens still face some key technical challenges, particularly significant deficiencies in compatibility with different cartridge sizes.

[0003] Currently, commercially available electric insulin pens typically support two different sizes of insulin cartridges, mainly differing in diameter and length (e.g., 11mm diameter, 66.2mm length and 11.6mm diameter, 63mm length). Since insulin dosage calculation is directly related to cartridge diameter, users need to manually switch the device program when using different cartridges. However, in practice, users may forget to switch programs, leading to incorrect dosage calculations, affecting treatment effectiveness, and potentially causing medical risks. Therefore, there is a need for an automatic insulin pen vial identification device and method that is simple in structure, easy to operate, and allows for adjustment of the gas extraction tube sieve length as needed. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic identification device and method for insulin pen vials that is simple in structure, easy to operate, and allows for adjustment of the length of the gas extraction tube sieve section as needed. By utilizing the difference in physical pressure exerted by pen cartridges of different diameters on the spring or switch, the corresponding circuit is triggered, thereby accurately identifying the pen cartridge type and automatically switching the dosage calculation mode to ensure the accuracy of the injection dosage. Through optimized structural design, it is compatible with the two mainstream pen cartridge specifications on the market (11mm and 11.6mm in diameter). By utilizing the differentiated triggering mechanism of the outer and inner switches, unique identification is achieved, avoiding misjudgment.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: An automatic insulin pen vial identification device includes an inner frame structure disposed inside the insulin pen. The upper part of the inner frame structure has a storage compartment corresponding to the insulin vial, and the lower part has a rectangular battery compartment for mounting a power module. A guide rail groove is provided within the inner frame structure, and an annular guide rail is mounted on the guide rail. A spring-loaded identification component for identifying large-diameter and small-diameter vials is mounted on the annular guide rail. The guide rail groove is located below the storage compartment. A circuit board mounting base is also provided within the inner frame structure, located below the guide rail groove. A circuit control module is mounted on the circuit board mounting base. The power module and the spring-loaded identification component are electrically connected to the circuit control module via corresponding flexible ribbon cables. The circuit control module is connected to a smart terminal via a wireless signal. After the vial is installed in the storage compartment, the spring-loaded identification component identifies the diameter of the vial and triggers the corresponding circuit. The circuit control module transmits the corresponding wireless signal to the smart terminal based on the triggered circuit. The smart terminal then controls the insulin pen to perform an injection action using a vial of the corresponding diameter.

[0006] The spring-load recognition component includes a circular floating bracket, on which a large-diameter spring-load group and a small-diameter spring-load group are arranged. Both the large-diameter spring-load group and the small-diameter spring-load group are arranged on the upper surface of the circular floating bracket, with the large-diameter spring-load group located on the outer circumference of the small-diameter spring-load group. The large-diameter spring-load group corresponds to the bottom of the large-diameter medicine bottle, and the small-diameter spring-load group corresponds to the bottom of the small-diameter medicine bottle. An acceleration sensor for detecting the direction of the pen body's gravitational acceleration is arranged in the middle of the circular floating bracket, and then the tilt angle of the pen body relative to the horizontal or vertical plane is calculated based on the direction of the pen body's gravitational acceleration.

[0007] The large-diameter spring assembly includes a phosphor bronze alloy spring. When a large-diameter vial is installed in the drug storage compartment, the bottom ring of the large-diameter vial presses down on the phosphor bronze alloy spring, causing the phosphor bronze alloy spring to contact the first and second contacts of the circuit control module. The first circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the large-diameter vial. The small-diameter spring assembly includes a beryllium copper spring. When a small-diameter vial is installed in the drug storage compartment, the bottom ring of the small-diameter vial presses down on the beryllium copper spring, causing the beryllium copper spring to contact the third and fourth contacts of the circuit control module. The second circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the small-diameter vial.

[0008] The trigger stroke of the large-diameter spring group is 1.2mm, and the trigger stroke of the small-diameter spring group is 0.8mm. Both groups of springs adopt a dual-contact redundancy mechanism and improve contact reliability through gold plating. The insulin pen body has an integrated needle concealer at the front end. The needle concealer includes an outer shell, an inner shell, a return spring, and a flexible spring. The inner shell is slidably disposed inside the outer shell. The top end of the return spring is connected to the top inner wall of the outer shell, and the bottom end of the return spring is connected to the top outer wall of the inner shell. The outer shell and the inner shell are coaxially arranged with a first penetration hole and a second penetration hole at their center. The flexible spring is disposed in the second penetration hole. The needle concealer is installed at the front end of the insulin pen body through the inner shell, so that the needle of the insulin pen is hidden in the first penetration hole and the second penetration hole. The flexible spring is used to hold the front end of the insulin pen body.

[0009] It also includes a main control chip installed inside the insulin pen. The main control chip uses an intelligent medication prediction and reminder system. The intelligent medication prediction and reminder system includes a medication behavior feature extraction module, a context perception analysis module, a medication demand prediction module, and a medication recommendation engine module. The intelligent medication prediction and reminder system adopts a three-level early warning mechanism, including regular reminders, emergency reminders, and crisis warnings. Regular reminders are sent 3 days in advance via vibration and screen lock notifications. Emergency reminders are triggered by voice broadcast when the remaining medication is less than 3 doses. Crisis warnings are triggered by automatically contacting emergency contacts when medication is about to run out.

[0010] The medication behavior feature extraction module collects users' medication history data through the built-in sensor of the insulin pen. The medication history data includes the type of vial used for each injection, the brand of the drug, the time of administration, and the dosage. The drug type includes large diameter (11.6 mm) or small diameter (11.0 mm). The medication behavior feature extraction module uses a sliding window statistical method to extract features from these raw data and calculate core feature indicators. The window size is 7 days. The core feature indicators include the frequency ratio of large diameter vials to small diameter vials, the brand preference index, and the regularity of medication time. Among them, the brand preference index is normalized using the Softmax function, and the regularity of medication time is based on standard deviation analysis. The structured feature vector provides standardized input for subsequent prediction models.

[0011] The context-aware analysis module acquires real-time location data through the GPS module built into a smartphone or insulin pen. Combining this data with user calendar events and environmental sensor information, it uses the DBSCAN clustering algorithm to intelligently classify the user's current context. Context types include permanent residence, travel status, and emergency status. Permanent residence is defined as a location where the user has stayed for more than 30 consecutive days. A travel status is indicated when hotel check-in or transportation ticket information is detected, and an emergency status is indicated when cross-time zone or high-altitude changes are detected. The context-aware analysis module calculates the environmental adaptability coefficient α_env using barometer data, providing an environmental correction basis for subsequent demand forecasting.

[0012] The medication demand prediction module is built on the Prophet time series algorithm. This model receives structured data output by the feature extraction module and combines it with the current remaining medication to predict medication demand for the next 7 days. The model innovatively introduces a dynamic correction factor: when the context-aware analysis module detects that the user is traveling, it automatically applies the β_travel correction coefficient, which has an upward adjustment of 20%-50%; during holidays, the β_holiday correction coefficient is activated, which has an upward adjustment of 15%.

[0013] When the prediction results indicate insufficient medication, the system immediately activates the medication recommendation engine module. This engine module connects to real-time databases of multiple pharmacies and uses a multi-objective optimization algorithm to score and rank nearby pharmacies. The scoring formula comprehensively considers four dimensions: inventory matching degree, distance score, price index, and user reviews. Among them, the matching degree weight w1=0.4, the distance score weight w2=0.3, the price index weight w3=0.2, and the user review weight w4=0.1 to ensure that the recommendation results meet both medication needs and user preferences. At the same time, it integrates a navigation API to provide users with optimal route planning.

[0014] An automatic identification method for insulin pen vials, implemented based on the aforementioned automatic identification device for insulin pen vials, includes the following steps: (1) Start the automatic identification device First, when the user is ready to replace the insulin vial, they pinch and pull out the medication reservoir at the end of the pen body to expose the vial mounting cavity for replacement; the LCD backlight module automatically lights up, displaying the previously identified vial type, remaining dosage, and current battery status; the main control chip wakes up from deep sleep mode and starts continuously monitoring the status of the spring assembly through the first, second, third, and fourth contacts; (2) Attitude detection and installation safety tips When the accelerometer detects that the pen body's tilt angle is greater than 30°, the system issues a warning, prompting the user to install the medicine bottle vertically. When the accelerometer detects that the pen body's tilt angle is less than or equal to 30°, the system proceeds to the next step. (3) Inserting the medicine bottle triggers recognition The user inserts the medicine bottle into the medicine storage compartment along the guide rail groove: When the medicine bottle is a large-diameter medicine bottle, the bottom ring of the large-diameter medicine bottle presses against the large-diameter spring group located outside the small-diameter spring group, causing the phosphor bronze alloy spring to deform and close the first contact and the second contact in sequence. The diameter of the large-diameter medicine bottle is 11.6mm. When the medicine bottle is of small diameter, the bottom ring of the small diameter medicine bottle presses against the small diameter spring assembly located inside the large diameter spring assembly, causing the beryllium copper spring to undergo elastic deformation and sequentially close the third and fourth contacts. The diameter of the small diameter medicine bottle is 11.0 mm. (4) Signal acquisition and type determination Large-diameter medicine bottle: The large-diameter spring support arm shifts by 1.2mm, the first contact and the second contact close in sequence, the circuit board detects the characteristic resistance of the first circuit loop of 45±5mΩ, and the main control chip confirms the large-diameter mode within 200ms. Small-diameter medicine bottle: The small-diameter spring support beam shifts by 0.8mm, the third and fourth contacts close in sequence, and the main control chip confirms the small-diameter mode within 180ms; (5) Automatic switching of metering calculation parameters Large diameter mode: Automatically switches to a dosage parameter of 0.5 μL / U and identifies the result through a green LED and an 800 Hz beep. Small diameter mode: Automatically switches to a dosage parameter of 0.3 μL / U, and is confirmed by a blue LED and a 500 Hz beep. (6) Safety inspection and anomaly handling The system synchronously records the deformation curve of the spring sheet and the change in contact resistance; if an abnormality is detected, a yellow alarm is immediately triggered and the injection program is stopped to prevent misoperation. (7) After each identification is completed, the system automatically performs a contact self-cleaning procedure to maintain the contact and ensure identification accuracy and contact reliability.

[0015] This invention, through an innovative design combining mechanical contact and circuit feedback, can accurately identify different diameter insulin pen cartridges and automatically match the corresponding dosage calculation parameters, completely eliminating the need for manual user intervention. Furthermore, the automatic identification device of this application adopts a modular circuit and mechanical linkage structure, featuring simple and reliable structure and high identification stability. It is perfectly compatible with existing insulin pen structures, requiring no additional complex modules, thus facilitating widespread application. Moreover, this application effectively solves the dosage error problem caused by incompatibility between cartridge type and program in traditional insulin pens, significantly improving injection safety and ease of operation. It is particularly suitable for elderly or visually impaired patients, providing a more accurate and reliable technical guarantee for insulin treatment in diabetic patients. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the external structure of the automatic identification device of the present invention.

[0017] Figure 2 This is a schematic diagram of the internal structure of the automatic identification device of the present invention when a large-diameter medicine bottle is installed.

[0018] Figure 3 for Figure 2 Enlarged view of section A.

[0019] Figure 4 This is a schematic diagram of the installation of the main control chip of the present invention.

[0020] Figure 5 This is a first-view installation diagram of the large-diameter spring assembly and the small-diameter spring assembly of the present invention.

[0021] Figure 6 This is a second-view installation diagram of the large-diameter spring group and the small-diameter spring group of the present invention.

[0022] Figure 7 This is a distribution diagram of the first contact, second contact, third contact and fourth contact of the present invention.

[0023] Figure 8 This is a schematic diagram of the internal structure of the automatic identification device of the present invention when a large-diameter medicine bottle is installed.

[0024] Figure 9 for Figure 8 Enlarged view of section B in the middle.

[0025] Figure 10 This is a schematic diagram of the structure of the hidden needle device of the present invention installed on the pen body.

[0026] Figure 11 This is a schematic diagram of the structure of the hidden needle device of the present invention.

[0027] Figure 12 This is a flowchart of the automatic identification method of the present invention. Detailed Implementation

[0028] The embodiments of the present invention are further described below with reference to the accompanying drawings.

[0029] like Figure 1-11As shown, an automatic insulin pen vial identification device includes an inner frame structure 18 disposed inside the insulin pen. The upper part of the inner frame structure 18 has a storage compartment corresponding to the insulin vial, and the lower part of the inner frame structure 18 has a rectangular battery compartment for mounting a power module 13. A guide rail groove 6 is disposed within the inner frame structure 18, and an annular guide rail 17 is disposed on the guide rail groove 6. A spring-loaded identification component for identifying large-diameter vials 2 and small-diameter vials 3 is mounted on the annular guide rail 17. The guide rail groove 6 is located below the storage compartment. A circuit board mounting base is also disposed within the inner frame structure 18. The mounting base is located below the guide rail groove 6. A circuit control module is installed on the circuit board mounting base. The power module 13 and the spring-loaded sensor identification component are electrically connected to the circuit control module via corresponding flexible ribbon cables. The circuit control module connects to the smart terminal via a wireless signal. The smart terminal connects wirelessly to the circuit control module via Bluetooth module 14. After the insulin bottle is installed in the storage compartment, the spring-loaded sensor identification component identifies the bottle diameter and triggers the corresponding circuit. The circuit control module transmits the corresponding wireless signal to the smart terminal based on the triggered circuit. The smart terminal controls the insulin pen to perform the injection action of the corresponding diameter bottle. When changing the insulin bottle, pinch and pull out the storage compartment at the end of the pen body to expose the bottle mounting cavity for replacement, ensuring that both the large-diameter bottle 2 and the small-diameter bottle 3 are on the same centerline. The inner frame structure 18 is externally fitted with a main shell 1. Both the main shell 1 and the inner frame structure 18 are made of medical-grade ABS plastic.

[0030] The spring clip recognition component includes a circular floating bracket 11, on which a large-diameter spring clip group 4 and a small-diameter spring clip group 5 are disposed. Both the large-diameter spring clip group 4 and the small-diameter spring clip group 5 are disposed on the upper surface of the circular floating bracket 11, with the large-diameter spring clip group 4 disposed on the outer circumference of the small-diameter spring clip group 5. The large-diameter spring clip group 4 corresponds to the bottom of the large-diameter medicine bottle 2, and the small-diameter spring clip group 5 corresponds to the bottom of the small-diameter medicine bottle 3. An acceleration sensor 19 for detecting the direction of the pen body's gravitational acceleration is disposed in the middle of the circular floating bracket 11, thereby calculating the tilt angle of the pen body relative to the horizontal or vertical plane through the direction of the pen body's gravitational acceleration, and realizing the calculation of the pen body placement angle.

[0031] The large-diameter spring assembly 4 includes a phosphor bronze alloy spring. When the large-diameter vial 2 is installed in the drug storage compartment, the bottom ring of the large-diameter vial 2 presses down on the phosphor bronze alloy spring, causing the phosphor bronze alloy spring to contact the first contact 7 and the second contact 8 of the circuit control module. The first circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the large-diameter vial 2. The small-diameter spring assembly 5 includes a beryllium copper spring. When the small-diameter vial 3 is installed in the drug storage compartment, the bottom ring of the small-diameter vial 3 presses down on the beryllium copper spring, causing the beryllium copper spring to contact the third contact 9 and the fourth contact 10 of the circuit control module. The second circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the small-diameter vial 3.

[0032] The trigger stroke of the large-diameter spring group 4 is 1.2mm, and the trigger stroke of the small-diameter spring group 5 is 0.8mm. Both groups of springs adopt a dual-contact redundancy mechanism and improve contact reliability through gold plating.

[0033] like Figure 10 As shown, the insulin pen body has a hidden needle device 15 integrated at the front end, specifically, as... Figure 11 As shown, the concealed needle device 15 includes a housing 22, an inner housing 23, a return spring 24, and a flexible spring 25. The inner housing 23 is slidably disposed inside the housing 22. The top end of the return spring 24 is connected to the top inner wall of the housing 22, and the bottom end of the return spring 24 is connected to the top outer wall of the inner housing 23. The housing 22 and the inner housing 23 are coaxially arranged with a first penetration hole and a second penetration hole. The flexible spring 25 is disposed in the second penetration hole. The concealed needle device 15 is installed at the front end of the insulin pen body through the inner housing 23, so that the insulin pen needle is hidden in the first and second penetration holes. The flexible spring 25 locks the front end of the insulin pen body. During injection, the concealed puncture and withdrawal of the needle are achieved through mechanical linkage, effectively alleviating the user's fear of needles.

[0034] It also includes a main control chip 12 and an LCD backlight module 20 installed inside the insulin pen. Both the main control chip 12 and the LCD backlight module 20 are connected to a release button 16. Pressing the release button 16 wakes up the main control chip 12, and the LCD backlight module 20 automatically lights up, displaying the last identified vial type, remaining dosage, and current battery status. The main control chip 12 employs an intelligent medication prediction and reminder system, which includes a medication behavior feature extraction module, a context-aware analysis module, a medication demand prediction module, and a medication recommendation engine module. The intelligent medication prediction and reminder system uses a three-level warning mechanism, including regular reminders, emergency reminders, and crisis warnings. Regular reminders are sent 3 days in advance via vibration and screen lock notifications. Emergency reminders trigger a voice broadcast when the remaining dosage is less than 3 doses. Crisis warnings automatically contact emergency contacts when medication is about to run out. All reminder information is context-adapted; for example, when traveling, it automatically includes the opening hours and inventory information of nearby pharmacies to ensure the practicality and timeliness of the reminders.

[0035] The medication behavior feature extraction module collects users' medication history data through the built-in sensor of the insulin pen. The medication history data includes the type of vial used for each injection, the brand of the drug, the time of administration, and the dosage. The drug type includes either a large diameter of 11.6 mm or a small diameter of 11.0 mm. The medication behavior feature extraction module uses a sliding window statistical method to extract features from these raw data and calculate core feature indicators. The window size is 7 days. The core feature indicators include the usage frequency ratio of large diameter vials 2 and small diameter vials 3, the brand preference index, and the regularity of medication time. Among them, the brand preference index is normalized using the Softmax function, and the regularity of medication time is based on standard deviation analysis. The structured feature vector provides standardized input for subsequent prediction models.

[0036] The context-aware analysis module acquires real-time location data through the GPS module built into a smartphone or insulin pen. Combining this data with user calendar events and environmental sensor information, it uses the DBSCAN clustering algorithm to intelligently classify the user's current context. Context types include permanent residence, travel status, and emergency status. Permanent residence is defined as a location where the user has stayed for more than 30 consecutive days. A travel status is indicated when hotel check-in or transportation ticket information is detected, and an emergency status is indicated when cross-time zone or high-altitude changes are detected. The context-aware analysis module calculates the environmental adaptability coefficient α_env using barometer data, providing an environmental correction basis for subsequent demand forecasting.

[0037] The medication demand prediction module is built on the Prophet time series algorithm. This model receives structured data from the feature extraction module and, combined with the current remaining medication supply, predicts medication demand for the next 7 days. The model innovatively introduces a dynamic correction factor: when the context-aware analysis module detects that the user is traveling, it automatically applies a β_travel correction coefficient, with an upward adjustment of 20%-50%; during holidays, it uses a β_holiday correction coefficient, with an upward adjustment of 15%. This context-adaptive prediction mechanism significantly improves prediction accuracy in special scenarios.

[0038] When the prediction results indicate insufficient medication, the system immediately activates the medication recommendation engine module. This engine module connects to real-time databases of multiple pharmacies and uses a multi-objective optimization algorithm to score and rank nearby pharmacies. The scoring formula comprehensively considers four dimensions: inventory matching degree, distance score, price index, and user reviews. Among them, the matching degree weight w1=0.4, the distance score weight w2=0.3, the price index weight w3=0.2, and the user review weight w4=0.1 to ensure that the recommendation results meet both medication needs and user preferences. At the same time, it integrates a navigation API to provide users with optimal route planning.

[0039] This application incorporates an intelligent medication prediction and reminder system. Based on user medication behavior feature extraction, context-aware analysis, medication demand prediction, and a medication recommendation engine, it achieves tiered early warning and personalized pharmaceutical services. This invention solves problems such as poor compatibility of multi-specification pen cartridges, easy dosage setting errors, anxiety caused by needle exposure, and passive medication management, significantly improving the safety, accuracy, and user experience of insulin injection.

[0040] like Figure 12 As shown, an automatic identification method for insulin pen vials, implemented based on the automatic identification device for insulin pen vials described in Embodiment 1, includes the following steps: (1) Start the automatic identification device First, when the user is ready to replace the insulin vial, they pinch and pull out the medication reservoir at the end of the pen body to expose the vial mounting cavity for replacement; the LCD backlight module 20 automatically lights up, displaying the previously identified vial type, remaining dosage, and current battery status; the main control chip 12 wakes up from deep sleep mode and begins to continuously monitor the status of the spring assembly through the first contact 7, the second contact 8, the third contact 9, and the fourth contact 10; (2) Attitude detection and installation safety tips When the accelerometer 19 detects that the tilt angle of the pen body is greater than 30°, the system issues a warning, prompting the user to install the medicine bottle vertically. When the accelerometer 19 detects that the tilt angle of the pen body is less than or equal to 30°, the system proceeds to the next step. (3) Inserting the medicine bottle triggers recognition The user inserts the medicine bottle into the medicine storage compartment along guide rail groove 6: When the medicine bottle is a large-diameter medicine bottle 2, the bottom ring of the large-diameter medicine bottle 2 presses against the large-diameter spring group 4 located outside the small-diameter spring group 5, causing the phosphor bronze alloy spring to deform and close the first contact 7 and the second contact 8 in sequence. The diameter of the medicine bottle 2 is 11.6 mm. When the medicine bottle 3 is of small diameter, the bottom ring of the small diameter medicine bottle 3 presses against the small diameter spring group 5 located inside the large diameter spring group 4, causing the beryllium copper spring to undergo elastic deformation and sequentially close the third contact 9 and the fourth contact 10. The diameter of the small diameter medicine bottle 3 is 11.0 mm. (4) Signal acquisition and type determination Large-diameter medicine bottle 2: The large-diameter spring support arm is displaced by 1.2mm, the first contact 7 and the second contact 8 close in sequence, the circuit board detects the characteristic resistance of the first circuit loop 45±5mΩ, and the main control chip 12 confirms the large-diameter mode within 200ms. Small diameter medicine bottle 3: The small diameter spring support beam is displaced by 0.8mm, the third contact 9 and the fourth contact are closed in sequence, and the main control chip 12 confirms the small diameter mode within 180ms; (5) Automatic switching of metering calculation parameters Large diameter mode: Automatically switches to a dosage parameter of 0.5 μL / U and identifies the result through a green LED and an 800 Hz beep. Small diameter mode: Automatically switches to a dosage parameter of 0.3 μL / U, and is confirmed by a blue LED and a 500 Hz beep. (6) Safety inspection and anomaly handling The system synchronously records the deformation curve of the spring sheet and the change in contact resistance; if an abnormality is detected, a yellow alarm is immediately triggered and the injection program is stopped to prevent misoperation. (7) After each identification is completed, the system automatically performs a contact self-cleaning procedure to maintain the contact and ensure identification accuracy and contact reliability.

[0041] This invention, through an innovative design combining mechanical contact and circuit feedback, can accurately identify different diameter insulin pen cartridges and automatically match the corresponding dosage calculation parameters, completely eliminating the need for manual user intervention. Furthermore, the automatic identification device of this application adopts a modular circuit and mechanical linkage structure, featuring simple and reliable structure and high identification stability. It is perfectly compatible with existing insulin pen structures, requiring no additional complex modules, thus facilitating widespread application. Moreover, this application effectively solves the dosage error problem caused by incompatibility between cartridge type and program in traditional insulin pens, significantly improving injection safety and ease of operation. It is particularly suitable for elderly or visually impaired patients, providing a more accurate and reliable technical guarantee for insulin treatment in diabetic patients.

[0042] The above embodiments are only used to illustrate and not limit the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention without departing from the spirit and scope of the present invention. Any modifications or partial substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An automatic identification device for insulin pen vials, comprising an inner frame structure disposed inside the insulin pen, characterized in that: The upper part of the inner frame structure has a storage compartment corresponding to the insulin vial, and the lower part has a rectangular battery compartment for installing the power module. The inner frame structure has a guide rail groove with a ring-shaped guide rail. A spring-loaded identification component for identifying large-diameter and small-diameter vials is mounted on the ring-shaped guide rail. The guide rail groove is located below the storage compartment. The inner frame structure also has a circuit board mounting base, located below the guide rail groove. A circuit control module is mounted on the circuit board mounting base. The power module and the spring-loaded identification component are electrically connected to the circuit control module via flexible ribbon cables. The circuit control module connects to a smart terminal via wireless signals. After the vial is installed in the storage compartment, the spring-loaded identification component identifies the diameter of the vial and triggers the corresponding circuit. The circuit control module then transmits the corresponding wireless signal to the smart terminal based on the triggered circuit. The smart terminal controls the insulin pen to perform the injection action of the vial with the corresponding diameter.

2. The automatic insulin pen vial identification device according to claim 1, characterized in that: The spring-load recognition component includes a circular floating bracket, on which a large-diameter spring-load group and a small-diameter spring-load group are arranged. Both the large-diameter spring-load group and the small-diameter spring-load group are arranged on the upper surface of the circular floating bracket, with the large-diameter spring-load group located on the outer circumference of the small-diameter spring-load group. The large-diameter spring-load group corresponds to the bottom of the large-diameter medicine bottle, and the small-diameter spring-load group corresponds to the bottom of the small-diameter medicine bottle. An acceleration sensor for detecting the direction of the pen body's gravitational acceleration is arranged in the middle of the circular floating bracket, and then the tilt angle of the pen body relative to the horizontal or vertical plane is calculated based on the direction of the pen body's gravitational acceleration.

3. The automatic identification device for insulin pen vials according to claim 2, characterized in that: The large-diameter spring assembly includes a phosphor bronze alloy spring. When a large-diameter vial is installed in the drug storage compartment, the bottom ring of the large-diameter vial presses down on the phosphor bronze alloy spring, causing the phosphor bronze alloy spring to contact the first and second contacts of the circuit control module. The first circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the large-diameter vial. The small-diameter spring assembly includes a beryllium copper spring. When a small-diameter vial is installed in the drug storage compartment, the bottom ring of the small-diameter vial presses down on the beryllium copper spring, causing the beryllium copper spring to contact the third and fourth contacts of the circuit control module. The second circuit of the circuit control module is triggered and transmits a wireless signal to the smart terminal. The smart terminal controls the insulin pen to perform the injection action of the small-diameter vial.

4. The automatic insulin pen vial identification device according to claim 3, characterized in that: The trigger stroke of the large-diameter spring group is 1.2mm, and the trigger stroke of the small-diameter spring group is 0.8mm. Both groups of springs adopt a dual-contact redundancy mechanism and improve contact reliability through gold plating. The insulin pen body has an integrated needle concealer at the front end. The needle concealer includes an outer shell, an inner shell, a return spring, and a flexible spring. The inner shell is slidably disposed inside the outer shell. The top end of the return spring is connected to the top inner wall of the outer shell, and the bottom end of the return spring is connected to the top outer wall of the inner shell. The outer shell and the inner shell are coaxially arranged with a first penetration hole and a second penetration hole at their center. The flexible spring is disposed in the second penetration hole. The needle concealer is installed at the front end of the insulin pen body through the inner shell, so that the needle of the insulin pen is hidden in the first penetration hole and the second penetration hole. The flexible spring is used to hold the front end of the insulin pen body.

5. The automatic insulin pen vial identification device according to claim 4, characterized in that: It also includes a main control chip installed inside the insulin pen. The main control chip uses an intelligent medication prediction and reminder system. The intelligent medication prediction and reminder system includes a medication behavior feature extraction module, a context perception analysis module, a medication demand prediction module, and a medication recommendation engine module. The intelligent medication prediction and reminder system adopts a three-level early warning mechanism, including regular reminders, emergency reminders, and crisis warnings. Regular reminders are sent 3 days in advance via vibration and screen lock notifications. Emergency reminders are triggered by voice broadcast when the remaining medication is less than 3 doses. Crisis warnings are triggered by automatically contacting emergency contacts when medication is about to run out.

6. The automatic identification device for insulin pen vials according to claim 5, characterized in that: The medication behavior feature extraction module collects users' medication history data through the built-in sensor of the insulin pen. The medication history data includes the type of vial used for each injection, the brand of the drug, the time of administration, and the dosage. The drug type includes large diameter (11.6 mm) or small diameter (11.0 mm). The medication behavior feature extraction module uses a sliding window statistical method to extract features from these raw data and calculate core feature indicators. The window size is 7 days. The core feature indicators include the frequency ratio of large diameter vials to small diameter vials, the brand preference index, and the regularity of medication time. Among them, the brand preference index is normalized using the Softmax function, and the regularity of medication time is based on standard deviation analysis. The structured feature vector provides standardized input for subsequent prediction models.

7. An automatic insulin pen vial identification device according to claim 6, characterized in that: The context-aware analysis module acquires real-time location data through the GPS module built into a smartphone or insulin pen. Combining this data with user calendar events and environmental sensor information, it uses the DBSCAN clustering algorithm to intelligently classify the user's current context. Context types include permanent residence, travel status, and emergency status. Permanent residence is defined as a location where the user has stayed for more than 30 consecutive days. A travel status is indicated when hotel check-in or transportation ticket information is detected, and an emergency status is indicated when cross-time zone or high-altitude changes are detected. The context-aware analysis module calculates the environmental adaptability coefficient α_env using barometer data, providing an environmental correction basis for subsequent demand forecasting.

8. The automatic insulin pen vial identification device according to claim 7, characterized in that: The medication demand prediction module is built on the Prophet time series algorithm. This model receives structured data output by the feature extraction module and combines it with the current remaining medication to predict medication demand for the next 7 days. The model innovatively introduces a dynamic correction factor: when the context-aware analysis module detects that the user is traveling, it automatically applies the β_travel correction coefficient, which has an upward adjustment of 20%-50%; during holidays, the β_holiday correction coefficient is activated, which has an upward adjustment of 15%.

9. An automatic insulin pen vial identification device according to claim 8, characterized in that: When the prediction results indicate insufficient medication, the system immediately activates the medication recommendation engine module. This engine module connects to real-time databases of multiple pharmacies and uses a multi-objective optimization algorithm to score and rank nearby pharmacies. The scoring formula comprehensively considers four dimensions: inventory matching degree, distance score, price index, and user reviews. Among them, the matching degree weight w1=0.4, the distance score weight w2=0.3, the price index weight w3=0.2, and the user review weight w4=0.1 to ensure that the recommendation results meet both medication needs and user preferences. At the same time, it integrates a navigation API to provide users with optimal route planning.

10. An automatic identification method for insulin pen vials, implemented based on an automatic identification device for insulin pen vials as described in any one of claims 1 to 9, characterized in that, Includes the following steps: (1) Start the automatic identification device First, when the user is ready to replace the insulin vial, they pinch and pull out the medication reservoir at the end of the pen body to expose the vial mounting cavity for replacement; the LCD backlight module automatically lights up, displaying the previously identified vial type, remaining dosage, and current battery status; the main control chip wakes up from deep sleep mode and starts continuously monitoring the status of the spring assembly through the first, second, third, and fourth contacts; (2) Attitude detection and installation safety tips When the accelerometer detects that the pen body's tilt angle is greater than 30°, the system issues a warning, prompting the user to install the medicine bottle vertically. When the accelerometer detects that the pen body's tilt angle is less than or equal to 30°, the system proceeds to the next step. (3) Inserting the medicine bottle triggers recognition The user inserts the medicine bottle into the medicine storage compartment along the guide rail groove: When the medicine bottle is a large-diameter medicine bottle, the bottom ring of the large-diameter medicine bottle presses against the large-diameter spring group located outside the small-diameter spring group, causing the phosphor bronze alloy spring to deform and close the first contact and the second contact in sequence. The diameter of the large-diameter medicine bottle is 11.6mm. When the medicine bottle is of small diameter, the bottom ring of the small diameter medicine bottle presses against the small diameter spring assembly located inside the large diameter spring assembly, causing the beryllium copper spring to undergo elastic deformation and sequentially close the third and fourth contacts. The diameter of the small diameter medicine bottle is 11.0 mm. (4) Signal acquisition and type determination Large-diameter medicine bottle: The large-diameter spring support arm shifts by 1.2mm, the first contact and the second contact close in sequence, the circuit board detects the characteristic resistance of the first circuit loop of 45±5mΩ, and the main control chip confirms the large-diameter mode within 200ms. Small-diameter medicine bottle: The small-diameter spring support beam shifts by 0.8mm, the third and fourth contacts close in sequence, and the main control chip confirms the small-diameter mode within 180ms; (5) Automatic switching of metering calculation parameters Large diameter mode: Automatically switches to a dosage parameter of 0.5 μL / U and identifies the result through a green LED and an 800 Hz beep. Small diameter mode: Automatically switches to a dosage parameter of 0.3 μL / U, and is confirmed by a blue LED and a 500 Hz beep. (6) Safety inspection and anomaly handling The system synchronously records the deformation curve of the spring sheet and the change in contact resistance; if an abnormality is detected, a yellow alarm is immediately triggered and the injection program is stopped to prevent misoperation. (7) After each identification is completed, the system automatically performs a contact self-cleaning procedure to maintain the contact and ensure identification accuracy and contact reliability.