Dynamic filling method and system of traditional Chinese medicine liquid filling equipment and storage medium

By dynamically adjusting the filling speed and using image data-driven venting technology, combined with extrusion rollers and ultrasonic vibration components, the problem of gas mixing during the filling of traditional Chinese medicine liquid was solved, achieving efficient removal of air bubbles and quality control of the production process.

CN121134098APending Publication Date: 2025-12-16SHANGHAI ZHENRENTANG PHARM CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511664869.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

During the filling process of traditional Chinese medicine liquid, gas mixing leads to a large number of air bubbles. During transportation, foam is generated, which affects the consumer's consumption experience. Existing filling equipment lacks effective gas treatment methods.

Method used

By acquiring product information for filling, calculating air volume and viscosity reference values, dynamically adjusting the filling speed, and generating venting commands based on image data, the system utilizes extrusion rollers and ultrasonic vibration components for targeted venting, thereby optimizing the packaging process.

Benefits of technology

This reduces residual gas after the traditional Chinese medicine liquid is filled, minimizes foam generation during transportation, improves the consumer experience, and ensures stable production quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121134098A_ABST
    Figure CN121134098A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of filling equipment, and discloses a dynamic filling method and system of traditional Chinese medicine liquid filling equipment and a storage medium. The method comprises the steps that based on a filling starting instruction, the viscosity and filling and packaging data of a traditional Chinese medicine liquid product are obtained, and the volume and viscosity reference value is calculated to obtain a filling reference value; according to this, one-time / multi-time filling is distinguished, and the filling speed is adapted; and after filling, collecting a semi-finished product image to extract gas data, generating a passive or active exhaust instruction to remove bubbles, and completing packaging. And weighting coefficients and the like can be calculated based on finished product bubble monitoring data, reverse optimization exhaust judgment parameters, filling reference values and the like. According to the scheme, residual gas and transportation foam of the traditional Chinese medicine liquid can be reduced, the taking experience is improved, and the production quality stability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of filling equipment, and in particular to a dynamic filling method, system and storage medium for a traditional Chinese medicine liquid filling equipment. Background Technology

[0002] Traditional Chinese medicine (TCM) liquids originate from traditional Chinese medicine processing techniques. In the early days, they were mostly prepared and used immediately by medical institutions or pharmacies, stored temporarily in earthenware jars or clay pots. This resulted in short storage periods and dosage control based on experience, making it difficult to meet the needs of large-scale use. With the innovation of TCM extraction processes, the introduction of technologies such as supercritical fluid extraction and membrane separation has enabled the precise enrichment of effective components and the removal of impurities. Packaging has gradually shifted from large bulk containers to small-dose bottles and bags, propelling TCM liquids into the industrial production stage. The application of TCM liquids in primary healthcare and home health care is becoming increasingly widespread, leading to continuously increasing requirements for the quality and stability of their production process, which in turn drives the upgrading of supporting technologies. The technology for filling traditional Chinese medicine liquids has gradually upgraded along with the development of pharmaceutical preparations: In the early stages, manual filling with spoons or funnels was relied upon, which was inefficient and prone to contamination and dosage deviation. Subsequently, semi-automatic mechanical filling equipment emerged, which used cylinders to drive pistons to achieve quantitative filling, improving efficiency, but still requiring manual assistance for bottle loading and positioning. In recent years, fully automated filling production lines have been put into use, integrating automatic bottle loading, filling, and sealing processes, and have also introduced flow sensors to achieve precise dosage control. Current filling technologies focus primarily on dosage control and pollution prevention, but lack effective means to handle the gases generated during the filling process. As a result, there are many air bubbles in the filled Chinese medicine liquid, and these bubbles are easily generated during transportation and shaking. When consumers use the product, the bubbles will affect their consumption experience. Summary of the Invention

[0003] To reduce the amount of gas left behind after filling traditional Chinese medicine liquid, this application provides a dynamic filling method, system, and storage medium for traditional Chinese medicine liquid filling equipment.

[0004] Firstly, this application provides a dynamic filling method for a traditional Chinese medicine liquid filling equipment, employing the following technical solution: A dynamic filling method for a traditional Chinese medicine liquid filling equipment includes the following steps: Based on the filling start command, obtain the filling product information corresponding to the traditional Chinese medicine liquid product, and extract the product viscosity, filling data and packaging data from the filling product information; The air volume is calculated based on the filling and packaging data, and the volume reference value is calculated based on the air volume and the preset reference volume. The viscosity reference value is calculated based on the product viscosity and the preset reference viscosity; The filling reference value is calculated based on the volume reference value and the viscosity reference value; If the filling reference value is less than the preset first reference value, then it is set as a single-fill product, and the filling speed is negatively correlated with the filling reference value; otherwise, it is set as a multi-fill product, and the filling speed is positively correlated with the filling reference value; then proceed with the filling of traditional Chinese medicine liquid. After the Chinese medicine liquid is filled, the image data of the semi-finished product is collected in real time, the gas image data is extracted from the semi-finished product image data, and the gas image data is compared with the preset gas comparison data to generate a passive exhaust command or an active exhaust command. In response to a passive exhaust command, the exhaust is allowed to remain stationary for a preset first duration; or, in response to an active exhaust command, the exhaust is allowed to be actively performed for a preset first duration. The exhaust speed and exhaust amplitude are extracted from the active exhaust command. The extrusion rollers on both sides of the product packaging are controlled to move towards each other at the exhaust speed to extrude the product packaging. The stroke of the extrusion rollers is the exhaust amplitude. Complete the product packaging sealing.

[0005] By adopting the above technical solution, product information is obtained based on the filling start command, product viscosity, filling data, and packaging data are extracted, and air volume and volume reference values ​​and viscosity reference values ​​are calculated to obtain filling reference values. This distinguishes between single-fill products and multi-fill products and matches the filling speed settings, reducing the impact of neglecting venting while focusing on dosage control. After the Chinese medicine liquid is filled, semi-finished product image data is collected in real time, and gas image data is extracted and compared with preset gas comparison data to generate passive or active venting commands. In response to the passive venting command, static venting is performed for a preset first duration, or in response to the active venting command, the squeezing rollers on both sides of the product packaging move in opposite directions to squeeze the packaging at the extracted venting speed and amplitude, which can specifically remove air bubbles in the medicine liquid. Finally, the product packaging is completed, reducing foam generated by transportation shaking, improving the consumer's consumption experience, and reducing the gas left in the filling Chinese medicine liquid.

[0006] Optionally, the step of generating passive exhaust commands or active exhaust commands may further include the following sub-steps: Obtain packaging image templates for the product packaging based on the filling product information; The outer contour data of the semi-finished product is matched from the image data of the semi-finished product using the packaging image template. The internal data of the semi-finished product is extracted from the outer contour data of the semi-finished product. The internal data of the semi-finished product does not include the outer contour data of the semi-finished product. Extract the inner contour data of the semi-finished product from the internal data of the semi-finished product, calculate the number of inner contour lines based on the calculated inner contour data of the semi-finished product, and calculate the inner contour aggregation value based on the calculated inner contour data of the semi-finished product. If the number of inner contour lines is less than the preset number of inner contour comparisons and the inner contour aggregation value is less than the preset aggregation comparison value, a passive exhaust command is generated and output; otherwise, an active exhaust command is generated, the preset exhaust speed and exhaust amplitude are read, the quantity adjustment value is calculated based on the number of inner contour lines and the number of inner contour comparisons, the exhaust speed is adjusted according to the positive correlation of the quantity adjustment value, the aggregation adjustment value is calculated based on the inner contour aggregation value and the aggregation comparison value, and the exhaust amplitude is adjusted according to the negative correlation of the aggregation adjustment value.

[0007] By adopting the above technical solution, the outer contour data and inner contour data of the semi-finished product are accurately extracted through the packaging image template. The exhaust method is determined by combining the number of inner contour lines and the inner contour aggregation value. The exhaust speed and amplitude are dynamically adjusted so that the exhaust command is more in line with the actual state of the bubble, thereby improving the targeting and efficiency of the exhaust.

[0008] Optionally, the step of allowing the exhaust gas to settle may also include the following sub-steps: An ultrasonic vibration component is installed next to the packaging component. In response to a passive exhaust command, the ultrasonic vibration component is controlled to vibrate the semi-finished product at a preset vibration frequency for a second duration; wherein the second duration is shorter than the first duration. The second duration is adjusted according to the positive correlation between the quantity adjustment value and the second duration; the larger the quantity adjustment value, the longer the second duration, and the smaller the quantity adjustment value, the shorter the second duration. The vibration frequency is adjusted according to the positive correlation between the aggregation adjustment value and the aggregation adjustment value; the larger the aggregation adjustment value, the higher the vibration frequency, and the smaller the aggregation adjustment value, the lower the vibration frequency.

