IoT-based intelligent release and control method and system for medical formaldehyde

By using an IoT-based intelligent distribution and control method, dynamic permission binding and real-time traffic calculation are achieved in the formaldehyde distribution process. This solves the problems of difficulty in identifying responsible parties and missing data records in traditional control methods, and improves the accuracy of distribution and the convenience of behavior traceability.

CN123120191APending Publication Date: 2026-11-17JINAN HUIKAI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611174424.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Traditional formaldehyde distribution and usage control lacks a dynamic mapping mechanism, making it difficult to determine the responsible parties, unable to dynamically bind personnel permissions to liquid volume, lacking differentiated judgment and management of preset quantitative and on-demand customized liquid collection, and lacking an integrated closed-loop link of identity authentication, quantitative execution and data recording.

Method used

By using an IoT-based intelligent dispensing and control method, terminal devices are used to obtain user identity information, verify identity, generate dynamic session tokens, establish authorized sessions based on tokens, calculate flow rate in real time and adjust the drive signal of the pumping device, and combine the multi-dimensional index of the backend operation log library to achieve traceability of dispensing behavior.

Benefits of technology

It enhances the binding between personnel identity and liquid collection capacity, strengthens the differentiated adaptation to different operating standards and temporary personalized liquid collection needs, reduces the difficulty of tracing distribution and usage behavior, and provides a balance between standardized distribution accuracy and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123120191A_ABST
    Figure CN123120191A_ABST
Patent Text Reader

Abstract

This application relates to the field of medical resource management technology. It provides an IoT-based intelligent dispensing and control method and system for medical formaldehyde. The method includes: after dispensing is terminated, extracting the user's identity identifier from a dynamic session token; aggregating the user's identity identifier with the device identifier stored locally on the terminal device, the dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object; and reporting the operation record data object, carrying the dynamic session token, to the backend platform via an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in an operation log database. An index is built on the operation log database to support multi-dimensional traceability queries and report generation, thereby improving the dynamic binding capability between personnel permissions and dispensing volume, enhancing the differentiated adaptation effect to fixed-volume and customized dispensing needs, and reducing the difficulty of tracing dispensing and usage behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical resource management technology, and in particular to an IoT-based intelligent distribution and control method and system for medical formaldehyde. Background Technology

[0002] With the continuous advancement of medical informatization, the demand for standardized and intelligent management of hazardous chemicals in hospital operating rooms, pathology departments, and other settings is becoming increasingly urgent. Formaldehyde, as an essential liquid for fixing pathological tissues during surgery, has its distribution and usage control directly impacting the quality and efficiency of operating room safety management, and is a key management focus of the medical quality and safety improvement campaign.

[0003] Traditional technologies, which combine manual registration with mechanical storage tank dispensing, can only achieve physical opening and closing control, but cannot establish a dynamic mapping mechanism between personnel permissions and dispensing capacity, making it difficult to determine the responsible party. Existing technologies lack differentiated judgment and unified management strategies for the two dispensing logics of preset quantitative and on-demand customized dispensing, resulting in control conflicts between standardized operating procedures and emergency response needs. In addition, traditional solutions do not build an integrated closed-loop link of identity authentication, quantitative execution, and data recording, resulting in a lack of cross-verifiable correlation logic between the actual flow trajectory of reagents, dosage distribution, and operational behavior. Summary of the Invention

[0004] Therefore, it is necessary to provide an IoT-based intelligent dispensing and control method and system for medical formaldehyde to address the aforementioned technical issues, thereby improving the dynamic binding capability between personnel permissions and liquid volume, enhancing the differentiated adaptation effect to fixed-volume and customized liquid dispensing needs, and reducing the difficulty of tracing dispensing and usage behavior.

[0005] Firstly, this application provides an IoT-based intelligent release and control method for medical formaldehyde, the method comprising:

[0006] The system obtains user identity information through the terminal device, generates an authentication request based on the user identity information, sends the authentication request to the backend platform for identity verification, obtains the dynamic session token returned by the backend platform, and establishes an authorization session based on the dynamic session token.

[0007] The operation interface is presented based on the authorized session. The operation interface receives the user's selection command for the preset fixed capacity or the custom liquid dispensing mode. Based on the selection command, the pump device is started and the pulse signal output by the flow sensor set in the liquid circuit is collected in real time. The flow rate is calculated from the pulse signal to obtain the actual dispensing volume. The drive signal of the pump device is adjusted according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity.

[0008] After the liquid dispensing is terminated, the user identity is extracted from the dynamic session token. The user identity is then aggregated with the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object. The operation record data object, along with the dynamic session token, is then reported to the backend platform through an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log database and builds an index on the operation log database to support multi-dimensional traceability queries and report generation.

[0009] In one embodiment, the actual dispensing volume is obtained by calculating the flow rate of the pulse signal, and the drive signal of the pumping device is adjusted according to the deviation between the actual dispensing volume and the target capacity, so that the dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity. This includes:

[0010] The pulse signal is periodically sampled to obtain a pulse counting sequence, and the pulse counting sequence is converted into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient.

[0011] The actual disbursement volume is obtained by performing time-cumulative integration on the instantaneous flow sequence;

[0012] Calculate the volume deviation between the actual dispensing volume and the target capacity, and generate the flow adjustment increment for adjusting the drive duty cycle of the pump device based on the volume deviation and the preset flow adjustment step size.

[0013] The flow rate adjustment increment is added to the current drive duty cycle, and the pumping device is driven by the adjusted drive duty cycle;

[0014] When the absolute value of the difference between the actual dispensing volume and the target capacity falls within the tolerance range, a pump stop control signal is generated, and the drive signal to the pumping device is stopped to terminate the dispensing.

[0015] In one embodiment, converting a pulse counting sequence into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient includes:

[0016] A smooth pulse sequence is obtained by applying a sliding window filter to the pulse counting sequence;

[0017] Identify the effective pulse edges in a smooth pulse sequence, count the number of effective pulse edges per unit time, and obtain the effective pulse frequency;

[0018] The instantaneous flow rate sequence is obtained by multiplying the effective pulse frequency by the preset pulse-to-volume conversion coefficient.

[0019] In one embodiment, sending an authentication request to a backend platform for authentication to obtain a dynamic session token returned by the backend platform includes:

[0020] The authentication request is sent to the backend platform so that the backend platform can perform time validity verification on the current timestamp carried in the authentication request and perform uniqueness verification on the single random string carried in the authentication request.

[0021] After both the timeliness and uniqueness verifications pass, the backend platform uses the private key paired with the asymmetric public key to decrypt the encrypted authentication data in the authentication request, obtains the decryption result, and performs feature matching between the decryption result and the pre-stored registration template in the user database.

[0022] After successful feature matching, the backend platform generates a dynamic session token carrying the user's identity identifier, role permissions, token validity period, and token unique number, and returns the dynamic session token to the terminal device.

[0023] In one embodiment, an index is built on the operation log repository to support multi-dimensional traceability queries and report generation, including:

[0024] Extract the user identifier field, device identifier field, and time identifier field from the operation records stored in the operation log database;

[0025] Combine the user identifier field, device identifier field, and time identifier field to construct a multi-dimensional composite index;

[0026] Based on multidimensional composite indexes, the system responds to traceability queries targeting users, devices, or time periods, retrieves the corresponding operation records, and generates consumption statistics reports or usage ranking reports.

[0027] In one embodiment, obtaining user identity information through a terminal device and generating an authentication request based on the user identity information includes:

[0028] The terminal device collects the user's finger vein images, performs liveness detection on the finger vein images, and obtains biometric vectors through feature extraction;

