Penicillin fermentation liquid level regulation method and system based on visual recognition

By using machine vision technology and AI algorithms, a method for intelligent identification and dynamic control of penicillin fermentation liquid level was constructed, which solved the problems of inaccurate measurement and lagging control in existing detection methods, and achieved high-precision, fully automatic liquid level control, thereby improving fermentation production efficiency and yield.

CN122284693APending Publication Date: 2026-06-26SHANXI WEIQIDA PHARMA IND
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANXI WEIQIDA PHARMA IND
Filing Date
2026-02-13
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for detecting penicillin fermentation liquid levels suffer from problems such as inaccurate measurement, susceptibility to interference, delayed control, reliance on manual intervention, and inability to make real-time dynamic adjustments. These issues make it difficult to meet the demands of modern fermentation industries for high-precision and high-stability automatic control.

Method used

A machine vision-based intelligent liquid level recognition and dynamic control method is adopted. Through video acquisition, image preprocessing, image segmentation, gradient-liquid level mapping database and time series analysis, combined with multi-dimensional indicators (liquid level value, rate value, fuzzy value), automatic control is achieved, and a complete reference standard selection scheme is constructed.

Benefits of technology

It achieves non-contact precision measurement, intelligent multi-parameter decision-making, and fully automatic closed-loop control, which improves the stability and yield of the fermentation process, reduces manual intervention, and improves response speed and control stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284693A_ABST
    Figure CN122284693A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for controlling the liquid level in penicillin fermentation based on visual recognition. By introducing visual AI detection technology into the field of penicillin fermentation production and combining it with the characteristics of fermentation liquid level, a complete set of reference standard selection schemes is innovatively constructed. It also proposes key indicators with specificity and innovation, such as "liquid level value", "rate value" and "fuzzy value", to provide quantitative basis for accurate identification and control of penicillin fermentation liquid level. It is linked with the control system to achieve automatic control, realizing accurate, stable and automated closed-loop control of penicillin fermentation liquid level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated control technology for industrial fermentation processes, and more specifically, to a method and system for intelligent identification, detection, and dynamic control of penicillin fermentation liquid level based on machine vision and artificial intelligence algorithms. Background Technology

[0002] Penicillin is a β-lactam antibiotic, a metabolite produced during the growth of Penicillium. It inhibits transpeptidase, preventing the cross-linking of peptidoglycans in bacterial cell wall synthesis, thus hindering bacterial cell wall synthesis and inhibiting bacterial growth. Penicillin fermentation is a typical microbial fermentation process, where the liquid level directly affects dissolved oxygen levels, nutrient transfer, and metabolite accumulation, significantly influencing fermentation efficiency and final yield.

[0003] Currently, level detection in penicillin fermentation broth mainly relies on float-type, capacitive, or ultrasonic sensors, with some small and medium-sized enterprises still using manual observation and control. These traditional methods have significant limitations: contact sensors are susceptible to interference from fermentation broth adhesion and foam, leading to measurement errors; non-contact sensors are often expensive and complex to install; and manual observation suffers from strong subjectivity, slow response, inability to conduct continuous monitoring, and high labor intensity, making it difficult to meet the demands of modern fermentation industries for high-precision and high-stability automatic control.

[0004] Therefore, developing a non-contact, high-precision liquid level control method that can be dynamically monitored in real time and automatically adjusted is of urgent need and great significance for improving the level of penicillin fermentation production. Summary of the Invention

[0005] In view of the above problems, the purpose of this invention is to provide a method and system for intelligent identification, detection and dynamic control of penicillin fermentation liquid level based on machine vision. Addressing the problems of inaccurate measurement, susceptibility to interference, delayed control, reliance on manual intervention, and inability to make real-time dynamic adjustments in existing penicillin fermentation liquid level detection and control technologies, this invention introduces visual AI detection technology into the field of penicillin fermentation production. Combined with the characteristics of the fermentation liquid level, a complete set of reference standard selection schemes is innovatively constructed, and key indicators such as "liquid level value," "rate value," and "fuzzy value" with specificity and innovation are proposed. This provides a quantitative basis for accurate identification and control of the penicillin fermentation liquid level, and enables automatic control in conjunction with the control system.

[0006] On one hand, the present invention provides a method for controlling the liquid level of penicillin fermentation based on visual recognition, comprising: Real-time and continuous acquisition of liquid level video in the fermenter at the penicillin fermentation site is based on a preset video acquisition unit. The liquid level video is preprocessed using a video processing industrial control computer to obtain a preprocessed liquid level image. Based on a pre-trained image segmentation model, liquid surface region recognition is performed on the pre-processed liquid level image to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and to calculate the pixel position of the liquid surface in the image. The pixel position is converted into the actual liquid level height value and gradient value based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database; and the liquid level video is analyzed in time series to determine the liquid level change rate and the viewing mirror blur value. Based on the actual liquid level height, gradient value, liquid level change rate, and sight glass blur value, the amount of oil to be added to the fermenter is determined, so as to regulate the liquid level in the fermenter according to the amount of oil added. Alternatively, the video acquisition unit may include an intelligent camera mounted on the sight glass opening at the top of the fermenter and a lighting source.

