Digital-twin-based automatic filling monitoring method for jar food

CN121921295BActive Publication Date: 2026-08-21TAIAN YASHENG FOODSTUFF CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610082239.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-08-21
Estimated Expiration
2046-01-21

AI Technical Summary

Technical Problem

[0005]为解决上述现有视觉检测技术在针对玻璃瓶等透明容器进行检测时,难以区分固有光学干扰与真实缺陷,且易受生产线机械震动影响导致误判率高的技术问题,本发明提供了基于数字孪生的瓦罐食品自动化灌装监控方法,包括:采集玻璃瓶在当前时刻的原始图像,读取灌装流量计的瞬时流速数据、传送带的编码器位置数据以及灌装工位的实时震动幅值;在数字孪生系统中构建包含玻璃瓶三维模型、食品流体材质模型以及现场环境光源模型的虚拟场景;对瞬时流速数据进行累积计算得到理论液位高度,基于理论液位高度利用光线追踪算法渲染生成理论光影渲染图像;对原始图像与理论光影渲染图像进行几何配准与背景差分,得到光影差分图;根据理论光影渲染图像的梯度幅值、玻璃瓶模型的投影曲率值及实时震动幅值,构建视觉置信度掩膜,利用视觉置信度掩膜对光影差分图进行调制,生成修正光影残差图;根据修正光影残差图获取灌装飞溅指数与液位偏差指数;响应于灌装飞溅指数大于污染阈值,触发剔除机构;响应于液位偏差指数大于精度阈值,调整灌装流量计的参数

Benefits of technology

[0012]本发明通过综合分析理论图像的梯度幅值、模型的几何曲率以及生产线的实时震动幅值,构建了多维度的视觉置信度评价体系,能够识别出图像中对震动敏感的边缘区域以及成像不稳定的高曲率区域,并据此生成动态权重的掩膜,实现了对不同区域检测灵敏度的自适应调整,有效防止了因生产线机械抖动或玻璃瓶几何畸变导致的虚假缺陷报警,显著提升了检测系统的环境适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921295B_ABST
    Figure CN121921295B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of digital twinning, and particularly relates to a method for automatically monitoring the filling of jar food based on digital twinning, which comprises the following steps: collecting the original image of a glass bottle at the current time, reading the filling valve opening, flow rate and conveyor belt position data; constructing a virtual scene in the digital twinning system, cumulatively calculating the theoretical liquid level height from the flow rate data, and generating a theoretical light and shadow rendering image by using a ray tracing algorithm; registering and differentiating the original image and the theoretical image to obtain a light and shadow difference image; constructing a visual confidence mask according to the theoretical image gradient, model curvature and real-time vibration amplitude, and generating a corrected light and shadow residual image; obtaining the filling splashing index and the liquid level deviation index according to the above; and triggering the rejection mechanism or correcting the flowmeter coefficient according to the indexes. The present application eliminates optical interference by using digital twinning, suppresses vibration artifacts by using a confidence mask, and realizes accurate detection and closed-loop control of the filling defects of transparent containers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twin technology. More specifically, this invention relates to a digital twin-based method for automated filling and monitoring of food in earthenware jars. Background Technology

[0002] After being prepared in earthenware pots, such as fish cooked in clay pots, the food is packaged into glass bottles via a bottling production line for sale. The bottling quality directly impacts product compliance and food safety. Precise liquid level control is crucial for ensuring the product's net content meets standards and controlling production costs, while the cleanliness of the bottle neck threads or sealing surfaces determines the integrity of the seal in the subsequent capping process. If sauce splatters or adheres to the bottle neck, it can easily lead to leakage or spoilage during transportation and storage. Therefore, real-time, high-precision online monitoring of the bottling process is essential.

[0003] In related technologies, industrial cameras are deployed on the side or above the conveyor belt to capture images of glass bottles. Pre-set image processing algorithms are used to extract grayscale anomalies at the liquid surface edge or in the bottle mouth area. By comparing the differences between the image features and a standard template, it is determined whether there are liquid level deviations or splashing defects.

