Intelligent dispensing control method and system for lyophilization bottles

CN122806375APending Publication Date: 2026-09-25SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610887785.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0007]有鉴于此,本申请提供一种冻干瓶智能配药控制方法和系统,以解决现有自动化配药系统在冻干瓶复溶过程中难以对多阶段、多变量、渐进式异常进行实时、可解释识别,并难以根据异常来源发出修正控制指令的技术问题

Benefits of technology

本申请通过基于变化率注意力的预测重构模型,实时关注变量的变化趋势,有效识别传统固定阈值法难以发现的渐进式异常和阶段性异常。利用异常评分矩阵ASM,在时间和变量维度上进行定位,提供了可解释的异常归因分析,不仅判断是否异常,还能精确定位异常发生的时间位置和变量来源。同时,建立了异常归因结果与修正控制指令的映射关系,实现了从异常告警到诊断—决策—修正控制的闭环,使系统能够根据异常来源自适应地执行降速、回退、重试等修正动作,而非简单地停机报警。最后,通过引入动态时间规整(DTW)对预测残差进行修正,有效减少了因机器人动作时间偏移导致的误报,进一步提升了异常检测结果的可靠性和系统的工程实用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122806375A_ABST
    Figure CN122806375A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of medical detection automation, in particular to a lyophilized bottle intelligent dispensing control method and system. The method is applied to an upper computer and comprises the following steps: acquiring running state data of each running variable of each actuator of a dispensing robot, including a clamping position, an execution displacement, force feedback and liquid injection flow; inputting the running state data into a pre-constructed prediction reconstruction model, predicting and reconstructing the running state data, acquiring a prediction reconstruction error for representing a deviation degree of the current running state compared with a corresponding running state under normal reconstitution; if the prediction reconstruction error is greater than or equal to a preset deviation threshold, acquiring a time position, a running variable and a corresponding actuator of the deviation occurrence, and generating a corresponding correction control instruction; and sending the correction control instruction to the dispensing robot for controlling the dispensing robot to execute a corresponding correction action, so that accurate detection, positioning and correction of a lyophilized bottle reconstitution process anomaly are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical testing automation technology, and more specifically, to a method and system for intelligent dispensing control of lyophilized bottles. Background Technology

[0002] Lyophilized reagent reconstitution is a crucial step in the in vitro diagnostic testing process. Lyophilized reagents are typically stored in powder, microsphere, or solid form. Before testing, a specified volume of solvent needs to be injected into the lyophilized vial, and the reagents are restored to a reactive state through shaking, rotary mixing, or constant-temperature incubation. The quality of this process directly affects reagent concentration, solubility, and the reliability and repeatability of subsequent test results. Based on existing research, lyophilized reagent reconstitution currently relies primarily on manual labor, resulting in low efficiency, poor consistency, and high safety risks. Furthermore, existing automated drug preparation systems are mostly designed for standardized liquid medications and lack effective real-time sensing and adaptive control capabilities for complex processes like lyophilized reagent reconstitution, which involve multivariate coupling, dynamic stage changes, and anomalous gradual evolution.

[0003] Existing manual reconstitution procedures typically include reagent identification, manual capping, reconstitution injection, mixing, and recording. Due to the thick rubber stopper inside the lyophilized vial, it is difficult to directly puncture with a standard push-button needle; if the operator forces a puncture, the needle may bend, break, or cause injury. The lyophilized vial usually has a certain negative pressure inside; improper manual capping or injection speed control can lead to powder ejection, reagent loss, environmental contamination, or reagent concentration deviations. For high-throughput detection scenarios, manual operation also presents challenges such as high labor intensity, unstable operating rhythm, easy omissions in recording, and difficulty in consistent reconstitution quality.

[0004] Existing automated drug dispensing robots are mainly used in hospital settings for centralized preparation of intravenous medications, chemotherapy drugs, antibiotics, and nutritional solutions. These systems typically use robotic arms, barcode recognition, weighing detection, and visual recognition to transfer drugs and control dosage. While these technologies can improve the automation of liquid drug dispensing, they primarily serve the handling of liquid drugs or standardized vials, with relatively fixed processes and a focus on dosage accuracy, aseptic operation, and process traceability. In contrast, the reconstitution process of powder in IVD lyophilized vials involves multiple stages, including cap treatment, rubber stopper puncture, quantitative injection, rotary mixing, and possible isothermal incubation. The physical states of each stage differ significantly, requiring real-time sensing of variables such as puncture resistance, actuator displacement, clamping position, injection flow rate, and rotation status. Existing liquid drug dispensing systems lack the ability to continuously monitor the status of these multi-stage dynamic processes. Anomaly handling usually relies on fixed rules or manual intervention, making it difficult to adapt to the gradual, coupled, and staged anomalies during the reconstitution process of lyophilized vials. Related papers also point out that existing systems have limited ability to perceive dynamic processes, lack continuous state monitoring, and rely heavily on preset rules for anomaly handling, making it difficult to achieve adaptive adjustment.

[0005] Furthermore, existing anomaly detection methods in industrial automation systems often employ fixed thresholds, single-point judgments, or simple statistical rules. For example, an alarm or shutdown is triggered when a sensor value exceeds a preset range. While these methods are simple in structure, they are insufficient for the reconstitution process of lyophilized vials. The reason is as follows: (1) The resolution process has obvious stages. The normal force, displacement, flow rate and clamping state ranges are different in different stages, and a single threshold is difficult to cover the whole process. (2) Some abnormalities are not instantaneous changes, but slow deviations, such as gradually increasing needle puncture resistance, slight fluctuations in injection flow rate, shift of clamping position, and abnormal rotational mixing state. (3) There is a coupling relationship between multiple variables. A slight change in a single variable may not be abnormal, but a combined change in multiple variables may indicate that the system has deviated from the normal state. (4) Traditional anomaly detection can only give alarm results of "abnormal / normal", and cannot explain at which stage the anomaly occurred, which execution module or variable caused it, nor can it be directly converted into executable correction control instructions. While existing deep learning-based time series anomaly detection methods can handle complex time-series data, most still focus on anomaly alerts, typically outputting overall anomaly scores or simple classification results. In engineering scenarios like drug dispensing robots, which emphasize real-time control, simply detecting anomalies is insufficient. The system also needs to know the time and location of the anomaly, the source of the variable, and the possible execution module, in order to generate corrective instructions such as slowing down, rewinding, pausing, refilling, re-clamping, and remixing. Existing research has also pointed out that current time series anomaly detection methods primarily serve monitoring and alarm scenarios, lacking sufficient support for anomaly localization accuracy, physical interpretability, and closed-loop control response, making it difficult to meet the real-time, anomaly localization, and closed-loop control requirements of IVD lyophilized reagent reconstitution processes.