[0007] Alternatively, the preprocessing may include at least one of noise filtering, contrast enhancement, edge sharpening, and lens distortion correction.

[0008] Alternatively, median filtering can be used to remove noise, histogram equalization can be used to enhance image contrast, and the Canny operator can be applied for sharpening before edge detection.

[0009] Alternatively, in the process of constructing the gradient-level mapping database, the existing ladder inside the fermenter is selected as a static reference, and the standard point of the fermenter body is taken as the zero point. The tank-by-tank and step-by-step measurement includes gradient data for the distance from the zero point of the first step, the distance between the first and second steps, the distance between the second and third steps, the distance between the third and fourth steps, the distance between the fourth and fifth steps, and the distance between the fifth and sixth steps. The gradient-level mapping database is established based on the gradient data, and the gradient data is incorporated into the configuration parameters of each tank.

[0010] In addition, alternative solutions include: The preset parameter setting interface displays the effective area, correction, and gradient calibration; wherein, at the gradient calibration point, the distance of the first ladder from the zero point and the spacing between each ladder are displayed, and the position height and linear coordinates of each gradient after calibration are also displayed. If the gradient calibration results do not meet the preset requirements, repeat the gradient calibration. Check whether the calibration line displayed on the interface during gradient calibration coincides with the ladder structure. If they do not coincide, modify the linear coordinates until the calibration line corresponds to the ladder.

[0011] In addition, an optional solution is to include a high liquid level alarm procedure; When the liquid level exceeds the warning threshold and manual intervention is required, an audible alarm will be triggered, and a flashing notification will be displayed on the monitoring screen.

[0012] On the other hand, the present invention also provides a penicillin fermentation liquid level control system based on visual recognition, comprising: The video acquisition unit is used to continuously acquire real-time video of the liquid level inside the fermenter at the penicillin fermentation site. An image preprocessing unit is used to preprocess the liquid level video to obtain a preprocessed liquid level image; The image segmentation unit is used to identify the liquid surface region of the pre-processed liquid level image based on a pre-trained image segmentation model, so as to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and calculate the pixel position of the liquid surface in the image. The parameter processing unit is used to convert the pixel position into the actual liquid level height value and gradient value based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database; and to determine the liquid level change rate and the viewing mirror blur value by time-series analysis of the liquid level video. The control unit is used to determine the amount of oil to be added to the fermenter based on the actual liquid level height, the gradient value, the liquid level change rate, and the sight glass blur value, so as to control the liquid level in the fermenter according to the amount of oil to be added.

[0013] In addition, an optional solution is to include a monitoring and display unit, which is used to display the effective area, correction, and gradient calibration on a preset parameter setting interface; wherein, at the gradient calibration point, the distance of the first ladder from the zero point and the spacing between each ladder are displayed, and the position height and linear coordinates of each gradient after calibration are also displayed.

[0014] In addition, an optional solution is to include an alarm unit, which will sound an alarm and flash a notification on the monitoring screen when the liquid level exceeds the warning threshold and manual intervention is required.

[0015] On the other hand, the present invention also provides an electronic device, the electronic device including a memory, a processor, and a vision-based penicillin fermentation level control program stored in the memory and executable on the processor, wherein the vision-based penicillin fermentation level control program, when executed by the processor, implements the vision-based penicillin fermentation level control method as described above.

[0016] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the penicillin fermentation liquid level control method based on visual recognition as described above.

[0017] Compared with existing technologies, the penicillin fermentation liquid level control method and system based on visual recognition provided by this invention have the following significant advantages: Non-contact precision measurement: Utilizing machine vision technology to avoid sensor contact with fermentation broth, completely solving problems such as adhesion, corrosion, and foam interference, and achieving high-precision, high-frequency liquid level monitoring; Intelligent multi-parameter decision-making: An innovative and comprehensive reference standard selection scheme is constructed to provide quantitative basis for precise monitoring and control of fermentation liquid level. Combining the characteristics of penicillin fermentation liquid level, multi-dimensional indicators such as "liquid level value", "velocity value", and "fuzzy value" are innovatively introduced to make control decisions more forward-looking and accurate, effectively dealing with liquid level fluctuations and foam interference; Fully automatic closed-loop control: It realizes fully automatic closed-loop control from image acquisition and recognition to control command generation and execution, which greatly reduces manual intervention and improves response speed and control stability; High system integration: It integrates image acquisition, processing, recognition, control, storage and remote monitoring functions, and has good human-computer interaction and scalability; Improving production efficiency: By controlling the liquid level and optimizing the fermentation process, the yield and quality of penicillin can be increased, resulting in significant economic benefits and application and promotion value.