[0004] However, after being prepared, clay pot foods are packaged and sold in containers such as glass bottles. Glass has high light transmittance and high reflectivity, and the bottle body typically includes complex geometric structures such as bottle shoulders, bottom corners, and threads. Under industrial light sources, the bottle surface produces complex and angle-dependent strong light spots, refraction shadows, and internal reflective textures. Related technologies struggle to distinguish these inherent optical noises from actual splashes, stains, or liquid level edges, easily misjudging reflections as defects. Furthermore, the high-speed operation of automated production lines is accompanied by mechanical vibrations, causing slight displacements or motion blur in the captured images. This frequently leads to mismatches in algorithms based on fixed templates or simple edge extraction, resulting in false alarms or missed detections, making it difficult to meet the high stability and high precision requirements of high-speed production lines. Summary of the Invention

[0005] To address the shortcomings of existing visual inspection technologies in distinguishing between inherent optical interference and actual defects when inspecting transparent containers such as glass bottles, and the high false positive rate caused by mechanical vibrations on the production line, this invention provides an automated filling and monitoring method for earthenware food based on digital twins. The method includes: acquiring the original image of the glass bottle at the current moment; reading the instantaneous flow rate data from the filling flow meter, the encoder position data of the conveyor belt, and the real-time vibration amplitude of the filling station; constructing a virtual scene in the digital twin system that includes a 3D model of the glass bottle, a food fluid material model, and an ambient light source model; and accumulating and calculating the instantaneous flow rate data to obtain theoretical... The liquid level is determined by generating a theoretical lighting and shadow rendering image based on the theoretical liquid level using a ray tracing algorithm. Geometric registration and background subtraction are performed between the original image and the theoretical lighting and shadow rendering image to obtain a lighting and shadow difference map. A visual confidence mask is constructed based on the gradient amplitude of the theoretical lighting and shadow rendering image, the projection curvature of the glass bottle model, and the real-time vibration amplitude. This mask is then used to modulate the lighting and shadow difference map, generating a corrected lighting and shadow residual map. The filling splash index and liquid level deviation index are obtained from the corrected lighting and shadow residual map. If the filling splash index exceeds a contamination threshold, a rejection mechanism is triggered. If the liquid level deviation index exceeds an accuracy threshold, the parameters of the filling flow meter are adjusted.

[0006] This invention reconstructs the optical imaging process of glass bottles in virtual space, using a ray tracing algorithm to generate a theoretical image containing complex refraction and reflection features. This image is then used as a physical background for differential calculations, effectively separating inherent optical interference from actual filling defects. This solves the problem of high false positive rates in traditional visual inspection under strong reflective and high refraction scenarios. Simultaneously, this invention combines real-time vibration amplitude and image geometric features to construct a visual confidence mask, achieving adaptive suppression of pseudo-residuals caused by mechanical vibration or edge misalignment in the differential image. This significantly improves the robustness of the system while preserving the true defect features. Furthermore, this invention calculates the filling splash index and liquid level deviation index separately, and performs rejection and calibration operations accordingly, forming a closed-loop control from defect identification to equipment optimization. This effectively ensures the efficient and stable operation of the filling production line and the consistency of product quality.

[0007] Preferably, the acquisition of the original image of the glass bottle at the current moment includes: using industrial cameras deployed directly above and to the side of the filling station to simultaneously acquire the original image of the glass bottle at the current moment; and stamping the original image, instantaneous flow rate data, and encoder position data of the conveyor belt with a unified timestamp.

[0008] Preferably, the step of using a ray tracing algorithm to render a theoretical light and shadow rendering image based on the theoretical liquid level includes: in a virtual scene, using a ray tracing algorithm to simulate the reflection and refraction paths of light at the glass bottle wall, the food liquid surface, and the gas-liquid interface inside the bottle, and rendering a theoretical light and shadow rendering image at the current moment and the current theoretical liquid level.

[0009] Preferably, the step of performing geometric registration and background subtraction on the original image and the theoretical lighting and shadow rendering image to obtain a lighting and shadow difference map includes: performing geometric registration on the original image and the theoretical lighting and shadow rendering image using a feature point matching algorithm; extracting the gray-level difference features between the registered original image and the theoretical lighting and shadow rendering image using a background subtraction algorithm; and smoothing the gray-level difference features using Gaussian filtering to obtain the lighting and shadow difference map.