[0006] Therefore, the existing technology has at least the following shortcomings: (1) There is a lack of dedicated automated execution and control processes for the reconstitution of powder in IVD lyophilized bottles, making it difficult to reliably complete continuous operations such as reagent identification, bottle cap processing, puncture and injection, rotary mixing and information recording. (2) Existing automated dispensing systems mostly use complex robotic arms or fixed process control, which makes it difficult to achieve process status perception and abnormal adaptive correction while simplifying the mechanical structure; (3) Existing rule threshold detection methods are difficult to identify gradual anomalies, local coupling anomalies and inter-stage state shifts in the reconstitution process; (4) Existing time-series anomaly detection models are mostly black-box outputs, which make it difficult to explain the source of the anomaly and cannot clearly point out the time segment, sensor variable and execution module corresponding to the anomaly; (5) There is no linkage mechanism between the existing detection results and the robot control logic. Abnormal detection results are difficult to be directly converted into executable correction instructions, which means that the system can only alarm or stop, and cannot be adjusted online. Summary of the Invention

[0007] In view of this, this application provides an intelligent dispensing control method and system for lyophilized bottles to solve the technical problem that existing automated dispensing systems have difficulty in real-time and interpretably identifying multi-stage, multi-variable, and progressive anomalies during the reconstitution process of lyophilized bottles, and in issuing corrective control commands based on the source of the anomalies.

[0008] The technical solution provided in this application is as follows: In a first aspect, this application provides an intelligent dispensing control method for lyophilized bottles, applied to a host computer, the method comprising: When the dispensing robot performs the task of reconstitution of lyophilized bottles, it acquires the operating status data of each operating variable of each actuator of the dispensing robot, including clamping position, execution displacement, force feedback, and injection flow rate; The operating status data is input into a pre-built prediction and reconstruction model to predict and reconstruct the operating status data, and the prediction and reconstruction error is obtained. The prediction and reconstruction error is used to characterize the degree of deviation of the current operating status from the corresponding operating status under normal reconstitution. If the predicted reconstruction error is greater than or equal to the preset deviation threshold, the time and location of the deviation, the running variables and the corresponding actuators are obtained, and the corresponding correction control command is generated. The correction control command is sent to the dispensing robot, and the correction control command is used to control the dispensing robot to perform corresponding correction actions.

[0009] In one possible implementation, the actuator of the medication dispensing robot includes a clamping and transport module, a clamping and rotating module, and a puncture and injection module. The acquisition of operational status data for each actuator and operational variable of the dispensing robot includes: Collect the positions of the grippers and slide of the clamping and transport module; Collect data on the clamping force, clamping position, lifting mechanism position, and rotation status of the clamping and rotating module; The system collects data on needle position, needle force feedback, real-time injection flow rate, and pump operating status from the puncture and injection module.

[0010] In one possible implementation, the operating state data is input into a pre-built prediction and reconstruction model to predict and reconstruct the operating state data, including: Calculate the rate of change characteristic of the operating status data within the sliding time window; Attention weights are calculated based on the rate of change characteristics, and the influence of the rate of change characteristics on the attention weights is adjusted using preset scaling parameters; the attention weights are used to characterize the degree of influence of the corresponding running variable and the changes in the running state of the running variable on the prediction of the running state in the next time window; The change rate features are weighted according to the attention weights, and the weighted change rate features are then dimensionality-reduced and encoded to obtain the current latent space representation. Based on the current latent space representation and combined with the latent space representation of historical windows, predict the latent space representation of the next time window; The latent space representation of the next time window is decoded and reconstructed to obtain the predicted running state data of the next time window; Obtain the actual operating status data corresponding to the next time window, and calculate the prediction reconstruction error by comparing the actual operating status data with the predicted operating status data, which serves as the basis for judging whether a deviation has occurred.

[0011] In one possible implementation, the weighting of the rate of change feature through a rate of change attention mechanism includes: Based on the current stage of the remelting task, the attention weights of the change rate features corresponding to the operating status data of each actuator are dynamically adjusted, so that the prediction and reconstruction model pays priority to the change of the operating status of the target operating variable; wherein, the target operating variable is the operating variable that directly participates in the remelting action or directly feeds back the execution result of the current action under the current stage of the remelting task.

[0012] In one possible implementation, before obtaining the time and location of the deviation, the source of the runtime variable, and the corresponding actuator, the method further includes: The Dynamic Time Warping (DTW) algorithm is used to align the current operating status data with the corresponding operating status data under normal resolution. The prediction reconstruction error is recalculated based on the aligned results; If the recalculated prediction reconstruction error is less than the preset deviation threshold, it is determined to be a normal fluctuation caused by time offset. If the recalculated prediction reconstruction error is still greater than or equal to the preset deviation threshold, it is determined to be a true deviation.

[0013] One possible implementation involves determining the time and location of the deviation, the running variables, and the corresponding actuators, including: Construct an anomaly scoring matrix, where each element in the anomaly scoring matrix represents the contribution of the corresponding time point and the running variable to the anomaly score; Based on the contribution of each time point and each operating variable in the anomaly scoring matrix to the anomaly scoring, the anomaly concentration area is determined, and based on the time interval, operating variable or combination of variables with the largest contribution, the time location of the deviation, the operating variable and the corresponding execution mechanism are determined.

[0014] In one possible implementation, the generation of correction control instructions includes: The type of abnormality is determined based on the time and location of the deviation, the operating variables, and the corresponding actuator; wherein, the type of abnormality includes at least one of the following: puncture obstruction abnormality, injection flow abnormality, clamping abnormality, cap handling abnormality, mixing abnormality, and global process abnormality. Based on the type of exception, a corresponding correction control instruction is generated from a preset exception-correction instruction mapping library.

[0015] In one possible implementation, the correction control command includes: For abnormal puncture obstruction, reduce the puncture speed, pause the puncture, retract the needle and puncture again; For abnormal injection flow, reduce the injection rate, suspend injection, and perform venting. For clamping abnormalities, re-clamp and adjust the clamping stroke; For issues with bottle cap processing, reduce the rotation speed, reverse the rotation, and try again. For abnormal mixing, extend the mixing time, reduce the rotation speed, and continue mixing. In case of global process anomalies, suspend all execution mechanisms and reset the system.