[0018] To achieve the foregoing and related objectives, one or more aspects of the invention include the features which will be described in detail below and specifically pointed out in the claims. The following description and accompanying drawings illustrate certain exemplary aspects of the invention. However, these aspects indicate only a few of the various ways in which the principles of the invention can be used. Furthermore, the invention is intended to include all such aspects and their equivalents. Attached Figure Description

[0019] Other objects and results of the invention will become more apparent and readily understood with reference to the following description taken in conjunction with the accompanying drawings and the contents of the claims, and with a more complete understanding of the invention. In the drawings: Figure 1 This is a schematic diagram of the penicillin fermentation liquid level control method based on visual recognition according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the overall module composition of a penicillin fermentation liquid level control system based on visual recognition according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the control unit composition of a visual recognition-based penicillin fermentation liquid level control system according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the liquid level quantification of a penicillin fermenter according to an embodiment of the present invention; Figure 5An example diagram illustrating liquid surface region recognition using an image segmentation model according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the network structure of the improved U-Net semantic segmentation network according to an embodiment of the present invention; Figure 7 A schematic diagram illustrating the process of liquid surface region recognition using an image segmentation model according to an embodiment of the present invention; Figure 8 This is a logic diagram of a penicillin fermentation liquid level control strategy based on multiple parameters (liquid level value, gradient value, and rate value) according to an embodiment of the present invention. Figure 9 This is a schematic diagram of the logic structure of an electronic device for implementing a penicillin fermentation liquid level control method based on visual recognition according to an embodiment of the present invention.

[0020] In all the accompanying drawings, the same reference numerals indicate similar or corresponding features or functions. Detailed Implementation

[0021] The technical solution of the present invention will now be clearly and completely described in conjunction with embodiments. In the following description, for illustrative purposes and to provide a thorough understanding of one or more embodiments, numerous specific details are set forth. However, it will be apparent that these embodiments can also be implemented without these specific details. In other instances, well-known structures and devices are shown in block diagram form for ease of description of one or more embodiments.

[0022] To address the problems of contact interference, inability to continuously and dynamically track liquid levels, high dependence on personnel, and low control precision in existing penicillin fermentation liquid level detection and control schemes, this invention provides a vision-based penicillin fermentation liquid level control method and system. By constructing a complete reference standard selection scheme and leveraging visual detection technology and AI algorithms, it deeply analyzes fermentation liquid level characteristics to propose key indicators such as "liquid level value," "rate value," and "fuzzy value," providing quantitative basis for accurate monitoring and control of the fermentation liquid level. This invention synergistically integrates machine vision detection technology with the control system, enabling the system to automatically adjust the control strategy and antifoaming oil replenishment based on dynamic changes in the liquid level, achieving automatic liquid level control. Building upon automatic control, it overcomes the bottlenecks of traditional methods, eliminating the need for reserved safety space, increasing the loading coefficient (the ratio of the actual loading volume in the fermenter to the effective volume of the tank), and improving yield.

[0023] Figure 1 The flowchart of a penicillin fermentation liquid level control method based on visual recognition according to an embodiment of the present invention is shown. Figure 2 The logical structure of a visual recognition-based penicillin fermentation liquid level control system according to an embodiment of the present invention is shown, consisting of... Figure 1 and Figure 2 As shown in the accompanying drawings, the penicillin fermentation liquid level control method based on vision recognition provided by this invention mainly comprises two parts: a machine vision detection part and an automatic control part. The specific implementation methods and systems will be described in detail below with reference to the accompanying drawings.

[0024] like Figure 1 As shown, the penicillin fermentation liquid level control method based on visual recognition provided by the present invention mainly includes the following steps: S110: Based on a preset video acquisition unit, continuously acquires real-time video of the liquid level inside the fermenter at the penicillin fermentation site.

[0025] This step is implemented by the machine vision detection section. In a specific embodiment of the present invention, the logical architecture of the machine vision detection section is as follows: Figure 2 As shown, it mainly includes a video acquisition unit 310, an image preprocessing unit 320, and an intelligent recognition unit (including an image segmentation unit 330 and a parameter processing unit 340).

[0026] The video acquisition unit 310 mainly consists of an intelligent camera and a lighting source. The intelligent camera is mounted on the sight glass at the top of the fermenter to capture real-time video of the liquid level inside the fermenter and output the video. In this embodiment, power supply and on-site data acquisition can be achieved through a PoE switch.

[0027] The lighting source is used to evenly illuminate the liquid surface inside the fermenter, ensuring that the liquid surface and reference objects can be clearly identified, so as to provide a stable, uniform and interference-free visual imaging environment for the intelligent camera. The preferred lighting source is an anti-fog lighting source.