[0010] This invention achieves pixel-level geometric alignment between the original image and the theoretical image through a feature point matching algorithm, eliminating spatial misalignment caused by slight deviations in the shooting perspective. It also uses a background subtraction algorithm to accurately extract the grayscale difference between the two images, and combines Gaussian filtering for smoothing to effectively suppress random sensor noise during image acquisition. This allows the light and shadow difference map to clearly and purely characterize the abnormal changes in the actual filling state relative to the theoretical ideal state, providing a high-quality feature map for subsequent defect quantification.

[0011] Preferably, the visual confidence mask satisfies the following relationship: In the formula, For coordinates Visual confidence mask at the location, Coordinates in a theoretically lit and shaded image The gradient magnitude of the pixel. This represents the maximum gradient magnitude in the theoretically rendered image. For the glass bottle model in coordinates The projected curvature value, This represents the maximum value of the projected curvature. This represents the current real-time vibration amplitude. The preset maximum vibration threshold, It is an exponential function with the natural constant as the base.

[0012] This invention constructs a multi-dimensional visual confidence evaluation system by comprehensively analyzing the gradient amplitude of theoretical images, the geometric curvature of models, and the real-time vibration amplitude of the production line. It can identify vibration-sensitive edge regions and high-curvature regions with unstable imaging in images, and generate a mask with dynamic weights accordingly. This enables adaptive adjustment of the detection sensitivity for different regions, effectively preventing false defect alarms caused by mechanical vibrations on the production line or geometric distortion of glass bottles, and significantly improving the environmental adaptability of the detection system.

[0013] Preferably, the corrected light and shadow residual map satisfies the following relationship: In the formula, To correct the coordinates in the light and shadow residual diagram The grayscale value of the pixel at that location. For coordinates Visual confidence mask at the location, Coordinates in the light and shadow difference diagram The grayscale value of the pixel.

[0014] This invention integrates the relative gradient factor, relative curvature factor, and vibration attenuation factor into the visual confidence mask and performs pixel-level weighting on the light and shadow difference map. This automatically suppresses the difference values ​​at strongly reflective edges, large curvature angles, or during severe vibrations, while retaining the original difference values ​​in flat and stable areas. This achieves the filtering out of false residuals, ensuring that the corrected light and shadow residual map can truly reflect filling quality problems and reducing the false alarm rate of the system.

[0015] Preferably, the step of obtaining the filling splash index and liquid level deviation index based on the modified light and shadow residual map includes: pre-selecting the set of vertices on the bottle neck thread surface of the glass bottle model and the set of vertices on the inner wall of the bottle body within a preset height range centered on the theoretical liquid level in the digital twin system; projecting the set of vertices on the bottle neck thread surface and the set of vertices on the inner wall of the bottle body onto a two-dimensional image plane and performing morphological closing operations and dilation processing to construct the bottle neck sensitive area and the liquid level monitoring area respectively; and obtaining the filling splash index and the liquid level deviation index respectively based on the distribution characteristics of the modified light and shadow residual map in the bottle neck sensitive area and the liquid level monitoring area.

[0016] Preferably, the filling splash index is the average grayscale value of all pixels in the sensitive area of ​​the bottle opening in the corrected light and shadow residual map.

[0017] Preferably, the liquid level deviation index satisfies the following relationship: In the formula, This refers to the liquid level deviation index. This refers to the actual liquid level height extracted from the liquid level monitoring area. The theoretical liquid level height calculated for the digital twin. The preset liquid level tolerance, It is the hyperbolic tangent function.

[0018] This invention calculates the liquid level deviation index, which improves the detection accuracy. It also normalizes the liquid level deviation into an easily controllable exponential form through nonlinear mapping, which can accurately measure the degree to which the actual liquid level deviates from the theoretical expectation. Both underfilling and overfilling can be effectively measured, providing standardized data support for the statistical process control of filling accuracy.

[0019] Preferably, adjusting the parameters of the filling flow meter in response to the liquid level deviation index being greater than the accuracy threshold includes: adjusting the parameters of the filling flow meter in response to the liquid level deviation index being greater than the accuracy threshold and the liquid level deviation index of a preset number of glass bottles continuously being greater than the accuracy threshold.