[0029] The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data;

[0030] The encrypted authentication data is assembled with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0031] In one embodiment, obtaining user identity information through a terminal device and generating an authentication request based on the user identity information includes:

[0032] The terminal device collects the user's facial image, performs liveness detection on the facial image, and obtains a biometric vector through feature extraction;

[0033] The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data;

[0034] The encrypted authentication data is assembled with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0035] Secondly, this application also provides an IoT-based intelligent medical formaldehyde dispensing and control system, which includes:

[0036] The identity authentication and authorization module is used to obtain user identity information through terminal devices, generate authentication requests based on user identity information, send authentication requests to the backend platform for identity verification, obtain dynamic session tokens returned by the backend platform, and establish an authorization session based on the dynamic session tokens.

[0037] The interactive pump control module is used to present an operation interface based on an authorized session. It receives user selection instructions for preset fixed capacity or custom dispensing mode through the operation interface. Based on the selection instructions, it starts the pump device and collects the pulse signal output by the flow sensor set in the liquid circuit in real time. It calculates the flow rate of the pulse signal to obtain the actual dispensing volume, and adjusts the drive signal of the pump device according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated when the actual dispensing volume reaches the tolerance range of the target capacity.

[0038] The data traceability and reporting module is used to extract the user identity identifier from the dynamic session token after the liquid dispensing is terminated. The user identity identifier is then aggregated with the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object. The operation record data object, along with the dynamic session token, is reported to the backend platform through an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log database and builds an index on the operation log database to support multi-dimensional traceability queries and report generation.

[0039] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods in the first aspect of this application.

[0040] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods in the first aspect of this application.

[0041] The IoT-based intelligent formaldehyde dispensing and control method and system provided in this application dynamically anchors user permissions to a single operation cycle during the process of collecting identity information through terminal devices and issuing dynamic session tokens through the backend platform. This enhances the binding tightness between personnel identity and liquid dispensing volume, preventing the misuse or mismatch of static permissions. By distinguishing between preset fixed volumes and custom liquid dispensing modes through the operation interface, and calculating the actual dispensing volume in real time based on the pulse signal output by the flow sensor, and dynamically adjusting the drive signal of the pump device according to the volume deviation, it can enhance the differentiated adaptation effect to different operating standards and temporary personalized liquid dispensing needs, taking into account both standardized dispensing accuracy and on-the-spot operational flexibility.

[0042] After the liquid is dispensed, the user identifier, device identifier, liquid dispensing mode, actual dispensing volume and timestamp in the dynamic session token are aggregated and reported. Combined with the multi-dimensional index construction of the backend operation log library, the difficulty of tracing the dispensing and usage behavior across terminals and time periods can be reduced, and coherent data support can be provided for subsequent audit verification and report generation. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A flowchart of an IoT-based intelligent formaldehyde dispensing and control method for medical use, according to one embodiment of the present invention;

[0045] Figure 2 This is a flowchart illustrating how a pulse counting sequence is converted into an instantaneous flow sequence according to a preset pulse-to-volume conversion coefficient, as described in one embodiment of the present invention.

[0046] Figure 3 This is a structural diagram of an IoT-based intelligent medical formaldehyde dispensing and control system according to one embodiment of the present invention. Detailed Implementation

[0047] To make the above-mentioned objects, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0048] First, the application scenarios of the embodiments of this application are described. In the embodiments of this application, an IoT-based intelligent dispensing and control method and system for medical formaldehyde is provided, applicable to, but not limited to, medical business scenarios such as hospital operating rooms, pathology departments, and laboratory departments. Given the special properties of formaldehyde (formalin solution) as an essential reagent for fixing pathological tissues, and the hazardous chemical management regulations involved in its storage, dispensing, and waste disposal, this solution effectively meets the daily operational needs of medical institutions for refined management of high-risk chemical reagents.

[0049] In illustrative purposes, the IoT-based intelligent dispensing and control method and system for medical formaldehyde provided in this application embodiment can also be applied to other application scenarios involving the dispensing and control of high-risk liquid chemicals, such as chemical laboratories of various research institutes, teaching and experimental centers of universities, R&D workshops of biopharmaceutical companies, and sample processing areas of third-party medical testing institutions. This is only an example and does not limit the specific application scenarios.

[0050] like Figure 1 As shown, this application provides an IoT-based intelligent dispensing and control method for medical formaldehyde, which includes:

[0051] S101: Obtain user identity information through the terminal device, generate an authentication request based on the user identity information, send the authentication request to the backend platform for identity verification, obtain the dynamic session token returned by the backend platform, and establish an authorized session based on the dynamic session token.

[0052] For example, the terminal device collects biometric information submitted by the user, extracts feature vectors from the raw biometric information, and then uses a pre-set asymmetric public key from the backend platform to perform encryption operations on the feature vectors to generate encrypted authentication data. Simultaneously, the terminal device retrieves its locally stored unique device identifier, combines it with the currently generated timestamp information and a randomly generated string, and encapsulates the encrypted authentication data, the unique device identifier, the timestamp information, and the random string into an authentication request data packet. This authentication request data packet is then transmitted to the backend platform via a secure communication link to trigger the identity verification process.

[0053] After the backend platform completes multi-dimensional verification, the terminal device receives a dynamic session token containing the user's identity and permission validity period from the backend platform. The terminal device parses and loads the dynamic session token, constructing a controlled authorized session environment based on the permission description and validity constraints embedded in the token. The terminal device continuously maintains the activity state of this authorized session until the token expires or the user actively cancels it. The authorized session serves as the sole valid credential for subsequent pump control and data reporting processes, and outputs the successfully established authorized session.

[0054] S102: Based on the authorized session, an operation interface is presented. The operation interface receives the user's selection command for the preset fixed capacity or the custom liquid dispensing mode. Based on the selection command, the pump device is started and the pulse signal output by the flow sensor set in the liquid circuit is collected in real time. The flow rate is calculated from the pulse signal to obtain the actual dispensing volume. The drive signal of the pump device is adjusted according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity.

[0055] For example, the terminal device invokes the interactive interface based on the established authorized session, loads preset fixed capacity options and custom liquid dispensing mode entries through the interactive interface, and receives selection commands triggered by the user. The terminal device parses the corresponding target capacity parameters according to the selection command, starts the pumping device, and simultaneously drives the flow sensor installed in the liquid path to enter the working state, capturing the pulse signal output by the flow sensor in real time.

[0056] The terminal equipment performs sliding window filtering on the pulse signal to remove interference noise, identifies the effective pulse edges in the filtered signal and counts them continuously, maps the pulse count values ​​to instantaneous flow rates according to a preset pulse-volume conversion relationship, and obtains the actual dispensing volume by performing cumulative integration of the instantaneous flow rate over time. The terminal equipment calculates the volume deviation between the actual dispensing volume and the target capacity, generates a drive signal adjustment amount based on the direction and amplitude of the deviation, and adds the adjustment amount to the current drive duty cycle to correct the output power of the pumping device.

[0057] The terminal equipment continuously monitors the changing trend of the actual dispensing volume. When it determines that the difference between the actual dispensing volume and the target capacity falls within the preset tolerance range, it immediately generates a pump stop control signal and transmits it to the pumping device to cut off the power output of the liquid circuit. After the liquid circuit comes to a complete stop, the terminal equipment locks the current actual dispensing volume value, completes the liquid dispensing process, and outputs the execution result of terminating liquid dispensing.

[0058] S103: After the liquid dispensing is terminated, the user identity identifier is extracted from the dynamic session token. The user identity identifier is aggregated with the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object. The operation record data object, carrying the dynamic session token, is reported to the backend platform through an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log library and builds an index on the operation log library to support multi-dimensional traceability queries and report generation.