[0009] By adopting the above technical solution, ultrasonic vibration is used to assist in static air exhaust, and the parameters are adjusted to adapt to the bubble state, the bubble escape is accelerated, the static air exhaust efficiency is improved, and the defoaming effect is enhanced.

[0010] Optionally, the active exhaust step may further include the following sub-steps: An ultrasonic vibration assembly is installed next to the extrusion roller; In response to the passive exhaust command, the ultrasonic vibration component is controlled to vibrate the semi-finished product at a preset vibration frequency when the extrusion rollers are pressing the semi-finished product. The comprehensive adjustment value is calculated based on the quantity adjustment value and the aggregation adjustment value; The vibration frequency is adjusted according to the positive correlation of the comprehensive adjustment value. The larger the comprehensive adjustment value, the higher the vibration frequency, and the smaller the comprehensive adjustment value, the lower the vibration frequency.

[0011] By adopting the above technical solution, the ultrasonic vibration component is linked when the extrusion roller extrudes the semi-finished product, and the vibration frequency is adjusted by adapting the comprehensive adjustment value, which can enhance the bubble escape effect and improve the active exhaust efficiency.

[0012] Optionally, the method further includes the following steps: Real-time shooting of finished products yields multiple sets of finished product image data, with each set of finished product image data corresponding to a single finished product. Based on a preset bubble template, bubble features in the finished product image data are identified; Calculate the average number of bubbles and the average bubble size corresponding to the bubble features in the image data of each batch of finished products; The bubble count is calculated based on a preset weighted data set using multiple average bubble counts, and the bubble size is calculated based on a weighted data set using multiple average bubble sizes. The longer the time after the finished product is discharged, the larger the corresponding weighted element in the weighted data set becomes. The bubble quantity is calculated based on the bubble quantity value and the preset bubble comparison value. The bubble size is calculated based on the bubble size value and the preset size comparison value. The bubble adjustment value is calculated based on the bubble quantity and bubble size. The inner contour comparison quantity and aggregation comparison value are negatively adjusted based on the bubble adjustment value.

[0013] By adopting the above technical solution, bubble adjustment values ​​are obtained through finished product bubble feature recognition and time-weighted calculation to optimize the inner contour comparison quantity and aggregation comparison value, thereby realizing dynamic feedback of exhaust parameters and making subsequent exhaust judgment more consistent with the actual situation of finished product bubbles.

[0014] Optionally, the method further includes the following steps: The filling reference value is calculated using a weighted algorithm based on the volume reference value and the viscosity reference value; The weighting coefficient of the viscosity reference value is adjusted according to the positive correlation between the calculated bubble number and the value. The larger the calculated bubble number, the larger the weighting coefficient of the viscosity reference value, and the smaller the calculated bubble number, the smaller the weighting coefficient of the viscosity reference value. The weighting coefficient of the volume reference value is adjusted based on the positive correlation between the calculated bubble size value and the calculated bubble size value. The larger the calculated bubble size value, the larger the weighting coefficient of the volume reference value, and the smaller the calculated bubble size value, the smaller the weighting coefficient of the volume reference value.

[0015] By adopting the above technical solution, the weighting coefficients of the corresponding reference values ​​are adjusted according to the bubble-related calculation values, so that the weighting algorithm is more in line with the actual bubble influence law, improving the accuracy of filling reference value calculation, thereby making the distinction between single-fill and multi-fill products more reasonable and optimizing the adaptability of filling speed.

[0016] Optionally, the method further includes the following steps: The element difference between adjacent weighted elements in the weighted data group is adjusted according to the positive correlation of the viscosity reference value. The smaller the viscosity reference value, the larger the element difference, and the larger the viscosity reference value, the smaller the element difference.

[0017] By adopting the above technical solution, the weighted data set can be adapted to liquids of different viscosities, thereby improving the calculation accuracy of bubble quantity and size values.

[0018] Optionally, the method further includes the following steps: Adjust the working area of ​​the extrusion roller on the surface of the semi-finished product according to the viscosity reference value. The smaller the viscosity reference value, the farther the working area is from the sealing part of the semi-finished product. The larger the viscosity reference value, the closer the working area is to the sealing part of the semi-finished product.

[0019] By adopting the above technical solution, the middle part of the low viscosity extrusion product and the sealing part of the high viscosity extrusion product can be adapted to the working area of ​​the extrusion roller to the liquid medicine of different viscosities, optimize the venting position, improve the active venting effect, and reduce residual air bubbles in the traditional Chinese medicine liquid.

[0020] Secondly, this application provides a dynamic filling system for a traditional Chinese medicine liquid filling equipment, which adopts the following technical solution: A dynamic filling system for a traditional Chinese medicine liquid filling device includes a processor, wherein the processor executes the steps of the dynamic filling method for the traditional Chinese medicine liquid filling device as described in any one of the above claims.

[0021] Thirdly, this application provides a storage medium, which adopts the following technical solution: A storage medium storing a program, wherein when the program is executed by a processor, the program implements the steps of the dynamic filling method of the traditional Chinese medicine liquid filling equipment described in any one of the above claims.

[0022] In summary, this application includes at least one of the following beneficial technical effects: through a closed-loop design that controls the source by adapting to the filling method, specifically exhausts and removes air bubbles, and optimizes parameters by providing feedback on finished product data, it can reduce gas mixing in the filling process, accurately remove generated air bubbles, and continuously optimize process parameters, effectively reducing residual gas in traditional Chinese medicine liquid and foam generated during transportation, thereby improving the quality of traditional Chinese medicine liquid packaging products. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the steps of a dynamic filling method for a traditional Chinese medicine liquid filling equipment.

[0024] Figure 2 This is a functional area diagram of a traditional Chinese medicine liquid filling equipment. Detailed Implementation

[0025] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.

[0026] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0027] In conventional packaging of bagged traditional Chinese medicine liquid, a heat-sealing filling machine first heat-seals both sides of the film on two rolls of raw material, forming a tubular bag while it is being conveyed and heat-sealed. Then, the bottom of the bag is heat-sealed in the sealing area. Next, the liquid medicine is filled in the filling area above the sealing area. After filling, the raw material continues to be conveyed, and the top of the bag and the bottom of the next bag are heat-sealed again in the sealing area. Finally, the bag is immediately cut by a cutting device in the cutting area. After each package of liquid medicine is packaged, it enters the conveying area. However, during subsequent filling processes, the filling does not stop while the top of the bag and the bottom of the next bag are being sealed, and the bag remains full. Therefore, the liquid medicine at the sealing point is also heated during the heat sealing process, which may affect the quality of the traditional Chinese medicine. (Refer to...) Figure 2 In this embodiment, after the raw materials are sealed in the sealing area, they are not filled in the filling area. Then, the bottom of the herbal medicine bag is sealed in the sealing area, and the filling area is opened for filling. After filling, the raw materials continue to move. The sealing area heat-seals the top of the herbal medicine bag and the bottom of the next herbal medicine bag, while the sealing area seals the sides of the two raw materials. After heat sealing, the next herbal medicine bag is filled again. When the top of the herbal medicine bag and the bottom of the next herbal medicine bag move to the shearing area, the herbal medicine bag is sheared and finally transported to the conveying area for packaging.

[0028] This application discloses a dynamic filling method for a traditional Chinese medicine liquid filling device, referring to... Figure 1 It includes the following steps: 1. Steps for obtaining filling product information When the operator inputs the filling start command through the human-machine interface of the traditional Chinese medicine liquid filling equipment, such as inputting a command containing the code of the product to be filled, like "ZY-001", the equipment's control system will retrieve the filling product information corresponding to "ZY-001" from the preset product database based on this command. This filling product information is entered during the early production preparation stage and covers the product's basic attributes and process parameters. The control system will extract key data from it: first, the product viscosity, such as "ZY-001" being a compound astragalus oral liquid, whose viscosity at room temperature is 75 mPa·s; second, the filling data, including a single filling volume set to 150 mL, 6 filling heads, and a filling accuracy requirement of ±0.5 mL; and third, the packaging data, using transparent bags with a total bag volume of 180 mL and a bag height of 120 mm.

[0029] 2. Steps for calculating volume reference values Based on the extracted filling and packaging data, the control system first calculates the air volume for the current filling scenario using the formula: Air Volume = Total Packaging Volume - Single Filling Volume. Substituting the data, we get: Air Volume = 180mL - 150mL = 30mL. Then, it calls a preset reference volume, which is set according to the common air residue safety threshold for similar packaging (preset to 15mL here). Using the formula: Volume Reference Value = Air Volume / Preset Reference Volume, it calculates the volume reference value, i.e., Volume Reference Value = 30mL / 15mL = 2.0. The volume reference value quantifies the relative air content within the packaging; a higher value indicates more residual air after filling, and a higher risk of potential air bubble formation.