[0020] The beneficial effects of this invention are as follows: By mapping real-time physical state data to virtual space, this invention can accurately isolate complex optical noise generated by the coupling of glass refraction, fluid fluctuations, and mechanical vibrations in a dynamically changing production environment. This endows the vision system with the cognitive ability to distinguish between optical artifacts and physical defects without increasing hardware costs. The detection architecture based on digital twins reduces the dependence of the vision system on the stability of the light source and the mechanical stability, enabling the production line to maintain an extremely high detection signal-to-noise ratio even under high-speed operation. This not only eliminates the outflow of defective products but also reduces material loss and manual maintenance costs through adaptive calibration of equipment parameters, significantly improving the intelligence level and production yield of the food filling process. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the automated filling and monitoring method for earthenware pot food based on digital twins in this invention; Figure 2 This is a schematic diagram illustrating the exponential changes in this invention. Detailed Implementation

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

[0023] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0024] This invention discloses an automated filling and monitoring method for earthenware food based on digital twins, referring to... Figure 1 This includes steps S1 to S6: S1. Real-time monitoring data of the filling site is obtained through industrial cameras and PLC controllers.

[0025] Specifically, industrial cameras deployed directly above and to the side of the filling station are used to simultaneously capture raw images of the glass bottles at the current moment. Simultaneously, the instantaneous flow rate data from the filling flow meter and the encoder position data of the conveyor belt are read in real time via a PLC controller. These image data and equipment operating parameters are then timestamped to construct a multi-dimensional real-time monitoring dataset containing both visual information and physical status.

[0026] S2. Based on the filling flow rate and the optical properties of the glass bottle, generate a theoretical light and shadow rendering image using a digital twin.

[0027] It should be noted that since the geometry, refractive index, and position of the light source in the glass bottle are fixed, under ideal, interference-free conditions, its optical imaging should follow the laws of reflection and refraction in physical optics. The light spots and refracted shadows that cause difficulties in visual inspection are actually predictable physical phenomena. Therefore, this invention reconstructs this physical process in virtual space, pre-generating the theoretically expected conditions during the filling process, so that these can be subsequently eliminated as background noise.

[0028] Specifically, a virtual scene is constructed within the digital twin system, comprising a 3D model of the glass bottle, a material model of the food fluid, and a model of the ambient lighting. An integral algorithm is used to accumulate and calculate the instantaneous flow velocity data transmitted by the PLC, yielding the theoretical liquid level height inside the glass bottle at the current moment. Based on this theoretical liquid level height, a ray tracing algorithm is used to simulate the reflection and refraction paths of light at the glass bottle wall, the food liquid surface, and the gas-liquid interface within the bottle. A rendering image is then generated, representing the theoretical lighting and shadows that the industrial camera should observe at the current moment and theoretical liquid level.

[0029] S3. Obtain the light and shadow difference map based on the real-time monitoring image and the theoretical light and shadow rendering image.

[0030] It should be noted that the theoretically rendered image represents the ideal visual state under perfect filling conditions and without any abnormal interference, including inherent optical features such as glass reflection and refraction. The original image, however, contains not only these inherent features but also actual anomalies such as drips, splashes, and bubbles. Therefore, by performing a difference operation between the two, common interferences such as glass reflection can be canceled out, making the abnormal features stand out.

[0031] Specifically, a feature point matching algorithm is used to geometrically register the original image and the theoretically rendered lighting and shadow image. A background subtraction algorithm is then used to extract the grayscale difference features between the two images at corresponding pixel coordinates. Gaussian filtering is then used to smooth these differences, resulting in a lighting and shadow difference map.

[0032] S4. Based on the optical gradient of the theoretically rendered image, the surface curvature of the glass bottle model, and the real-time vibration amplitude, construct a visual confidence mask and obtain the corrected light and shadow residual map.

[0033] It should be noted that glass bottles have complex structures, and in high-curvature areas such as the bottle shoulder and bottom corners, the refraction path of light is extremely sensitive to positional changes. Even minute mechanical vibrations from the production line conveyor belt or delays triggered by the camera can cause edge misalignment between the actual and theoretical images in these optically sensitive areas, resulting in high-amplitude pseudo-residuals. Therefore, this invention constructs a visual confidence mask based on the optical gradient of the theoretically rendered image, the surface curvature of the glass bottle model, and the real-time vibration amplitude to obtain a corrected image of the lighting residuals.