[0016] Secondly, this application provides an intelligent dispensing control system for lyophilized bottles, applied to the intelligent dispensing control system method for lyophilized bottles as described in any of the first aspects, wherein the system includes a host computer, a dispensing robot, and a slave computer; The drug dispensing robot is used to perform the task of reconstitution of lyophilized bottles and output the operating status data of each operating variable of each actuator. The operating status data includes clamping position, execution displacement, force feedback and injection flow rate. The host computer is used to acquire the operating status data, input the operating status data into a pre-built prediction and reconstruction model, predict and reconstruct the operating status data, and obtain the prediction and reconstruction error. The prediction and reconstruction error is used to characterize the degree of deviation of the current operating status from the corresponding operating status under normal reconstitution. If the prediction and reconstruction error is greater than or equal to a preset deviation threshold determined based on the distribution of normal operating status data, the corresponding operating segment is identified as a suspected deviation segment. The time location, operating variables and corresponding actuators of the deviation are determined by combining the time alignment result or the abnormal scoring matrix, and a corresponding correction control command is generated. The lower-level machine is used to receive the correction control command and control the dispensing robot to perform corresponding correction actions according to the correction control command.

[0017] In one possible implementation, the medication dispensing robot includes a clamping and transporting module, a clamping and rotating module, and a puncture and injection module; The host computer is used to collect the gripper position and slide position from the gripping and transport module, the gripping force, gripping position, lifting position and rotation status from the gripping and rotating module, and the needle position, needle force feedback, real-time injection flow rate and pump operating status from the puncture and injection module.

[0018] Compared with the prior art, the technical solution provided in this application has the following beneficial effects: This application utilizes a prediction reconstruction model based on rate of change attention to monitor variable trends in real time, effectively identifying progressive and staged anomalies that are difficult to detect using traditional fixed threshold methods. Employing the Anomaly Score Matrix (ASM), it locates anomalies in both time and variable dimensions, providing interpretable anomaly attribution analysis. This not only determines whether an anomaly exists but also precisely pinpoints the time and location of the anomaly and the source of the variable. Simultaneously, a mapping relationship is established between anomaly attribution results and corrective control commands, realizing a closed loop from anomaly alarm to diagnosis, decision-making, and corrective control. This enables the system to adaptively execute corrective actions such as deceleration, backtracking, and retrying based on the anomaly source, rather than simply stopping and triggering an alarm. Finally, by introducing Dynamic Time Warping (DTW) to correct the prediction residuals, false alarms caused by robot motion time offsets are effectively reduced, further improving the reliability of anomaly detection results and the system's engineering practicality. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of a smart drug dispensing control system for freeze-dried bottles provided in Embodiment 1 of this application.

[0020] Figure 2 This is a flowchart of an intelligent drug dispensing control method for lyophilized bottles provided in Embodiment 2 of this application.

[0021] Figure 3 This is a flowchart of a method for obtaining prediction reconstruction error provided in Embodiment 2 of this application.

[0022] Figure 4 This is a diagram illustrating the overall framework of the time series prediction-reconstruction anomaly detection method based on rate of change attention provided in Embodiment 2 of this application.

[0023] Figure 5 The flowchart is provided for the method of determining deviation from the actual occurrence in Embodiment 2 of this application.

[0024] Figure 6 The flowchart for anomaly determination and response provided in Embodiment 2 of this application is shown. Detailed Implementation

[0025] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0026] This application provides an intelligent dispensing control method and system for the reconstitution process of lyophilized bottle powders. The technical solution uses a simple serial dispensing robot as its execution basis, automating the reconstitution of lyophilized bottles through modules such as clamping, transporting, cap handling, puncturing, injection, and rotary mixing. Simultaneously, the operating status data of each actuator is acquired in real time during robot execution. A predictive reconstruction model based on rate of change attention is used to determine whether the dispensing process deviates from normal operating conditions, and a corrective control response is provided when anomalies occur. This forms a closed-loop control system of "execution—monitoring—judgment—correction—re-execution".

[0027] Specifically, see Figure 1 This is a schematic diagram of a smart dispensing control system for freeze-dried bottles provided in Embodiment 1 of this application. Figure 1 As shown, the system includes a dispensing robot, a host computer, a slave computer, multiple sensors, and a time-series data acquisition module.

[0028] The dispensing robot first completes the basic reconstitution of lyophilized vials according to a preset serial process. During the execution of these actions, multiple sensors and a time-series data acquisition module collect real-time operational status information such as clamping position, execution displacement, force feedback, and dispensing flow rate, constructing a multivariate time series. The host computer receives this multivariate time series and determines whether there are any anomalies based on the current stage's state change characteristics. If an anomaly is detected, it further analyzes the time and location of the anomaly, the corresponding variables, and the execution module to which it belongs. Finally, the host computer generates corresponding correction instructions based on the anomaly type and drives the execution module through the slave computer to complete online adjustments.

[0029] Through the above methods, this application can solve the problems that traditional serial dispensing robots can only execute according to a fixed process and lack state perception and abnormal adaptive correction capabilities. It enables the robot to not only "complete the action" during the reconstitution process of lyophilized bottles, but also to judge "whether the action is normal" and provide a control response of "how to correct" when an abnormality occurs.

[0030] like Figure 1 As shown, the aforementioned dispensing robot is the main executor of the reconstitution task, used to complete a series of physical actions from identification to reconstitution of the lyophilized vial. Its core actuators include a barcode scanning module, a clamping and transporting module, a clamping and rotating module, and a puncture and injection module.

[0031] The dispensing robot first scans the lyophilized bottle label using a barcode scanning module to obtain the reagent type and batch information. The host computer then calls the corresponding reconstitution parameters based on the identification results to determine the target dispensing volume, dispensing speed, puncture depth, cap treatment method, mixing speed, mixing time, and whether incubation is required. For example, if a certain type of lyophilized reagent requires the addition of 5 mL of solvent, the system automatically sets the dispensing volume to 5 mL and adjusts the dispensing speed and mixing time according to the corresponding process requirements.

[0032] The aforementioned clamping and transport module specifically includes parallel electric grippers, a synchronous belt slide, a closed-loop stepper motor, and a mounting bracket. It is used to clamp the freeze-dried bottle body and sequentially transport it to the cap processing station, the puncture and injection station, and the rotary mixing station. Its built-in position feedback unit can provide real-time feedback on the gripper and slide positions.

[0033] In practical applications, the clamping and transport module clamps the freeze-dried bottle body and transfers it to the cap processing station. Throughout the process, the host computer continuously receives the operating status information of each execution module and performs anomaly detection. It monitors the clamping position and slide position to confirm whether the freeze-dried bottle is stably clamped and accurately reaches the target station. If the clamping position is abnormal or the slide position does not reach the target position, the host computer can determine that there is a clamping or transport anomaly and send corrective instructions to the lower-level computer for re-clamping, repositioning, or pausing the task. If the operating status of each stage is within the normal range, the system does not trigger corrective instructions, and finally completes the reconstitution task and records the task information.