[0030] 3. Steps for calculating viscosity reference values The control system calls a preset reference viscosity, which is set based on the viscosity range of common products in the traditional Chinese medicine liquid industry. The midpoint of 50-100 mPa·s, 80 mPa·s, is taken as the preset reference viscosity. Combined with the extracted product viscosity, such as 75 mPa·s, the viscosity reference value is calculated using the formula: Viscosity Reference Value = Product Viscosity / Preset Reference Viscosity. That is, Viscosity Reference Value = 75 mPa·s / 80 mPa·s = 0.9375. The viscosity reference value reflects the fluidity of the traditional Chinese medicine liquid. The smaller the value, the stronger the fluidity of the liquid, and the easier it is for air to be entrained during filling; the larger the value, the weaker the fluidity of the liquid, and the more difficult it is for air bubbles to escape naturally.

[0031] 4. Calculation steps for filling reference values The control system uses a weighted average algorithm to calculate the filling reference value. Since air volume directly affects the total number of bubbles, the weight of the volume reference value is set to 0.4. Because viscosity affects the rate of bubble generation and escape, the weight of the viscosity reference value is set to 0.6. The specific formula is: Filling reference value = Volume reference value × 0.4 + Viscosity reference value × 0.6. Substituting the data, we get: Filling reference value = 2.0 × 0.4 + 0.9375 × 0.6 = 0.8 + 0.5625 = 1.3625. The filling reference value can comprehensively assess the filling difficulty and the risk of bubbles.

[0032] 5. Filling method and speed settings and filling execution steps The control system calls a preset first reference value, which is a critical value verified through multiple tests. This value is used to distinguish between single-fill and multi-fill scenarios. Here, it is preset to 0.7. The calculated filling reference value (1.3625) is compared with the preset first reference value (0.7). Since 1.3625 ≥ 0.7, the control system determines that "ZY-001" is a multi-fill product and sets the filling speed according to the rule that the filling speed is positively correlated with the filling reference value. The preset basic filling speed when the filling reference value is 0.7 is 12mL / s. This speed is a benchmark value that takes into account both efficiency and accuracy. Therefore, the current filling speed = basic filling speed × (filling reference value / preset first reference value) = 12mL / s × (1.3625 / 0.7) ≈ 23.36mL / s. The control system controls six filling heads to simultaneously perform multi-stage filling: 150mL of medicine is filled in three stages, with each stage containing 50mL of medicine. The interval between two stages is 0.3s. During each stage, the filling head slowly descends to a position 5mm below the liquid surface to avoid high-speed impact and air bubbles, ensuring a balance between filling accuracy and air bubble control. If the filling reference value is less than 0.7 (e.g., 0.6 for a certain product), it is considered a single-stage filling. The filling speed is set negatively correlated with the filling reference value; for example, 0.6 corresponds to a filling speed of 10mL / s. This low-speed, single-stage filling reduces air entrapment.

[0033] 6. Gas Image Data Acquisition and Exhaust Command Generation Steps After the traditional Chinese medicine liquid is filled, the semi-finished products (the medicine bags filled with liquid but not sealed) are conveyed to the image acquisition station via a conveyor belt. This station is equipped with an industrial camera and an image processing module. The industrial camera takes 360° panoramic photos of each semi-finished product, acquiring three sets of images from different angles: front, left side, and right side. The image processing module uses an OpenCV-based contour detection algorithm to extract gas image data from the semi-finished product image data, including the contour coordinates of the bubbles, the area of ​​a single bubble, and the total number of bubbles. For example, if a semi-finished product is found to contain a total of 8 bubbles with a maximum area of ​​2mm for each bubble... 2, the total area of the bubbles accounts for 6% of the surface area of the liquid medicine in the bag. The control system calls the preset gas comparison data. The preset total number threshold of bubbles is 5, and the preset proportion threshold of the total bubble area is 4%. It compares the extracted gas image data with the preset thresholds: Since the total number of bubbles is 8 > 5 and the proportion of the total bubble area is 6% > 4%, it is determined that the bubble content exceeds the standard, and an active exhaust instruction is generated; if the detected bubble data are all less than the preset thresholds, a passive exhaust instruction is generated.

[0034] 7. Exhaust execution steps If a passive exhaust instruction is generated, the control system will convey the semi-finished product to the static exhaust station, control the conveyor belt at this station to stop running, and make the semi-finished product statically exhaust within the preset first time period (35 s); by using the buoyancy of the bubbles themselves, the small bubbles in the liquid medicine slowly rise to the liquid surface and escape into the air layer in the bag. If an active exhaust instruction is generated, the control system will extract the preset basic exhaust speed (6 mm / s) and basic exhaust amplitude (15 mm) from the instruction, and convey the semi-finished product to the extrusion exhaust station. Silicone extrusion rollers are installed on both sides of this station to avoid scratching the bag body. The control system controls the two extrusion rollers to move towards each other at an exhaust speed of 6 mm / s, and the stroke of the extrusion rollers is strictly executed according to an exhaust amplitude of 15 mm. They move from an initial distance of 20 mm from the bag body to a distance of 5 mm from the bag body. By mechanically squeezing the bag body, the air in the bag and the bubbles in the liquid medicine are discharged from the bag mouth. The extrusion process lasts for 10 s to ensure that the gas is fully discharged. After the extrusion is completed, the extrusion rollers return to their original positions.

[0035] 8. Product packaging and sealing steps After the exhaust is completed, the semi-finished product is conveyed to the sealing station by the conveyor belt. The heat-sealing mechanism at this station will adjust the size of the heat-sealing head according to the packaging data, heat the heat-sealing head to the preset temperature. The suitable sealing temperature for the polyester bag is 180 °C, and the bag mouth is heat-pressed and sealed. The sealing time is 2 s, and the pressure is 0.3 MPa, forming a finished product with good sealing. After the packaging is completed, the quality inspection module of the equipment will conduct a random inspection on the sealing performance of the finished product. Using the negative pressure detection method, the finished product is placed in a negative pressure environment of -0.05 MPa and kept for 5 s. If the negative pressure value does not change, it is determined that the sealing is qualified, ensuring that there is no leakage of liquid medicine or secondary entry of air, and finally completing the entire traditional Chinese medicine liquid filling process.

[0036] By executing the above steps, this dynamic filling method can dynamically adjust the filling plan according to the product characteristics, specifically remove bubbles, effectively reduce the gas residue after filling the traditional Chinese medicine liquid, avoid generating a large amount of foam due to shaking during transportation, significantly improve the consumer's taking experience, and at the same time ensure the quality stability of the production of traditional Chinese medicine liquid.

[0037] 6.1 Sub-steps for generating exhaust instructions In the process of generating passive or active exhaust commands, to further improve the accuracy of gas detection and the adaptability of exhaust commands, the following sub-steps are also included: 6.1.1 Packaging Image Template Acquisition: Based on the currently extracted filling product information, such as the packaging type being "100mL aluminum-plastic composite bag," the control system retrieves the corresponding packaging image template from a preset template database. This template is a standard outline image of the product packaging, containing key feature parameters such as the outer edge features and size proportions of the packaging, serving as a benchmark for subsequent image matching.

[0038] 6.1.2 Extraction of Semi-finished Product Outer Contour and Internal Data: The image processing module calls the packaging image template to perform contour matching on the acquired semi-finished product image data. A shape matching algorithm based on Hu moments is used, with a matching accuracy set to 95%. The outer contour data of the semi-finished product is located and extracted from the image; that is, the set of pixel coordinates of the packaging edge. For example, with the upper left corner of the image as the origin, the outer contour boundary coordinates are (x1, y1) to (xn, yn). Subsequently, the internal area of ​​the semi-finished product is defined based on the outer contour data, and the image data within this area is extracted as the internal data of the semi-finished product. This includes image information of the liquid medicine, air bubbles, and blank areas inside the packaging, but the pixel data corresponding to the outer contour lines are discarded.

[0039] 6.1.3 Inner Contour Data Extraction and Parameter Calculation: From the internal data of the semi-finished product, inner contour data is extracted using an edge detection algorithm, such as the Canny operator, with a threshold set to 50-150. This mainly involves the edge contours of bubbles in the liquid, which are represented by continuous lines at the boundary between light and dark areas. Based on the inner contour data, the number of inner contour lines is counted, i.e., the total number of bubbles. For example, if 12 independent closed contour lines are detected, the number of bubbles is determined to be 12. Simultaneously, the inner contour aggregation value is calculated, defined as the number of inner contour lines per unit area. The calculation formula is: Aggregation value = Total number of bubbles / Projected area of ​​the liquid in the image. For example, if the projected area of ​​the liquid is 10 cm²... 2 The aggregation value corresponding to 12 bubbles is 1.2 bubbles / cm. 2 This is used to reflect the density of bubbles.