[0059] For example, after the liquid path is cut off, the terminal device parses the internal payload of the dynamic session token and extracts the user identity identifier from it. The terminal device then retrieves the device identifier stored in the local non-volatile storage area, and associates it with the liquid dispensing mode corresponding to the selected instruction cached during this interaction, the calculated and confirmed actual dispensing volume, and the operation completion timestamp generated by the system clock. The terminal device then encapsulates and concatenates the above multi-dimensional fields according to a predetermined data structure to construct an operation record data object.

[0060] The terminal device invokes its built-in communication protocol stack to bind and encapsulate the operation record data object with a dynamic session token into a reporting data packet, activates a pre-configured encrypted transmission channel, and pushes the data packet to the backend platform. The terminal device continuously listens to the network communication port, and upon receiving a write success signal from the backend platform, confirms that the operation record has been persistently stored in the backend platform's operation log library and that the log data has completed multi-dimensional index construction.

[0061] The terminal device outputs a confirmation message indicating successful reporting, ending the closed-loop management process for the current liquid collection cycle.

[0062] The IoT-based intelligent formaldehyde dispensing and control method for medical use provided in one embodiment of this application dynamically anchors user permissions to a single operation cycle during the process of collecting identity information through terminal devices and issuing dynamic session tokens through backend platforms. This enhances the binding tightness between personnel identity and liquid dispensing volume, preventing the misuse or mismatch of static permissions. By distinguishing between preset fixed volumes and custom liquid dispensing modes through the operation interface, and calculating the actual dispensing volume in real time based on the pulse signal output by the flow sensor, and dynamically adjusting the drive signal of the pump device according to the volume deviation, it can enhance the differentiated adaptation effect to different operating standards and temporary personalized liquid dispensing needs, taking into account both standardized dispensing accuracy and on-the-spot operational flexibility.

[0063] After the liquid is dispensed, the user identifier, device identifier, liquid dispensing mode, actual dispensing volume and timestamp in the dynamic session token are aggregated and reported. Combined with the multi-dimensional index construction of the backend operation log library, the difficulty of tracing the dispensing and usage behavior across terminals and time periods can be reduced, and coherent data support can be provided for subsequent audit verification and report generation.

[0064] In one embodiment, the actual dispensing volume is obtained by calculating the flow rate of the pulse signal, and the drive signal of the pumping device is adjusted according to the deviation between the actual dispensing volume and the target capacity, so that the dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity. This includes:

[0065] (1) Periodically sample the pulse signal to obtain the pulse counting sequence, and convert the pulse counting sequence into an instantaneous flow sequence according to the preset pulse-volume conversion coefficient.

[0066] For example, before performing pulse signal periodic sampling, the terminal device reads the current ambient temperature parameter collected by the built-in temperature sensor of the flow sensor, retrieves the level offset calibration value of the corresponding temperature range preset in the non-volatile storage area, corrects the baseline level of the pulse signal, and eliminates pulse edge recognition errors caused by ambient temperature drift. Then, it counts the number of valid pulse rising edges within a single sampling period, and arranges the pulse counts acquired in multiple consecutive sampling periods in chronological order to obtain the original pulse count sequence.

[0067] To suppress spike pulses caused by electromagnetic interference, the terminal device performs sliding window mean filtering on the original pulse count sequence to generate a smoothed pulse count sequence, thereby eliminating the impact of transient disturbances on the accuracy of flow integration. The formula for calculating the smoothed pulse count sequence is as follows:

[0068]

[0069] In the formula, Indicates the first The elements of the smooth pulse count sequence after filtering each sampling period are physically represented by the cumulative number of pulses per unit time, with the unit being Hertz (Hz). This indicates the length of the moving average window, which physically means the number of consecutive sampling points involved in the mean calculation; Indicates the first The original pulse count sequence element of each sampling period has the physical meaning of the number of original pulses per unit time, and the unit is Hertz (Hz).

[0070] The above filtering process is based on the continuity of fluid flow due to inertia, while circuit noise is mostly random transient signals. By processing the arithmetic mean in the time domain, high-frequency spikes can be filtered out while retaining the effective flow trend.

[0071] The terminal device retrieves the pulse-to-volume conversion coefficients pre-stored in the non-volatile storage area, verifies the validity of these coefficients, and determines whether they fall within the factory-calibrated valid threshold range. If the verification passes, the coefficients are retrieved and used; if the verification fails, the device automatically switches to the backup calibration coefficients and sends a coefficient anomaly alert to the backend platform. Then, the smoothed pulse count sequence is multiplied by the pulse-to-volume conversion coefficients, and combined with a fixed sampling period, the discrete pulse frequencies are mapped to the instantaneous volumetric flow rate for the corresponding time period, generating an instantaneous flow rate sequence. The formula for calculating the instantaneous flow rate sequence is:

[0072] In the formula, Indicates the first The instantaneous flow rate sequence element corresponding to each sampling period has the physical meaning of the fluid volume passing through per unit time, and the unit is cubic meters per second (m³ / s). The aforementioned smoothed pulse count is given in Hertz (Hz). is the pulse-to-volume conversion coefficient, which physically represents the fluid volume corresponding to a single pulse, with units of cubic meters per pulse (m³ / pulse); n represents the index of the current sampling period.

[0073] (2) Perform time-accumulated integration on the instantaneous flow sequence to obtain the actual disbursement volume.

[0074] For example, during the time-dimensional cumulative integration calculation of the instantaneous flow sequence, the terminal device simultaneously monitors the matching between the pulse signal and the operating status of the pumping device. If a logical conflict occurs where the pulse count reaches zero for multiple consecutive sampling cycles but the pumping device is still in the enabled state, the integration calculation is immediately paused and a pipeline fault alarm is triggered. In the absence of abnormalities, the product of all instantaneous flow values ​​from the pumping device startup time to the current time and the sampling cycle duration is accumulated to calculate the total volume flowing through the liquid path, thus obtaining the actual dispensing volume.

[0075] (3) Calculate the volume deviation between the actual dispensing volume and the target capacity, and generate the flow adjustment increment for adjusting the drive duty cycle of the pump device based on the volume deviation and the preset flow adjustment step size.

[0076] For example, the terminal device retrieves the target volume value corresponding to the current liquid dispensing process, performs calculations between the actual dispensing volume and the target volume value, and obtains the volume deviation between the two. After obtaining the deviation, the terminal device predicts the trend of the deviation. If the deviation shows a stable decreasing trend for several consecutive cycles and the rate of change conforms to the inherent response characteristics of the micro peristaltic pump, the proportional adjustment strategy is maintained; if the deviation shows a reverse increasing trend, it is determined that the pipeline is blocked and the adjustment process is suspended. Based on the verified deviation data, the terminal device generates the flow adjustment increment according to the preset proportional control law.

[0077] The above steps use proportional control instead of complex PID control. The physical basis for this is that formaldehyde liquid is a rigid incompressible fluid and the micro peristaltic pump has a fast response characteristic. Introducing a derivative term is easily affected by flow pulse noise, while an integral term can easily lead to system overshoot and overflow. Simple proportional adjustment is sufficient to achieve high-precision approximation while ensuring system stability.

[0078] (4) The flow rate adjustment increment is added to the current drive duty cycle, and the pump is driven by the adjusted drive duty cycle.