[0034] The aforementioned clamping and rotating module specifically includes an electric rotating gripper, a lifting mechanism, a rotating drive mechanism, a force feedback unit, and a position feedback unit, used to perform bottle cap processing and rotating mixing actions. Its feedback signals include the clamping force of the rotating gripper, the clamping position, the position of the lifting mechanism, and the rotational state, such as rotational speed and angle.

[0035] In practical applications, the clamping and transporting module secures the freeze-drying bottle body, while the clamping and rotating module clamps the bottle cap and applies a rotational motion to remove or loosen the external hard bottle cap. During the cap processing, the system monitors the force feedback, clamping position, lifting position, and rotation status of the rotating gripper.

[0036] If the rotational resistance increases abnormally, it may indicate that the bottle cap is stuck, the bottle is not in the correct position, or the clamping is off-center. If the rotational resistance is too low or the clamping position drifts, it may indicate that the clamping is not secure or slippage has occurred. The host computer will generate corrective instructions based on the source of the anomaly, such as reducing the rotational speed, re-clamping, increasing the clamping stroke, or retrying after reversing the rotation.

[0037] In another application scenario, during the bottle cap rotation phase, abnormal fluctuations occurred in the force feedback of the rotating gripper, and the gripper's position drifted slightly. The host computer determined that the anomaly was concentrated in the gripping rotation module, further identifying it as unstable or slipping gripping of the bottle cap. The system sent a corrective command to the slave computer: "Stop rotation—Re-grip—Increase gripping stroke—Slow rotation." After re-gripping, the slave computer processed the bottle cap again at a lower speed. If the operation returned to normal after re-gripping, the system continued the subsequent puncture and injection process; if the anomaly persisted, bottle cap processing was stopped and manual inspection was prompted.

[0038] The aforementioned puncture and injection module specifically includes a force-controlled electric actuator, a puncture needle, an injection pump, a multi-channel switching valve, and fluid lines. It is used to control the needle's puncture of the rubber stopper and inject a specified volume of solvent into the vial. Its feedback signals include needle position, needle puncture force feedback, real-time injection flow rate, and pump operating status.

[0039] In practical applications, after the lyophilized vials are transferred to the puncture and injection station, the puncture and injection module controls the needle to pierce the rubber stopper axially. The system determines whether the needle has successfully reached the target depth based on the needle position and puncture force feedback. When the needle reaches the target depth and the puncture status is normal, the injection pump injects the solvent according to the set flow rate. During the injection process, the system monitors the real-time flow rate, cumulative injection volume, needle position, and pump status. If abnormalities occur, such as excessive puncture force, needle displacement stagnation, excessively rapid increase in puncture force, unstable injection flow rate, or cumulative volume deviation, the host computer can generate corrective commands such as decelerating the puncture, pausing the puncture, retracting the needle, re-puncturing, reducing the injection speed, pausing the injection, venting air, or stopping the task, based on the type of abnormality. If the abnormality score returns to the normal range after re-puncture, the system continues to execute the injection process; if multiple retries still result in abnormalities, the task is terminated and a manual check is prompted.

[0040] In other embodiments, during the injection phase, the needle position and puncture force are normal, but the real-time injection flow rate fluctuates significantly, and the deviation between the cumulative injection volume and the target volume gradually increases. The host computer determines that the anomaly primarily originates from the injection flow rate variable, rather than the needle position or puncture force variable. Based on this, the system identifies the injection flow rate as abnormal, potentially caused by air bubbles, fluid path blockage, valve malfunction, or unstable infusion pump status. The host computer sends a correction command to the slave computer: "Pause injection—reduce flow rate—perform venting or valve check—continue injection." If the flow rate stabilizes after correction, the system continues to complete the target volume injection; if the flow rate remains abnormal, the current task is stopped and an anomaly report is output.

[0041] After the reconstitution task is completed, the system records the reagent number, batch number, set reconstitution parameters, actual execution parameters, anomaly detection results, correction instruction records, and final task status. This record can be used for reconstitution quality traceability, equipment operation and maintenance, and subsequent model optimization.

[0042] The lower-level machine is the system's execution control layer. Its main functions include process scheduling, instruction parsing, actuator control, status acquisition, and status feedback. Under normal circumstances, the lower-level machine controls each execution module to complete the clamping, transfer, bottle cap processing, puncture, liquid injection, and mixing actions in sequence according to the preset serial process.

[0043] The lower-level controller can be an industrial controller, PLC, or embedded controller. It connects to each execution module of the dispensing robot via a communication bus (such as RS-485), and is responsible for receiving instructions, controlling the actions of the motors and pumps, and collecting the operating status data fed back by each execution module in real time, such as the clamping position, execution displacement, force feedback, and injection flow rate, and then packaging and uploading it to the upper-level computer.

[0044] The host computer can be an industrial PC or a high-performance embedded computer. It communicates with the slave computer and receives real-time operational status data. The host computer internally deploys control software based on the method described in this application, including a data preprocessing module, a predictive reconstruction model, an anomaly detection and attribution module, and an instruction generation module. The host computer is responsible for real-time analysis of the operational status data, determining whether anomalies exist, locating the source of the anomaly when it occurs, generating corrective control instructions, and finally sending the instructions to the slave computer.

[0045] Specifically, the system first calls the corresponding reconstitution process parameters based on the reagent identification results; then determines the current stage based on the robot's execution flow; analyzes the changes in the current stage's operating status; uses a prediction and reconstruction model based on rate of change attention to determine whether the current operating status deviates from the normal mode; identifies the time and location of the anomaly, the source of the variable, and the corresponding execution module based on the anomaly scoring matrix; and generates corresponding correction instructions based on the anomaly type. Thus, the lower-level machine can execute operations such as pausing, slowing down, rewinding, retrying, re-clamping, repositioning, extending mixing, or terminating the task based on the correction instructions generated by the upper-level machine.

[0046] Unlike traditional detection methods that only output "normal" or "abnormal," the host computer in this invention not only determines whether an abnormality exists, but also further determines the source of the abnormality. For example, the system can distinguish whether the abnormality mainly originates from needle force feedback, injection flow rate, clamping position, rotational resistance, or slide position, thus providing a clear basis for subsequent corrective control.

[0047] During operation, the dispensing robot operates according to a preset procedure under the control of the lower-level computer. Simultaneously, the operational status data of each module is transmitted in real-time from the lower-level computer to the upper-level computer. The upper-level computer runs the intelligent control algorithm described in this application, analyzing the data, detecting anomalies, and attributing causes. Once an anomaly is detected and correction is required, a corresponding correction command (such as pausing puncture, reducing the injection rate, or re-clamping) is generated and sent to the lower-level computer. The lower-level computer executes the correction command, driving the dispensing robot to make corresponding adjustments, thereby achieving closed-loop intelligent control of the reconstitution process.

