Infusion quality detection system and method

By combining mechanical positioning devices and deep learning technology with lasers and image acquisition devices, the subjective and invasive nature of existing infusion quality testing has been solved, enabling non-invasive, rapid, and accurate testing of infusion quality and ensuring infusion safety.

CN120870055APending Publication Date: 2025-10-31ANHUI PROVINCIAL HOSPITAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511004328.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing methods for testing the quality of intravenous infusions mainly rely on visual inspection and turbidimeter testing. These methods are characterized by high subjectivity, long processing time, high invasiveness, and the inability to achieve real-time monitoring, making it difficult to ensure the accuracy and safety of intravenous infusion quality.

Method used

A mechanical positioning device combined with a laser generator and an image acquisition device is used. Utilizing the Tyndall effect and deep learning technology, a smart processing module enables non-invasive and rapid infusion quality detection. This includes irradiating the solution with a laser beam to excite the Tyndall effect, acquiring dynamic scattered light images, and using OpenCV and DeepLabv3+ models for feature extraction and quality level determination.

Benefits of technology

It provides a direct reflection of the state of the infusion solution microparticle dispersion system, provides accurate detection of drug solubility and compatibility, ensures infusion safety, reduces detection time and risk of contamination, and improves the accuracy and real-time performance of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120870055A_ABST
    Figure CN120870055A_ABST
Patent Text Reader

Abstract

The invention discloses an infusion quality detection system and method, and the system comprises a mechanical positioning device which comprises a cabinet body, a clamp for clamping an infusion bottle, a laser generator and an image collector, the cabinet body is internally provided with the clamp, the laser generator is used for transmitting a laser beam with adjustable power, and the laser beam irradiates a solution in the infusion bottle to excite the Tyndall effect; the image collector is used for capturing a dynamic scattered light image of the solution under laser irradiation; the intelligent processing module is configured to execute the following operations: controlling the transmitting power of the laser generator to be adaptively adjusted so as to adapt to the color characteristics of the solution; carrying out preprocessing and feature extraction on the image collected by the image collector to obtain geometric and textural features of the Tyndall beam; analyzing the feature sequence through a deep learning model, and outputting an infusion quality grade judgment result; and based on a determination result, triggering a visual alarm. And non-invasive, rapid and accurate detection of the infusion liquid preparation quality is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical equipment technology, and in particular to an infusion quality testing system and method. Background Technology

[0002] In clinical practice, intravenous infusion is an important treatment method, and the quality of the drug preparation solution directly affects the treatment effect and patient safety. The solutions routinely prepared for intravenous medications are liquid dispersion systems, and the state of the particulate dispersion (such as drug solubility and precipitation caused by chemical reactions between drugs) is a key factor determining the quality of the infusion. When particulate matter (insoluble matter of different particle sizes) appears during the preparation process, it may enter the body and cause serious complications such as phlebitis, thrombosis, and allergic reactions. Therefore, effective testing of infusion quality is of significant clinical importance.

[0003] Currently, there are three main methods for testing the quality of intravenous infusions: The first method relies mainly on visual inspection by medical staff. This method is greatly affected by subjective factors, such as eyesight, experience, and fatigue. The accuracy and consistency of the test are difficult to guarantee, and it cannot detect minor or potential quality problems (such as trace amounts of precipitate that have formed in the early stages).

[0004] The second method involves using a turbidimeter, which can provide quantitative data but only reflects the overall turbidity of the solution. It cannot intuitively present key information such as particle distribution and properties, and the detection process is time-consuming, making it difficult to meet the needs of rapid clinical testing.

[0005] The third type is invasive or offline testing, which requires damaging the infusion packaging or centralized testing, increasing the risk of contamination and making it impossible to monitor the solution preparation process in real time.

[0006] It is evident that there is an urgent need to develop a non-invasive, rapid, accurate, and real-time monitoring technology and device for infusion quality testing. Summary of the Invention