[0079] For example, after reading the current drive duty cycle value used to control the pumping device, the terminal device performs ramping processing on the generated flow regulation increment, gradually adjusting the current duty cycle according to a preset slope to avoid the pumping device's starting current surge caused by sudden duty cycle changes, thus extending the hardware's lifespan. Then, the processed flow regulation increment is calculated with the current drive duty cycle value to generate an updated drive duty cycle value. The terminal device uses this updated value to reconstruct the duty cycle parameters of the pulse width modulation wave and outputs the adjusted drive signal through the hardware interface to change the average operating voltage of the pumping device, thereby achieving flow regulation. The formula for calculating the adjusted drive duty cycle is:

[0080] In the formula, This indicates the adjusted drive duty cycle, which physically means the proportion of the high-level duration within one cycle to the total cycle. Indicates the current drive duty cycle; This indicates the maximum allowable drive duty cycle of the pumping device, which is determined by the hardware electrical characteristics. This indicates the flow rate adjustment increment generated based on the volume deviation; The amplitude limiting function is based on a hardware protection mechanism to prevent the output voltage from exceeding the motor's rated voltage or falling below the starting voltage, ensuring that the drive signal is always within the physically feasible range.

[0081] The physical basis of the above steps is the principle of electrical machinery. The speed of a DC motor is approximately proportional to the supply voltage, while the duty cycle of pulse width modulation determines the average output voltage.

[0082] (5) When the absolute value of the difference between the actual dispensing volume and the target capacity falls within the tolerance range, a pump stop control signal is generated and the drive signal to the pumping device is stopped to terminate the dispensing.

[0083] For example, the terminal device continuously monitors the absolute value of the difference between the actual dispensing volume and the target capacity, and makes a real-time determination on this value. When it detects that the absolute value has decreased and fallen within a preset tolerance threshold range, it does not immediately cut off the drive signal. Instead, it delays for a preset mechanical inertia compensation period, waiting for the residual fluid in the pipeline to completely stop before generating a logic high-level pump stop control signal to eliminate overcharging errors caused by fluid inertia. Finally, it forcibly cuts off the power supply to the pumping device, terminates the dispensing action, and outputs the execution result of terminating dispensing.

[0084] The above-mentioned judgment logic is based on the error band control theory, which allows the system to stop working within a very small neighborhood near the target value, thus avoiding repeated start-stop phenomena caused by quantization errors or mechanical inertia.

[0085] like Figure 2As shown, the pulse counting sequence is converted into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient, including:

[0086] S201: Perform sliding window filtering on the pulse counting sequence to obtain a smooth pulse sequence.

[0087] For example, the terminal device performs sliding window filtering preprocessing on the pulse counting sequence, extracts the pulse count values ​​from multiple consecutive sampling periods prior to the current sampling time, constructs a data sampling window of a set duration, performs an arithmetic average operation on the discrete values ​​within the window, filters out sudden noise caused by electromagnetic interference, and outputs a smooth pulse sequence with continuous waveform.

[0088] S202: Identify the effective pulse edges in the smooth pulse sequence, count the number of effective pulse edges per unit time, and obtain the effective pulse frequency.

[0089] For example, the terminal device performs digital edge detection on a smooth pulse sequence, sets a dynamic comparison threshold based on the statistical characteristics of historical pulse amplitudes, compares the values ​​of each sampling point in the smooth pulse sequence with this dynamic comparison threshold point by point, identifies pulse rising edges exceeding the threshold as valid pulse edges, excludes invalid narrow pulses caused by sensor jitter, and counts the cumulative number of valid pulse edges within a unit sampling period to obtain the valid pulse frequency. The formula for calculating the valid pulse frequency is as follows:

[0090]

[0091] In the formula, Indicates the first The effective pulse frequency identified in each sampling period is physically defined as the number of effective pulse oscillations per unit time, and its unit is Hertz (Hz). Indicates the first The smoothed pulse sequence elements corresponding to each sampling period are in Hertz (Hz). This represents the fixed duration of a single sampling period, measured in seconds (s).

[0092] The physical basis of the above steps is the working principle of photoelectric or Hall sensors. When the fluid flows through the sensor impeller, it drives the magnet to rotate. Each time the magnetic lines of force are cut, a pulse edge is generated. The pulse frequency directly reflects the instantaneous flow rate of the fluid.

[0093] S203: Multiply the effective pulse frequency by the preset pulse-to-volume conversion coefficient to obtain the instantaneous flow rate sequence.

[0094] For example, the terminal device retrieves the pulse-to-volume conversion coefficient pre-stored in the non-volatile storage area. This coefficient is the calibration parameter obtained by the flow sensor through metrological verification under a standard calibration environment. The effective pulse frequency is multiplied by the pulse-to-volume conversion coefficient to convert the physical signal in the dimension of frequency into engineering data in the dimension of volumetric flow rate, thereby generating an instantaneous flow rate sequence characterizing the current fluid flow rate.

[0095] In one embodiment, sending an authentication request to a backend platform for authentication to obtain a dynamic session token returned by the backend platform includes:

[0096] (1) Send the authentication request to the backend platform so that the backend platform can perform time validity verification on the current timestamp carried in the authentication request and perform uniqueness verification on the single random string carried in the authentication request.

[0097] For example, the terminal device sends the encapsulated authentication request to the backend platform via a secure transmission channel. The backend platform parses the network protocol header of the authentication request, extracts the current timestamp carried in the authentication request, synchronously retrieves the system reference timestamp generated by the local atomic clock source of the backend platform, calculates the absolute value of the difference between the current timestamp and the system reference timestamp, and compares this absolute value with a preset timeliness threshold. If the absolute value of the difference is less than or equal to the timeliness threshold, the authentication request is determined to be within a valid time window, and a timeliness verification result is output. If the verification fails, the authentication request is discarded and an exception log is recorded. The calculation formula for the timestamp deviation verification is as follows:

[0098]

[0099] In the formula, This represents the absolute value of the difference between the current timestamp and the system reference timestamp, in seconds (s). This indicates the current timestamp carried in the authentication request header, in seconds (s). This represents the system reference timestamp generated by the local atomic clock source on the backend platform, in seconds (s). This represents the preset time threshold, measured in seconds (s). Physically, it represents the maximum round-trip delay time allowed for a request to be transmitted over the network.

[0100] The physical basis of the above calculation lies in the defense against replay attacks and time window drift. By limiting the effective lifespan of requests, it ensures that data packets are not maliciously intercepted and used in a delayed manner.

[0101] After the timeliness verification passes, the backend platform extracts the single random string encapsulated in the authentication request payload. Using this single random string as a search key, it performs a full-field matching query in the recently processed request record table maintained by the backend platform to check if there is a record with the exact same string. If no match is found, the single random string is determined to be unique. At the same time, the single random string and its associated receiving timestamp are written to the recently processed request record table to update the record, and the aging timer for the record in the table is started. The uniqueness verification result is output. If a match is found, it is determined to be a replay attack and the connection is blocked.

[0102] (2) After the timeliness and uniqueness verification are both passed, the backend platform uses the private key paired with the asymmetric public key to decrypt the encrypted authentication data in the authentication request, obtains the decryption result, and performs feature matching between the decryption result and the registration templates pre-stored in the user database.

[0103] For example, after the timeliness and uniqueness verifications pass, the backend platform retrieves the private key paired with the asymmetric public key, which is pre-stored in the hardware security unit. It then uses a predefined asymmetric decryption algorithm to perform a modular exponentiation on the encrypted authentication data in the authentication request, restoring the original plaintext user biometric vector. This biometric vector is output as the decryption result to the memory security area, and intermediate operation variables within the hardware security unit are immediately cleared to prevent side-channel leakage. The expression for the asymmetric decryption operation is as follows:

[0104]