[0040] 6.1.4 Exhaust Command Judgment and Parameter Adjustment: The control system calls the preset number of inner contour comparisons, such as 8, and the preset aggregation comparison value, such as 1.0 / cm. 2 The calculated number of inner contour lines (12) and the inner contour cluster value (1.2 lines / cm) are then used to determine the inner contour lines. 2 Compare with each of them: because 12 > 8 and 1.2 / cm 2 >1.0 pieces / cm 2 The system determines that an active exhaust command needs to be generated. Subsequently, it reads the preset base exhaust speed (5mm / s) and base exhaust amplitude (10mm) and calculates the adjustment parameters: The quantity adjustment value = the number of inner contour lines / the number of inner contour comparisons = 12 / 8 = 1.5. According to the rule of adjusting the exhaust speed with a positive correlation of the quantity adjustment value, the actual exhaust speed = the basic exhaust speed × the quantity adjustment value = 5mm / s × 1.5 = 7.5mm / s. Convergence adjustment value = inner contour convergence value / convergence comparison value = 1.2 / 1.0 = 1.2. According to the rule of negative correlation between convergence adjustment value and exhaust amplitude adjustment, actual exhaust amplitude = basic exhaust amplitude / convergence adjustment value = 10mm / 1.2 ≈ 8.3mm.

[0041] If the number of inner contour lines of a semi-finished product is detected to be 5 (<8) and the aggregation value is 0.8 lines / cm 2 (<1.0 pieces / cm) 2 If the condition is met, a passive exhaust command is generated, and static exhaust is executed directly without adjusting the exhaust parameters.

[0042] By refining the process as described above, the number and density of bubbles can be accurately identified, making the type and parameter settings of the exhaust command more closely match the actual bubble state, avoiding over-exhausting or under-exhausting, and further improving exhaust efficiency and effectiveness.

[0043] 7.1 Sub-step of allowing the gas to vent while it is still To address the issues of low efficiency and difficulty in escaping small bubbles in traditional static venting, an ultrasonic vibration component is used to assist venting during static venting in response to a passive venting command. The vibration parameters are dynamically adjusted based on the bubble state. This process includes the following sub-steps: 7.1.1 Pre-installation of Ultrasonic Vibration Component: An ultrasonic vibration component is fixedly installed on the filling equipment at the stationary venting station between the image acquisition station and the packaging station, next to the packaging component. This component includes a high-frequency ultrasonic generator and a vibration transmission plate. The vibration transmission plate is parallel to the bearing surface of the semi-finished product conveyor belt, with a spacing of 5mm, ensuring that the vibration energy can be evenly transmitted to the semi-finished products on the conveyor belt, such as aluminum-plastic composite bags and polyester bags, without direct contact with the semi-finished products to avoid packaging damage. Simultaneously, the basic parameters of the ultrasonic vibration are preset in the equipment control system: a basic vibration frequency of 25kHz, a basic second duration of 10s, and a preset first duration of 30s, satisfying the constraint that the second duration < the first duration.

[0044] 7.1.2 Ultrasonic Vibration Trigger: When the control system generates a passive venting command and transports the semi-finished product to the stationary venting station, the conveyor belt stops to achieve stationary placement. Simultaneously, the control system automatically triggers the ultrasonic vibration component to start. Based on the semi-finished product bubble data associated with the passive venting command (i.e., the quantity adjustment value and aggregation adjustment value calculated in step 6.1.4), preset basic parameters are called to prepare for targeted vibration-assisted venting. For example, if the quantity adjustment value of a semi-finished product is 0.6, the number of inner contour lines is 4 (less than the preset inner contour comparison number of 8), the quantity adjustment value = 4 / 8 = 0.6, the aggregation adjustment value is 0.7, and the inner contour aggregation value is 0.7 bubbles / cm. 2 <Preset aggregation contrast value 1.0 particles / cm 2 If the aggregation adjustment value is 0.7 / 1.0 = 0.7, then the vibration parameters are adjusted based on this set of parameters.

[0045] 7.1.3 Vibration Duration (Second Duration) Adjustment: Based on the rule of positive correlation between the quantity adjustment value and the second duration, the control system first obtains the correlation formula between the quantity adjustment value and the preset basic second duration: Actual Second Duration = Basic Second Duration × (1 + Quantity Adjustment Value). Substituting the quantity adjustment value of 0.6, the actual second duration is calculated as follows: Actual Second Duration = 10s × (1 + 0.6) = 16s, and 16s < the preset first duration of 30s, which meets the duration constraint. If the quantity adjustment value of a semi-finished product is 0.3, and the number of inner contour lines is 2.4, rounded down to 2, then the actual second duration is 10s × (1 + 0.3) = 13s. The smaller the quantity adjustment value, the shorter the vibration duration, avoiding unnecessary energy consumption. If the quantity adjustment value is 0.9, and the number of inner contour lines is 7.2, rounded down to 7, then the actual second duration is 10s × (1 + 0.9) = 19s. Extending the vibration duration promotes the aggregation and escape of more small bubbles.

[0046] 7.1.4 Vibration Frequency Adjustment: Based on the rule of positive correlation between the aggregation adjustment value and the vibration frequency, the control system adopts the following formula: Actual vibration frequency = Basic vibration frequency × (1 + Aggregation adjustment value × 0.4). 0.4 is the optimized value used in the experiment, which balances vibration intensity and bubble escape effect, avoiding damage to the drug solution components from high-frequency vibration. Substituting the aggregation adjustment value of 0.7, the calculation is: Actual vibration frequency = 25kHz × (1 + 0.7 × 0.4) = 25kHz × 1.28 = 32kHz. If the aggregation adjustment value of a certain semi-finished product is 0.4 (inner contour aggregation value 0.4 particles / cm), then... 2 If the actual vibration frequency is 25kHz × (1 + 0.4 × 0.4) = 25kHz × 1.16 = 29kHz, then the frequency should be reduced when the aggregation degree is low to minimize disturbance to the liquid. If the aggregation adjustment value is 0.9, the aggregation value of the inner contour is 0.9 particles / cm. 2The actual vibration frequency is 25kHz × (1 + 0.9 × 0.4) = 25kHz × 1.36 = 34kHz. By increasing the frequency, the bubble aggregation state is broken, and the bubble rises and escapes faster.

[0047] 7.1.5 Vibration-Assisted Static Air Exhaust: The ultrasonic vibration component operates according to the adjusted actual second duration (e.g., 16s) and actual vibration frequency (e.g., 32kHz). The vibration energy is transmitted to the semi-finished product through the transmission plate, causing the liquid medicine to vibrate slightly. This causes small bubbles in the liquid medicine to collide and coalesce into larger bubbles, while simultaneously reducing the adhesion of bubbles in the liquid medicine, accelerating the rise of bubbles to the liquid surface and their escape into the air layer inside the packaging. After the vibration ends, the semi-finished product continues to settle at the static station for the remaining time. The total static time = first duration - second duration, e.g., 30s - 16s = 14s, ensuring that any remaining small bubbles fully escape, thus completing the static air exhaust.

[0048] Through the above-mentioned detailed steps, ultrasonic vibration can be specifically adapted to the number and aggregation state of bubbles, thereby improving the efficiency of static air release and enhancing the defoaming effect without damaging the properties of the liquid.

[0049] 7.2 Sub-steps of active exhaust To further improve the efficiency of bubble escape during active degassing and prevent bubbles from being trapped in the liquid and difficult to expel during extrusion, an ultrasonic vibration component needs to be added next to the extrusion roller and linked for control. This includes the following sub-steps: 7.2.1 Installation and Parameter Presetting of Ultrasonic Vibration Component: An ultrasonic vibration component is fixedly installed at the extrusion and venting station of the filling equipment, directly below the extrusion rollers (silicone extrusion rollers on both sides). This component consists of a high-frequency ultrasonic transducer and an arc-shaped vibration tray. The arc-shaped vibration tray is adapted to the shape of the semi-finished product packaging; for example, a 50mm radius arc is suitable for polyester bags, and a flat tray is suitable for aluminum-plastic composite bags. The vibration tray and the extrusion trajectory of the extrusion rollers are kept perpendicularly aligned to ensure that the bottom of the semi-finished product can fully contact the tray during extrusion, and the vibration energy is evenly transferred to the liquid medicine. Simultaneously, the basic parameters of the ultrasonic vibration are preset in the equipment control system: a basic vibration frequency of 30kHz. This frequency has been experimentally verified to effectively break the adhesion between air bubbles and the liquid medicine without damaging the packaging.