[0028] Considering factors such as camera lifespan, shooting distance, effect degradation, and ambient light, in a preferred embodiment of the present invention, a starlight-level intelligent camera specifically designed for low-light environment monitoring is selected as the camera for real-time acquisition of liquid level video. Its real-time liquid level video acquisition effect does not require special reliance on infrared or white light supplementary lighting equipment. By employing a large aperture lens, a high-sensitivity sensor, and optimized ISP image processing technology, it can achieve detail retention and color reproduction under low light conditions by balancing pixels and photosensitive area and adjusting gamma curves.

[0029] After acquiring the real-time liquid level video from the site, the process proceeds to step S120, where the liquid level video is preprocessed using a video processing industrial control computer to obtain a preprocessed liquid level image.

[0030] Specifically, the image preprocessing unit 320 is located within the video processing industrial control computer, or it can exist independently as an industrial control computer. It is used to process and extract liquid level images from the video, and to perform preliminary preprocessing on the extracted liquid level images. To improve image quality and obtain the liquid level images required by subsequent recognition algorithms, the preprocessing in this invention includes, but is not limited to, grayscale conversion, noise filtering, contrast enhancement, edge sharpening, and lens distortion correction. More specifically, median filtering can be used to remove noise, histogram equalization can be used to enhance image contrast, and the Canny operator can be applied for sharpening before edge detection.

[0031] In one embodiment of the present invention, the Canny edge detection algorithm is used to accurately extract the liquid surface boundary inside the penicillin fermentation tank. Since the Canny algorithm itself includes a Gaussian smoothing filter step (using a 5×5 Gaussian kernel with a standard deviation σ=1.0), it can effectively suppress image noise, thus eliminating the need for additional image sharpening before edge detection. Introducing sharpening operations (such as unsharpened masks or Laplacian sharpening) can enhance edge response, but it also amplifies high-frequency noise, leading to false edges near the liquid surface and affecting the accuracy of liquid level positioning. Experiments have verified that in this application scenario, skipping the sharpening preprocessing and directly using the Canny algorithm can improve the liquid level recognition accuracy by approximately 8.2%, with better edge continuity.

[0032] S130: Based on a pre-trained instance segmentation model, liquid surface region recognition is performed on the pre-processed liquid level image to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and the pixel position of the liquid surface in the image is calculated.

[0033] In the process of region identification from preprocessed liquid level images, accurate quantization of the acquired liquid level images is required. To achieve this, the selection of a reference object is crucial. Figure 4 A method for quantifying the liquid level in a penicillin fermenter according to an embodiment of the present invention is shown, such as... Figure 4 As shown, in this embodiment, during the construction of the gradient-level mapping database, the existing ladders (human ladders) inside the fermenter are specifically selected as static references. Specifically, the standard point on the tank can be used as the zero point. The distance from the first ladder to the zero point, the distance between the first and second ladders, the distance between the second and third ladders, the distance between the third and fourth ladders, the distance between the fourth and fifth ladders, and the distance between the fifth and sixth ladders are measured tank by tank and ladder by ladder, and a gradient-level mapping database is established. The gradient data is incorporated into the configuration parameters of each tank. Finally, the liquid level is quantified by identifying the ladder positions in the image in real time.

[0034] This step is implemented by the intelligent recognition unit, whose internal image segmentation unit 330 is equipped with a pre-trained image segmentation model. In one specific embodiment of the present invention, the image segmentation model can accurately determine the liquid level value under low discernibility conditions through a preset AI image recognition algorithm, and uses image preprocessing strategies to enhance effective features and suppress environmental interference.

[0035] More specifically, as an example, the AI ​​image recognition algorithm used in this embodiment can be a deep learning-based instance segmentation model (U-Net deep learning model) or a semantic segmentation model, which can accurately separate the liquid surface area from the background area and obtain the accurate liquid surface height value (unit: m) through regression calculation.

[0036] Figure 5 An example of liquid surface region recognition using an image segmentation model according to an embodiment of the present invention is shown. Specifically, as shown... Figure 5 As shown, the image segmentation model in this embodiment uses an improved U-Net semantic segmentation network, the network structure of which is as follows: Figure 6 As shown, its backbone network is ResNet50, used to extract high-order semantic features; the encoder part retains the first five levels of convolutional blocks of ResNet50, realizing layer-by-layer downsampling, and the output feature map size is (64, 128, 256, 512); the decoder part realizes upsampling through transposed convolution, and is concatenated with the encoder features of the corresponding level through skip connections to fuse multi-scale spatial information. To further improve the recognition accuracy of liquid surface edges, a channel attention module (SE Block) is introduced in the skip connections to suppress the response intensity of non-target areas (such as top foam and bottom sediment).