[0105] In the formula, This represents the original plaintext user biometric vector after decryption, which physically means a high-dimensional numerical matrix describing the user's physiological characteristics (such as finger vein patterns or facial feature points). This refers to the asymmetric encryption private key pre-stored within the hardware security module of the backend platform. Physically, it means a decryption key string that is held only by the backend platform and is physically protected. This refers to the encrypted authentication data carried in the authentication request, which physically means a block of ciphertext data encrypted using the backend platform's public key on the terminal device side. This represents an asymmetric decryption function operator executed using a private key, typically implemented using RSA or elliptic curve cryptography algorithms.

[0106] The physical basis of the above operation is the public key infrastructure principle. Only the server holding the corresponding private key can decipher the information encrypted by the public key, thus ensuring the confidentiality of data transmission.

[0107] The backend platform loads the user's biometric vector from the decryption result into the feature matching engine. It locates the pre-stored registration template bound to the user's identity in the user database, calculates the Euclidean distance between the biometric vector and the registration template, and compares this Euclidean distance value with a preset identity matching threshold. If the Euclidean distance value is less than or equal to the identity matching threshold, the feature match is considered successful, confirming the user's legitimacy, and the memory resources occupied by the feature matching engine are released. The formula for feature matching is as follows:

[0108]

[0109] In the formula, This represents the Euclidean distance in the feature space between the decrypted biometric vector and the pre-stored registration template. The smaller the value, the higher the similarity. The resulting biometric vector is obtained through decryption. Represents the first in the biological feature vector One eigenvalue; This indicates the first one in the pre-stored registration template. One eigenvalue; This represents the total dimension of the feature vector; This is a preset identity matching threshold used to define the acceptable limits for biometric similarity.

[0110] The physical basis of the above operation is pattern recognition theory, which measures the similarity of samples by calculating the vector spacing in a multidimensional feature space, thereby achieving identity verification.

[0111] (3) After successful feature matching, the backend platform generates a dynamic session token carrying the user's identity identifier, role permissions, token validity period and token unique number, and returns the dynamic session token to the terminal device.

[0112] For example, after successful feature matching, the backend platform calls a random number generator to create a globally unique token identifier. Combining the decrypted user identity identifier, the role permissions retrieved from the permission configuration table, and the token validity period calculated based on the current system time, the platform constructs the original data structure of the dynamic session token. The platform then uses its private key to digitally sign the original data structure, generating the final dynamic session token. The dynamic session token is then encapsulated into an encrypted response message and sent back to the terminal device via a secure transmission channel. The terminal device receives and parses the response message, extracts the dynamic session token, and stores it in a protected memory area.

[0113] In one embodiment, an index is built on the operation log repository to support multi-dimensional traceability queries and report generation, including:

[0114] (1) Extract the user identifier field, device identifier field and time identifier field of each operation record from the operation log stored in the operation log library.

[0115] For example, the backend platform performs field integrity checks on all persistent operation records in the operation log library. It iterates through the data structure of each operation record, locates the user identifier field, device identifier field, and time identifier field at a fixed offset position in each operation record, checks the non-empty value and format compliance of the three fields, removes dirty data records with missing fields or abnormal formats, and temporarily stores the values ​​of each field that pass the check to a temporary cache queue according to the original record ownership relationship, and outputs the cleaned field dataset.

[0116] (2) Combine the user identifier field, device identifier field and time identifier field to construct a multidimensional composite index.

[0117] For example, the backend platform retrieves the cleaned field dataset from the temporary cache queue, concatenates the user identifier field value, device identifier field value, and time identifier field value corresponding to the same operation record into a composite key string in a preset fixed order, performs a predefined consistent hash operation on the composite key string to generate a fixed-length index key value, establishes a one-to-one mapping relationship between the index key value and the physical storage address of the corresponding operation record, batch constructs an ordered B+ tree storage structure for the index key values, and outputs a multi-dimensional composite index structure.

[0118] Among them, the query time complexity of B+ tree index is logarithmic, which supports efficient single-value query and range query, and is suitable for multi-dimensional traceability scenarios.

[0119] (3) Based on multidimensional composite index, respond to traceability queries for users, devices or time periods, retrieve the corresponding operation records and generate consumption statistics reports or usage ranking reports.

[0120] For example, the backend platform receives an externally triggered traceability query request, parses the query dimension identifier and filter condition range carried in the request payload, retrieves the constructed multi-dimensional composite index structure, maps the filter conditions to the matching rules of index key values, performs a range scan or matching search of index key values ​​in the B+ tree storage structure, locates all index key values ​​that meet the filter conditions, and retrieves the corresponding original operation record datasets in batches according to the mapping relationship between index key values ​​and the physical storage address of operation records, and outputs the matching query result set.

[0121] The backend platform will populate the matched query result set in a structured manner according to the preset report template. If the query request is for consumption statistics, it will perform an accumulation operation on the actual distribution volume field of each record in the query result set to generate a consumption statistics report. If the query request is for usage ranking, it will group the query result set by user identifier or device identifier, sort the total actual distribution volume of each group in descending order, extract the sorted result part that meets the preset quantity requirements to generate a usage ranking report, and encapsulate the generated report into a visual file for output.

[0122] In one embodiment, obtaining user identity information through a terminal device and generating an authentication request based on the user identity information includes:

[0123] (1) The terminal device collects the user's finger vein image, performs liveness detection on the finger vein image and obtains the biological feature vector through feature extraction.

[0124] For example, the terminal device drives the built-in near-infrared supplementary light circuit to illuminate the fingertip tissue into the acquisition area, and acquires the image of the finger vein shadow after penetrating the fingertip tissue through the CMOS image acquisition circuit to obtain the original finger vein grayscale image frame. The original finger vein grayscale image frame is then subjected to adaptive histogram equalization processing to enhance the contrast between the blood vessels and the background.

[0125] The terminal device uses a texture feature extraction algorithm based on Gabor filters to calculate the phase response value of the blood vessel direction pixel by pixel. The continuously distributed phase response values ​​are mapped and quantized into a fixed-dimensional floating-point array to obtain a biometric vector. At the same time, Fourier spectrum analysis is performed on the original finger vein grayscale image frame to detect whether the high-frequency noise components conform to the random texture distribution characteristics of living biological tissue. If they do not conform, it is determined to be a non-living forgery medium attack and the process is terminated. If they conform, the liveness detection is confirmed to be successful.

[0126] (2) Use the server’s asymmetric public key to encrypt the biometric vector to obtain encrypted authentication data.

[0127] For example, the terminal device retrieves the server's asymmetric public key pre-installed in its local non-volatile storage area. This public key is a legitimate public key downloaded and stored from the backend platform during the terminal device's initial network registration. Using the RSA-OAEP padding scheme encryption algorithm, the binary serialized data of the biometric vector is taken as input, and the server's asymmetric public key is used to perform modular exponentiation encryption to generate a fixed-length ciphertext data block, which is the encrypted authentication data. During the encryption process, a padding random factor that conforms to cryptographic security specifications is generated simultaneously. The padding random factor is bound to the ciphertext data block for storage to prevent chosen-plaintext attacks.

[0128] (3) Assemble the encrypted authentication data with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0129] For example, the terminal device retrieves the device identifier embedded in the local one-time programmable storage area. The device identifier is a unique hardware code burned at the factory. It reads the current timestamp output by the real-time clock circuit of the terminal device, calls the cryptographically secure pseudo-random number generator to generate a single random string. The length of the single random string meets the random number generation requirements of the cryptographic security specification. According to the predefined TLV encoding rules, the encrypted authentication data, device identifier, current timestamp, and single random string are sequentially encapsulated into a continuous bit stream. After adding the protocol version number and cyclic redundancy check field, a complete authentication request is obtained.