[0007] In a first aspect, to solve the above-mentioned technical problems, an infusion quality detection system is provided, comprising: A mechanical positioning device includes a cabinet, wherein the cabinet houses a clamp for holding infusion bottles, a laser generator, and an image acquisition device, wherein: The laser generator is used to emit a laser beam with adjustable power, which irradiates the solution in the infusion bottle to excite the Tyndall effect; The image acquisition device is used to capture dynamic scattered light images of the solution under laser irradiation; The intelligent processing module is configured to perform the following operations: (a) The emission power of the laser generator is adaptively adjusted to suit the color characteristics of the solution; (b) Preprocessing and feature extraction are performed on the images acquired by the image acquisition device to obtain the geometric and texture features of the Tyndall beam; (c) Analyze the feature sequence using a deep learning model and output the infusion quality grade determination result; (d) Based on the determination result, trigger a visual alarm.

[0008] Furthermore, the laser generator is a semiconductor laser with a wavelength range of 630-670nm.

[0009] Furthermore, the intelligent processing module integrates a laser control circuit, the output of which is electrically connected to the laser generator to adjust the emission power of the laser generator through pulse width modulation technology.

[0010] Further: When the solution transmittance is ≥80%, the laser control circuit adjusts the emission power of the laser generator to 3-8mW; When the solution transmittance is less than 80%, the laser control circuit adjusts the emission power of the laser generator to 40-60mW.

[0011] Furthermore, the feature extraction operation performed by the intelligent processing module includes: The contour, length, width, and percentage of broken pixels of the Tyndall beam are extracted using edge detection technology. Calculate the brightness variance, spatial frequency variation, and texture entropy value of the Tyndall beam.

[0012] Furthermore, the deep learning model is a hybrid architecture model based on OpenCV and DeepLabv3+, wherein: The OpenCV is used for image preprocessing and the bounding box localization of the Tyndall beam; The DeepLabv3+ is used to perform pixel-level semantic segmentation, multi-scale contextual feature extraction, and quality level prediction on the Tyndall beam.

[0013] Further: The clamp contacts the neck of the infusion bottle, the infusion bottle is placed on the base plate, and the base plate has a laser inlet; The laser beam emitted by the laser generator passes through the laser inlet and irradiates from bottom to top along the central axis of the infusion bottle; The camera of the image acquisition device is positioned directly facing the infusion bottle and perpendicular to the central axis of the infusion bottle.

[0014] Furthermore, the clamp is made of an elastic material, and the open end of the clamp is provided with an arc-shaped buckle to close the opening of the clamp.

[0015] Preferably, the inner surface of the clamp that contacts the infusion bottle is provided with an anti-slip texture.

[0016] A second aspect of the present invention provides a method for detecting the quality of infusions based on the system, comprising the following steps: S1. Load the infusion bottle into the mechanical positioning device and make the laser beam irradiate the center of the solution perpendicularly; S2. Select the corresponding laser emission power according to the solution color to stimulate the Tyndall effect; S3. Acquire dynamic scattered light images of the solution Tyndall beam using a high-definition camera; S4. The dynamic scattered light image is processed by DeepLabv3+, wherein multi-scale context features are extracted by using convolution and image pooling operations with different hole rates in the encoder, the multi-scale context features are fused with low-level features by the decoder to generate a pixel-level segmentation mask of the beam, the geometric features of the Tyndall beam are extracted based on the segmentation mask, and the geometric feature parameters are standardized. S5. The quality level prediction of DeepLabv3+ is based on standardized features. It learns the nonlinear mapping relationship between beam intensity distribution and turbidity parameter through an improved edge enhancement module and background suppression mechanism, and outputs the comprehensive turbidity state value through a fully connected layer. S6. Based on the pre-trained mapping relationship between the comprehensive state value and the solution turbidity value established through calibration samples, generate the corresponding turbidity value according to the comprehensive state value; S7. Compare the turbidity value with the qualified threshold: if the turbidity value is less than or equal to the qualified threshold, the solution is deemed qualified; otherwise, it is deemed unqualified and an audible and visual alarm is triggered.