[0048] The technical solution of this application will be further described in detail below through method embodiments, so as to clarify the technical solution protected by this application.

[0049] Example 2 See Figure 2 This is a flowchart of an intelligent dispensing control method for lyophilized bottles provided in Embodiment 2 of this application. Figure 2 As shown, the specific implementation steps of the above method include: Step 101: When the dispensing robot performs the task of reconstitution of lyophilized bottles, it acquires the operating status data of each operating variable of each actuator of the dispensing robot.

[0050] In some embodiments, data acquisition is achieved using the encoders, force feedback interfaces, position feedback interfaces, motor status interfaces, and pump status interfaces integrated into the actuators of the dispensing robot, eliminating the need for additional complex dedicated sensors. The aforementioned operational status data includes, but is not limited to, clamping position, execution displacement, force feedback, and injection flow rate. Specifically, it includes the clamping force, clamping position, lifting position, and rotation status of the clamping rotation module; the needle position, needle force feedback, real-time injection flow rate, and pump operating status of the puncture injection module; and the gripper position, slide position, and transfer status of the clamping transport module. This status information reflects the actual operational status of the robot during clamping, transfer, cap opening, puncture, injection, and mixing stages, providing a basis for subsequent anomaly detection and corrective control.

[0051] Step 102: Input the above-mentioned operating status data into the pre-built prediction and reconstruction model, predict and reconstruct the above-mentioned operating status data, and obtain the prediction and reconstruction error.

[0052] Specifically, such as Figure 3 As shown, the specific implementation method of step 102 above includes: Step 1021: Calculate the rate of change characteristics of the above operating status data within the sliding time window.

[0053] In this embodiment, the aforementioned operational status data is used as input to the predictive reconstruction model, such as gripper position, gripping force, needle position, puncture force, injection flow rate, and slide position. The system first uses a sliding time window to capture a segment of historical data to form the current window.W k Then calculate the rate of change Δ of the data within the window. W k This refers to the trend of how each sensor variable changes over time.

[0054] Specifically, such as Figure 4 As shown in the figure, the predictive reconstruction model includes an input module, and the input sequence in the figure is represented as follows: This indicates that a segment of data is extracted from a continuous time series using a sliding window.

[0055] in, Indicates the first t Multivariate observation data at various time points. It is not a single numerical value, but a vector. For example, it can contain 8 sensor variables. Indicates the first The number of each sliding window. This indicates the sliding step size, which is how many sampling points the window moves forward each time. L This indicates the window length, which is the number of sampling points contained in a time window.

[0056] W k Indicates the first Each time window corresponds to a continuous segment of multivariate time series data. W k+1 This represents the actual next time window, used for comparison with the model's prediction results.

[0057] Δ W k Indicates the first The rate of change characteristics of each variable in the window. This can be understood as not measuring the current value of the variable, but rather how fast it changes and whether the trend is normal. For example, during the puncture phase, if the needle force feedback gradually increases, it may be normal; however, if the rate of increase is abnormal, it may indicate that the needle is encountering abnormal resistance, the stopper is in an abnormal state, or there is a problem with the puncture path. Therefore, this application uses rate of change modeling to more sensitively identify gradual anomalies and dynamic process anomalies.

[0058] Step 1022: Calculate the attention weight based on the above rate of change characteristics, and adjust the influence of the above rate of change characteristics on the above attention weight using a preset scale adjustment parameter.

[0059] The attention weights mentioned above are used to characterize the degree of influence of the corresponding running variables and the changes in the running state of the running variables on the prediction of the running state in the next time window.

[0060] Specifically, such as Figure 4 As shown, the rate of change characteristic Δ Wk The data is fed into the Delta-Attention module, where the model automatically determines which variables and trends are more critical.

[0061] The model is based on the rate of change characteristic Δ W k Calculate attention weights , represented as Among them, attention weights It indicates the importance of each variable or each type of change feature. The function representing the mapping of the rate of change feature can be understood as a learnable neural network mapping. This represents a normalization function that transforms the importance of different variables into a set of weights. The larger the weight, the more noteworthy the change in that variable is.

[0062] The role of the rate of change attention module is to enable the model to automatically focus on key dynamic variables, rather than treating all sensor signals equally. In this embodiment, based on the current stage of the reconstitution task, the attention weights of the rate of change features corresponding to the operating status data of each actuator are dynamically adjusted, causing the prediction and reconstruction model to prioritize the operating status changes of the target operating variables. These target operating variables are those that directly participate in the reconstitution action or directly provide feedback on the execution result of the current action at the current stage of the reconstitution task. For example, in the puncture stage, needle force and needle displacement are more important; in the injection stage, real-time flow rate is more important; and in the clamping stage, clamp position and clamping force are more important.

[0063] Preset scale adjustment parameters λ This is used to control the strength of the influence of the rate of change feature in attention calculation. Simply put, λ Used to adjust the model's sensitivity to changing trends. If some variables change very little but are critical to anomalies, λ This can help the model amplify these types of changes. If some variables change significantly but are not important, their impact can also be reduced.

[0064] Step 1023: Weight the rate of change features according to the above attention weights, and then perform dimensionality reduction encoding on the weighted rate of change features to obtain the current latent space representation.

[0065] After attention-weighting, a low-dimensional latent representation is obtained through a dimensionality reduction network. Y k Specifically, such as Figure 4As shown, the predictive reconstruction model includes a Dim Reduction FC-Layer. This module compresses the original high-dimensional window data into low-dimensional latent features. In other words, the dimensionality-reduction fully connected layer can transform complex multivariate time series data. W k Transform into a more compact low-dimensional state representation Y k . Y k It is not the raw sensor data, but the "current robot operating state" extracted by the model, which is a compressed representation of the current reprocessing action state.

[0066] Step 1024: Based on the current latent space representation and in combination with the latent space representation of the historical windows, predict the latent space representation of the next time window.

[0067] In this embodiment of the application, low-dimensional latent representation Y k The data is fed into the GRU predictor to predict the potential state of the next window based on the states of past windows. .

[0068] The GRU predictor is a recurrent neural network architecture suitable for processing time series data. For example... Figure 4 As shown, GRU(k-1), GRU(k), and GRU(k+1) represent models that process multiple window states sequentially over time, inferring subsequent states from earlier states. The role of GRU is to learn the dynamic evolution patterns between different time windows during the normal operation of the robot. For example, under normal circumstances, after clamping is completed, the puncture phase should begin, the puncture force should change specifically as the needle descends, and then the injection flow rate should enter a stable range. GRU learns this "temporal pattern of the normal process."

[0069] This represents the potential state predicted by the model for the (k+1)th window, which differs from the true state. Y k+1 different, It is the result inferred by the model based on normal patterns. If the robot operates normally, the predicted state should be close to the actual state; if an anomaly occurs, the two will deviate significantly.