[0130] In one embodiment, obtaining user identity information through a terminal device and generating an authentication request based on the user identity information includes:

[0131] (1) The terminal device collects the user's face image, performs liveness detection on the face image and obtains the biometric vector through feature extraction.

[0132] For example, the terminal device drives the built-in visible light image acquisition module to align with the user's facial area and acquire RGB face image frames containing complete facial contours. The RGB face image frames are then geometrically corrected and normalized to eliminate feature interference caused by tilted shooting angles and uneven local illumination. Subsequently, liveness feature analysis is performed on the face image frames to detect the continuity of blinking, natural changes in head posture, and the diffuse reflectance spectrum distribution of the skin surface. If the image frame is detected to originate from a static photograph, electronic screen reproduction medium, or 3D printed mask, the authentication process is immediately terminated. If all liveness features match the biological characteristics of a natural human face, a pre-trained deep convolutional feature extraction network is invoked to map the pre-processed face image frames into a fixed-dimensional floating-point feature array to obtain a biometric feature vector.

[0133] (2) Use the server’s asymmetric public key to encrypt the biometric vector to obtain encrypted authentication data.

[0134] For example, the terminal device retrieves the server's asymmetric public key pre-installed in the local trusted execution environment. This public key is a legitimate public key that is securely issued and stored by the backend platform during the terminal device's initial network registration phase. It uses the SM2 public key encryption algorithm that conforms to the national cryptographic standard, takes the binary serialized data stream of the biometric vector as input, and performs a modular multiplication operation with the cryptographically secure random padding factor generated during the encryption process to generate a fixed-length ciphertext data block, thus obtaining encrypted authentication data. The random padding factor generated during the encryption process is bound to the ciphertext data block for storage to resist the risk of chosen-plaintext attacks.

[0135] (3) Assemble the encrypted authentication data with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0136] For example, the terminal device reads the device identifier embedded in the local one-time programmable storage area. The device identifier is a unique hardware serial number burned into the terminal device during the manufacturing process. It synchronously retrieves the current timestamp output by the real-time clock circuit and calls a cryptographically secure pseudo-random number generator to generate a single random string. The single random string is a one-time random byte sequence that is only valid for the current authentication process. According to the predefined TLV type length value encoding rules, the encrypted authentication data, device identifier, current timestamp, and single random string are sequentially encapsulated into a continuous bit stream. After adding the protocol version field and the cyclic redundancy check field, a complete authentication request is obtained.

[0137] In one embodiment, before sampling the pulse signal, the terminal device reads the current liquid temperature parameter collected by the built-in temperature sensor of the flow sensor, retrieves the pre-stored formaldehyde dynamic viscosity-temperature mapping table, and calculates the correction coefficient of the formaldehyde dynamic viscosity at the current temperature relative to the calibration temperature. Based on this correction coefficient, the terminal device performs temperature compensation correction on the preset pulse-to-volume conversion coefficient to obtain a dynamic pulse-to-volume conversion coefficient adapted to the current operating conditions, eliminating flow measurement deviations caused by fluid viscosity fluctuations due to temperature changes. The correction formula for the dynamic pulse-to-volume conversion system is as follows:

[0138]

[0139] In the formula, Indicates the current temperature The dynamic pulse-to-volume conversion factor is expressed in cubic meters per pulse (m³ / pulse). Indicates the calibrated temperature The reference pulse-volume conversion factor is expressed in cubic meters per pulse (m3 / pulse). Indicates the current temperature The dynamic viscosity of formaldehyde, measured in Pascal-seconds (Pa). s); Indicates the calibrated temperature The dynamic viscosity at the specified value is expressed in Pascal-seconds (Pa). s); This represents the temperature-viscosity coupling compensation coefficient; This indicates the reference temperature calibrated by the sensor at the factory, in degrees Celsius (°C).

[0140] The physical basis for the above correction is the principle of fluid mechanics. As a Newtonian fluid, formaldehyde's dynamic viscosity decreases approximately linearly with increasing temperature, which directly affects the linear relationship between impeller speed and flow rate. The conversion coefficient needs to be corrected in real time to maintain metering accuracy.

[0141] Meanwhile, the terminal equipment abandons the original pure proportional control logic and adopts a piecewise PID control strategy with integral separation to cope with the physical inertia of the liquid circuit. When the volume deviation is greater than the preset fast adjustment threshold, the terminal equipment only activates the proportional control term to quickly approach the target capacity with a large flow output; when the volume deviation falls between the fast adjustment threshold and the integral separation threshold, the terminal equipment introduces the integral control term to eliminate steady-state error and simultaneously sets an anti-integral saturation upper limit to prevent the control quantity from exceeding the limit; when the volume deviation is less than the integral separation threshold, the terminal equipment shuts down the integral term and only retains a small proportional fine-tuning term for fine correction.

[0142] Furthermore, after determining that the difference between the actual dispensing volume and the target capacity falls within the preset tolerance range, the terminal device does not immediately cut off the drive signal. Instead, it matches the corresponding mechanical inertia compensation delay based on the current dynamic viscosity of formaldehyde. After the residual fluid in the pipeline has completely stopped under the action of viscous resistance, it generates a pump stop control signal and sends it to the pumping device. This completely eliminates the overfilling error caused by fluid inertia and pipe wall adhesion effect, and outputs the execution result of terminating the dispensing.

[0143] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0144] In one embodiment, such as Figure 3 As shown, this application also provides an IoT-based intelligent medical formaldehyde dispensing and control system 300, which includes:

[0145] The identity authentication and authorization module 301 is used to obtain user identity information through the terminal device, generate an authentication request based on the user identity information, send the authentication request to the backend platform for identity verification, obtain the dynamic session token returned by the backend platform, and establish an authorization session based on the dynamic session token.

[0146] The interactive pump control module 302 is used to present an operation interface based on an authorized session. It receives user selection instructions for preset fixed capacity or custom dispensing mode through the operation interface. Based on the selection instructions, it starts the pump device and collects the pulse signal output by the flow sensor set in the liquid path in real time. It calculates the flow rate of the pulse signal to obtain the actual dispensing volume, and adjusts the drive signal of the pump device according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity.

[0147] The data traceability and reporting module 303 is used to extract the user identity identifier from the dynamic session token after the liquid dispensing is terminated. The user identity identifier is aggregated with the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object. The operation record data object is then reported to the backend platform through an encrypted channel along with the dynamic session token. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log library and builds an index on the operation log library to support multi-dimensional traceability queries and report generation.

[0148] Specifically, the terminal device includes an identity authentication and authorization module 301, an interactive pump control module 302, and a data traceability and reporting module 303.

[0149] The identity authentication and authorization module collects the user's biometric image, performs liveness detection on the biometric image, and extracts a biometric vector through feature extraction. This biometric vector is then encrypted using a pre-set server asymmetric public key to obtain encrypted authentication data. The identity authentication and authorization module then retrieves the device identifier stored in the local one-time programmable storage area, reads the current timestamp output by the real-time clock circuit, and calls a cryptographically secure pseudo-random number generator to generate a single random string. Finally, the encrypted authentication data, device identifier, current timestamp, and the single random string are encapsulated into an authentication request according to predefined encoding rules.

[0150] The identity authentication and authorization module sends the authentication request to the backend platform via a secure transmission channel. After the backend platform completes the timeliness verification of the authentication request, the uniqueness verification of the single random string, the decryption operation of the encrypted authentication data, and the feature matching process with the pre-stored registration template, the identity authentication and authorization module receives the dynamic session token returned by the backend platform, which carries the user's identity identifier, role permissions, token validity period, and token unique number. Based on the dynamic session token, a controlled authorization session environment is built, and the activity of the authorization session is continuously maintained until the token expires or the user actively cancels the session, and the established authorization session is output.