[0037] Figure 7 A more detailed image segmentation model is shown for liquid surface region recognition. For example... Figure 7 As shown, the input to the image segmentation model in this embodiment is a preprocessed liquid level image with a size of 512×512 and one channel (i.e., a single-channel grayscale image), which is then normalized before being fed into the model. The model output is a binary mask image of the same size as the input, where each pixel represents the probability value of belonging to the "liquid surface". Subsequently, by performing threshold segmentation (e.g., a threshold of 0.5), morphological closing operation (removing small holes), and opening operation (eliminating noise spots) on the output mask, a continuous and smooth liquid surface region contour is obtained. This dynamically eliminates the influence of adverse working conditions such as stains, fogging, and blurring of the sight glass, improving the interpretation accuracy while eliminating interference from complex working conditions.

[0038] After determining the pixel position of the liquid surface in the image, the process proceeds to step S140: based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database, the pixel position is converted into the actual liquid level height value and gradient value; and, by time-series analysis of the liquid level video, the liquid level change rate and the vision mirror blur value are determined. This step can be implemented by the parameter processing unit 340. In this embodiment, the intelligent recognition unit can also be deployed on an industrial control computer to intelligently interpret the liquid level image and calculate the actual liquid level height.

[0039] Specifically, as an example, in step S140, an AI algorithm is used to further analyze the liquid level data over time to calculate the "velocity value" of the liquid level change. This invention defines a custom rule for determining the liquid level change rate: a negative velocity indicates a rising liquid level, a positive velocity indicates a falling liquid level, and a velocity of 0 indicates no fluctuation in the liquid level during the current time period. This, combined with the real-time liquid level value, forms the basis for the replenishment control decision. The control system dynamically adjusts the frequency and amount of defoaming oil replenishment based on this decision.

[0040] As can be seen, the fine quantification of liquid level in this step provides a dynamic parameter of "liquid level change rate" on the basis of static "liquid level value". By analyzing liquid level fluctuations in real time, AI quantifies them into "velocity values" to accurately characterize the intensity of liquid surface turbulence, thereby achieving a deeper level of quantitative perception of liquid level status.

[0041] In one specific embodiment of the present invention, the rate of liquid level change is calculated using the following method: First, calculate the average liquid level height in the initial section: ; Then calculate the average liquid level height of the current segment: ; Finally, calculate the rate of liquid level change: ; The parameters have the following meanings: : Current frame timestamp; : Current window average liquid level; Average liquid level at the rear window; Time difference; : The rate at which the liquid level rises at any given moment; : in the The liquid level height value detected by each timestamp.

[0042] In addition, in step 140, a fuzzy discrimination algorithm is used to perform a fuzzy scoring of the sight glass status, generating a "fuzzy value," which is then linked to the sight glass purge valve. Specifically, as an example, a preset intelligent recognition algorithm can continuously analyze the liquid level data stream, calculate the liquid level change rate per second (velocity value), and evaluate the clarity / foam coverage of the liquid surface area in the image (fuzzy value), transmitting the data to the control system. For example, when the system receives a liquid level value of 1.05m and a rate value of +0.2mm / s (the liquid level is slowly rising), according to preset control logic, the control system determines that the defoaming oil addition program needs to be activated to suppress foam and stabilize the liquid level. A signal is output to the defoaming oil metering pump, controlling it to operate at a set frequency and continuously add defoaming oil. Simultaneously, the fuzzy discrimination algorithm performs a fuzzy scoring of the sight glass status, generating a "fuzzy value." When the sight glass becomes so blurred that it falls below a fuzziness threshold that it may cause misjudgment, the purge function is triggered to automatically flush the sight glass, ensuring clear images and reliable recognition.

[0043] Specifically, as an example, after blur detection, a blur score is calculated for each frame of image, and a corresponding threshold is set according to the tank type; if the blur score exceeds the threshold, it is determined that the lens needs to be cleaned, the score is output and subsequent operations are stopped; if the threshold is not exceeded, the number of images with low blur scores is accumulated, and when the number exceeds 10, a flushing signal is triggered to control the valve to clean the lens.

[0044] Among them, local contrast: ; Fuzzy rating: ; in, This is the local contrast matrix. The mean, , These are the pixel coordinates of the image. For the image at position Local contrast at that location. Image at pixel position The grayscale value. Center pixel grayscale value, In pixels A local neighborhood window centered on the pixel represents the set of pixels surrounding that pixel. M and N are the height and width of the image. For all The arithmetic mean.

[0045] As can be seen, the fuzzy discrimination in this step provides an automatic rinsing function for the sight glass. To ensure the reliability of non-contact visual liquid level detection, this function uses AI to intelligently determine the degree of fuzziness of the sight glass and links with the control program to achieve fully automatic closed-loop management of "fuzzy recognition - automatic rinsing - restoration of clarity", minimizing manual intervention and ensuring the continuous and stable operation of the monitoring system.