[0070] Step 1025: Decode and reconstruct the latent space representation of the next time window to obtain the predicted running state data of the next time window.

[0071] like Figure 4 As shown, the predicted latent state is then restored to the original variable space by the TCN decoder to obtain the prediction reconstruction window. The decoder then converts the predicted low-dimensional latent state... The original sensor data space is restored. Specifically, dimensionality restoration is performed using a Temporal Convolutional Network (TCN), which restores the low-dimensional predicted state to a multivariate time series with the same dimensions as the original window, while preserving the local temporal structure. In other words, the TCN outputs... . This represents the next time window predicted and reconstructed by the model, which is different from the actual time window. W k+1 They have the same dimensions and all correspond to a multivariable sensor time series. If the system is normal, then... If the system malfunctions, then Will and actual observed values W k+1 Significant deviations have occurred.

[0072] Step 1026: Obtain the actual running status data corresponding to the next time window, and calculate the prediction reconstruction error by comparing the actual running status data with the predicted running status data.

[0073] The aforementioned prediction reconstruction error is used to characterize the degree of deviation between the current operating state and the corresponding operating state under normal reconstitution, and serves as the basis for judging the occurrence of deviation.

[0074] In this embodiment of the application, the actual running status data corresponding to the next time window is obtained. W k+1 The predicted reconstruction results With the actual observation window W k+1 The results are compared, and anomaly scores are calculated, which is the aforementioned prediction reconstruction error. These anomaly scores are further used to form the ASM anomaly score matrix, used to determine whether an anomaly occurred, in which time period the anomaly occurred, from which sensor variable the anomaly primarily originated, and whether the anomaly is a univariate anomaly, a locally coupled anomaly, or a global anomaly. Specifically, the steps include: Step 103: If the above prediction and reconstruction error is greater than or equal to the preset deviation threshold, then obtain the time and location of the deviation, the running variables and the corresponding actuators, and generate the corresponding correction control command.

[0075] In some embodiments, slight time skew may exist between different lyophilized vial tasks during actual drug preparation. For example, a puncture may be tens of milliseconds slower than the normal procedure, the infusion start time may be slightly delayed, or the stage switching time may differ slightly from the standard procedure. If the system directly compares the actual state with the predicted state one by one at fixed time points, it may misjudge such slight time misalignments as anomalies. To reduce such false alarms, this application introduces Dynamic Time Warping (DTW) to assist in the judgment of suspected deviation segments. When a certain runtime segment is initially identified as abnormal, the host computer further determines whether the abnormality is mainly caused by a slight misalignment of the time axis. If, after time alignment, the suspected deviation segment is still similar to the normal operating mode, its abnormality score is reduced to avoid unnecessary corrective actions. If, after time alignment, the suspected deviation segment still significantly deviates from the normal mode, the abnormality judgment is retained, and the process of abnormality type identification and correction instruction generation begins. This involves combining the time alignment results or the abnormality score matrix to determine the time location of the deviation, the runtime variables, and the corresponding actuators, and generating corresponding corrective control instructions. In this way, this application can distinguish between "slight delay in action" and "real runtime abnormality," thereby improving the reliability of abnormality detection results.

[0076] Specifically, such as Figure 5 As shown, the specific implementation steps of the above method include: Step 1031: Use the Dynamic Time Warping (DTW) algorithm to time-align the current running status data with the corresponding running status data under normal remelting.

[0077] Step 1032: Recalculate the prediction reconstruction error based on the aligned results.

[0078] Step 1033: If the recalculated prediction reconstruction error is less than the preset deviation threshold, it is determined to be a normal fluctuation caused by time offset.

[0079] Step 1034: If the recalculated prediction reconstruction error is still greater than or equal to the above-mentioned preset deviation threshold, it is determined to be a true deviation.

[0080] Step 1035: Construct the anomaly scoring matrix. Each element in the anomaly scoring matrix represents the contribution of the corresponding time point and the running variable to the anomaly score.

[0081] Specifically, after determining a deviation to be real, this application constructs an Anomaly Scoring Matrix (ASM) to enable the anomaly detection results to be used for actual control. This matrix represents the distribution of anomalies across the time and variable dimensions. Traditional anomaly detection methods typically only output an overall anomaly score, which, while determining "whether an anomaly exists," struggles to explain "where the anomaly occurred," "which module caused it," and "how it should be corrected." This application's ASM retains the contribution of anomalies at different time points and across different variables, enabling the system to further perform anomaly localization and attribution analysis.

[0082] Step 1036: Based on the contribution of each time point and each operating variable in the above-mentioned anomaly scoring matrix to the anomaly scoring, determine the anomaly concentration area, and based on the time interval, operating variable or combination of variables with the largest contribution, determine the time location of the deviation, the operating variable and the corresponding execution mechanism.

[0083] Compared to ordinary anomaly detection models that typically output only a total score, the ASM proposed in this application forms a two-dimensional matrix, namely, time dimension × variable dimension. Based on this, the system can determine which time point the anomaly is most obvious, which variable contributes the most, whether the anomaly is concentrated on a single variable, and whether the anomaly simultaneously affects multiple variables.

[0084] In a specific application scenario, ASM (Automatic Streaming Management) allows the system to determine which action stage an anomaly occurs in, within which time period the anomaly is concentrated, which runtime variable the anomaly primarily originates from, which execution module the anomaly corresponds to, and whether the anomaly is a single variable anomaly, a locally coupled anomaly, or a global process anomaly. For example, in the puncture stage, if the anomaly score corresponding to the needle force feedback increases while the needle position change slows down, the system can determine that the puncture is obstructed or deviated. In the injection stage, if the anomaly score corresponding to the real-time injection flow rate increases, but the needle position and puncture force are not significantly abnormal, the system can determine that the injection flow rate is abnormal, possibly related to air bubbles, fluid path blockage, or pump instability. In the cap handling stage, if both the rotary gripper force feedback and gripping position are abnormal, the system can determine that the cap is stuck, the gripping is slipping, or the bottle posture is abnormal. When multiple module variables are abnormal simultaneously, the system can determine that the anomaly is a global process anomaly, an execution cycle anomaly, or a discrepancy between the lower-level machine's state and the upper-level machine's task stage.

[0085] In this way, ASM transforms the model detection results into interpretable sources of anomalies, providing a basis for generating subsequent correction instructions.