[0050] 7.2.2 Linkage Triggering of Ultrasonic Vibration and Squeeze Roller: The error in the command association in the original steps needs to be corrected first. Here, it should respond to the active venting command, not the passive venting command. When the control system generates an active venting command and the semi-finished product is conveyed to the venting station, and the venting roller is ready to start the venting action, the control system synchronously sends a start signal to the ultrasonic vibration component. This achieves synchronous triggering of the venting action and ultrasonic vibration, ensuring that the vibration can act on the liquid medicine while applying pressure during venting, providing dual power for bubble escape: the pressure difference of venting + the disturbance force of vibration. For example, in the active venting command corresponding to a certain semi-finished product, when the start signal of the venting roller is issued, the ultrasonic vibration component starts with a 0.2s delay. This optimal delay time, determined through debugging, avoids damage to the packaging caused by the superposition of the initial venting impact and vibration. Subsequently, it operates synchronously with the venting action.

[0051] 7.2.3 Calculation of Comprehensive Adjustment Value: The control system calls the quantity adjustment value and aggregation adjustment value calculated in step 6.1.4. For example, if the number of inner contour lines is 12 and the number of inner contour contrast lines is 8, the quantity adjustment value = 12 / 8 = 1.5. The aggregation adjustment value is 1.2 clusters / cm for the inner contour aggregation value. 2 Aggregation contrast value 1.0 particles / cm 2 The aggregation adjustment value is 1.2 / 1.0 = 1.2. A weighted summation algorithm is used to calculate the comprehensive adjustment value, where the weight of the quantity adjustment value is set to 0.4 (the number of bubbles determines the total exhaust load), and the weight of the aggregation adjustment value is set to 0.6 (the bubble density determines the exhaust difficulty). The specific formula is: Comprehensive adjustment value = Quantity adjustment value × 0.4 + Aggregation adjustment value × 0.6. Substituting the data, we get: Comprehensive adjustment value = 1.5 × 0.4 + 1.2 × 0.6 = 0.6 + 0.72 = 1.32. This value comprehensively reflects the combined state of the number and density of bubbles.

[0052] 7.2.4 Dynamic Adjustment of Vibration Frequency: Based on the rule of positive correlation between the comprehensive adjustment value and the vibration frequency, the control system adopts a linear adjustment formula: Actual vibration frequency = Basic vibration frequency × (1 + Comprehensive adjustment value × 0.3). The coefficient 0.3 is a parameter optimized through multiple sets of tests, which can avoid excessive frequency causing liquid splashing or packaging deformation. Substituting the comprehensive adjustment value 1.32, the actual vibration frequency is calculated as follows: Actual vibration frequency = 30kHz × (1 + 1.32 × 0.3) = 30kHz × (1 + 0.396) = 30kHz × 1.396 ≈ 41.88kHz, which is rounded to 42kHz. If the overall adjustment value of a semi-finished product is 0.8, the quantity adjustment value is 1.0, and the aggregation adjustment value is 0.67, then the actual vibration frequency = 30kHz × (1 + 0.8 × 0.3) = 30kHz × 1.24 = 37.2kHz; if the overall adjustment value is 1.8, the quantity adjustment value is 2.0, and the aggregation adjustment value is 1.67, then the actual vibration frequency = 30kHz × (1 + 1.8 × 0.3) = 30kHz × 1.54 = 46.2kHz, ensuring that the vibration intensity is precisely matched with the composite state of the bubbles.

[0053] 7.2.5 Linked Exhaust Execution and Termination: The extrusion roller approaches the semi-finished product and applies pressure according to the adjusted exhaust speed (e.g., 7.5 mm / s) and exhaust amplitude (e.g., 8.3 mm). Simultaneously, the ultrasonic vibration component continuously vibrates at the actual vibration frequency (e.g., 42 kHz). The vibration causes the bubbles in the liquid to rapidly aggregate and burst, reducing the adhesion of the bubbles in the liquid. The pressure difference generated by the extrusion accelerates the aggregated bubbles to move towards the packaging opening and are discharged. After the extrusion roller completes the preset stroke (exhaust amplitude) and maintains the extrusion state for 10 seconds (pressure holding and exhaust time), the control system synchronously sends a termination signal, the extrusion roller resets, the ultrasonic vibration component stops operating, and the active exhaust step is completed.

[0054] Through the above-mentioned detailed steps, the linkage between ultrasonic vibration and the extrusion roller can improve the bubble removal rate of active degassing, effectively avoiding bubble residue. At the same time, by adjusting the vibration frequency with a comprehensive value, the degassing effect can be balanced with the safety of packaging and pharmaceutical solution.

[0055] 9. Finished Product Bubble Monitoring and Exhaust Parameter Feedback Optimization Steps To achieve closed-loop optimization of the filling-venting process and avoid inaccurate venting parameters due to equipment aging or fluctuations in the characteristics of the liquid, it is necessary to monitor the bubble state of the finished product in real time and adjust the key parameters of the initial venting determination accordingly, including the number of inner contour comparisons and the aggregation comparison value. The specific steps are as follows: 9.1 Finished Product Image Data Acquisition: Two sets of high-definition industrial cameras are installed at the end of the finished product discharge conveyor belt of the filling equipment to simultaneously capture images from the front and top of the finished product (e.g., a sealed 100mL polyester bag). The front camera captures air bubbles in the middle of the bag, while the top camera captures residual air bubbles above the liquid surface, ensuring no blind spots in monitoring. For each finished product produced, the cameras automatically capture three images (0.5s interval), forming a set of finished product image data. Each set of finished product image data is bound to a unique code for each finished product (e.g., "CP-20240501-001") for easy traceability.

[0056] 9.2 Finished Product Bubble Feature Recognition: The equipment control system calls a preset bubble template, which is generated based on the morphological characteristics of common bubbles in traditional Chinese medicine liquids. This template includes parameters such as the grayscale range (150-220) for round and elliptical bubbles and the edge gradient threshold (30-50). Feature matching is performed on the image data of each batch of finished products. Image segmentation algorithms, such as thresholding and morphological filtering, are used to separate the bubble region from the image. Then, a contour extraction algorithm is used to identify the feature parameters of each bubble, including the pixel area and number of bubbles. The pixel area of ​​the bubble is subsequently converted to the actual area, with a pixel-to-actual-size conversion ratio of 1 pixel = 0.01 mm. 2 .

[0057] 9.3 Calculation of Bubble Parameters for Single-Component Finished Product: For three images of a single-component product, the control system first counts the number of bubbles in each image. The arithmetic mean of the three counts is taken as the average number of bubbles in the finished product. For example, if 2, 3, and 2 bubbles are detected in the three images respectively, the average number of bubbles = (2+3+2) / 3 ≈ 2.33. Next, the actual area of ​​all bubbles in each image is calculated, and the arithmetic mean of the bubble areas in the three images is taken as the average bubble size of the finished product. For example, if the average bubble area in the three images is 1.2 mm... 2 1.5mm 2 1.3mm 2 The average bubble size is approximately 1.33 mm (1.2 + 1.5 + 1.3) / 3. 2 .

[0058] 9.4 Weighted Calculation of Bubble Parameters for Multiple Finished Products: The control system sets preset weighted data groups. For example, it divides the finished product discharge time into 5 time periods, with corresponding weighting elements of [0.8, 1.0, 1.2, 1.5, 1.8]. The longer the time after the finished product discharge, the larger the weighting element. Because as time progresses after the finished product discharge, tiny bubbles in the liquid may slowly aggregate into visible bubbles, this weighting rule can better reflect the actual change trend of bubbles and improve the representativeness of the data. For example, if 10 sets of finished product image data are collected in a certain batch, of which 2 sets are within 0-10 min of discharge (weighting element 0.8), 3 sets are 10-20 min (1.0), 2 sets are 20-30 min (1.2), 2 sets are 30-40 min (1.5), and 1 set is 40-50 min (1.8), then: The number of bubbles = (2×2.33×0.8+3×2.1×1.0+2×2.5×1.2+2×2.8×1.5+1×3.0×1.8) / (2×0.8+3×1.0+2×1.2+2×1.5+1×1.8)≈(3.728+6.3+6+8.4+5.4) / (1.6+3+2.4+3+1.8)≈30.028 / 11.8≈2.54 bubbles; Bubble size = (2×1.33×0.8+3×1.2×1.0+2×1.4×1.2+2×1.6×1.5+1×1.8×1.8) / 11.8≈(2.128+3.6+3.36+4.8+3.24) / 11.8≈17.128 / 11.8≈1.45mm 2 .