[0017] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: This invention utilizes the Tyndall effect to intuitively reflect the state of the particulate dispersion system in the infusion solution. By combining real-time vision and deep learning technology, it achieves non-invasive, rapid, and accurate detection of the infusion preparation quality, effectively judging the drug dissolution, the compatibility between drugs and between drugs and the infusion solution, and providing reliable protection for clinical infusion safety. Attached Figure Description

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

[0019] Figure 1 This is a schematic diagram of the overall structure of the mechanical positioning device disclosed in an embodiment of the present invention; Figure 2 This is a partial structural diagram of the mechanical positioning device disclosed in an embodiment of the present invention, showing the structure of the clamp; Figure 3 This is a partial structural diagram of the mechanical positioning device disclosed in an embodiment of the present invention, showing the position of the camera; Figure 4 This is a partial schematic diagram of the laser control circuit disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the principle disclosed in the embodiments of the present invention; Figure 6 The main flowchart disclosed in the embodiments of the present invention shows the flowchart for establishing the relationship between Tyndall beam and turbidity; Figure 7 This is a flowchart of the model training process disclosed in an embodiment of the present invention; Figure 8 This is a schematic diagram of the visual determination result disclosed in an embodiment of the present invention.

[0020] In the picture: 00. Cabinet; 10. Fixture; 11. Base plate; 20. Laser generator; 21. Laser inlet; 30. Image acquisition device. Detailed Implementation

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

[0022] This invention aims to provide an infusion quality testing system and method. By utilizing the Tyndall effect to intuitively reflect the state of the particulate dispersion system in the infusion solution, and combining real-time vision and deep learning technology, it achieves non-invasive, rapid, and accurate detection of infusion preparation quality. It effectively judges the drug dissolution status, the compatibility between drugs and between drugs and the infusion solution, thus realizing solution quality testing and providing reliable protection for clinical infusion safety. It solves the clinical pain points of traditional visual inspection, such as strong subjectivity and high risk of contamination from turbidimeter sampling.

[0023] The following is a detailed description of the infusion quality detection system provided by the present invention.

[0024] The infusion quality detection system provided in this embodiment mainly includes a mechanical positioning device and an intelligent processing module. Please refer to [link / reference]. Figure 1-3 The mechanical positioning device includes a cabinet 00, which contains a clamp 10 for holding infusion bottles, a laser generator 20, and an image acquisition device 30.

[0025] In a further embodiment, the clamp 10 contacts the neck of the infusion bottle. Preferably, the clamp 10 is made of an elastic material to accommodate infusion bottles of different sizes. The open end of the clamp 10 is provided with an arc-shaped buckle to close the opening and prevent the infusion bottle from slipping. Optionally, the inner surface of the clamp 10 in contact with the infusion bottle has an anti-slip texture, such as a silicone liner, to increase the friction between the clamp 10 and the infusion bottle, achieving reliable clamping and ensuring the stability of the infusion bottle's position during testing. The infusion bottle is placed on a base plate 11, which has a laser inlet 21. The laser beam emitted by the laser generator 20 passes through the laser inlet 21 and irradiates upwards along the central axis of the infusion bottle. The camera of the image acquisition unit 30 faces the infusion bottle and is perpendicular to its central axis.

[0026] Laser generator 20 emits a laser beam with adjustable power, which irradiates the solution inside the infusion bottle to excite the Tyndall effect. Laser generator 20 is a semiconductor laser with a wavelength range of 630-670 nm. In this embodiment, the wavelength of laser generator 20 is 650 nm. When the 650 nm wavelength laser beam penetrates the infusion solution, the particles in the solution (particle size > 200 nm) scatter the light. The scattered light intensity... With particle concentration Satisfying Relationship: In the formula, For the incident light intensity, For wavelength, It is the refractive index constant of the solution; by capturing the morphological changes of the scattered light path, it can directly reflect the distribution state of the particles in the solution.