[0046] S150: Based on the actual liquid level height, gradient value, liquid level change rate, and sight glass blur value, determine the amount of oil to be added to the fermenter, so as to regulate the liquid level in the fermenter according to the amount of oil to be added.

[0047] Figure 8 This paper illustrates the logic of a penicillin fermentation liquid level control strategy based on multiple parameters (liquid level, gradient, and rate) according to an embodiment of the present invention. The machine vision detection module and control module are used to implement the machine vision detection part and automatic control part of the present invention, respectively. Figure 5 As can be seen from the control logic shown, this invention achieves multi-parameter analysis and decision-making. By deeply integrating multi-dimensional data, it not only monitors the real-time "liquid level value" and "gradient value," but also calculates the "velocity value" of liquid level change and the "blurring value" of the sight glass through time-series analysis. Through the synergistic analysis of these four key parameters, a multi-dimensional judgment basis is formed, which directly drives the on-site control program, ultimately achieving real-time, dynamic, and precise closed-loop control of the liquid level.

[0048] Furthermore, to facilitate real-time monitoring of the fermentation process, one possible implementation of this invention also provides monitoring and data management functions. This allows the identification of gradient values, liquid level values, velocity values, and other data to be sent to the monitoring display unit and the server's communication unit. Specifically, the monitoring display unit displays liquid level data, system status, and high-liquid-level alarm information in real-time, and provides a human-machine interface for parameter configuration and manual intervention. All data (historical liquid level data and alarm records, etc.) is stored in a data management platform, which provides data visualization and remote access functions, supporting historical queries, visual analysis, and remote access, enabling continuous monitoring and optimization of the fermentation process.

[0049] Specifically, as an example, the penicillin fermentation liquid level control method based on visual recognition provided by this invention can display the effective area, correction, and gradient calibration on a preset parameter setting interface. The correction refers to geometric correction of the tilted viewing mirror image to eliminate the influence of perspective distortion on geometric measurements. The gradient calibration displays the distance from the tank to the zero point, the spacing between each ladder, and the position, height, and linear coordinates of each calibrated gradient. If the gradient calibration effect does not meet the preset requirements, the gradient calibration is repeated to ensure that both sides (or at least one side) of the ladder are aligned along the same y-axis, i.e., vertically aligned. Simultaneously, the rungs (ladder stools) of the ladder should be parallel to each other as much as possible. Then, the position of the red straight line displayed on the interface (the calibration line during gradient calibration) is checked to ensure it coincides with the ladder structure (especially the vertical side of the ladder). If the red straight line does not coincide with the ladder, the linear coordinates need to be modified until the line corresponds to the ladder.

[0050] Compared with existing technologies, the penicillin fermentation liquid level control method based on visual recognition provided by this invention introduces visual AI detection technology into the field of penicillin fermentation production. Combined with fermentation liquid level characteristics, it innovatively constructs a complete reference standard selection scheme and proposes targeted and innovative key indicators such as "liquid level value," "rate value," and "fuzzy value," providing quantitative basis for accurate identification and control of penicillin fermentation liquid level, and achieving automatic control in conjunction with the control system. This provides a method for intelligent monitoring and automatic control of liquid level based on visual recognition and artificial intelligence algorithms, achieving precise, stable, and automated closed-loop control of penicillin fermentation liquid level.

[0051] Corresponding to the above-mentioned penicillin fermentation level control method based on visual recognition, this invention also provides a penicillin fermentation level control system based on visual recognition. For example... Figure 2 As shown, the penicillin fermentation liquid level control system based on visual recognition provided by this invention generates video using the previously described method for controlling penicillin fermentation liquid level based on visual recognition. Depending on the functions implemented, the penicillin fermentation liquid level control system 300 based on visual recognition may include a video acquisition unit 310, an image preprocessing unit 320, an image segmentation unit 330, a parameter processing unit 340, and a control unit 350. The module of this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, stored in the memory of the electronic device.

[0052] In this embodiment, the functions of each module / unit are as follows: Video acquisition unit 310 is used to continuously acquire video of the liquid level inside the fermenter at the penicillin fermentation site in real time; Image preprocessing unit 320 is used to preprocess the liquid level video to obtain a preprocessed liquid level image; Image segmentation unit 330 is used to identify the liquid surface region of the pre-processed liquid level image based on a pre-trained image segmentation model, so as to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and calculate the pixel position of the liquid surface in the image. The parameter processing unit 340 is used to convert the pixel position into an actual liquid level height value and a gradient value based on the pre-calibrated reference gradient parameters in a preset gradient-liquid level mapping database; and to determine the liquid level change rate and the viewing mirror blur value by time-series analysis of the liquid level video. The control unit 350 is used to determine the amount of oil to be added to the fermenter based on the actual liquid level height, the gradient value, the liquid level change rate, and the sight glass blur value, so as to control the liquid level in the fermenter according to the amount of oil to be added.