[0059] 9.5 Bubble Adjustment Value Calculation and Exhaust Parameter Optimization: The control system calls preset bubble comparison values ​​(e.g., 3, which is the maximum acceptable bubble number threshold for the finished product) and size comparison values ​​(e.g., 1.5mm). 2 (where is the maximum acceptable bubble size threshold for the finished product), first calculate: Calculated bubble count = Bubble count / Bubble comparison value = 2.54 / 3 ≈ 0.85; Bubble size calculation = bubble size value / size comparison value = 1.45 / 1.5 ≈ 0.97.

[0060] Then, the bubble adjustment value is calculated using a weighted summation algorithm (the quantity calculation value has a weight of 0.5, and the size calculation value has a weight of 0.5): Bubble adjustment value = 0.85 × 0.5 + 0.97 × 0.5 ≈ 0.91.

[0061] According to the rule of negatively adjusting the inner contour contrast quantity and aggregation contrast value based on the bubble adjustment value, if the original preset inner contour contrast quantity is 8 and the aggregation contrast value is 1.0 / cm... 2 ,but: Adjusted inner contour contrast count = original inner contour contrast count × (2 - bubble adjustment value) = 8 × (2 - 0.91) ≈ 8 × 1.09 ≈ 8.72, rounded to 9; Adjusted aggregation contrast value = original aggregation contrast value × (2 - bubble adjustment value) = 1.0 × 1.09 ≈ 1.09 bubbles / cm 2 .

[0062] If the bubble adjustment value is 1.2 (the number and size of bubbles in the finished product both exceed the standard), then the number of inner contour contrasts after adjustment = 8 × (2 - 1.2) = 6.4 ≈ 6, and the aggregation contrast value = 1.0 × 0.8 = 0.8 bubbles / cm. 2 This lowers the exhaust gas detection threshold, preventing excessive bubbles in the finished product due to lenient detection of semi-finished products.

[0063] 4.1 Steps for dynamically adjusting the weighting coefficients in calculating filling reference values To further improve the accuracy of filling reference value calculations and to better align the distinction between single / multi-stage filling and the adaptation of filling speed with actual bubble generation patterns, it is necessary to dynamically adjust the weighting coefficients of volume reference values ​​and viscosity reference values ​​based on the calculated bubble quantity and size values ​​obtained from finished product bubble monitoring. The specific steps are as follows: 4.1.1 Initial Weighting Algorithm and Coefficient Preset: In the equipment control system, the initial weighting algorithm for the filling reference value is preset as follows: Filling reference value = Volume reference value × α + Viscosity reference value × β, where α is the initial weighting coefficient for the volume reference value, preset to 0.4, and β is the initial weighting coefficient for the viscosity reference value, preset to 0.6, and α + β = 1 is satisfied to ensure the normalization of the weighting algorithm and avoid parameter weight imbalance. This initial coefficient is set based on the experimental settings of the bubble influence factors of conventional Chinese medicine liquid; by default, the influence of viscosity on bubble generation is slightly greater than that of air volume, and will be dynamically corrected according to the actual state of bubbles in the finished product.

[0064] 4.1.2 Adjustment of the Weighted Coefficient of Calculated Bubble Count and Viscosity Reference Value: The control system calls the calculated bubble count obtained in step 9.5, reflecting the relative degree of bubble count in the finished product. For example, if the calculated value for a certain batch is 0.85, the weighted coefficient β of the viscosity reference value is adjusted according to the rule of positive correlation between the calculated bubble count and the weighted coefficient β. The linear adjustment formula is adopted: β' = β_initial + (Calculated bubble count - 0.5) × 0.3, where 0.5 is the baseline value of the calculated bubble count and 0.3 is the adjustment coefficient. Experimental verification shows that this can avoid excessive fluctuations in the coefficient that could lead to abrupt changes in the filling scheme. Substituting the data, the calculation is: β' = 0.6 + (0.85 - 0.5) × 0.3 = 0.6 + 0.35 × 0.3 = 0.6 + 0.105 = 0.705, rounded to two decimal places as 0.71. If the calculated bubble count is 1.2, the number of bubbles in the finished product exceeds the standard. Then, β' = 0.6 + (1.2 - 0.5) × 0.3 = 0.6 + 0.21 = 0.81, further increasing the weight of the viscosity reference value. Since a large number of bubbles is usually related to high drug viscosity and difficulty in bubble escape, it is necessary to optimize the multi-stage filling strategy to reduce bubble generation by calculating the filling reference value with more emphasis on viscosity. If the calculated bubble count is 0.3, the number of bubbles in the finished product is extremely small. Then, β' = 0.6 + (0.3 - 0.5) × 0.3 = 0.6 - 0.06 = 0.54, reducing the weight of the viscosity reference value to avoid over-reliance on viscosity parameters leading to a decrease in filling efficiency.