[0151] Based on the established authorized session, the interactive pump control module activates the touch display component and loads the interactive interface, presenting preset fixed capacity options and custom dispensing mode entries. It captures user-triggered selection commands and parses the corresponding target capacity parameters. The interactive pump control module then drives the pump device into operation and simultaneously wakes up the flow sensors deployed in the liquid path to capture pulse signals in real time. It performs sliding window filtering on the pulse signals to remove interference noise, identifies the effective pulse edges in the filtered signal, counts the number of pulses per unit period, and maps the pulse count to an instantaneous flow sequence.

[0152] The interactive pump control module performs a time-dimensional cumulative integral calculation on the instantaneous flow rate sequence to obtain the actual dispensing volume. It then calculates the volume deviation between this actual dispensing volume and the target capacity, generates a drive signal adjustment based on the direction and magnitude of the deviation, and adds this adjustment to the current drive duty cycle to correct the pump's output power. The interactive pump control module continuously monitors the convergence trend of the actual dispensing volume. When the difference between the actual dispensing volume and the target capacity falls within a preset tolerance range, it generates a pump stop control signal and sends it to the pump to cut off the fluid flow. After the fluid in the fluid flow completely stops, the final actual dispensing volume value is solidified, and the execution result of terminating dispensing is output.

[0153] After completing the liquid dispensing action, the data tracing and reporting module parses the internal payload of the dynamic session token to extract the user's identity identifier. At the same time, it retrieves the device identifier stored in the local non-volatile storage area and associates it with the liquid dispensing mode corresponding to the selected instruction cached during this interaction, the actual dispensing volume confirmed by calculation, and the operation completion timestamp generated by the system clock.

[0154] The data tracing and reporting module encapsulates and concatenates the aforementioned fields according to a predefined data structure to construct an operation record data object. Then, it calls the built-in encrypted transmission channel to bind the operation record data object with a dynamic session token, encapsulates it into a reporting data packet, and pushes it to the backend platform. The data tracing and reporting module continuously listens to the network communication port. Once it receives a successful signal from the backend platform confirming that the operation record has been stored in the operation log database and that the multi-dimensional composite index has been successfully constructed, it outputs a confirmation message indicating successful reporting.

[0155] The interactive pump control module 302 is also used for:

[0156] The pulse signal is periodically sampled to obtain a pulse counting sequence, and the pulse counting sequence is converted into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient.

[0157] The actual disbursement volume is obtained by performing time-cumulative integration on the instantaneous flow sequence;

[0158] Calculate the volume deviation between the actual dispensing volume and the target capacity, and generate the flow adjustment increment for adjusting the drive duty cycle of the pump device based on the volume deviation and the preset flow adjustment step size.

[0159] The flow rate adjustment increment is added to the current drive duty cycle, and the pumping device is driven by the adjusted drive duty cycle;

[0160] When the absolute value of the difference between the actual dispensing volume and the target capacity falls within the tolerance range, a pump stop control signal is generated, and the drive signal to the pumping device is stopped to terminate the dispensing.

[0161] The interactive pump control module 302 is also used for:

[0162] A smooth pulse sequence is obtained by applying a sliding window filter to the pulse counting sequence;

[0163] Identify the effective pulse edges in a smooth pulse sequence, count the number of effective pulse edges per unit time, and obtain the effective pulse frequency;

[0164] The instantaneous flow rate sequence is obtained by multiplying the effective pulse frequency by the preset pulse-to-volume conversion coefficient.

[0165] The identity authentication and authorization module 301 is also used for:

[0166] The authentication request is sent to the backend platform so that the backend platform can perform time validity verification on the current timestamp carried in the authentication request and perform uniqueness verification on the single random string carried in the authentication request.

[0167] After both the timeliness and uniqueness verifications pass, the backend platform uses the private key paired with the asymmetric public key to decrypt the encrypted authentication data in the authentication request, obtains the decryption result, and performs feature matching between the decryption result and the pre-stored registration template in the user database.

[0168] After successful feature matching, the backend platform generates a dynamic session token carrying the user's identity identifier, role permissions, token validity period, and token unique number, and returns the dynamic session token to the terminal device.

[0169] The data traceability and reporting module 303 is also used for:

[0170] Extract the user identifier field, device identifier field, and time identifier field from the operation records stored in the operation log database;

[0171] Combine the user identifier field, device identifier field, and time identifier field to construct a multi-dimensional composite index;

[0172] Based on multidimensional composite indexes, the system responds to traceability queries targeting users, devices, or time periods, retrieves the corresponding operation records, and generates consumption statistics reports or usage ranking reports.

[0173] The identity authentication and authorization module 301 is also used for:

[0174] The terminal device collects the user's finger vein images, performs liveness detection on the finger vein images, and obtains biometric vectors through feature extraction;

[0175] The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data;

[0176] The encrypted authentication data is assembled with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0177] The identity authentication and authorization module 301 is also used for:

[0178] The terminal device collects the user's facial image, performs liveness detection on the facial image, and obtains a biometric vector through feature extraction;

[0179] The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data;

[0180] The encrypted authentication data is assembled with the device identifier stored locally on the terminal device, the current timestamp, and a single random string generated by the terminal device to form an authentication request.

[0181] In one embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0182] In one embodiment, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0183] In one embodiment, the liquid retrieval operation can be performed by logging in using any of the following four methods: 1. face, 2. fingerprint, 3. password, 4. IC card.

[0184] After entering the user interface, click "Corresponding Required Capacity" or click "Start". Dispense liquid from the dispensing port below. Click the corresponding capacity (e.g., 25ml). The machine will automatically stop dispensing after the system has dispensed 25ml. If you click "Start" (this is for custom capacity) and fill the container with liquid, you need to click "Stop" for the machine to stop dispensing. After the operation is complete, please click "Return" to return to the main interface.

[0185] I. Product Features:

[0186] 1. Multi-dimensional identity authentication: Supports multiple login methods such as finger vein, IC card, face recognition, and account password. It has hierarchical access control, and unauthorized use is prohibited, ensuring a high level of security.

[0187] 2. Precise quantitative liquid dispensing: Supports dispensing at fixed volumes (500ml / 200ml / 150ml, etc.) and custom volumes. The system automatically controls the pump, ensuring high precision and avoiding waste and excessive contact.

[0188] 3. Full-process data traceability: Completely records data such as user, time of use, and capacity of use, with accurate timestamp recording, and supports multi-dimensional query and report export in the backend.

[0189] 4. High-definition touch screen for easy operation: Equipped with a high-definition capacitive touch screen, the interface is intuitive and simple, and operators can quickly get started without professional training.

[0190] 5. Corrosion-resistant and safety design: In view of the characteristics of formalin liquid, the pipeline and outlet are made of corrosion-resistant materials to ensure the safety of the operating environment.

[0191] 6. Strong stability and compatibility: Adopting industrial-grade hardware configuration, the system runs smoothly, supports deployment on internal and external networks, and provides multiple communication methods such as WiFi and LAN.

[0192] 7. Scenario-adaptive design: Bottom casters facilitate movement and positioning.

[0193] II. Specifications

[0194]

[0195] III. Usage Environment and Precautions

[0196] (a) Usage Environment

[0197] 1. Operating temperature: -20℃~60℃. Avoid prolonged exposure to high temperatures and direct sunlight.