[0053] In other possible implementations of the present invention, the above-mentioned visual recognition-based penicillin fermentation liquid level control system may further include: The monitoring and display unit 360 is used to display the effective area, correction, and gradient calibration on a preset parameter setting interface; wherein, at the gradient calibration point, the distance of the first ladder from the zero point and the spacing between each ladder are displayed, and the position height and linear coordinates of each gradient after calibration are also displayed. The alarm unit 370 is used to issue an audible alarm and simultaneously provide a flashing prompt on the monitoring screen when the liquid level exceeds the warning threshold and manual intervention is required. Communication unit 380 is used to provide data communication management between various units.

[0054] In terms of specific hardware implementation, the hardware structure of the machine vision inspection part can include a high-definition intelligent camera, a lighting source and a PoE switch, a video processing industrial control computer, built-in image recognition software and AI image recognition algorithms, server communication software, host computer monitoring software, and a hard disk recorder; the hardware structure of the automatic control part can include actuators such as a sight glass steam purge pump valve and a defoaming oil addition pump valve.

[0055] More specific implementations of the above-mentioned penicillin fermentation liquid level control system based on visual recognition can be found in the foregoing description of the embodiments of the penicillin fermentation liquid level control method based on visual recognition, and will not be described in detail here.

[0056] Through actual operation testing, this invention can successfully achieve 24-hour continuous and stable automatic control of the penicillin fermentation liquid level, effectively reducing the intensity of manual operation and improving the stability of the fermentation process and the fermentation yield.

[0057] like Figure 9 As shown, the present invention also provides an electronic device 1 for implementing a penicillin fermentation level control method based on visual recognition.

[0058] The electronic device 1 may include a processor 10, a memory 11, and a bus. It may also include a computer program stored in the memory 11 and executable on the processor 10, such as a vision-based penicillin fermentation level control program 12. The memory 11 may include both internal storage units for the vision-based penicillin fermentation level control system and external storage devices. The memory 11 can be used not only to store application software and various types of data, such as the code for the vision-based penicillin fermentation level control program, but also to temporarily store data that has been output or will be output.

[0059] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart memory card, secure digital card, flash memory card, etc., equipped on the electronic device 1. Furthermore, the memory 11 can include both internal and external storage units of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a penicillin fermentation level control program based on visual recognition, but also to temporarily store data that has been output or will be output.

[0060] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units, microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a penicillin fermentation level control program based on visual recognition) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0061] The bus can be a peripheral component interconnection standard bus or an extended industry standard structure bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0062] Figure 4 Only electronic devices with components are shown; those skilled in the art will understand that... Figure 4 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0063] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management system, thereby enabling functions such as charging management, discharging management, and power consumption management through the power management system. The power supply may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0064] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0065] Optionally, the electronic device 1 may further include a user interface, which may be a display or an input unit. Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0066] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0067] The penicillin fermentation liquid level control program 12 based on visual recognition, stored in the memory 11 of the electronic device 1, is a combination of multiple instructions. When run in the processor 10, it can achieve the following: Real-time and continuous acquisition of liquid level video in the fermenter at the penicillin fermentation site is based on a preset video acquisition unit. The liquid level video is preprocessed using a video processing industrial control computer to obtain a preprocessed liquid level image. Based on a pre-trained image segmentation model, liquid surface region recognition is performed on the pre-processed liquid level image to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and to calculate the pixel position of the liquid surface in the image. The pixel position is converted into the actual liquid level height value and gradient value based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database; and the liquid level video is analyzed in time series to determine the liquid level change rate and the viewing mirror blur value. Based on the actual liquid level height, gradient value, liquid level change rate, and sight glass blur value, the amount of oil to be added to the fermenter is determined, so as to regulate the liquid level in the fermenter according to the amount of oil to be added.

[0068] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figure 2 The descriptions of the relevant steps in the corresponding embodiments are not repeated here. Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or system capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory.

[0069] This invention also provides a computer-readable storage medium, which may be non-volatile or volatile, and stores a computer program that, when executed by a processor, implements the above-described penicillin fermentation level control method based on visual recognition.

[0070] In the several embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may exist in actual implementation. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0071] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0072] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Various modifications can be made to the visual recognition-based penicillin fermentation liquid level control method and system proposed in the present invention without departing from the scope of the invention. Therefore, the above embodiments are not intended to limit the scope of protection of the present invention.

Claims

1. A method for controlling the level of penicillin fermentation based on visual recognition, characterized in that, include: Real-time and continuous acquisition of liquid level video in the fermenter at the penicillin fermentation site is based on a preset video acquisition unit. The liquid level video is preprocessed using a video processing industrial control computer to obtain a preprocessed liquid level image. Based on a pre-trained image segmentation model, liquid surface region recognition is performed on the pre-processed liquid level image to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and to calculate the pixel position of the liquid surface in the image. The pixel position is converted into the actual liquid level height value and gradient value based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database; and the liquid level video is analyzed in time series to determine the liquid level change rate and the viewing mirror blur value. Based on the actual liquid level height, gradient value, liquid level change rate, and sight glass blur value, the amount of oil to be added to the fermenter is determined, so as to regulate the liquid level in the fermenter according to the amount of oil to be added.