[0027] Image acquisition unit 30 is used to capture dynamic scattered light images of the solution under laser irradiation. It employs an industrial camera with a resolution of no less than 4000×3000 pixels and is equipped with a macro lens, enabling it to clearly capture image details of the Tyndall effect produced by the solution inside the infusion bottle under laser irradiation. The industrial camera's frame rate is set to 30fps, allowing for real-time capture of dynamic changes in the solution, and the image data is transmitted at high speed to the host computer via a USB 3.0 interface.

[0028] The intelligent processing module is configured to perform the following operations: (a) The emission power of the laser generator 20 is adaptively adjusted to suit the color characteristics of the solution.

[0029] (b) The image acquired by the image acquisition device 30 is preprocessed and features are extracted to obtain the geometric and texture features of the Tyndall beam; wherein, the feature extraction operation includes: extracting the contour, length, width and the proportion of broken pixels of the Tyndall beam through edge detection technology; calculating the brightness variance, spatial frequency change and texture entropy value of the Tyndall beam.

[0030] (c) Analyze the feature sequence through a deep learning model and output the infusion quality grade determination result; wherein, the deep learning model is a hybrid architecture model based on OpenCV and DeepLabv3+; further, OpenCV is used for image preprocessing, including denoising, enhancement, and grayscale conversion; DeepLabv3+ is used to realize pixel-level semantic segmentation of Tyndall beam, multi-scale contextual feature extraction, and quality grade prediction.

[0031] (d) Based on the judgment result, trigger a visual alarm.

[0032] The intelligent processing module integrates a laser control circuit. The output of the laser control circuit is electrically connected to the laser generator 20 to adjust the emission power of the laser generator 20 using pulse width modulation technology, thereby achieving rapid switching of the power required for different solution detections. For its principle, please refer to [link to relevant documentation]. Figure 4 The LASER-PWM pin is connected to the microcontroller pin, and then the PWM input is sent to the terminal via the LASER input. The LASER+ terminal is connected to +12V, and the LASER- terminal outputs at least +7V. Therefore, the minimum PWM output of the microcontroller is 60% (i.e., +7.2V). Pressing the dimming button increments the PWM. Simultaneously, the system monitors the laser's operating current, temperature, and other parameters in real time. If any abnormality occurs, the power supply is automatically cut off to protect the laser's safe operation.

[0033] This embodiment uses an STM32F407 microcontroller to construct the laser control circuit, and adjusts the power through a constant current drive circuit. When the solution transmittance is ≥80%, the laser control circuit adjusts the emission power of the laser generator 20 to 3-8mW; when the solution transmittance is <80%, the laser control circuit adjusts the emission power of the laser generator 20 to 40-60mW. Specifically, for colorless, almost colorless, or slightly colored solutions, a 5mW laser generator 20 is used; for colored solutions, a 50mW laser generator 20 is used. When the laser beam emitted by the laser generator 20 irradiates the infusion solution, the Tyndall effect is utilized to scatter the light from the particles in the solution, forming an observable scattered light path, providing a visual basis for quality detection.

[0034] Please see Figure 5-7 The following section provides a detailed explanation of the image feature extraction and depth analysis models.

[0035] In this embodiment, the preprocessing and feature extraction of the acquired images mainly include preprocessing the acquired images based on OpenCV, including denoising (median filtering, Gaussian filtering), enhancement (histogram equalization), grayscale conversion, and other operations to improve image quality. Edge detection algorithms are used to extract the edges of the Tyndall effect beams, obtaining features such as beam shape, length, and width. This embodiment uses the Canny algorithm to extract the edges of the Tyndall effect beams, which satisfies the expression:

[0036] In the formula, For the horizontal and vertical gradients of the image, This is the standard deviation parameter.

[0037] The Canny algorithm uses the standard deviation parameter. Gaussian smoothing is performed to suppress noise, and the horizontal and vertical gradients of the image are calculated to obtain the gradient intensity. and direction Edge refinement is achieved by suppressing non-maximum values ​​and setting a high threshold. and low threshold Double threshold detection and edge connection are performed to obtain a binarized profile. Based on this profile, the length, width, and shape characteristics of the Tyndall effect beam are calculated.

