Intelligent monitoring method and system for codonopsis pilosula and astragalus membranaceus beverage production workshop
By using industrial cameras and image processing algorithms to automatically identify the adhesion and flow state of liquid films, the problem of traditional manual visual inspection and density sensors being unable to accurately determine the concentration endpoint has been solved, thus achieving automation and quality stability in the production of Codonopsis and Astragalus beverages.
Patent Information
- Application Number
- CN202511519754.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-23
AI Technical Summary
In the production of Codonopsis and Astragalus beverages, the traditional method of manually visually determining the concentration endpoint is highly subjective, leading to inconsistent judgment standards among different pharmacists. Furthermore, density sensors cannot accurately calculate the state of the liquid adhering to the wall, resulting in fluctuations in product quality.
An industrial camera is used to continuously acquire images of the concentration tank. Through algorithms such as grayscale conversion, threshold segmentation, linear information weighting, and hysteresis index calculation, the degree of liquid film adhesion to the wall and the flow state are automatically identified, and the concentration endpoint is accurately determined.
It enables automated monitoring of the concentration process, reduces human error, ensures stable product quality, improves production efficiency and consumer trust, and promotes the standardization and intelligent development of the beverage production industry.
Smart Images

Figure CN120997216A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to an intelligent monitoring method and system for use in a Codonopsis and Astragalus beverage production workshop. Background Technology
[0002] In the production process of Codonopsis and Astragalus beverages, the concentration step of the extract is crucial, as it directly determines the concentration of the beverage's effective ingredients and its taste. Only by controlling the concentration process to the appropriate endpoint can the quality of the beverage be guaranteed to meet the standards. Therefore, it is necessary to accurately monitor the concentration endpoint.
[0003] Traditional methods for monitoring the concentration endpoint rely on manual visual inspection of the film adhering to the tank walls. Experienced pharmacists determine the endpoint by observing the thickness, color, and flow rate of the liquid film on the inner wall of the tank. However, this method is entirely dependent on personal experience, highly subjective, and different pharmacists have different judgment standards. Furthermore, the judgment of the same pharmacist may be inconsistent at different times, resulting in significant fluctuations in the viscosity, taste, and active ingredient content of different batches of products, making it difficult to achieve standardized production.
[0004] Existing technology uses density sensors to monitor the density of the extract in real time and determines the concentration endpoint based on density changes, thus achieving efficient monitoring of the concentration endpoint.
[0005] However, this method has limitations for Codonopsis pilosula and Astragalus membranaceus decoction. When Codonopsis pilosula and Astragalus membranaceus are boiled together, the specific polysaccharides and saponins that dissolve will cause the decoction to stick to the wall. The density sensor can only reflect the physical properties of the overall solution and cannot accurately calculate the wall-sticking state and hydrodynamic changes that are crucial for determining the optimal endpoint due to the release of polysaccharides such as saponins. Therefore, its monitoring results still have deviations and cannot fully meet the needs of high-quality production. Summary of the Invention
[0006] To address the technical problem that density sensors struggle to calculate wall-mounted states, this invention provides solutions in several aspects.
[0007] In a first aspect, the present invention provides an intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop, comprising: An industrial camera continuously acquires images of the observation window at preset intervals. After preprocessing and grayscale conversion, the images are arranged chronologically to obtain a liquid image sequence. Based on the grayscale values of the liquid surface areas, a liquid region sequence is obtained from the liquid image sequence. Any liquid region is designated as the target region, and profile lines are extracted. Based on the grayscale values and stability of the profile lines, the line information weights are calculated. The target adhesion coefficient is calculated based on the difference between the average grayscale value of all profile lines in the target region after being affected by their respective weights and the sum of the information weights of all profile lines in the target region. Based on the target adhesion coefficient, the target liquid film hysteresis index is calculated. The target displacement component is calculated based on the movement of pixels in the liquid image corresponding to the target region and the previous frame of the liquid image. The target liquid film hysteresis index is calculated based on the difference between the average displacement modulus and the maximum average displacement modulus of all target displacement components. Based on the relationship between the mean absolute value of all pixels in the target region and the target liquid film hysteresis index, the endpoint decision index is calculated, the inflection point of the endpoint decision index curve is located, and control is implemented.
[0008] This invention addresses the problems of traditional manual visual inspection relying on experience and being highly subjective. By automatically acquiring images and calculating the degree of adhesion to the wall, flow state, and decision index, the entire process eliminates the need for subjective human judgment, reducing the discrepancies in judgment between different personnel and at different times. It also addresses the issue that existing density monitoring methods cannot calculate the unique wall adhesion state of the liquid solution. By analyzing the degree of adhesion to the wall, flow changes, and saponin patterns of the liquid film, it accurately identifies the concentration characteristics of this type of liquid solution, avoiding monitoring bias caused by relying solely on density data. Furthermore, through pre-experimentation to determine effective liquid film conditions, data normalization, and inflection point determination endpoints, it reduces problems such as inaccurate data in the initial stage of concentration, differences between batches of equipment, and misjudgments due to single factors, ensuring more accurate monitoring results and avoiding over- or under-concentration. This solves the main shortcomings of traditional methods and existing technologies in monitoring the concentration of this type of liquid solution, ensuring stable product quality.
[0009] Preferably, obtaining the liquid region sequence in the liquid image sequence includes: During the condensation time, at a preset 1-second interval... The system continuously acquires image sequences from the observation window, denoises them, converts the denoised images to grayscale, and arranges them according to the shooting time to obtain a liquid image sequence. A threshold segmentation algorithm is used to treat the regions in the liquid image sequence whose grayscale values are lower than the optimal segmentation threshold as liquid regions, and all the corresponding liquid regions in the liquid image sequence are recorded as a liquid region sequence.
[0010] Preferably, the linear information weights satisfy the following expression: ; In the formula, The line information weight of the m-th profile line; Indicates the maximum grayscale value; This represents the average gray value of the m-th profile line; The gray standard deviation of the m-th profile line; Represents the normalization function; It represents a very small positive number, and guarantees that the denominator is not 0.
[0011] Preferably, the target adhesion coefficient satisfies the following expression: ; In the formula, Indicates the target adhesion coefficient; The line information weight of the m-th profile line; Indicates the baseline grayscale value; This represents the average gray value of the m-th profile line; This represents the normalization function.
[0012] This invention accurately measures the degree to which the liquid film adheres to the tank wall. By using the grayscale value of the liquid before concentration as a benchmark, it eliminates the need for visual estimation of film thickness or adhesion, reducing the variability in human judgment. Furthermore, weighted calculation using linear information weights highlights the influence of reliable regions and weakens the role of interfering regions. Simultaneously, by normalizing the weighted sum, it eliminates the differences caused by different numbers or weights of profile lines, providing a clear visual indication of the changing trend of liquid film adhesion during concentration and offering a definitive basis for judging the concentration state.
[0013] Preferably, the calculation of the target liquid film hysteresis index is initiated, including: Through three preliminary experiments, the concentration of the Codonopsis and Astragalus decoction was recorded three times consecutively in each experiment. Value, taken 3 times The average value as When the target adhesion coefficient does not exceed Continue monitoring changes in the target adhesion coefficient; when the target adhesion coefficient exceeds When it is determined that an effective wall liquid film has been formed, the calculation of the target liquid film hysteresis index is initiated.
[0014] Preferably, calculating the target displacement components includes: The liquid image corresponding to the target area is compared with the previous frame liquid image. The Shi-Tomasi corner detection algorithm is used to select feature points in the target area. The Lucas-Kanade optical flow method is used to calculate the horizontal and vertical displacement components of the feature points in a 3×3 neighborhood around each feature, which are denoted as the target displacement components.
[0015] This invention can accurately calculate minute movements of a liquid film without relying on visual observation of the flow rate, thus avoiding judgment errors caused by the inability to perceive small movements. By extracting feature points on the liquid film and calculating their horizontal and vertical movements, even very small movements can be accurately calculated, providing clear data representation of the liquid film's flow state. The resulting displacement components accurately reflect the liquid film's flow, providing a precise basis for subsequently measuring the degree of slowdown in the liquid film's flow and ensuring more accurate monitoring of the liquid film's flow state.
[0016] Preferably, the target liquid film hysteresis index satisfies the following expression: ; In the formula, This represents the target liquid film hysteresis index, with a value ranging from 0 to 1; , For feature points Optical flow displacement components in the horizontal and vertical directions; Indicates the number of feature points in the target region; Indicates the maximum target modulus; Represents a very small positive number, ensuring that the denominator is not zero; This represents an exponential function with the natural constant as its base.
[0017] This invention clearly demonstrates the degree of slowdown in liquid film flow, with values between 0 and 1, making it easy to understand the flow state of the liquid film. The higher the value, the more difficult the liquid film is to flow. It also eliminates the absolute differences in liquid film flow velocity between different batches and different equipment. It eliminates the need for visual observation of differences in liquid film flow speed, reducing subjective judgment bias and providing a direct view of the change in liquid film flow from easy to difficult during concentration, helping staff accurately grasp the concentration progress.
[0018] Preferably, the endpoint decision index satisfies the following expression: ; In the formula, Indicates the endpoint decision index; Indicates the target liquid film hysteresis index; Indicates the saponin stain index; Represents a logarithmic function.
[0019] This invention combines the flow state of the liquid film and the patterns formed by saponins to determine the concentration endpoint. When the liquid film is still flowing or there are no patterns, the decision index will not increase, thus avoiding premature determination of the endpoint. Only when the liquid film is basically still and the patterns are obvious will the decision index increase significantly.
[0020] Preferably, the inflection point of the endpoint decision index curve is located and controlled, including: All endpoint decision indices in the liquid image sequence are continuously calculated, and the time evolution curve of the endpoint decision index is plotted with time as the horizontal axis and the endpoint decision index as the vertical axis. When the inflection point of the endpoint decision index value changing from continuous rise to fall is detected, it is determined that the concentration process has reached the optimal endpoint, and the corresponding control command is immediately triggered.
[0021] Secondly, the present invention provides an intelligent monitoring system for a Codonopsis pilosula and Astragalus membranaceus beverage production workshop, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aforementioned intelligent monitoring method for a Codonopsis pilosula and Astragalus membranaceus beverage production workshop is implemented.
[0022] By adopting the above technical solution, a computer program is generated from the above-mentioned intelligent monitoring method for the production workshop of Codonopsis pilosula and Astragalus membranaceus beverage, and stored in the memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.
[0023] The beneficial effects of this invention are as follows: This invention provides an efficient and reliable concentration monitoring solution for the production of Codonopsis pilosula and Astragalus membranaceus beverages. From a production perspective, it automates concentration monitoring, reduces manual operation, lowers the probability of human error, improves production efficiency, and avoids raw material waste caused by delays or errors in manual judgment. From a quality perspective, by accurately identifying the optimal concentration endpoint, it ensures that the effective ingredient content, taste, and viscosity of each batch of product are consistent, improving product quality stability and enhancing consumer trust and market competitiveness. From an industry perspective, this solution can provide a reference for concentration monitoring of other beverages containing special ingredients, promoting the standardization and intelligent development of the beverage production industry, reducing quality fluctuations caused by inappropriate monitoring methods, and helping the industry as a whole improve its production level to achieve a high-quality and sustainable production model. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating an intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to the present invention; Figure 2 This is a schematic illustration of the observation window of the concentration tank and the grayscale image of the concentrated medicine solution in this invention. Detailed Implementation
[0025] This invention discloses an intelligent monitoring method for use in a Codonopsis and Astragalus beverage production workshop, referring to... Figure 1 This includes steps S1-S4: S1: Use an industrial camera to continuously acquire images of the observation window at preset times, and after preprocessing and grayscale conversion, arrange them in chronological order to obtain a liquid image sequence; based on the grayscale value of the liquid surface area, obtain the liquid region sequence in the liquid image sequence.
[0026] It should be noted that in production scenarios requiring precise control of the concentration endpoint, such as for Codonopsis and Astragalus beverages, traditional manual monitoring methods rely on experience to judge the adhesion status, which suffers from strong subjectivity and inconsistent batch quality. To achieve automated and precise monitoring, this invention constructs a monitoring system based on industrial vision technology. By placing an industrial camera parallel to the observation window of the concentration tank, a vertically stable shooting angle is ensured. Images from the observation window are continuously acquired at fixed time intervals. After image denoising and grayscale conversion, a time-series image sequence is formed. Then, a threshold segmentation algorithm is used to process the images, automatically distinguishing the liquid area from the tank wall background based on the difference in grayscale values. The liquid areas at different times are then arranged into a liquid area sequence in chronological order.
[0027] Specifically, a temporal pixel variance profile detection algorithm is used to locate the observation window where the liquid surface appears in the concentration tank. The industrial camera is placed parallel to the observation window at the same height to ensure that the camera's shooting angle can vertically and stably cover the observation window area. During the concentration time, the camera operates at preset 1-second time intervals. The system continuously acquires image sequences from the observation window, performs denoising, and then converts the denoised image to grayscale. Figure 2 The right image is shown in the observation window of the concentration tank and the grayscale image of the concentrated liquid. The images are arranged according to the shooting time to obtain a liquid image sequence. A threshold segmentation algorithm is used to treat the regions in the liquid image sequence whose grayscale values are lower than the optimal segmentation threshold as liquid regions. All the corresponding liquid regions in the liquid image sequence are recorded as a liquid region sequence.
[0028] Thus, the liquid region sequence was obtained.
[0029] S2: Denote any liquid region as the target region, extract the profile lines, and calculate the line information weight based on the gray value of the profile lines and the stability of the gray value. Calculate the target adhesion coefficient based on the difference between the average gray value of all profile lines in the target region after being affected by their corresponding weights and the sum of the information weights of all profile lines in the target region.
[0030] It should be noted that during the concentration process, pharmaceutical engineers tend to seek the most ideal observation area in the liquid region—that is, an area that reflects sufficient viscosity of the liquid while ensuring the purity and reliability of the observation information. This invention uses the difference between the average and maximum grayscale values to represent the thickness or viscosity of the liquid film, and utilizes the grayscale standard deviation to assess the stability of the observation information, effectively identifying and suppressing visual noise caused by boiling, bubbles, or reflections. Furthermore, this invention assigns different information weights to different profile lines in the liquid region by calculating a comprehensive score. The profile line with the highest score represents a thicker liquid film region and a purer observation signal, thus ensuring that subsequent analyses are always based on the most reliable and representative liquid film state of the concentration.
[0031] It should be noted that when dividing the profile lines from the liquid area, one profile line is extracted every 10 pixels. A total of 192 profile lines are extracted from the target area in each frame, corresponding to a width of 1920 pixels. 1920 is the resolution setting value of the industrial camera, which is 1920×1080. This method can ensure that the obtained profile lines cover the entire target area. Therefore, here a is 10 and b is 192.
[0032] Specifically, in the liquid region sequence, any liquid region is extracted and denoted as the target region; a vertical line perpendicular to the horizontal coordinate within the target region is located and denoted as a profile line; along the horizontal direction of the image, a profile line is extracted every 'a' pixels, for a total of 'b' profile lines; the average gray value and standard deviation of all pixels on a single profile line are calculated; based on the difference between the average gray value and the standard deviation, the intrinsic information quality weight of the vertical profile is calculated, denoted as the line information weight, including: The linear information weights satisfy the following expression: ; In the formula, The line information weight of the m-th profile line; Indicates the maximum grayscale value; This represents the average gray value of the m-th profile line; The gray standard deviation of the m-th profile line; Represents the normalization function; It represents a very small positive number, and guarantees that the denominator is not 0.
[0033] In the formula, This represents the difference between the average gray value and the maximum gray value of the m-th profile line. The thicker the liquid film in the concentration tank, the lower the average gray value of the profile line. The smaller, The larger the size, the larger the molecule; The larger the value, the more unstable the change in the gray value of the liquid film, and the stronger the noise on the straight line of the profile. In this expression, the numerator represents the viscosity of the liquid film in the region containing the m-th profile line, and the denominator represents the degree of information disorder when judging the viscosity of the liquid film from the m-th profile line. The ratio between the viscosity of the liquid film in the region containing the m-th profile line and the degree of disorder in the information used to determine the viscosity of the liquid film was directly calculated. To obtain a high-weighted profile line, the following conditions must be met: The larger, and The smaller the value; for a straight profile with a low viscosity of the attached liquid film, near , Smaller; for a straight profile with a high viscosity of the attached liquid film, the numerator is maximized while the denominator is minimized. maximum.
[0034] It should be noted that, in the concentration stage of Codonopsis and Astragalus beverage production, to address the issues of strong subjectivity and difficulty in standardization in traditional manual visual inspection of liquid film adhesion, and to achieve precise monitoring of the liquid film adhesion process, this invention first obtains a baseline grayscale value based on the liquid image before concentration begins. Then, for each straight line in the target area, the absolute difference between the average grayscale value of the line and the baseline grayscale value is weighted using the line information weight. The weighted results of all lines are summed to characterize the degree of liquid film adhesion in the entire target area. Finally, the sum of the line information weights is normalized to eliminate the influence of differences in the number of straight lines or the total weight, making the target adhesion coefficients corresponding to liquid images at different times comparable, thereby intuitively presenting the changing pattern of liquid film adhesion characteristics over time during the concentration process.
[0035] Preferably, a liquid image before concentration is obtained from historical data, denoted as the pre-concentration liquid image; the position of the liquid region in the liquid image is mapped to the pre-concentration liquid image to obtain the pre-concentration liquid region; the average gray value of the pre-concentration liquid region is calculated and denoted as the reference gray value; the average gray value of the m-th profile line corresponding to the target region is obtained, and the liquid film adhesion coefficient of the target region is calculated based on the reference gray value and the line information weight of the m-th profile line, denoted as the target adhesion coefficient, including: The target adhesion coefficient satisfies the following expression: ; In the formula, Indicates the target adhesion coefficient; The line information weight of the m-th profile line; Indicates the baseline grayscale value; This represents the average gray value of the m-th profile line; This represents the normalization function.
[0036] In the formula, The absolute difference between the average gray value of the m-th profile line and the reference gray value is used to represent the degree of liquid film adhesion of the m-th profile. The larger the absolute difference, the greater the degree of liquid film adhesion of the m-th profile. This represents the weighted degree of liquid film adhesion after the m-th profile line is drawn; This represents the summation of the weighted liquid film adhesion levels of all profile lines in the target region, used to represent the degree of liquid film adhesion in the target region; the denominator is... The sum of the information weights of all profile lines in the target region is denoted as the target region information weight. It is used to normalize the degree of liquid film adhesion in the target region, eliminate the influence of differences in the number of profile lines or the sum of the information weights of the profile lines, make the target adhesion coefficients corresponding to liquid images of different frames comparable, and can more intuitively reflect the changes in liquid film adhesion characteristics with concentration time.
[0037] S3: Based on the target adhesion coefficient, start the calculation of the target liquid film hysteresis index; based on the movement of pixels in the liquid image corresponding to the target region and the previous frame liquid image, calculate the target displacement component; based on the difference between the average displacement modulus and the maximum average displacement modulus of all target displacement components, calculate the target liquid film hysteresis index.
[0038] It should be noted that during the concentration process of Codonopsis pilosula and Astragalus membranaceus decoction, the specific polysaccharides and saponins they contain form a unique wall-mounting state. Traditional manual methods for judging whether this state has reached the required level of concentration suffer from problems such as vague standards and large batch-to-batch variations. In the later stages of concentration, the viscosity of the decoction increases sharply, and the downward flow of the liquid film on the wall slows significantly, indicating a stagnant state. This is an important signal that concentration is nearing its end. However, if the liquid film has not yet formed an effective thickness, such as in the early stages of concentration when the film is thin and unstable, the obtained stagnant index is not accurate enough and needs to be adjusted. Exceeding a threshold is used as the standard for calculating the hysteresis index. Therefore, this invention records the liquid film adhesion coefficient when the drug solution reaches a specified concentration through three preliminary experiments, and takes the average value as the benchmark value, which serves as the critical standard for measuring the formation of an effective wall liquid film.
[0039] It should be noted that traditional manual observation is difficult to calculate dynamic details such as sliding and stagnation of liquid films at the millimeter or even micrometer level. Optical flow method can solve this problem precisely. By tracking the motion trajectory of feature points of the liquid film in consecutive frames of images, it accurately calculates the horizontal and vertical displacement components, transforming the liquid film flow that is difficult to detect with the naked eye into specific values. Especially for scenarios such as Codonopsis and Astragalus decoction, where there may be local unevenness in liquid film thickness and differences in flow velocity, the motion estimation capability of Lucas-Kanade optical flow method in small neighborhoods can effectively analyze subtle local flow differences and avoid ignoring local stagnation features due to the smooth overall flow of the liquid film.
[0040] Specifically, through three preliminary experiments, the concentration of the Codonopsis and Astragalus decoction was recorded three times consecutively in each experiment. Value, taken 3 times The average value as When the target adhesion coefficient does not exceed Continue monitoring changes in the target adhesion coefficient; when the target adhesion coefficient exceeds When it is determined that an effective wall liquid film has been formed, the calculation of the target liquid film hysteresis index is initiated.
[0041] It should be noted that, during the concentration process of Codonopsis pilosula and Astragalus membranaceus decoction, this invention focuses on analyzing the dynamic changes of the liquid film from flow to stagnation. This change is directly related to the degree of concentration of the Codonopsis pilosula and Astragalus membranaceus decoction. That is, as concentration proceeds, the concentration of components such as polysaccharides and saponins in the decoction increases, and the liquid film will gradually change from being easy to slide and flowing quickly in the initial stage to being viscous and adhering and flowing slowly, until it reaches a stable stagnation state at the end of the concentration. In this invention, the sum of the displacement modulus of all feature points is calculated and then averaged to eliminate the influence of the difference in the number of feature points at different locations on the liquid film. For example, there are fewer feature points in places where the liquid film is thin, so that the calculation result can reflect the overall flow level of the liquid film. In this invention, the average flow displacement of the liquid film is compared with the maximum average displacement modulus to normalize the difference in the absolute value of the flow rate under different batches and different equipment. For example, the initial fluidity of different batches of raw materials may be different, so that the flow state at different stages can be directly compared.
[0042] Preferably, the liquid image corresponding to the target area is compared with the previous frame liquid image. The Shi-Tomasi corner detection algorithm is used to select feature points within the target area. The Lucas-Kanade optical flow method is used to calculate the horizontal and vertical displacement components of the feature points in a 3×3 neighborhood around each feature, which are denoted as the target displacement components.
[0043] Preferably, all target displacement components within the target area are extracted, the average displacement modulus is calculated based on all target displacement components, and the maximum average displacement modulus within the target area during the initial stage of concentration in a single batch is obtained and denoted as the target maximum modulus; based on the target displacement components, the target maximum modulus, and the number of feature points in the target area, the liquid film hysteresis index of the target area is calculated and denoted as the target liquid film hysteresis index, including: The target liquid film hysteresis index satisfies the following expression: ; In the formula, This represents the target liquid film hysteresis index, with a value ranging from 0 to 1; , For feature points Optical flow displacement components in the horizontal and vertical directions; Indicates the number of feature points in the target region; Indicates the maximum target modulus; Represents a very small positive number, ensuring that the denominator is not zero; This represents an exponential function with the natural constant as its base.
[0044] In the formula, It represents the sum of displacement moduli of all feature points in the target region, reflecting the overall displacement of the liquid film; The average displacement modulus is obtained by dividing the sum of the displacement moduli of all feature points in the target area by the number of feature points in the target area, which is the average flow displacement of the liquid film. This means that the average flow potential of the liquid film is removed to target the maximum displacement modulus, and the maximum average displacement modulus is converted into a normalized average flow velocity to eliminate the difference in the absolute value of the flow velocity under different scenarios. This indicates that the slower the flow rate, the smaller the average flow displacement of the liquid film, the higher the degree of hysteresis, and the larger the target liquid film hysteresis index.
[0045] S4: Based on the relationship between the mean absolute value of all pixels in the target area and the target liquid film hysteresis index, calculate the endpoint decision index, locate the inflection point of the endpoint decision index curve, and perform control.
[0046] It should be noted that the slowly increasing saponins in the Codonopsis and Astragalus herbal decoction will form unique, fine, speckled textures in the later stages of concentration. This is an important characteristic that distinguishes it from other herbal decoctions and is a key signal that the concentration is nearing its end. The target liquid film hysteresis index can only reflect the liquid film flow, while saponin spots are an important feature of the later stages of concentration in the Codonopsis and Astragalus herbal decoction. This feature can be used to determine the concentration endpoint of the Codonopsis and Astragalus herbal decoction from both dynamic and microscopic texture perspectives.
[0047] Specifically, the target region is filtered using the Laplacian operator, and the mean of the absolute values of all pixels is calculated, denoted as the saponin blemish index. Based on the saponin blemish index and the target liquid film hysteresis index, the endpoint decision index for the concentration of Codonopsis pilosula and Astragalus membranaceus is calculated, denoted as the endpoint decision index, which includes: The endpoint decision index satisfies the following expression: ; In the formula, Indicates the endpoint decision index; Indicates the target liquid film hysteresis index; Indicates the saponin stain index; Represents a logarithmic function.
[0048] In the formula, This indicates a logarithmic enhancement of the saponin streak index; when there are no saponin streak areas, T Approaching 0 It is also close to 0, the entire endpoint decision index is suppressed to 0, when saponin streaks appear, T The value increases, It will grow slowly, thus having a reinforcing effect; using a logarithmic function can smooth it out. T The dramatic fluctuations in values make the model more stable; This indicates that saponin streaks only appear when the hysteresis index has reached a high level, meaning the liquid film has essentially stagnated. TOnly by increasing the value can the final decision index be effectively increased. If the liquid film is still flowing rapidly, R The value is low, even with noise resembling patterns. It will also be very small R The value is suppressed.
[0049] It should be noted that during the concentration process, the endpoint decision index rises with increasing concentration until it reaches an equilibrium point between the peak concentration of the active ingredient and the optimal physical state. Further concentration at this point will disrupt this equilibrium, causing the index to decrease. The inflection point precisely corresponds to this equilibrium state, ensuring that the dual objectives of achieving the target concentration and suitable physical state are met simultaneously. A single point-in-time decision index cannot reflect this dynamic trend, while a time-series curve can fully present the entire process of exponential growth, slowing growth, and the decline at the inflection point. By precisely locating the critical point through the mathematical first derivative, it avoids misjudgments due to high absolute values of the index.
[0050] Preferably, all endpoint decision indices in the liquid image sequence are continuously calculated, and the time evolution curve of the endpoint decision index is plotted with time as the horizontal axis and the endpoint decision index as the vertical axis. When the inflection point of the endpoint decision index value changing from continuous rise to fall is detected, it is determined that the concentration process has reached the optimal endpoint, and the corresponding control command is immediately triggered.
[0051] This invention also discloses an intelligent monitoring system for a Codonopsis and Astragalus beverage production workshop, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, an intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to the present invention is implemented.
[0052] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0053] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. An intelligent monitoring method for use in a Codonopsis and Astragalus beverage production workshop, characterized in that, include: The images of the observation window are continuously acquired using an industrial camera at preset times, and after preprocessing and grayscale conversion, they are arranged in chronological order to obtain a sequence of liquid images. Based on the grayscale values of the liquid surface areas, the sequence of liquid regions in the liquid image sequence is obtained; Any liquid region is designated as the target region. A profile line is extracted. The line information weight is calculated based on the gray value of the profile line and the stability of the gray value. The target adhesion coefficient is calculated based on the difference between the average gray value of all profile lines in the target region after being affected by their respective weights and the sum of the information weights of all profile lines in the target region. Based on the target adhesion coefficient, the target liquid film hysteresis index is calculated; based on the movement of pixels in the liquid image corresponding to the target region and the previous frame liquid image, the target displacement component is calculated. The target liquid film hysteresis index is calculated based on the difference between the average displacement modulus and the maximum average displacement modulus of all target displacement components. Based on the relationship between the mean absolute value of all pixels in the target area and the target liquid film hysteresis index, the endpoint decision index is calculated, the inflection point of the endpoint decision index curve is located, and control is implemented.
2. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The process of obtaining the liquid region sequence in the liquid image sequence includes: During the condensation time, at a preset 1-second interval... The system continuously acquires image sequences from the observation window, denoises them, converts the denoised images to grayscale, and arranges them according to the shooting time to obtain a liquid image sequence. A threshold segmentation algorithm is used to treat the regions in the liquid image sequence whose grayscale values are lower than the optimal segmentation threshold as liquid regions, and all the corresponding liquid regions in the liquid image sequence are recorded as a liquid region sequence.
3. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The weight of the straight line information satisfies the following expression: ; In the formula, The line information weight of the m-th profile line; Indicates the maximum grayscale value; This represents the average gray value of the m-th profile line; The gray standard deviation of the m-th profile line; Represents the normalization function; It represents a very small positive number, and guarantees that the denominator is not 0.
4. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The target adhesion coefficient satisfies the following expression: ; In the formula, Indicates the target adhesion coefficient; The line information weight of the m-th profile line; Indicates the baseline grayscale value; This represents the average gray value of the m-th profile line; This represents the normalization function.
5. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The calculation of the target liquid film hysteresis index includes: Through three preliminary experiments, the concentration of the Codonopsis and Astragalus decoction was recorded three times consecutively in each experiment. Value, taken 3 times The average value as When the target adhesion coefficient does not exceed Continue monitoring changes in the target adhesion coefficient; when the target adhesion coefficient exceeds When it is determined that an effective wall liquid film has been formed, the calculation of the target liquid film hysteresis index is initiated.
6. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The calculation of the target displacement components includes: The liquid image corresponding to the target area is compared with the previous frame liquid image. The Shi-Tomasi corner detection algorithm is used to select feature points in the target area. The Lucas-Kanade optical flow method is used to calculate the horizontal and vertical displacement components of the feature points in a 3×3 neighborhood around each feature, which are denoted as the target displacement components.
7. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The target liquid film hysteresis index satisfies the following expression: ; In the formula, This represents the target liquid film hysteresis index, with a value ranging from 0 to 1; , For feature points Optical flow displacement components in the horizontal and vertical directions; Indicates the number of feature points in the target region; Indicates the maximum target modulus; Represents a very small positive number, ensuring that the denominator is not zero; This represents an exponential function with the natural constant as its base.
8. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The endpoint decision index satisfies the following expression: ; In the formula, Indicates the endpoint decision index; Indicates the target liquid film hysteresis index; Indicates the saponin stain index; Represents a logarithmic function.
9. The intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to claim 1, characterized in that, The inflection point of the location endpoint decision index curve is controlled, including: All endpoint decision indices in the liquid image sequence are continuously calculated, and the time evolution curve of the endpoint decision index is plotted with time as the horizontal axis and the endpoint decision index as the vertical axis. When the inflection point of the endpoint decision index value changing from continuous rise to fall is detected, it is determined that the concentration process has reached the optimal endpoint, and the corresponding control command is immediately triggered.
10. An intelligent monitoring system for use in a Codonopsis and Astragalus beverage production workshop, characterized in that, include: A processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement an intelligent monitoring method for a Codonopsis and Astragalus beverage production workshop according to any one of claims 1-9.
Citation Information
Patent Citations
Leakage detection method and device for insulin and medium
CN115205249A
Quantitative characterization and prediction method for microdynamic behaviors of liquid drops in crude oil emulsion
CN115508353A
Atomized liquid film measuring method
CN117593282A
Gas cylinder inner surface defect detection method
CN120510138A
Water quality image analysis method and system based on deep learning, and device and medium
WO2022217589A1