2. The method of claim 1, wherein the method is a method of controlling the penicillin broth level based on visual recognition, characterized by, The video acquisition unit includes an intelligent camera mounted on the sight glass at the top of the fermenter and a lighting source.

3. The method of claim 2, wherein the method is a method of controlling the penicillin broth level based on visual recognition, characterized by, The preprocessing includes at least one of noise filtering, contrast enhancement, edge sharpening, and lens distortion correction.

4. The method of claim 3, wherein the color of the penicillin broth is determined by the following equation: ###0001### wherein R is the red value, G is the green value, and B is the blue value. The preprocessing includes: using median filtering to remove noise, using histogram equalization to enhance image contrast, and applying the Canny operator for sharpening before edge detection.

5. The method of claim 2, wherein the method is a method of controlling the penicillin fermentation level based on visual recognition, characterized by, In the process of constructing the gradient-level mapping database The existing ladder inside the fermenter is selected as a static reference, and the standard point of the fermenter body is taken as the zero point. The tank-by-tank and step-by-step measurement includes gradient data for the distance from the zero point of the first step, the distance between the first and second steps, the distance between the second and third steps, the distance between the third and fourth steps, the distance between the fourth and fifth steps, and the distance between the fifth and sixth steps. The gradient-level mapping database is established based on the gradient data, and the gradient data is incorporated into the configuration parameters of each tank.

6. The method of claim 1 to 5, wherein Also includes: The preset parameter setting interface displays the effective area, perspective correction, and gradient calibration; wherein, at the gradient calibration point, the distance of the first ladder from the zero point and the spacing between each ladder are displayed, and the position, height, and linear coordinates of each gradient after calibration are also displayed. If the gradient calibration results do not meet the preset requirements, repeat the gradient calibration. Check whether the calibration line displayed on the interface during gradient calibration coincides with the ladder structure. If they do not coincide, modify the linear coordinates until the calibration line corresponds to the ladder.

7. The penicillin fermentation liquid level control method based on visual recognition as described in claim 6, characterized in that, It also includes a high liquid level alarm procedure; When the liquid level exceeds the warning threshold and manual intervention is required, an audible alarm will be triggered, and a flashing notification will be displayed on the monitoring screen.

8. A visual recognition-based penicillin broth level regulating system, characterized in that, include: The video acquisition unit is used to continuously acquire real-time video of the liquid level inside the fermenter at the penicillin fermentation site. An image preprocessing unit is used to preprocess the liquid level video to obtain a preprocessed liquid level image; The image segmentation unit is used to identify the liquid surface region of the pre-processed liquid level image based on a pre-trained image segmentation model, so as to separate the liquid surface from the tank wall and foam background in the liquid level image by delineating an effective region, and calculate the pixel position of the liquid surface in the image. The parameter processing unit is used to convert the pixel position into the actual liquid level height value and gradient value based on the pre-calibrated reference gradient parameters in the preset gradient-liquid level mapping database; and to determine the liquid level change rate and the viewing mirror blur value by time-series analysis of the liquid level video. The control unit is used to determine the amount of oil to be added to the fermenter based on the actual liquid level height, the gradient value, the liquid level change rate, and the sight glass blur value, so as to control the liquid level in the fermenter according to the amount of oil to be added.

9. The visual recognition based penicillin broth level regulating system according to claim 8, wherein, It also includes a monitoring and display unit, which is used to display the effective area, correction, and gradient calibration on a preset parameter setting interface; wherein, at the gradient calibration point, the distance of the first ladder from the zero point and the spacing between each ladder are displayed, and the position height and linear coordinates of each gradient after calibration are also displayed.

10. The visual recognition based penicillin broth level regulating system according to claim 8, wherein, It also includes an alarm unit, which is used to issue an audible alarm and provide a flashing prompt on the monitoring screen when the liquid level exceeds the warning threshold and manual intervention is required.

11. An electronic device, comprising: The electronic device includes a memory, a processor, and a vision-based penicillin fermentation level control program stored in the memory and executable on the processor. When the vision-based penicillin fermentation level control program is executed by the processor, it implements the vision-based penicillin fermentation level control method as described in any one of claims 1 to 7.

12. A computer readable storage medium storing a computer program, wherein the computer program comprises program instructions configured to cause a processor to perform the method according to any one of claims 1 to 11. When the computer program is executed by the processor, it implements the penicillin fermentation liquid level control method based on visual recognition as described in any one of claims 1 to 7.