[0038] The overall brightness of a light beam may indirectly reflect the concentration of scattered particles in the solution. The length, width, sharpness, and shape symmetry of the beam reflect the light propagation path; a sharp and symmetrical beam usually indicates a homogeneous and pure solution. Twisting, bifurcating, or irregular beams may suggest uneven concentration, impurity aggregation, or flow disturbance. The spatial distribution, density variation, and statistical properties of key points and their descriptor vectors can be used to detect dynamic processes in the solution and characterize texture uniformity, aiding in the identification of anomalies or the differentiation of solution types. Combining beam morphology and key point features in the analysis provides more comprehensive information about the solution state.

[0039] In this embodiment, a hybrid model based on OpenCV and DeepLabv3+ is used. A large number of Tyndall effect images of qualified and unqualified infusion solutions are pre-collected to construct and label a dataset containing beam features and quality levels. It should be noted that the pre-collected data has strict requirements, covering original Tyndall effect images of different quality levels, lighting conditions, solution types, and backgrounds to construct the basic dataset. Specifically, all images must be double-labeled: firstly, the bounding box positions of the Tyndall beams are accurately labeled; secondly, the corresponding quality level labels (qualified / unqualified) are added. To ensure model generalization, the qualified and unqualified datasets should include the following features: Qualified samples (≥60%) exhibit characteristics of being clear, continuous, and having a beam brightness standard deviation ≤15%; Non-compliant samples (≥40%) must cover multiple abnormal patterns, including beam dispersion (scattering angle > 10% of standard value), breakage (proportion of discontinuous beam length > 5%), uneven brightness distribution (local brightness difference > 30%), or cloudiness, i.e., specific texture feature values ​​exceed the standard.

[0040] The dataset is divided proportionally: 75% is used as the training set for model parameter learning, 20% as the validation set for training process monitoring, hyperparameter tuning, and overfitting detection, and the remaining 5% is used as an independent test set for final model generalization ability evaluation.

[0041] The model training process revolves around two core tasks: beam segmentation and quality level prediction. First, OpenCV is used for image preprocessing, performing operations such as denoising, enhancement, and grayscale conversion. Next, DeepLabv3+ is used for beam segmentation training. The encoder uses Xception as its backbone network. After image data input, it undergoes 3×3 convolutions, 1×1 convolutions, and image pooling operations at different dilation rates (Rate 6, Rate 12, Rate 18) to capture multi-scale Tyndall beam features and integrate them to obtain multi-scale contextual features. The decoder fuses the encoder output features after 1×1 convolution with low-level features. The low-level features are first convolved with 1×1, then concatenated with the encoder features upsampled by 4 times in a Concat module, followed by 3×3 convolutions and another 4-fold upsampling operation to output a pixel-level segmentation mask for the beam region.

[0042] Geometric features (such as contour integrity, percentage of broken pixels, and aspect ratio) and texture features (such as brightness variance, spatial frequency variation, and texture entropy) of the Tyndall beam are extracted based on the segmentation mask. The feature parameters are then standardized and input into the prediction branch of DeepLabv3+. Training employs a joint loss function of "cross-entropy loss (segmentation task) + mean squared error loss (turbidity prediction task)".

[0043] For cross-entropy loss, let the total number of samples be... , It is a sample The true label (the beam area is 1, and the background area is 0). This is the model's predicted probability value, and its expression is:

[0044] For mean squared error loss This is the true turbidity value. To predict turbidity values, the expression is:

[0045] The joint loss function is then:

[0046] By optimizing network parameters through backpropagation, the model learns the feature differences between qualified and unqualified samples. Qualified samples exhibit clear, continuous beam outlines and uniform brightness. Outline clarity is represented by edge gradient values ​​exceeding a set threshold, continuity is indicated by a lower proportion of broken pixels, and brightness uniformity is indicated by low variance. Unqualified samples exhibit diffuse, broken, or cloudy beam patterns. Diffuseness is represented by spatial frequency feature changes exceeding a threshold, brokenness is measured by discontinuous regions exceeding a certain proportion in connected component analysis, and cloudiness is represented by texture entropy values ​​exceeding a set threshold.

