A method and system for intelligent management of liquid veterinary drug production workshops
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]为解决泡沫干扰引起液位误判及静态补偿无法适应动态变化的问题,本发明提出一种液体兽药生产车间智能管理方法及系统,通过多源数据融合与物理机理建模,实现了全时段的高精度液位追踪与智能反馈控制
本发明通过同步采集药液瞬时流速数据与视觉图像数据,并完成时序对齐处理,利用感兴趣区域内的灰度分布特征精准计算泡沫纹理指数,进而成功构建了基于泡沫纹理指数及其一阶差分变化率的泡沫结构稳定性模型。该模型能够精准定位结构稳定的泡沫层,有效抑制了灌装初期飞溅干扰引发的视觉误判。
Smart Images

Figure CN121903177B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology. More specifically, this invention relates to an intelligent management method and system for a liquid veterinary drug production workshop. Background Technology
[0002] In the modern pharmaceutical industry, liquid veterinary drug filling production lines are developing towards higher speeds and greater automation. Liquid level control accuracy, as a core indicator of filling quality, directly affects product qualification rates, production costs, and corporate compliance. Traditional filling control methods often employ time-based or weighing methods. However, with the widespread adoption of machine vision technology, image processing-based non-contact liquid level detection is gradually becoming the mainstream solution due to its hygienic and efficient characteristics.
[0003] However, veterinary drug products containing high concentrations of surfactants or with high viscosity are prone to generating a large amount of foam during high-speed filling. Most current machine vision algorithms are based on geometric morphology, which makes it difficult to effectively distinguish between the actual liquid surface of liquid veterinary drugs and the top of the foam layer. This often leads the system to misjudge the top of the foam layer as the liquid level, resulting in insufficient actual filling volume. This misjudgment not only affects product quality but may also trigger a chain reaction of failures in subsequent processes.
[0004] To address the challenge of current machine vision algorithms effectively distinguishing between the actual liquid level and the top of the foam layer in liquid veterinary drugs, some existing technologies employ static subtraction strategies with fixed compensation values. However, the amount of foam generated is not constant; it exhibits complex nonlinear coupling with real-time flow rate, drug temperature, drug viscosity, and bottle structure. More problematic is the significant physical hysteresis of foam, meaning it doesn't immediately disappear after filling stops. At the end of variable-speed filling and at the moment of shutdown, static compensation methods cannot adapt to the dynamic changes in the foam layer, leading to drastic jumps in liquid level data at the end of filling, severely impacting the stability and accuracy of the control system. Therefore, an intelligent management method capable of accurately measuring the level of foam-containing liquids is urgently needed. Summary of the Invention
[0005] To address the issues of misjudgment of liquid level caused by foam interference and the inability of static compensation to adapt to dynamic changes, this invention proposes an intelligent management method and system for liquid veterinary drug production workshops. Through multi-source data fusion and physical mechanism modeling, it achieves high-precision liquid level tracking and intelligent feedback control throughout the entire time period.
[0006] In a first aspect, the present invention provides an intelligent management method for a liquid veterinary drug production workshop, comprising: synchronously collecting instantaneous flow rate data of the liquid at the front end of the filling valve and visual image data of the side of the medicine bottle, and performing time-series alignment of the visual image data and the instantaneous flow rate data of the liquid; performing image processing on the visual image data to extract the observation height including the liquid body and the foam layer, and calculating a foam texture index characterizing the richness of bubbles based on the gray-scale distribution characteristics of the region of interest; constructing a foam structure stability model based on the foam texture index, introducing the time change rate of the foam texture index as a suppression term, calculating a foam structure stability factor, using the foam structure stability factor to screen out structurally stable foam layers and suppress splash interference; inputting the instantaneous flow rate data of the liquid, the observation height, and the foam structure stability factor into a real liquid level decoupling formula to calculate the real liquid level after removing the foam layer thickness, and generating a closing control signal for the filling valve based on the real liquid level.
[0007] By adopting the above technical solution, on the one hand, through hardware deployment and a precise timestamp synchronization mechanism, the visual image data and the instantaneous flow rate data of the liquid are strictly correlated in time. This not only eliminates the information silos formed by a single data source, but also addresses the deficiency of traditional methods in perceiving the internal structure of foam by using the entropy value feature of the gray-level co-occurrence matrix to characterize the texture complexity of the region of interest, thereby objectively reflecting the density of bubbles and overcoming the misjudgment of the actual liquid surface and the top of the foam layer by machine vision algorithms. On the other hand, a mathematical model including the time change rate of the foam texture index is constructed. By utilizing the physical difference in the frequency of change between splashing droplets and the stable foam layer, splashing noise in the early stage of filling is filtered out from the algorithm level, ensuring that compensation is only applied to the stable foam layer, thereby improving the anti-interference capability of the system.
[0008] Preferably, the extraction of the observation height including the liquid body and the foam layer includes: performing Gaussian filtering to denoise the visual image data; calculating a segmentation threshold using the maximum inter-class variance method to binarize the image into a content region and a background region; extracting the uppermost row coordinates of the content region and converting them into physical height as the observation height.
[0009] By adopting the above technical solution, Gaussian filtering is first used to process the visual image data, which can efficiently filter out interference caused by uneven lighting and sensor thermal noise in the filling environment, thus significantly improving image quality. Then, the optimal segmentation threshold is automatically calculated using the maximum inter-class variance method. This threshold allows for precise separation of the contents from the complex background. This separation process not only fully covers the liquid itself but also retains the information of the top layer of foam, thus specifically solving the problem mentioned in existing technologies of the difficulty in effectively distinguishing the actual liquid surface of liquid veterinary drugs from the top of the foam layer. Finally, by extracting pixel coordinates and converting them into physical height, a precise and physically meaningful raw data base is constructed for the subsequent real liquid level decoupling formula. This standardized image preprocessing workflow greatly enhances the adaptability and detection stability of the intelligent management system in the liquid veterinary drug production workshop when faced with different bottle types and drug colors, effectively improving the liquid level control accuracy of the liquid veterinary drug filling production line.
[0010] Preferably, the calculation of the foam texture index characterizing the abundance of bubbles includes: cropping an image sub-region of a preset height downwards from the row where the observation height is located as the gas-liquid interface analysis area; calculating the gray-level co-occurrence matrix of the gas-liquid interface analysis area, and extracting the entropy value of the gray-level co-occurrence matrix as the foam texture index.
[0011] By employing the aforementioned technical solution, a specific gas-liquid interface analysis zone is constructed below the observation height, and the entropy feature of the gray-level co-occurrence matrix is introduced, successfully transforming complex visual textures into calculable physical indicators. Compared to traditional machine vision algorithms that only focus on geometric edges, the feature extraction method based on information entropy in this invention possesses extremely high sensitivity, accurately capturing the subtle changes in the surface of the liquid as it transitions from a smooth liquid state to a chaotic foam state. This effectively overcomes the deficiency of traditional algorithms in being unable to perceive the internal structure of foam, providing multi-dimensional and crucial feature inputs for the subsequent construction of a foam structure stability model. Consequently, it significantly improves the recognition accuracy of liquid veterinary drug production workshop intelligent management systems for liquids with different viscosities and foaming characteristics.
[0012] Preferably, the foam structure stability factor satisfies the following relationship: ; in, express The stability factor of the foam structure at any given time. express The foam texture index at any given moment. This indicates the foam texture index at the previous moment. Indicates the sampling time interval. Represents the fundamental constant. This represents the dissipation time constant.
[0013] By adopting the above technical solution, the difference between the high-frequency transients of splashed liquid and the spatiotemporal continuity of stable foam layers is cleverly utilized. This ensures that the management system of the liquid veterinary drug production workshop can accurately screen out the stable foam structure that truly needs compensation, while effectively suppressing splash interference. This avoids fluctuations in liquid level calculation caused by visual interference, solves the pain point of traditional machine vision algorithms being unable to distinguish between the real liquid surface and splashed foam, and provides a stable and reliable correction benchmark for subsequent full-process and high-precision real liquid level tracking.
[0014] Preferably, the actual liquid level after removing the foam layer thickness satisfies the following relationship: ; in, express The actual liquid level at any given time. express The observation altitude at any given time express The instantaneous flow rate of the medicine at any given moment. Indicates the dimension alignment factor. As a stability factor for foam structure, Indicates the reference flow rate. It is a natural constant. It is the natural logarithm function.
[0015] By adopting the above technical solution, the complex nonlinear coupling relationship between observation height, foam stability, and instantaneous flow rate of the liquid is comprehensively considered. Based on this, the logarithmic function is cleverly used to calculate the boosting effect of flow rate on foam height. Simultaneously, leveraging the unique mathematical properties of the natural logarithm and the natural constant, even during the static stage when the flow rate is 0, the intelligent management system for the liquid veterinary drug production workshop can maintain a reasonable compensation amount based on the foam structure stability factor and accurately reproduce the physical lag process of foam dissipation. This not only effectively eliminates the phenomenon of liquid level data jumps during shutdown but also ensures the smoothness and stability of the closed-loop control signal, thereby significantly improving filling accuracy.
[0016] Preferably, the step of aligning the visual image data and the instantaneous flow rate data of the liquid medicine in time includes: receiving the instantaneous flow rate data of the liquid medicine and the visual image data through an edge computing gateway; and assigning a unified timestamp to each frame of the visual image data and each piece of the instantaneous flow rate data of the liquid medicine based on the system clock of the edge computing gateway to ensure data synchronization in the time dimension.
[0017] By adopting the above technical solution and relying on the high-precision clock of the edge computing gateway, a unified timestamp is accurately assigned to visual image data and instantaneous liquid flow rate data, enabling precise synchronization of multi-source data. This time-series alignment provides a basis for synchronized input to the subsequent real liquid level decoupling formula, significantly improving the accuracy and robustness of the system calculations.
[0018] Preferably, the real liquid level decoupling formula includes correction logic for the filling and settling period, specifically including: when filling is completed and the instantaneous flow rate data of the liquid is zero, the result of the logarithmic term in the real liquid level decoupling formula is a set value; the product of the foam structure stability factor and the set value is used as a continuous foam compensation amount to continue to correct the real liquid level after the flow rate stops.
[0019] By adopting the above technical solution, a correction logic for the flow rate returning to zero is innovatively introduced into the actual liquid level decoupling formula. This ensures that even when the filling valve is closed and the flow rate is zero, the logarithmic term in the intelligent management system of the liquid veterinary drug production workshop can still stably output the set value. This design cleverly utilizes the product of the foam structure stability factor and the set value to construct a minimum support for the actual liquid level calculation, thereby restoring the physical process of natural foam dissipation. This measure not only effectively avoids the problem of drastic jumps in calculation results when the flow rate is zero, but also achieves a seamless transition and connection from dynamic filling state to static monitoring state, providing a solid guarantee for the accuracy of the final liquid level determination.
[0020] Preferably, the step of setting the numerical value of the dimensional alignment coefficient includes: obtaining the cross-sectional area data of the bottle mouth of the medicine bottle used for filling; determining the dimensional alignment coefficient applicable to the current filling batch according to the inverse relationship between the cross-sectional area data of the bottle mouth and the dimensional alignment coefficient, so as to convert the dimensionless calculated value into a physical thickness value.
[0021] By adopting the above technical solution, the cross-sectional area data of the bottle opening is introduced as an adjustment benchmark, and an inverse proportional relationship between it and the dimensional alignment coefficient is constructed. Through this ingenious design, the algorithm successfully achieves a precise mapping from dimensionless numerical calculations to physical thickness units. In industrial production, the measurement deviation problem caused by differences in container shape, as mentioned in the background technology, is quite common. This innovative design allows the intelligent management system of the liquid veterinary drug production workshop to dynamically and accurately adjust compensation parameters based on the container specifications of the current filling batch, thereby effectively solving the foam thickness perception error caused by differences in bottle structure.
[0022] Preferably, the method further includes a process alarm step: statistically analyzing the peak data of the foam structure stability factor during all filling processes within a filling batch; calculating the average value of the peak data; if the average value of the peak data exceeds a preset stability threshold, then determining that the foaming characteristics of the current batch of liquid are abnormal, and issuing a process alarm signal.
[0023] Secondly, the present invention provides an intelligent management system for a liquid veterinary drug production workshop, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned intelligent management method for a liquid veterinary drug production workshop is implemented.
[0024] By adopting the above technical solution, a computer program for the intelligent management method of liquid veterinary drug production workshop is generated and stored in a memory so that it can be loaded and executed by a processor. Terminal equipment can then be made based on the memory and processor for convenient use.
[0025] The beneficial effects of this invention are: This invention simultaneously acquires instantaneous flow velocity data of the liquid medicine and visual image data, performs time-series alignment processing, and accurately calculates the foam texture index using the grayscale distribution characteristics of the region of interest. This leads to the successful construction of a foam structure stability model based on the foam texture index and its first-order differential rate of change. This model can accurately locate structurally stable foam layers and effectively suppress visual misjudgments caused by splashing interference in the initial filling stage.
[0026] Furthermore, this invention introduces a decoupling formula for the actual liquid level that includes a natural constant and a logarithmic function. It cleverly utilizes the mathematical property that the logarithmic term becomes a constant when the flow rate returns to zero to construct a physical support logic for liquid level correction. This ensures that the intelligent management system for liquid veterinary drug production workshop can continue to output the corrected actual liquid level based on the stability factor of the residual foam structure during the settling stage after filling. This not only achieves high-precision, all-time liquid level tracking for liquids of different viscosities, but also has the ability to provide intelligent early warning of abnormal foaming characteristics of liquids. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating an intelligent management method for a liquid veterinary drug production workshop according to the present invention; Figure 2 This is a schematic diagram illustrating the real-time comparison and analysis of liquid level monitoring data provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the dynamic logic of intermediate variables in the algorithm provided in an embodiment of the present invention. Detailed Implementation
[0028] 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 some embodiments of the present invention, but not all embodiments.
[0029] This invention discloses an intelligent management method for veterinary drug production workshops, referring to... Figure 1 This includes steps S1-S4: S1. Synchronously collect instantaneous flow rate data of the liquid medicine at the front end of the filling valve and visual image data of the side of the medicine bottle, and perform time-series alignment of the visual image data and the instantaneous flow rate data of the liquid medicine.
[0030] In one optional embodiment, a high-precision flow meter and an industrial camera are first installed at the filling station in the veterinary drug production workshop to collect instantaneous flow rate data of the filled liquid and visual image data of the medicine bottle. It is important to note that to ensure the spatiotemporal consistency of the instantaneous flow rate data and visual image data, the system's edge computing gateway needs to perform unified data aggregation. In a specific implementation, a high-precision flow meter, such as a mass flow meter or electromagnetic flow meter, needs to be installed on the pipeline upstream of the filling valve at the filling station in the veterinary drug production workshop to monitor the instantaneous velocity of the liquid flowing through this pipeline in real time; simultaneously, a high-speed industrial camera needs to be installed on the side of the medicine bottle to acquire images of the liquid level inside the bottle during the filling process.
[0031] While collecting instantaneous flow rate data of the liquid medicine and visual image data, the edge computing gateway, as a data hub, receives flow rate signals from a high-precision flow meter and image frames from an industrial camera. The edge computing gateway timestamps each received image frame and each flow rate signal according to its own system high-precision clock. At the same time, in order to ensure that the collected flow rate signals and image frames are strictly aligned in the time dimension, the sampling period of the collected flow rate signals and image frames should be consistent. In this embodiment of the invention, the sampling period of both the collected flow rate signals and visual image data is set to 10 milliseconds, thereby providing a basis for subsequent fusion calculations.
[0032] In this way, by performing strict time-series alignment and synchronous acquisition of multi-source data through the edge computing gateway, errors caused by hardware transmission delays are eliminated, providing an accurate and reliable data foundation for subsequent data fusion analysis based on physical mechanisms.
[0033] S2. Perform image processing on the visual image data to extract the observation height containing the liquid body and the foam layer, and calculate the foam texture index, which characterizes the richness of bubbles, based on the gray-scale distribution characteristics of the region of interest.
[0034] In an optional embodiment, after obtaining synchronized flow velocity signals and visual image data, the visual image data first needs to be preprocessed. In this embodiment, the original image is first smoothed using a Gaussian filtering algorithm to remove noise caused by uneven lighting or sensor thermal noise. Then, the optimal segmentation threshold is calculated using the maximum inter-class variance method, and the grayscale image is binarized into a content region and a background region, where the content region includes both liquid and foam states. In one embodiment of this invention, the top row coordinates of the pixel coordinates of the content region are extracted, and converted into physical height based on the pixel equivalent calibrated by the camera, and recorded as the observation height. It should be noted that the observation height at this time is the sum of the liquid body height and the foam layer height. Direct use will result in insufficient filling volume.
[0035] To assess the observation height The present invention introduces a foam texture index to address the foam content in the material. For observation altitude The foam content in the image is evaluated. Specifically, a rectangular sub-region of the image with a preset height is cropped downwards from the row at the observation height and defined as the gas-liquid interface analysis region. Then, the gray-level co-occurrence matrix of the gas-liquid interface analysis region is calculated, and the entropy value of the gray-level co-occurrence matrix is further calculated. This entropy value characterizes the complexity and randomness in image processing. If the gas-liquid interface analysis region is a pure liquid, the texture of the gas-liquid interface analysis region is smooth and uniform, and the entropy value is low. If the gas-liquid interface analysis region contains bubbles of different sizes, the texture of the gas-liquid interface analysis region is disordered, and the entropy value will increase significantly.
[0036] Thus, by combining threshold segmentation with gray-level co-occurrence matrix entropy calculation, not only was the geometric height of the liquid surface obtained, but the density of bubbles was also objectively assessed through texture features, providing multi-dimensional feature inputs for subsequent differentiation between the foam layer and the liquid body.
[0037] S3. Construct a foam structure stability model based on the foam texture index, introduce the time change rate of the foam texture index as a suppression term, calculate the foam structure stability factor, and use the foam structure stability factor to screen out structurally stable foam layers and suppress splashing interference.
[0038] In an optional embodiment, during the initial stage of filling the liquid, the liquid flow rate is relatively fast. At this time, the liquid is more likely to impact the bottom of the bottle and splash during the filling process. The splashed liquid will also generate foam and cause a high texture index. However, the foam in this case is not stable and should not be regarded as a foam layer that needs compensation. In the middle and later stages of filling the liquid, the foam layer formed by the accumulation of bubbles is relatively stable in structure and should be regarded as a foam layer that needs compensation. Therefore, in order to distinguish the foam layers in these two states, this embodiment of the invention constructs a foam structure stability factor. Foam structure stability factor is used to characterize the stability of foam generated during the filling process of pharmaceutical solutions. The calculation method is as follows: ; in, express The stability factor of the foam structure at any given time; express The foam texture index at any given moment; This represents the foam texture index at the previous moment; Indicates the sampling time interval; Basic constants; This is the dissipation time constant.
[0039] To more clearly illustrate the role and calculation process of the foam structure stability factor, the embodiments of the present invention will be explained by examples below: First, set the sampling time interval. =0.01; fundamental constant =1; dissipation time constant It is 0.5; it should be noted that the dissipation time constant is 0.5. The dissipation time constant is positively correlated with the viscosity of the drug solution; that is, the higher the viscosity of the drug solution, the longer the dissipation time constant. The larger the value of ; In one alternative embodiment, an example scenario is provided, where the process is in the later stages of drug filling and the foam layer is relatively stable: Assuming in At that moment, the system detected abundant foam and a texture index for Texture index of the previous moment If it is 0.79, then: ; In one optional embodiment, an example of scenario two is provided, where the foam layer is unstable during the early stage of liquid filling: Assuming in At that moment, the system detected an occasional splash of liquid medicine that caused a decrease in the texture index. for However, the texture index of the previous moment If it is 0.1, then .
[0040] The comparison between scenario one and scenario two shows that when foam is generated due to occasional splashing of the medicine in the early stage of medicine filling, the change is too rapid. Therefore, the system judges it as medicine splashing and does not provide much compensation.
[0041] Thus, by introducing the time rate of change of the texture index as a denominator suppression term, the model can automatically and accurately select structurally stable foam layers from a mathematical logic perspective, effectively shielding splash interference during the filling process and ensuring the robustness of the compensation decision.
[0042] S4. Input the instantaneous flow rate data of the liquid, the observation height and the foam structure stability factor into the real liquid level decoupling formula, calculate the real liquid level after removing the foam layer thickness, and generate the closing control signal of the filling valve based on the real liquid level.
[0043] In an optional embodiment, after calculating the foam structure stability factor, the actual liquid level of the drug can be calculated. Since the foam height depends not only on the filling stage and the foam's viscosity, but also on the instantaneous flow rate of the drug, this embodiment of the invention combines the effects of the foam structure stability factor and the instantaneous flow rate of the drug to calculate the actual liquid level. The calculation method is as follows: ; in, for The actual liquid level at any given time; For observation altitude; The instantaneous flow rate of the liquid medicine; This is the dimensional alignment factor; As a stability factor for foam structures; For reference flow rate; It is a natural constant.
[0044] To more clearly illustrate the calculation process of the actual liquid level of the medicine, the following embodiments of the present invention will be explained by example: First, let's define the current time. During the middle and later stages of drug filling, the foam layer is relatively stable. 1.046; observation altitude The value is 105; the flow meter reading displays the current flow rate. The system's preset reference flow rate is 200. =100; dimensional alignment factor The value is 2. Therefore... .
[0045] When the filling valve is closed, the flow rate The value instantly drops to 0, at which point the logarithmic term in the formula becomes... At this point, the correction amount for the system to calculate the actual liquid level of the medicine becomes... In other words, as long as the foam has not completely dissipated, the correction amount still exists, thus constructing a minimum support for the actual liquid level of the drug, preventing the calculation result from becoming zero when the flow rate reaches zero, and characterizing the hysteresis process of foam dissipation.
[0046] When the true liquid level of the medicine is calculated Then, the system compares the actual liquid level of the medicine with the preset target liquid level. If the actual liquid level of the medicine is not lower than the preset target liquid level, the control system immediately sends a command to close the filling valve, thereby ensuring that the actual amount of medicine filled in the bottle meets the standard.
[0047] It is important to note that the dimensional alignment factor is inversely proportional to the cross-sectional area of the medicine bottle opening. This means that when the production line changes to medicine bottles of different diameters or shapes, the dimensional alignment factor needs to be reset to ensure that the calculated physical thickness is accurate.
[0048] The steps for setting the dimensional alignment coefficient include: first, obtaining the cross-sectional area data of the bottle opening used for filling; determining the applicable dimensional alignment coefficient for the current filling batch based on the inverse relationship between the cross-sectional area data and the dimensional alignment coefficient; the value of the dimensional alignment coefficient decreases as the cross-sectional area of the bottle opening increases; and converting the dimensionless calculated value into a physical thickness value through the dimensional alignment coefficient.
[0049] Thus, by employing a decoupled formula incorporating natural constants and logarithmic functions, not only is the nonlinear boosting effect of flow velocity on foam height demonstrated, but more importantly, the problem of calculating the foam residence time after the flow velocity stops is solved, achieving continuous real-time liquid level tracking. Furthermore, by using the real liquid level for closed-loop control and leveraging intermediate variables for process early warning, not only is high-precision control of single-bottle filling achieved, but also intelligent monitoring and management of the stability of the entire production line process is realized.
[0050] As a specific embodiment of the present invention, the system is also equipped with an intelligent early warning system, which will count during the filling process. If the average value of the peak data of the foam structure stability factor of multiple consecutive bottles exceeds the preset threshold, it indicates that the foaming tendency of this batch of liquid medicine is abnormally enhanced. This indicates that there is an abnormality in this batch of liquid medicine. At this time, the system will trigger an automatic alarm, generate alarm information and remind the operator to pay attention to the problem in the production process of the liquid medicine.
[0051] Reference Figure 2 The curve representing the traditional visual detection value is consistently higher due to the inclusion of a foam layer; the curve representing the liquid level calculated by this invention closely matches the actual physical liquid level curve, thus demonstrating the robustness of the detection method of this invention. (Refer to...) Figure 3The dashed line representing the change in filling flow rate returns to zero after about 9 seconds, while the solid line representing the foam structure stability factor does not immediately return to zero, but decreases slowly. This accurately reflects the physical process of the natural dissipation of foam and ensures that the system can still calculate a reasonable compensation value during the shutdown and resting phase.
[0052] This invention also discloses an intelligent management system for a liquid veterinary drug production workshop, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the intelligent management method for a liquid veterinary drug production workshop according to this invention is implemented.
[0053] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0054] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise expressly and specifically defined.
Claims
1. A method for intelligent management of a liquid veterinary drug production workshop, characterized in that, include: Simultaneously collect instantaneous flow rate data of the liquid medicine at the front end of the filling valve and visual image data of the side of the medicine bottle, and perform time-series alignment of the visual image data and the instantaneous flow rate data of the liquid medicine; The visual image data is processed to extract the observation height including the liquid body and the foam layer, and the foam texture index, which characterizes the richness of bubbles, is calculated based on the gray-scale distribution characteristics of the region of interest. A foam structure stability model is constructed based on the foam texture index. The time change rate of the foam texture index is introduced as a suppression term. A foam structure stability factor is calculated. The foam structure stability factor is used to screen out structurally stable foam layers and suppress splashing interference. The instantaneous flow rate data of the liquid, the observation height, and the foam structure stability factor are input into the real liquid level decoupling formula to calculate the real liquid level after removing the foam layer thickness, satisfying the following relationship: ; in, express The actual liquid level at any given time. express The observation altitude at any given time express The instantaneous flow rate of the medicine at any given moment. Indicates the dimension alignment factor. As a stability factor for foam structure, Indicates the reference flow rate. It is a natural constant. It is the natural logarithm function; The true liquid level decoupling formula includes correction logic for the filling and settling period, specifically including: when filling is completed and the instantaneous flow rate data of the liquid is zero, the result of the logarithmic term in the true liquid level decoupling formula is a set value; the product of the foam structure stability factor and the set value is used as a continuous foam compensation amount to continue to correct the true liquid level after the flow rate stops. A closing control signal for the filling valve is generated based on the actual liquid level.
2. The intelligent management method for a liquid veterinary drug production workshop according to claim 1, characterized in that, The extraction includes observation heights of the liquid volume and foam layer, including: The visual image data is subjected to Gaussian filtering for noise reduction. The segmentation threshold is calculated using the Otsu's method, and the image is binarized into content regions and background regions. Extract the topmost row coordinates of the content region and convert them into physical height as the observation height.
3. The intelligent management method for a liquid veterinary drug production workshop according to claim 1, characterized in that, The foam texture index, which characterizes the abundance of bubbles, includes: A sub-region of the image at a preset height is cropped downwards from the row where the observation height is located as the gas-liquid interface analysis area; Calculate the gray-level co-occurrence matrix of the gas-liquid interface analysis region, and extract the entropy value of the gray-level co-occurrence matrix as the foam texture index.
4. The intelligent management method for a liquid veterinary drug production workshop according to claim 1, characterized in that, The stability factor of the foam structure satisfies the following relationship: ; in, express The stability factor of the foam structure at any given time. express The foam texture index at any given moment. This indicates the foam texture index at the previous moment. Indicates the sampling time interval. Represents the fundamental constant. This represents the dissipation time constant.
5. The intelligent management method for a liquid veterinary drug production workshop according to claim 1, characterized in that, The step of time-series alignment of the visual image data and the instantaneous flow rate data of the liquid medicine includes: The instantaneous flow rate data of the liquid medicine and the visual image data are received through an edge computing gateway; Based on the system clock of the edge computing gateway, a unified timestamp is assigned to each frame of the visual image data and each instantaneous flow rate data of the liquid medicine to ensure data synchronization in the time dimension.
6. The intelligent management method for a liquid veterinary drug production workshop according to claim 4, characterized in that, The steps for setting the numerical value of the dimension alignment coefficient include: Obtain the cross-sectional area data of the bottle opening for filling; Based on the inverse relationship between the bottle mouth cross-sectional area data and the dimensional alignment coefficient, the dimensional alignment coefficient applicable to the current filling batch is determined, so as to convert the dimensionless calculated value into a physical thickness value.
7. The intelligent management method for a liquid veterinary drug production workshop according to claim 4, characterized in that, The method also includes a process alarm step: The peak data of the foam structure stability factor were statistically analyzed during all filling processes within a filling batch. Calculate the average value of the peak data; If the average value of the peak data exceeds the preset stability threshold, the foaming characteristics of the current batch of medicine solution are determined to be abnormal, and a process alarm signal is issued.
8. An intelligent management system for a liquid veterinary drug production workshop, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for intelligent management of a liquid veterinary drug production workshop according to any one of claims 1 to 7.
Citation Information
Patent Citations
Ore pulp liquid level prediction method and system based on flotation froth dynamic characteristics and storage medium
CN119863630A
Quartz sand flotation froth characteristic and dosage linkage control method
CN121266729A