[0086] like Figure 6 As shown, the model first calculates the residuals based on the predicted reconstruction results and the actual observation data to obtain an initial anomaly score. If the initial score does not exceed a preset deviation threshold, the system is considered to be operating normally. If it exceeds the preset deviation threshold, it indicates that there may be an anomaly in the current window. Considering that the dispensing robot may have slight advances or lags in actual operation, directly calculating the residuals point by point is prone to false alarms. Therefore, this application further introduces DTW to align the predicted sequence and the actual sequence in time, and recalculates the anomaly score based on the aligned residual matrix. If the corrected score is lower than the preset deviation threshold, it is considered to be a normal fluctuation caused by time offset. If it is still higher than the preset deviation threshold, it is determined to be a real anomaly and enters the anomaly response layer, generating corresponding correction instructions based on the anomaly variables and anomaly stage.

[0087] Specifically, the anomaly type is determined based on the time and location of the deviation, the operating variables, and the corresponding actuator. This includes at least one or more of the following: puncture obstruction anomaly, injection flow rate anomaly, clamping anomaly, cap handling anomaly, mixing anomaly, and global process anomaly. This application establishes a correspondence between anomaly types and correction instructions based on ASM attribution results. After determining the source of the anomaly, the host computer generates a corresponding correction instruction and sends it to the slave computer for execution.

[0088] Step 104: Send the above correction control command to the dispensing robot to control the dispensing robot to perform the corresponding correction action.

[0089] In some embodiments, when the system determines that the anomaly is mainly concentrated in the needle force feedback and needle position variables during the puncture phase, and manifests as an abnormal increase in puncture force, a slowdown in needle displacement, or needle stagnation, it is determined to be a puncture obstruction anomaly. Corresponding correction instructions may include: reducing the puncture speed, pausing the puncture and maintaining the current position, retracting the needle a preset distance and then re-puncturing, adjusting the puncture path or repositioning the vial, terminating the task and triggering an alarm after multiple failed retries.

[0090] When the system determines that the anomalies are mainly concentrated in the real-time flow rate, cumulative injection volume, or pump operating status during the injection phase, and manifest as flow fluctuations, insufficient injection, excessive injection, or flow interruption, it is judged as an injection flow anomaly. Corresponding correction instructions may include: reducing the injection rate, pausing injection, performing venting operations, checking or switching valve channels, recalibrating the injection pump, and stopping the current task if necessary.

[0091] When the system determines that the anomalies are mainly concentrated in the position of the parallel gripper, the gripping position of the rotary gripper, or the gripping force feedback, and manifest as a shift in gripping position, insufficient gripping force, or fluctuations in gripping status, it is judged as a gripping anomaly. Corresponding correction instructions may include: re-gripping, increasing or decreasing the gripping stroke, pausing and then repositioning the freeze-dried bottle, reducing the subsequent rotation or transfer speed, and re-executing the bottle positioning step.

[0092] When the system determines that the anomaly mainly occurs during the bottle cap rotation stage, and manifests as abnormal rotational resistance, substandard rotation angle, or drifting or slippage of the clamping position, it is considered a bottle cap processing anomaly. Corresponding correction instructions may include reducing the rotational speed, increasing the clamping stroke or clamping force, rotating in the opposite direction by a certain angle and then unscrewing, repositioning the bottle, and stopping bottle cap processing and issuing an alarm after multiple failures.

[0093] When the system determines that the anomaly mainly occurs during the rotational mixing stage, and manifests as unstable clamping, abnormal rotational resistance, abnormal speed, or insufficient mixing time, it is judged as a mixing anomaly. Corresponding correction instructions may include re-clamping, reducing the speed and continuing mixing, extending the mixing time, pausing mixing and repositioning, or transferring to the manual review area.

[0094] When the status variables of multiple execution modules are abnormal simultaneously, or when the abnormality persists across multiple stages, or when the status feedback from the lower-level machine is inconsistent with the task stage from the upper-level machine, it is determined to be a global process abnormality. Corresponding correction instructions may include: pausing all execution modules, saving the current running state, performing a system reset, re-initializing the task, outputting an abnormality report, and notifying the operator.

[0095] Through the aforementioned closed-loop process, this application enables the lyophilized bottle dispensing robot to be upgraded from a fixed, serial execution mode to an intelligent execution system with state awareness, anomaly interpretation, and adaptive correction capabilities. Compared with the prior art, the technical solution provided in Embodiment 1 of this application has the following beneficial effects: (1) To realize the automation and continuous operation of the reconstitution process of lyophilized bottle powder. This application designs a complete automated process for the reconstitution of lyophilized powder vials, which can sequentially complete reagent identification, vial clamping, cap processing, puncture and injection, rotational mixing, and process recording. Compared with manual reconstitution, this application reduces manual cap opening, manual puncture, and manual shaking, improving operational consistency and process traceability.

[0096] (2) Implement intelligent correction control based on a simple serial mechanism This application does not rely on a complex robotic arm to complete all intelligent behaviors. Instead, it uses a simple serial control as the basic execution method, and then generates correction instructions through timing analysis by a host computer. This reduces the complexity of the mechanical and control systems, and improves the system's ability to cope with anomalies through algorithmic compensation. In other words, the mechanical structure can be relatively simple, but the control is not a "fixed process" but can be dynamically adjusted according to the anomaly detection results.

[0097] (3) Improve the ability to identify gradual anomalies and stage anomalies. Traditional thresholding methods primarily focus on whether values ​​exceed limits at a specific moment, making it difficult to identify gradually deviating anomalies. This application, through rate of change characteristics and a rate of change attention mechanism, focuses on the trend of variable changes over time, enabling earlier detection of progressive anomalies such as gradually increasing puncture resistance, gradual fluctuations in injection flow, and slow drift in clamping position.

[0098] (4) Provide interpretable anomaly localization results This application retains information on both the time and variable dimensions using the ASM anomaly scoring matrix. It not only determines whether an anomaly exists but also identifies the stage and key variables involved. For example, it can pinpoint anomalies such as abnormal needle force during puncture, abnormal flow rate during injection, or abnormal clamping during rotation. Compared to black-box models that only output overall anomaly scores, this application is more suitable for engineering control scenarios.

[0099] (5) Convert the anomaly detection results into executable correction instructions. This application establishes a mapping relationship between anomaly types and corrective control strategies, enabling the system to generate specific actions based on anomaly attribution results, such as slowing down, pausing, reversing, retrying, re-gripping, extending mixing, or terminating the task. Therefore, anomaly detection results are no longer just alarms, but can directly participate in the robot's closed-loop control.

[0100] (6) Reduce false alarms caused by time offset When robot actions have slight delays or stage switching time offsets, direct point-by-point comparisons may produce false alarms. This application introduces DTW residual correction to filter out normal fluctuations with slight time axis misalignments, thereby improving the stability of anomaly detection.