[0065] 4.1.3 Adjustment of Weighted Coefficient for Calculated Bubble Size and Volume Reference Value: The control system calls the calculated bubble size value obtained in step 9.5 to reflect the relative degree of bubble size in the finished product. For example, if the calculated value for a certain batch is 0.97, the volume reference value weighted coefficient α is adjusted according to the rule of positive correlation between the calculated bubble size value and the volume reference value. Combined with the constraint of α+β'=1, the correlation adjustment formula is adopted: α'=1-β'+(calculated bubble size value-0.5)×0.2, where 0.2 is the adjustment coefficient to balance the weight relationship between the volume parameter and the viscosity parameter. Substituting β'=0.71 and calculated bubble size value=0.97, the calculation is: α'=1-0.71+(0.97-0.5)×0.2=0.29+0.47×0.2=0.29+0.094=0.384, which is rounded to two decimal places as 0.38. If the calculated bubble size is 1.3, and the finished product bubble size exceeds the standard, then α' = 1 - 0.81 (corresponding to β' = 0.81) + (1.3 - 0.5) × 0.2 = 0.19 + 0.16 = 0.35. Although the value of α' decreases slightly, combined with the increase of β', by increasing the weight of the volume reference value, relative to the initial α = 0.4, α' = 0.35 here can still reflect the influence of air volume on bubble size through the volume parameter. Since large bubble size is usually related to a large air volume in the packaging and a large amount of air entrained during filling, it is necessary to optimize the interval and speed of multiple fillings by calculating the filling reference value with more emphasis on volume to reduce air entrainment. If the calculated bubble size is 0.4, and the finished product bubble size is extremely small, then α' = 1 - 0.54 + (0.4 - 0.5) × 0.2 = 0.46 - 0.02 = 0.44, where β' = 0.54 is corresponding to β' = 0.54. Appropriately increasing the weight of the volume reference value takes into account both filling efficiency and bubble control.

[0066] 4.1.4 Calculation of Filling Reference Value using Dynamic Weighted Algorithm: The adjusted weighting coefficients α' and β' are used to recalculate the filling reference value by substituting the volume reference value and viscosity reference value. Taking a semi-finished product as an example, the volume reference value = 2.0 and the viscosity reference value = 0.9375. In the initial calculation, α = 0.4 and β = 0.6, and the filling reference value = 2.0 × 0.4 + 0.9375 × 0.6 = 0.8 + 0.5625 = 1.3625. After adjustment, α' = 0.38 and β' = 0.71, and the recalculated filling reference value = 2.0 × 0.38 + 0.9375 × 0.71 = 0.76 + 0.6656 = 1.4256. The adjusted filling reference value more closely reflects the bubble state of the finished product. Because the calculated values ​​for the number and size of bubbles were too high, the viscosity weight was increased by increasing β', resulting in a slight increase in the filling reference value. This corresponds to further optimization of the filling speed in each batch, reducing bubble generation. If the bubble parameters of subsequent batches of finished product decrease, the weighting coefficient will be adjusted in the opposite direction to ensure that the filling reference value always matches the actual bubble influence pattern.

[0067] Through the above steps, the weighting coefficient of the filling reference value can be dynamically adapted, making the distinction between single / multiple filling more accurate, and significantly improving the matching degree between filling speed and drug characteristics and bubble risk, thereby reducing bubble generation from the source.

[0068] 9.4.1 Dynamic Adjustment Steps for the Difference of Elements in a Weighted Data Set To make the preset weighted data set in step 9.4 more suitable for the bubble change characteristics of medicinal solutions with different viscosities, since low-viscosity medicinal solutions have a faster bubble aggregation rate and high-viscosity medicinal solutions have a more stable bubble state, it is necessary to adjust the difference between adjacent weighted elements in the weighted data set according to the viscosity reference value to improve the calculation accuracy of bubble quantity and size values. The specific steps are as follows: 9.4.1.1 Initial Weighted Data Set Preset: In the equipment control system, a basic weighted data set is first preset, divided into 5 consecutive time periods according to the finished product discharge time: 0-10min, 10-20min, 20-30min, 30-40min, and 40-50min. The corresponding initial weighting elements are [0.8, 1.0, 1.2, 1.4, 1.6]. The initial difference between adjacent elements is uniformly set to 0.2, 1.0-0.8=0.2, 1.2-1.0=0.2, and so on. This initial setting is based on the bubble change pattern of medium-viscosity traditional Chinese medicine liquid (viscosity reference value ≈ 1.0). The difference will be dynamically adjusted according to the actual viscosity reference value of the traditional Chinese medicine liquid.

[0069] 9.4.1.2 Correlation between Viscosity Reference Value and Difference Adjustment Rule: The control system calls the viscosity reference value of the current batch of medicine liquid calculated in step 3. For example, the viscosity reference value of a certain batch of children's cough syrup is 0.6, which belongs to low viscosity medicine liquid; the viscosity reference value of a certain batch of Angelica sinensis blood-tonifying paste is 1.5, which belongs to high viscosity medicine liquid. According to the core rule of positively correlated adjustment of adjacent element differences based on viscosity reference values, the difference adjustment formula is set as follows: Actual adjacent difference = Initial difference × Viscosity reference value. The logic of this formula is as follows: In low viscosity medicine liquid, the aggregation and enlargement of bubbles are fast as the discharge time progresses, so the weighted element difference of adjacent time periods needs to be increased to make the bubbles in later time periods, such as high viscosity medicine liquid, more stable, and the later data can better reflect the true state. The bubble data weight of the later weight difference needs to be increased to better reflect the actual changes; In high viscosity medicine liquid, the bubble state is stable and changes little over time, so the adjacent difference needs to be decreased to avoid excessive weighting leading to data distortion.

[0070] 9.4.1.3 Difference Adjustment and Weighted Data Set Reconstruction in Low-Viscosity Liquid Scenarios: Taking a viscosity reference value of 0.6 (low viscosity) as an example, the actual adjacent difference is calculated as 0.2 × 0.6 = 0.12. The weighted data set is then reconstructed based on this actual difference. In the first time period (0-10min), the weighted elements retain their initial value of 0.8 (the baseline value, without adjustment). The weighted element for the second time period (10-20 min) is 0.8 + 0.12 = 0.92; The weighted element for the third time period (20-30 min) is 0.92 + 0.12 = 1.04; The weighted element for the fourth time period (30-40 min) is 1.04 + 0.12 = 1.16; The weighted element for the fifth time period (40-50 min) is 1.16 + 0.12 = 1.28; The reconstructed weighted data set is [0.8, 0.92, 1.04, 1.16, 1.28]. At this point, the weight difference between the later time period (e.g., 40-50 min) and the earlier time period (0-10 min) is 0.48 (1.28-0.8), which is more in line with the characteristics of rapid changes in bubbles in low-viscosity drug solutions compared to the initial difference of 0.8 (1.6-0.8). This ensures that the later bubble data, which better reflects the actual residual state, accounts for a higher proportion in the calculation.

[0071] 9.4.1.4 Difference Adjustment and Weighted Data Set Reconstruction in High-Viscosity Liquid Scenarios: Taking a viscosity reference value of 1.5 (high viscosity) as an example, the actual adjacent difference is calculated as 0.2 × 1.5 = 0.3. The weighted data set is then reconstructed based on this actual difference. The weighted element for the first time period is 0.8; The weighted element for the second time period is 0.8 + 0.3 = 1.1; The weighted element for the third time period is 1.1 + 0.3 = 1.4; The weighted element for the fourth time period is 1.4 + 0.3 = 1.7; The weighted element for the 5th time period is 1.7 + 0.3 = 2.0; The reconstructed weighted data set is [0.8, 1.1, 1.4, 1.7, 2.0]. Because the bubbles in high-viscosity pharmaceutical solutions change slowly over time, increasing the difference between adjacent values ​​strengthens the weight of stable bubble data in later stages, avoiding interference from earlier data that may not be fully stable, and improving the accuracy of bubble quantity and size values.

[0072] 9.4.1.5 Application of the adjusted weighted data set: Substitute the reconstructed weighted data set into the calculation in step 9.4. For example, for a batch of low-viscosity pharmaceutical solution, collect 10 sets of product data: 2 sets for 0-10 min, 3 sets for 10-20 min, 2 sets for 20-30 min, 2 sets for 30-40 min, and 1 set for 40-50 min. When calculating the bubble count: The bubble count is calculated as follows: (2×2.1×0.8+3×2.3×0.92+2×2.5×1.04+2×2.7×1.16+1×2.9×1.28) / (2×0.8+3×0.92+2×1.04+2×1.16+1×1.28)≈(3.36+6.348+5.2+6.368+3.712) / (1.6+2.76+2.08+2.32+1.28)≈24.988 / 10≈2.498 bubbles. The error between this count and the actual number of bubbles in the finished product (approximately 2.5 bubbles) is less than 0.05 bubbles, which is a significant improvement in accuracy compared to the initial unadjusted data set (error of approximately 0.2 bubbles).

[0073] Through the above steps, the weighted data set can be dynamically adapted according to the viscosity of the drug solution, ensuring that the calculation of the number and size of bubbles is more in line with the bubble change pattern of drug solutions with different viscosities, providing a more accurate data basis for subsequent bubble adjustment value calculation and exhaust parameter optimization.

[0074] 7.2.5 Dynamic Adjustment Steps for the Working Area of ​​the Extrusion Roller To ensure that the squeezing position of the squeezing roller during the active venting process is better adapted to the bubble distribution characteristics of medicinal liquids with different viscosities, it is necessary to adjust the working area of ​​the squeezing roller on the surface of the semi-finished product according to the viscosity reference value. The specific steps are as follows: 7.2.5.1 Division of Working Areas on Semi-finished Product Surface: In the equipment control system, based on the structural characteristics of the semi-finished product packaging, taking a 100mL polyester bag as an example, with a bag height of 120mm and the sealing part located 5mm below the bag opening (i.e., 115mm from the bottom of the bag), the surface of the bag is divided into 5 continuous working areas along the height direction. These areas are labeled as Area 1 to Area 5 from the bag opening (sealing part) to the bottom of the bag, with each area having a height of 24mm (120mm ÷ 5). Area 1 is the area closest to the sealing part, ranging from 0 to 24mm from the seal, while Area 5 is the area farthest from the sealing part, ranging from 96 to 120mm from the seal. The starting coordinates of the compression roller stroke for each area are also preset. For example, the initial position of the compression roller in Area 1 is 20mm from the bag body, and the initial position in Area 5 is 30mm from the bag body, ensuring uniform compression pressure in different areas.

[0075] 7.2.5.2 Viscosity Reference Value and Working Area Association Rule: The control system calls the viscosity reference value calculated in step 3 to reflect the fluidity of the medicine. For example, the viscosity reference value of a certain batch of honeysuckle dew is 0.3, which is low viscosity; the viscosity reference value of a certain batch of donkey-hide gelatin oral liquid is 1.2, which is high viscosity. According to the rule of adjusting the distance between the working area and the sealing part according to the positive correlation of viscosity reference value, the area adjustment formula is set as follows: Target working area number = 1 + 4 × (1 - viscosity reference value), where 1 is the nearest area reference number and 4 is the area quantity difference, ensuring that when the viscosity reference value is 1, it corresponds to area 1, and when the viscosity reference value is 0, it corresponds to area 5. The logic of this formula is as follows: Low viscosity medicine has strong fluidity, and after filling, air bubbles are easily diffused to the middle and bottom of the packaging with the flow of medicine. It is necessary to select an area far from the seal and squeeze it. By applying pressure from a distance towards the seal, the air bubbles are pushed to be concentrated and discharged. High viscosity medicine has weak fluidity, and air bubbles are difficult to diffuse and tend to gather near the seal. It is necessary to select an area close to the seal and squeeze it to directly act on the dense air bubble area and improve the exhaust efficiency.

[0076] 7.2.5.3 Adjustment of working area in low-viscosity liquid scenarios: Taking a viscosity reference value of 0.3 (low viscosity) as an example, substitute the values ​​into the formula to calculate the target working area number: 1 + 4 × (1 - 0.3) = 1 + 4 × 0.7 = 1 + 2.8 = 3.8, rounded to area 4. The distance of area 4 from the sealing part is 72-96mm, located in the lower middle part of the bag body. The control system sends a positioning command to the extrusion roller drive module to lock the working area of ​​the extrusion roller as area 4. During extrusion, the silicone rollers on both sides move towards each other from the lower middle part of the bag body, applying extrusion at an exhaust speed of 7.5mm / s and an exhaust amplitude of 8.3mm. Through the pressure gradient from bottom to top, the air bubbles that have diffused to the middle are pushed towards the bag opening and discharged, avoiding the air bubbles from lingering in the middle.

[0077] 7.2.5.4 Adjustment of working area in high-viscosity liquid scenarios: Taking a viscosity reference value of 1.2 (high viscosity) as an example, substitute the values ​​into the formula to calculate the target working area number: 1 + 4 × (1 - 1.2) = 1 + 4 × (-0.2) = 1 - 0.8 = 0.2, rounded to the nearest 1. The distance between area 1 and the sealing part is 0-24mm, close to the sealing part. The control system controls the extrusion roller to work in this area; during extrusion, it directly acts on the dense bubble area near the sealing part, and quickly breaks the adhesion between the bubbles and the high-viscosity liquid through local high pressure, so that the accumulated bubbles are quickly discharged from the bag opening, avoiding the bubbles being wrapped by the liquid during movement due to the extrusion position being too far away.

[0078] 7.2.5.5 Verification of Active Exhaust Effect after Adjustment: Through comparative testing, when low-viscosity liquids were squeezed in Zone 4, the bubble removal rate increased by 25% compared to squeezing in a fixed zone, from 65% to 90%; when high-viscosity liquids were squeezed in Zone 1, the bubble removal rate increased by 30%, from 60% to 90%, and no packaging deformation or liquid splashing occurred due to improper squeezing position in either scenario.

[0079] Through the above steps, the working area of ​​the extrusion roller can be dynamically adapted according to the viscosity characteristics of the medicinal liquid, so that the pressure application point of the active venting is precisely matched with the distribution position of the bubbles, further improving the venting effect and reducing residual bubbles in the traditional Chinese medicine liquid.

[0080] This application also discloses a dynamic filling system for a traditional Chinese medicine liquid filling device, including a processor, wherein the processor executes the steps of the dynamic filling method for the traditional Chinese medicine liquid filling device as described in any of the above embodiments.

[0081] This application also discloses a storage medium storing a program, which, when executed by a processor, implements the steps of the dynamic filling method of the traditional Chinese medicine liquid filling equipment described in any of the above embodiments.

[0082] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A dynamic filling method for a traditional Chinese medicine liquid filling equipment, characterized in that, Includes the following steps: Based on the filling start command, obtain the filling product information corresponding to the traditional Chinese medicine liquid product, and extract the product viscosity, filling data and packaging data from the filling product information; The air volume is calculated based on the filling and packaging data, and the volume reference value is calculated based on the air volume and the preset reference volume. The viscosity reference value is calculated based on the product viscosity and the preset reference viscosity; The filling reference value is calculated based on the volume reference value and the viscosity reference value; If the filling reference value is less than the preset first reference value, then it is set as a single-fill product, and the filling speed is negatively correlated with the filling reference value; otherwise, it is set as a multi-fill product, and the filling speed is positively correlated with the filling reference value; then proceed with the filling of traditional Chinese medicine liquid. After the Chinese medicine liquid is filled, the image data of the semi-finished product is collected in real time, the gas image data is extracted from the semi-finished product image data, and the gas image data is compared with the preset gas comparison data to generate a passive exhaust command or an active exhaust command. In response to a passive exhaust command, the exhaust is allowed to remain stationary for a preset first duration; or, in response to an active exhaust command, the exhaust is allowed to be actively performed for a preset first duration. The exhaust speed and exhaust amplitude are extracted from the active exhaust command. The extrusion rollers on both sides of the product packaging are controlled to move towards each other at the exhaust speed to extrude the product packaging. The stroke of the extrusion rollers is the exhaust amplitude. Complete the product packaging sealing.

2. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 1, characterized in that, The steps for generating passive or active exhaust commands also include the following sub-steps: Obtain packaging image templates for the product packaging based on the filling product information; The outer contour data of the semi-finished product is matched from the image data of the semi-finished product using the packaging image template. The internal data of the semi-finished product is extracted from the outer contour data of the semi-finished product. The internal data of the semi-finished product does not include the outer contour data of the semi-finished product. Extract the inner contour data of the semi-finished product from the internal data of the semi-finished product, calculate the number of inner contour lines based on the calculated inner contour data of the semi-finished product, and calculate the inner contour aggregation value based on the calculated inner contour data of the semi-finished product. If the number of inner contour lines is less than the preset number of inner contour comparisons and the inner contour aggregation value is less than the preset aggregation comparison value, a passive exhaust command is generated and output; otherwise, an active exhaust command is generated, the preset exhaust speed and exhaust amplitude are read, the quantity adjustment value is calculated based on the number of inner contour lines and the number of inner contour comparisons, the exhaust speed is adjusted according to the positive correlation of the quantity adjustment value, the aggregation adjustment value is calculated based on the inner contour aggregation value and the aggregation comparison value, and the exhaust amplitude is adjusted according to the negative correlation of the aggregation adjustment value.

3. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 2, characterized in that, The process of allowing the gas to vent to settle also includes the following sub-steps: An ultrasonic vibration component is installed next to the packaging component. In response to a passive exhaust command, the ultrasonic vibration component is controlled to vibrate the semi-finished product at a preset vibration frequency for a second duration; wherein the second duration is shorter than the first duration. The second duration is adjusted according to the positive correlation between the quantity adjustment value and the second duration; the larger the quantity adjustment value, the longer the second duration, and the smaller the quantity adjustment value, the shorter the second duration. The vibration frequency is adjusted according to the positive correlation between the aggregation adjustment value and the aggregation adjustment value; the larger the aggregation adjustment value, the higher the vibration frequency, and the smaller the aggregation adjustment value, the lower the vibration frequency.

4. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 2, characterized in that, The active exhaust process also includes the following sub-steps: An ultrasonic vibration assembly is installed next to the extrusion roller; In response to the passive exhaust command, the ultrasonic vibration component is controlled to vibrate the semi-finished product at a preset vibration frequency when the extrusion rollers are pressing the semi-finished product. The comprehensive adjustment value is calculated based on the quantity adjustment value and the aggregation adjustment value; The vibration frequency is adjusted according to the positive correlation of the comprehensive adjustment value. The larger the comprehensive adjustment value, the higher the vibration frequency, and the smaller the comprehensive adjustment value, the lower the vibration frequency.

5. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 2, characterized in that, The method also includes the following steps: Real-time shooting of finished products yields multiple sets of finished product image data, with each set of finished product image data corresponding to a single finished product. Based on a preset bubble template, bubble features in the finished product image data are identified; Calculate the average number of bubbles and the average bubble size corresponding to the bubble feature in the image data of each batch of finished products; The bubble count is calculated based on a preset weighted data set using multiple average bubble counts, and the bubble size is calculated based on a weighted data set using multiple average bubble sizes. The longer the time after the finished product is discharged, the larger the corresponding weighted element in the weighted data group; The bubble quantity is calculated based on the bubble quantity value and the preset bubble comparison value. The bubble size is calculated based on the bubble size value and the preset size comparison value. The bubble adjustment value is calculated based on the bubble quantity and bubble size. The inner contour comparison quantity and aggregation comparison value are negatively adjusted based on the bubble adjustment value.

6. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 5, characterized in that, The method also includes the following steps: The filling reference value is calculated using a weighted algorithm based on the volume reference value and the viscosity reference value; The weighting coefficient of the viscosity reference value is adjusted according to the positive correlation between the calculated bubble number and the value. The larger the calculated bubble number, the larger the weighting coefficient of the viscosity reference value, and the smaller the calculated bubble number, the smaller the weighting coefficient of the viscosity reference value. The weighting coefficient of the volume reference value is adjusted based on the positive correlation between the calculated bubble size value and the calculated bubble size value. The larger the calculated bubble size value, the larger the weighting coefficient of the volume reference value, and the smaller the calculated bubble size value, the smaller the weighting coefficient of the volume reference value.

7. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 5, characterized in that, The method also includes the following steps: The element difference between adjacent weighted elements in the weighted data group is adjusted according to the positive correlation of the viscosity reference value. The smaller the viscosity reference value, the larger the element difference, and the larger the viscosity reference value, the smaller the element difference.

8. The dynamic filling method of the traditional Chinese medicine liquid filling equipment according to claim 4, characterized in that, The method also includes the following steps: Adjust the working area of ​​the extrusion roller on the surface of the semi-finished product according to the viscosity reference value. The smaller the viscosity reference value, the farther the working area is from the sealing part of the semi-finished product. The larger the viscosity reference value, the closer the working area is to the sealing part of the semi-finished product.

9. A dynamic filling system for a traditional Chinese medicine liquid filling equipment, characterized in that, Includes a processor, wherein the processor performs the steps of the dynamic filling method of the traditional Chinese medicine liquid filling equipment as described in any one of claims 1-8.

10. A storage medium, characterized in that, The storage medium stores a program, which, when executed by a processor, implements the steps of the dynamic filling method of the traditional Chinese medicine liquid filling equipment according to any one of claims 1-8.