[0047] In addition, DeepLabv3+ was improved. An edge-aware branch was added at the decoder output. The Sobel operator was used to calculate the gradient map of the segmentation mask, and the edge gradient features were fused with the original segmentation features to enhance the recognition of the fine edges of the light beam. An attention gating unit was embedded in the encoder stage to learn the background region suppression weights and reduce the interference of non-light beam regions on feature extraction. The dilation rate configuration of the dilated spatial pyramid pooling module was improved, and the dilation rate of the convolution kernel was dynamically adjusted according to the size of the bounding rectangle of the light beam obtained by OpenCV preprocessing to improve the multi-scale light beam segmentation accuracy.

[0048] During actual detection, the input is an image preprocessed by OpenCV. DeepLabv3+ generates a pixel-level segmentation mask of the light beam through its encoder-decoder structure. After extracting and normalizing the features based on the mask, the prediction branch combines the edge details captured by the improved module and the background suppression weights to learn the complex non-linear mapping relationship between the light beam intensity distribution and the turbidity parameters. The high-precision turbidity comprehensive status value is output through the fully connected layer, and then the corresponding turbidity value is generated according to the pre-trained mapping relationship between the comprehensive status value and the solution turbidity. It is compared with the qualified threshold. If it is less than or equal to the qualified threshold, the solution is determined to be qualified; if it is greater, it is determined to be unqualified and an audible and visual alarm is triggered.

[0049] According to the prediction results of the deep learning analysis model, the final determination is made in combination with the preset quality determination criteria. As Figure 8 shown, if it is determined to be qualified, the host computer interface displays the "qualified" information and stores the detection results; if it is unqualified, the host computer displays the "unqualified" information, triggers an audible and visual alarm, and at the same time stores the unqualified image and related information for medical staff to check. It supports generating a detection report, including the detection time, infusion bottle information, quality determination results, etc., which can be printed or exported.

[0050] The information such as the image data, detection results, and quality determination criteria during the detection process is stored, and operations such as data query, statistics, and backup are supported. By analyzing the historical data, the parameters of the deep learning model are optimized to improve the detection accuracy and reliability.

[0051] The present invention also protects an infusion quality detection method based on the above system, and the method includes the following steps: S1. Load the infusion bottle onto the mechanical positioning device and make the laser beam vertically irradiate the center of the solution; S2. Select the corresponding laser emission power according to the solution color to stimulate the Tyndall effect; S3. Collect the dynamic scattered light image of the solution's Tyndall beam through a high-definition industrial camera; S4. The dynamic scattered light image is processed using DeepLabv3+. Multi-scale contextual features are extracted using convolution and image pooling operations with different hole rates in the encoder. These features are then fused with low-level features using the decoder to generate a pixel-level segmentation mask for the beam. Based on the segmentation mask, the geometric and texture features of the Tyndall beam are extracted, and the feature parameters are standardized. The geometric features include contour integrity, proportion of broken pixels, and aspect ratio. The texture features include brightness variance, spatial frequency variation, and texture entropy. The prediction branches of S5 and DeepLabv3+ are based on normalized features. With the help of improved edge enhancement modules and background suppression mechanisms, they learn the complex nonlinear mapping relationship between beam intensity distribution and turbidity parameters, and output high-precision comprehensive turbidity state values ​​through fully connected layers. S6. Based on the pre-trained mapping relationship between the comprehensive state value and the solution turbidity value established through calibration samples, generate the corresponding turbidity value according to the comprehensive state value; S7. Compare the turbidity value with the acceptable threshold: if the turbidity value is less than or equal to the acceptable threshold, the solution is deemed acceptable; otherwise, it is deemed unacceptable and an audible and visual alarm is triggered.

[0052] First, edge detection technology is applied to the acquired solution image, and the contour boundary of the Tyndall effect beam is accurately identified based on the grayscale difference between the beam and the background.

[0053] Next, connected component analysis is performed to eliminate small connected components with minor noise interference, and complete and effective beam regions are selected. At the same time, the geometric boundary coordinates (such as the vertex coordinates of the smallest bounding rectangle) and the contour point set (the edge pixel coordinates arranged in order) of this region are extracted to complete the acquisition of basic beam morphology information.