[0034] Specifically, the Sobel operator is used to obtain the gradient magnitude of each pixel in the theoretically rendered image, and the maximum gradient value of the entire image is extracted to construct a relative gradient factor. A geometric projection algorithm is used to map the 3D curvature of the glass bottle model in the digital twin onto a 2D imaging plane, obtaining the projected curvature value of each pixel, and the maximum curvature value of the entire image is extracted to construct a relative curvature factor. The real-time vibration amplitude is read by the PLC, and combined with the maximum allowable vibration threshold of the device, a vibration attenuation factor is calculated. Based on the relative gradient factor, relative curvature factor, and vibration attenuation factor, a visual confidence mask is constructed, and this mask is used to modulate the light and shadow difference map to generate a corrected light and shadow residual map.

[0035] Specifically, the corrected light and shadow residual map satisfies the following relationship: ; ; In the formula, To correct the coordinates in the light and shadow residual diagram The grayscale value of the pixel at that location. For coordinates Visual confidence mask at the location, Coordinates in the light and shadow difference diagram The grayscale value of the pixel at that location. Coordinates in a theoretically lit and shaded image The gradient magnitude of the pixel. This represents the maximum gradient magnitude in the theoretically rendered image. For the glass bottle model in coordinates The projected curvature value, This represents the maximum value of the projected curvature. This represents the current real-time vibration amplitude. The preset maximum vibration threshold, It is an exponential function with the natural constant as the base.

[0036] in, The larger the value, the more likely the pixel is to be located at a highly reflective edge or a sudden change in texture. It is extremely sensitive to minute displacements, causing the visual confidence mask to approach 0, thereby strongly suppressing the confidence of the area and preventing false alarms caused by spot misalignment. The smaller the value, the more likely the pixel is to be in a region of gentle lighting and have stable visual features. This results in the visual confidence mask being closer to 1, thus preserving the original residual. The larger the value, the more likely the area is located at a high curvature point, such as the shoulder or bottom corner of the bottle. This makes the geometric imaging extremely unstable, resulting in a smaller visual confidence mask, which automatically reduces its weight. The smaller the area, the better the geometric consistency, which means the area is located on a flat part of the bottle and thus the larger the visual confidence mask, thereby maintaining high detection sensitivity. The larger the value, the more severe the mechanical vibration of the production line, which poses a risk of motion blur in the image. This results in a smaller visual confidence mask, thereby reducing the confidence baseline of the entire image. A smaller value indicates smoother operation, resulting in a larger visual confidence mask, thus allowing the system to perform high-precision detection. This, in turn, enables... , and Obtain the visual confidence mask and through The pixels in the light and shadow difference map are processed to obtain the corrected light and shadow residual map, which realizes the adaptive dynamic filtering of pseudo residuals.

[0037] S5. Based on the distribution characteristics of the corrected light and shadow residual map in different monitoring areas, obtain the filling splash index and liquid level deviation index, and execute feedback control.

[0038] It should be noted that the distribution of highlighted areas in the corrected optical residual map varies, representing different defect types. To identify different types of defects, the image needs to be analyzed by region. Therefore, this invention obtains the filling splash index and liquid level deviation index based on the distribution characteristics of the corrected optical residual map in different monitoring areas, and performs feedback control.

[0039] Specifically, in a virtual 3D space, a set of vertices on the threaded surface of the bottle neck of the glass bottle model and a set of vertices on the inner wall of the bottle body within a preset height range centered on the theoretical liquid level are pre-selected. Using the camera intrinsic and real-time extrinsic matrices used when rendering the theoretical image, the above two sets of 3D vertex sets are projected onto a 2D image plane. Morphological closing and dilation operations are performed on the projected 2D point cloud region to fill gaps and cover edge tolerances, thereby constructing the bottle neck sensitive area and the liquid level monitoring area, respectively.