[0101] (7) The experimental results verified the detection performance and engineering usability. Based on existing experiments, the proposed method was validated on a real-world drug dispensing robot platform. The accuracy, recall, and F1 score reached 84.57%, 68.04%, and 0.7541, respectively, which are superior to the comparison methods such as LSTM, GRU, autoencoder AE, variational autoencoder VAE, and TimeXer. The ASM anomaly attribution success rate reached over 60%, and it can distinguish between single-dimensional anomalies, locally coupled anomalies, and global anomalies.

[0102] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for intelligent dispensing control of lyophilized bottles, characterized in that, Applied to a host computer, the method includes: When the dispensing robot performs the task of reconstitution of lyophilized bottles, it acquires the operating status data of each operating variable of each actuator of the dispensing robot, including clamping position, execution displacement, force feedback, and injection flow rate; The operating status data is input into a pre-built prediction and reconstruction model to predict and reconstruct the operating status data, and the prediction and reconstruction error is obtained. The prediction and reconstruction error is used to characterize the degree of deviation of the current operating status from the corresponding operating status under normal reconstitution. If the predicted reconstruction error is greater than or equal to the preset deviation threshold, the time and location of the deviation, the running variables and the corresponding actuators are obtained, and the corresponding correction control command is generated. The correction control command is sent to the dispensing robot, and the correction control command is used to control the dispensing robot to perform corresponding correction actions.

2. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, The actuators of the drug dispensing robot include a clamping and transporting module, a clamping and rotating module, and a puncture and injection module; The acquisition of operational status data for each actuator and operational variable of the dispensing robot includes: Collect the positions of the grippers and slide of the clamping and transport module; and / or Collect data on the clamping force, clamping position, lifting mechanism position, and rotation status of the clamping and rotating module; and / or The system collects data on needle position, needle force feedback, real-time injection flow rate, and pump operating status from the puncture and injection module.

3. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, The operational status data is input into a pre-built prediction and reconstruction model to predict and reconstruct the operational status data, including: Calculate the rate of change characteristic of the operating status data within the sliding time window; Attention weights are calculated based on the rate of change characteristics, and the influence of the rate of change characteristics on the attention weights is adjusted using preset scaling parameters; the attention weights are used to characterize the degree of influence of the corresponding running variable and the changes in the running state of the running variable on the prediction of the running state in the next time window; The change rate features are weighted according to the attention weights, and the weighted change rate features are then dimensionality-reduced and encoded to obtain the current latent space representation. Based on the current latent space representation and combined with the latent space representation of historical windows, predict the latent space representation of the next time window; The latent space representation of the next time window is decoded and reconstructed to obtain the predicted running state data of the next time window; Obtain the actual operating status data corresponding to the next time window, and calculate the prediction reconstruction error by comparing the actual operating status data with the predicted operating status data, which serves as the basis for judging whether a deviation has occurred.

4. The intelligent dispensing control method for lyophilized bottles according to claim 3, characterized in that, Weighting the rate of change features further includes: Based on the current stage of the remelting task, the attention weights of the change rate features corresponding to the operating status data of each actuator are dynamically adjusted, so that the prediction and reconstruction model pays priority to the change of the operating status of the target operating variable; wherein, the target operating variable is the operating variable that directly participates in the remelting action or directly feeds back the execution result of the current action under the current stage of the remelting task.

5. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, Before obtaining the time and location of the deviation, the source of the runtime variable, and the corresponding actuator, the method further includes: The Dynamic Time Warping (DTW) algorithm is used to align the current operating status data with the corresponding operating status data under normal reconstitution. The prediction reconstruction error is recalculated based on the aligned results; If the recalculated prediction reconstruction error is less than the preset deviation threshold, it is determined to be a normal fluctuation caused by time offset. If the recalculated prediction reconstruction error is still greater than or equal to the preset deviation threshold, it is determined to be a true deviation.

6. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, Determine the time and location of the deviation, the running variables, and the corresponding actuators, including: Construct an anomaly scoring matrix, where each element in the anomaly scoring matrix represents the contribution of the corresponding time point and the running variable to the anomaly score; Based on the contribution of each time point and each operating variable in the anomaly scoring matrix to the anomaly scoring, the anomaly concentration area is determined, and based on the time interval, operating variable or combination of variables with the largest contribution, the time location of the deviation, the operating variable and the corresponding execution mechanism are determined.

7. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, Generate correction control instructions, including: The type of abnormality is determined based on the time and location of the deviation, the operating variables, and the corresponding actuator; wherein, the type of abnormality includes at least one of the following: puncture obstruction abnormality, injection flow abnormality, clamping abnormality, cap handling abnormality, mixing abnormality, and global process abnormality. Based on the type of exception, a corresponding correction control instruction is generated from a preset exception-correction instruction mapping library.

8. The intelligent dispensing control method for lyophilized bottles according to claim 1, characterized in that, The correction control command includes: For abnormal puncture obstruction, reduce the puncture speed, pause the puncture, retract the needle and puncture again; For abnormal injection flow, reduce the injection rate, suspend injection, and perform venting. For clamping abnormalities, re-clamp and adjust the clamping stroke; For issues with bottle cap processing, reduce the rotation speed, reverse the rotation, and try again. For abnormal mixing, extend the mixing time, reduce the rotation speed, and continue mixing. In case of global process anomalies, suspend all execution mechanisms and reset the system.

9. A smart dispensing control system for lyophilized bottles, characterized in that, The system, which is applied to the intelligent dispensing control method for lyophilized bottles as described in any one of claims 1 to 8, includes a host computer, a dispensing robot, and a slave computer. The drug dispensing robot is used to perform the task of reconstitution of lyophilized bottles and output the operating status data of each operating variable of each actuator. The operating status data includes clamping position, execution displacement, force feedback and injection flow rate. The host computer is used to acquire the operating status data, input the operating status data into a pre-built prediction and reconstruction model, predict and reconstruct the operating status data, and obtain the prediction and reconstruction error; the prediction and reconstruction error is used to characterize the degree of deviation of the current operating status from the corresponding operating status under normal reconstitution. Furthermore, if the predicted reconstruction error is greater than or equal to a preset deviation threshold determined based on the distribution of normal operating state data, the corresponding operating segment is identified as a suspected deviation segment, and the time location, operating variables and corresponding actuators of the deviation are determined by combining the time alignment results or the abnormal scoring matrix, and a corresponding correction control command is generated. The lower-level machine is used to receive the correction control command and control the dispensing robot to perform corresponding correction actions according to the correction control command.

10. The intelligent dispensing control system for lyophilized bottles according to claim 9, characterized in that, The drug dispensing robot includes a clamping and transporting module, a clamping and rotating module, and a puncture and injection module. The host computer is used to collect the gripper position and slide position from the gripping and transport module, the gripping force, gripping position, lifting position and rotation status from the gripping and rotating module, and the needle position, needle force feedback, real-time injection flow rate and pump operating status from the puncture and injection module.