[0054] Then, OpenCV is used for image preprocessing, including denoising, enhancement, grayscale conversion, and other operations.

[0055] Subsequently, processing is performed based on the DeepLabv3+ model. In DeepLabv3+, after image input, the encoder with Xception as the backbone network extracts features by using 3×3 convolutions, 1×1 convolutions, and image pooling operations with different dilation rates (Rate 6, Rate 12, Rate 18) to obtain multi-scale contextual features. The decoder fuses the features from the encoder output after 1×1 convolution with the low-level features, and after upsampling, concatenation, and other operations, outputs a pixel-level segmentation mask of the beam region, thereby locating the beam region.

[0056] For the located beam region, OpenCV library functions are used to extract multi-dimensional quantized features: on the one hand, color features are extracted, such as the mean and variance of each RGB channel, and hue (H), saturation (S), and brightness (V) in HSV space; on the other hand, texture features are extracted, such as the contrast and energy of the gray-level co-occurrence matrix, as well as geometric features such as the area, perimeter, and aspect ratio of the beam region. These features are then standardized (e.g., Z-score normalization) to eliminate dimensional differences, resulting in a regular feature sequence.

[0057] Next, the continuously standardized feature sequences are input into the prediction branch of DeepLabv3+. This branch combines an improved edge enhancement module (which calculates the segmentation mask gradient map using the Sobel operator and fuses edge gradient features with the original segmentation features), an adaptive background suppression mechanism (embedding an attention gating unit in the encoder stage to learn background region suppression weights), and a dynamic scale-adjusted void space pyramid pooling module (which dynamically adjusts the void ratio according to the beam scale). This effectively captures key patterns such as beam brightness distribution features and texture complexity, and outputs a comprehensive state value that has a precise mapping relationship with the solution turbidity level.

[0058] Finally, based on the pre-established mapping model between the state value and the NTU turbidity value (determined through calibration experiments), the output comprehensive state value is converted into the corresponding NTU turbidity value. This turbidity value is then logically compared with a preset acceptable threshold. If it is less than or equal to the acceptable threshold, the solution turbidity is deemed acceptable; otherwise, it is deemed unacceptable. This completes the solution turbidity detection and judgment process.

[0059] In one specific embodiment, a non-invasive method for detecting infusion quality based on machine vision and the Tyndall effect includes the following steps: Step 1: Install the laser generator 20, laser control circuit, mechanical positioning device, high-definition camera, etc., according to the design requirements, and complete the electrical connections. After powering on, adjust parameters such as the output power of the laser generator 20, beam stability, high-definition camera image quality, and mechanical positioning device motion accuracy to ensure normal operation of the device. Install the software system on the host computer, perform initialization settings, including camera parameters, laser power mode, etc., and load the deep learning model and quality judgment criteria.

[0060] Step 2: Place the infusion bottle to be tested into clamp 10, and irradiate the center of the solution with the laser beam. Select the appropriate laser power mode based on the solution color.

[0061] Step 3: Start the image acquisition device 30, and use the high-definition camera to capture images of the solution inside the infusion bottle under laser irradiation and transmit them to the host computer. Then, perform preprocessing such as noise reduction, enhancement, and grayscale conversion on the images in sequence, and finally use edge detection and feature extraction algorithms to extract Tyndall effect-related features.

[0062] Step 4: Input the extracted feature data into the trained model of the deep learning analysis module. The model outputs the quality level prediction result. The result judgment and output module makes a final judgment according to preset standards. If it is qualified, the qualified information is displayed and the result is stored. If it is unqualified, an alarm is triggered and relevant information is recorded.

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

Claims