[0040] Furthermore, all pixels within the bottle neck sensitive area are iterated over, and the value of each pixel in the corrected light and shadow residual map is used as the local residual value. The mean of the local residual values ​​of all pixels within the bottle neck sensitive area is used as the filling splash index.

[0041] The filling splash index reflects the average density of abnormal light and shadow residue in the bottle neck area. A higher value indicates more sauce residue or splashed droplets at the bottle neck threads or inner wall of the bottle neck, resulting in more severe contamination of the sealing surface and indicating a very high risk of seal failure. A lower value indicates a higher smoothness in the bottle neck area, with the corrected residual map in this area being close to pure black, resulting in a lower risk of contamination and thus being judged as a qualified product.

[0042] Furthermore, a weighted centroid algorithm is used to extract the vertical center coordinates of the high-response area within the liquid level monitoring zone, and these coordinates are determined as the actual liquid level height. The liquid level deviation index is determined based on the absolute value of the difference between the actual liquid level height and the theoretical liquid level height generated by the digital twin.

[0043] Specifically, the liquid level deviation index satisfies the following relationship: ; In the formula, This refers to the liquid level deviation index. This refers to the actual liquid level height extracted from the liquid level monitoring area. The theoretical liquid level height calculated for the digital twin. The preset liquid level tolerance, The function is the hyperbolic tangent function, which is used in this embodiment. The thickness is 3mm; the implementer can set it according to the product's quality control standards. For example, when the requirement for appearance consistency is extremely high, it can be set to 1.5mm; when the requirement for appearance consistency is not high, it can be set to 5mm.

[0044] in, This reflects the relative degree to which the actual liquid level deviates from the theoretical expectation. The larger the value, the more significant the deviation between the actual filling volume and the standard volume, resulting in a liquid level deviation index close to 1, thus indicating underfilling or overfilling. The smaller the value, the closer the actual liquid level is to the theoretical value, resulting in a lower liquid level deviation index, which indicates that the filling accuracy meets the standard.

[0045] S6. Monitor the filling process based on the splashing index and the level deviation index.

[0046] Specifically, in response to a filling splash index exceeding a preset contamination threshold, if the bottle is determined to have a sealing hazard, an immediate rejection mechanism is triggered to remove the bottle from the production line at a subsequent station. In response to a level deviation index exceeding a preset accuracy threshold, and if a preset number of bottles consecutively exceed this threshold, a calibration command is generated to automatically correct the compensation coefficient of the filling flow meter; for example, the contamination threshold is 0.4, the accuracy threshold is 0.7, and the preset number is 10.

[0047] For example, Figure 2 This is a schematic diagram of the index change in this invention. As can be seen from the diagram, this invention addresses occasional quality anomalies by instantly identifying and marking defective products when the filling splash index of a specific glass bottle exceeds a preset contamination threshold. For systemic equipment drift, when the liquid level deviation index gradually accumulates during production and exceeds the accuracy threshold, the compensation coefficient of the filling flow meter is automatically corrected through a digital twin feedback mechanism. This causes the subsequent liquid level deviation index to quickly fall back and remain at a low and stable level, thereby achieving precise removal of individual defects while effectively ensuring the long-term operational accuracy of the equipment.

Claims

1. A method for automated filling and monitoring of earthenware food based on digital twins, characterized in that, include: Acquire the original image of the glass bottle at the current moment, and read the instantaneous flow rate data of the filling flow meter, the encoder position data of the conveyor belt, and the real-time vibration amplitude of the filling station; Construct a virtual scene in the digital twin system that includes a 3D model of a glass bottle, a material model of food fluids, and a model of ambient lighting. The theoretical liquid level height is obtained by accumulating instantaneous flow velocity data. Based on the theoretical liquid level height, a theoretical lighting and shadow rendering image is generated using a ray tracing algorithm. Geometric registration and background subtraction are performed on the original image and the theoretical lighting and shadow rendering image to obtain a lighting and shadow difference map. A visual confidence mask is constructed based on the gradient amplitude of the theoretical lighting and shadow rendering image, the projection curvature value of the glass bottle model, and the real-time vibration amplitude. The lighting and shadow difference map is modulated using the visual confidence mask to generate a corrected lighting and shadow residual map. The filling splash index and liquid level deviation index are obtained based on the corrected lighting and shadow residual map. The projection curvature value is the curvature value obtained after mapping the three-dimensional curvature of the glass bottle model in the digital twin to the two-dimensional imaging plane using a geometric projection algorithm. The rejection mechanism is triggered when the filling splash index exceeds the contamination threshold; the parameters of the filling flow meter are adjusted when the liquid level deviation index exceeds the accuracy threshold.

2. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The acquisition of the original image of the glass bottle at the current moment includes: using industrial cameras deployed directly above and to the side of the filling station to simultaneously acquire the original image of the glass bottle at the current moment; and stamping the original image, instantaneous flow rate data, and encoder position data of the conveyor belt with a unified timestamp.

3. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The process of generating a theoretical light and shadow rendering image based on the theoretical liquid level using a ray tracing algorithm includes: in a virtual scene, using a ray tracing algorithm to simulate the reflection and refraction paths of light at the glass bottle wall, the food liquid surface, and the gas-liquid interface inside the bottle, and rendering a theoretical light and shadow rendering image at the current moment and the current theoretical liquid level.

4. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The step of performing geometric registration and background subtraction between the original image and the theoretical lighting and shadow rendering image to obtain a lighting and shadow difference map includes: performing geometric registration between the original image and the theoretical lighting and shadow rendering image using a feature point matching algorithm; extracting the gray-level difference features between the registered original image and the theoretical lighting and shadow rendering image using a background subtraction algorithm; and smoothing the gray-level difference features using Gaussian filtering to obtain the lighting and shadow difference map.

5. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The visual confidence mask satisfies the following relationship: ; In the formula, For coordinates Visual confidence mask at the location, Coordinates in a theoretically lit and shaded image The gradient magnitude of the pixel. This represents the maximum gradient magnitude in the theoretically rendered image. For the glass bottle model in coordinates The projected curvature value, This represents the maximum value of the projected curvature. This represents the current real-time vibration amplitude. The preset maximum vibration threshold, It is an exponential function with the natural constant as the base.

6. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 5, characterized in that, The corrected light and shadow residual map satisfies the following relationship: ; In the formula, To correct the coordinates in the light and shadow residual diagram The grayscale value of the pixel at that location. For coordinates Visual confidence mask at the location, Coordinates in the light and shadow difference diagram The grayscale value of the pixel.

7. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The step of obtaining the filling splash index and liquid level deviation index based on the modified light and shadow residual map includes: pre-selecting the set of vertices on the bottle neck thread surface of the glass bottle model and the set of vertices on the inner wall of the bottle body within a preset height range centered on the theoretical liquid level in the digital twin system; projecting the set of vertices on the bottle neck thread surface and the set of vertices on the inner wall of the bottle body onto a two-dimensional image plane and performing morphological closing operations and dilation processing to construct the bottle neck sensitive area and the liquid level monitoring area respectively; and obtaining the filling splash index and the liquid level deviation index respectively based on the distribution characteristics of the modified light and shadow residual map in the bottle neck sensitive area and the liquid level monitoring area.

8. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 7, characterized in that, The filling splash index is the average grayscale value of all pixels in the sensitive area of ​​the bottle opening in the corrected light and shadow residual map.

9. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 7, characterized in that, The liquid level deviation index satisfies the following relationship: ; In the formula, This refers to the liquid level deviation index. This refers to the actual liquid level height extracted from the liquid level monitoring area. The theoretical liquid level height calculated for the digital twin. The preset liquid level tolerance, It is the hyperbolic tangent function.

10. The automated filling and monitoring method for earthenware pot food based on digital twins according to claim 1, characterized in that, The step of adjusting the parameters of the filling flow meter in response to the liquid level deviation index being greater than the accuracy threshold includes: adjusting the parameters of the filling flow meter in response to the liquid level deviation index being greater than the accuracy threshold and the liquid level deviation index of a preset number of glass bottles continuously being greater than the accuracy threshold.

Citation Information

Patent Citations

  • Full-automatic tissue culture bottle filling assembly line and control method thereof

    CN119409126A

  • Carbon energy efficiency dual-objective optimization analysis method and system based on digital twinning

    CN121348887A