[0198] 2. Operating humidity: 5%~95% RH (non-condensing), avoid humid, water-accumulated, and spray-dripping environments;

[0199] 3. Storage conditions: Storage temperature -40℃~70℃, suitable storage humidity, avoid violent vibration;

[0200] 4. Applicable scenarios: Indoor medical environment in hospitals, away from strong electromagnetic interference, water sources, and sharp objects.

[0201] (II) Precautions

[0202] 1. Before powering on, check the power supply voltage and wiring specifications. Only power on after confirming that everything is correct to avoid circuit failure.

[0203] 2. Place the cabinet stably, and take precautions against moisture and dirt to protect electrical interfaces, network cables and charging interfaces. Keep the touch areas clean and do not scratch them with hard objects.

[0204] 3. Avoid dirt and physical damage to the facial recognition camera, finger vein recognition area, and IC card recognition area;

[0205] 4. Avoid obstructing the antenna and network module with metal to ensure a stable WiFi / Ethernet connection;

[0206] 5. Non-professionals are prohibited from disassembling the cabinet, electric lock, and internal electronic components. Equipment upgrades will not be notified separately.

[0207] 6. Avoid frequent forced power cycles and regularly clean up background logs to prevent excessive storage usage from causing system lag;

[0208] 7. Regularly check the pump fluid accuracy, outlet pipeline, sealing performance, and door lock status;

[0209] 8. The liquid level in the storage tank should be checked regularly and formalin should be added in time to prevent dry suction from damaging the pump body.

[0210] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0211] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. An IoT-based intelligent dispensing and control method for medical formaldehyde, characterized in that: The method includes: The system obtains user identity information through a terminal device, generates an authentication request based on the user identity information, sends the authentication request to the backend platform for identity verification, obtains a dynamic session token returned by the backend platform, and establishes an authorized session based on the dynamic session token. An operation interface is presented based on the authorized session. The operation interface receives the user's selection command for a preset fixed capacity or a custom liquid dispensing mode. Based on the selection command, the pump device is started and the pulse signal output by the flow sensor set in the liquid path is collected in real time. The flow rate of the pulse signal is calculated to obtain the actual dispensing volume. The drive signal of the pump device is adjusted according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity. After the liquid dispensing is terminated, the user identity identifier is extracted from the dynamic session token. The user identity identifier, the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selection instruction, the actual dispensing volume, and the operation completion timestamp are aggregated into an operation record data object. The operation record data object, carrying the dynamic session token, is reported to the backend platform through an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log database and builds an index on the operation log database to support multi-dimensional traceability queries and report generation.

2. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 1, characterized in that, The step of calculating the actual dispensing volume from the pulse signal and adjusting the drive signal of the pumping device based on the deviation between the actual dispensing volume and the target capacity, so that the dispensing volume reaches the tolerance range of the target capacity, includes: The pulse signal is periodically sampled to obtain a pulse counting sequence, and the pulse counting sequence is converted into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient. The actual disbursement volume is obtained by performing a time-cumulative integral on the instantaneous flow sequence; Calculate the volume deviation between the actual dispensing volume and the target capacity, and generate a flow adjustment increment for adjusting the drive duty cycle of the pump device based on the volume deviation and a preset flow adjustment step size. The flow rate adjustment increment is added to the current drive duty cycle to drive the pumping device with the adjusted drive duty cycle; When the absolute value of the difference between the actual dispensing volume and the target capacity falls within the tolerance range, a pump stop control signal is generated, and the output of the drive signal to the pumping device is stopped to terminate the dispensing.

3. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 2, characterized in that, The step of converting the pulse counting sequence into an instantaneous flow rate sequence according to a preset pulse-to-volume conversion coefficient includes: A smooth pulse sequence is obtained by performing a sliding window filter on the pulse counting sequence; The effective pulse edges in the smoothed pulse sequence are identified, and the number of effective pulse edges per unit time is counted to obtain the effective pulse frequency. The instantaneous flow rate sequence is obtained by multiplying the effective pulse frequency by the preset pulse-to-volume conversion coefficient.

4. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 1, characterized in that, The step of sending the authentication request to the backend platform for identity verification to obtain the dynamic session token returned by the backend platform includes: The authentication request is sent to the backend platform so that the backend platform performs timeliness verification on the current timestamp carried in the authentication request and performs uniqueness verification on the single random string carried in the authentication request. After both the timeliness verification and the uniqueness verification pass, the backend platform uses the private key paired with the asymmetric public key to decrypt the encrypted authentication data in the authentication request, obtains the decryption result, and performs feature matching between the decryption result and the registration templates pre-stored in the user database. After the feature matching is successful, the backend platform generates a dynamic session token carrying the user's identity identifier, role permissions, token validity period and token unique number, and returns the dynamic session token to the terminal device.

5. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 1, characterized in that, The process of building an index on the operation log database to support multi-dimensional traceability queries and report generation includes: Extract the user identifier field, device identifier field, and time identifier field from the operation records stored in the operation log library; The user identifier field, the device identifier field, and the time identifier field are combined to construct a multidimensional composite index; Based on the multidimensional composite index, in response to traceability queries targeting users, devices, or time periods, the corresponding operation records are retrieved and consumption statistics reports or usage ranking reports are generated.

6. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 1, characterized in that, The step of obtaining user identity information through the terminal device and generating an authentication request based on the user identity information includes: The terminal device acquires the user's finger vein image, performs liveness detection on the finger vein image, and obtains a biometric vector through feature extraction; The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data; The encrypted authentication data is assembled with the device identifier, current timestamp, and a single random string generated by the terminal device stored locally to form the authentication request.

7. The IoT-based intelligent dispensing and control method for medical formaldehyde according to claim 1, characterized in that, The step of obtaining user identity information through the terminal device and generating an authentication request based on the user identity information includes: The terminal device collects the user's facial image, performs liveness detection on the facial image, and obtains a biometric vector through feature extraction; The biometric vector is encrypted using the server's asymmetric public key to obtain encrypted authentication data; The encrypted authentication data is assembled with the device identifier, current timestamp, and a single random string generated by the terminal device stored locally to form the authentication request.

8. An IoT-based intelligent medical formaldehyde dispensing and control system, characterized in that: The system includes: The identity authentication and authorization module is used to obtain user identity information through the terminal device, generate an authentication request based on the user identity information, send the authentication request to the backend platform for identity verification, obtain a dynamic session token returned by the backend platform, and establish an authorization session based on the dynamic session token. An interactive pump control module is used to present an operation interface based on the authorized session. The operation interface receives user selection instructions for preset fixed capacity or custom dispensing mode. Based on the selection instructions, the pump device is started and the pulse signal output by the flow sensor set in the liquid path is collected in real time. The flow rate of the pulse signal is calculated to obtain the actual dispensing volume. The drive signal of the pump device is adjusted according to the deviation between the actual dispensing volume and the target capacity. The dispensing is terminated after the actual dispensing volume reaches the tolerance range of the target capacity. The data traceability and reporting module is used to extract the user identity identifier from the dynamic session token after the liquid dispensing is terminated. The user identity identifier is then aggregated with the device identifier stored locally on the terminal device, the liquid dispensing mode corresponding to the selected instruction, the actual dispensing volume, and the operation completion timestamp into an operation record data object. The operation record data object, carrying the dynamic session token, is then reported to the backend platform through an encrypted channel. After the backend platform verifies the dynamic session token, it stores the operation record in the operation log database and builds an index on the operation log database to support multi-dimensional traceability queries and report generation.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the IoT-based intelligent formaldehyde release and control method for medical use as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the IoT-based intelligent formaldehyde dispensing and control method for medical use as described in any one of claims 1 to 7.