1. An infusion quality detection system, characterized in that, include: A mechanical positioning device includes a cabinet, wherein the cabinet houses a clamp for holding infusion bottles, a laser generator, and an image acquisition device, wherein: The laser generator is used to emit a laser beam with adjustable power, which irradiates the solution in the infusion bottle to excite the Tyndall effect; The image acquisition device is used to capture dynamic scattered light images of the solution under laser irradiation; The intelligent processing module is configured to perform the following operations: (a) The emission power of the laser generator is adaptively adjusted to suit the color characteristics of the solution; (b) Preprocessing and feature extraction are performed on the images acquired by the image acquisition device to obtain the geometric and texture features of the Tyndall beam; (c) Analyze the feature sequence using a deep learning model and output the infusion quality grade determination result; (d) Based on the determination result, trigger a visual alarm.

2. The infusion quality detection system according to claim 1, characterized in that, The laser generator is a semiconductor laser with a wavelength range of 630-670nm.

3. The infusion quality detection system according to claim 1, characterized in that, The intelligent processing module integrates a laser control circuit, the output of which is electrically connected to the laser generator to adjust the emission power of the laser generator using pulse width modulation technology.

4. The infusion quality detection system according to claim 3, characterized in that: When the solution transmittance is ≥80%, the laser control circuit adjusts the emission power of the laser generator to 3-8mW; When the solution transmittance is less than 80%, the laser control circuit adjusts the emission power of the laser generator to 40-60mW.

5. The infusion quality detection system according to claim 1, characterized in that, The feature extraction operations performed by the intelligent processing module include: The contour, length, width, and percentage of broken pixels of the Tyndall beam are extracted using edge detection technology. Calculate the brightness variance, spatial frequency variation, and texture entropy value of the Tyndall beam.

6. The infusion quality detection system according to claim 1 or 5, characterized in that, The deep learning model is a hybrid architecture model based on OpenCV and DeepLabv3+, wherein: Image preprocessing is performed using the OpenCV described above; The DeepLabv3+ is used to perform pixel-level semantic segmentation, multi-scale contextual feature extraction, and quality level prediction on the Tyndall beam.

7. The infusion quality detection system according to claim 1, characterized in that: The clamp contacts the neck of the infusion bottle, the infusion bottle is placed on the base plate, and the base plate has a laser inlet; The laser beam emitted by the laser generator passes through the laser inlet and irradiates from bottom to top along the central axis of the infusion bottle; The camera of the image acquisition device is positioned directly facing the infusion bottle and perpendicular to the central axis of the infusion bottle.

8. The infusion quality detection system according to claim 1 or 7, characterized in that, The clamp is made of elastic material, and the open end of the clamp is provided with an arc-shaped buckle to close the opening of the clamp.

9. The infusion quality detection system according to claim 1, characterized in that, The inner surface of the clamp that contacts the infusion bottle is provided with an anti-slip texture.

10. A method for detecting the quality of infusion based on the system according to any one of claims 1-9, characterized in that, Includes the following steps: S1. Load the infusion bottle into the mechanical positioning device and make the laser beam irradiate the center of the solution perpendicularly; S2. Select the corresponding laser emission power according to the solution color to stimulate the Tyndall effect; S3. Acquire dynamic scattered light images of the solution Tyndall beam using a high-definition camera; S4. The dynamic scattered light image is processed by DeepLabv3+, wherein multi-scale context features are extracted by using convolution and image pooling operations with different hole rates in the encoder, the multi-scale context features are fused with low-level features by the decoder to generate a pixel-level segmentation mask of the beam, the geometric features of the Tyndall beam are extracted based on the segmentation mask, and the geometric feature parameters are standardized. S5. The quality level prediction of DeepLabv3+ is based on standardized features. It learns the nonlinear mapping relationship between beam intensity distribution and turbidity parameter through an improved edge enhancement module and background suppression mechanism, and outputs the comprehensive turbidity state value through a fully connected layer. S6. Based on the pre-trained mapping relationship between the comprehensive state value and the solution turbidity value established through calibration samples, generate the corresponding turbidity value according to the comprehensive state value; S7. Compare the turbidity value with the qualified threshold: if the turbidity value is less than or equal to the qualified threshold, the solution is deemed qualified; otherwise, it is deemed unqualified and an audible and visual alarm is triggered.