End point monitoring method and device for gastric rejuvenation concentration process
By combining hyperspectral imaging technology and computer vision algorithms, the gastric rejuvenation concentration process is monitored in real time, which solves the problem of time-consuming, low efficiency and manual dependence on end point judgment in traditional methods, and realizes efficient and automated concentration control, improving product quality and production efficiency.
Patent Information
- Application Number
- CN202411979518.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The traditional gastric rejuvenation concentration process takes a long time, is low in efficiency, and is highly energy-consuming. The end point judgment depends on manual experience, and there are errors and uncertainties.
Hyperspectral imaging technology combined with computer vision algorithms is used to monitor the concentration process of gastrofuchun extract in real time, and a quantitative correction model is constructed through image information and hyperspectral data to automatically judge the concentration end point.
It realizes efficient and automated control of the gastric rejuvenation concentration process, reduces manual intervention, and improves production efficiency and product quality stability.
Smart Images

Figure CN119780088A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quality analysis of traditional Chinese medicines, and in particular to a method and device for monitoring the endpoint of a Weifuchun concentration process. Background Art
[0002] The concentration of Wei Fuchun is an extremely critical process in its production. At present, the concentration of Wei Fuchun is mainly carried out by continuously heating the Chinese medicine extract with a heater to evaporate and concentrate it, thereby obtaining a Wei Fuchun concentrate with a certain concentration. However, the traditional concentration process has some shortcomings. First, the entire concentration process takes a long time, and the contact area of the drug solution during the heating process is limited, resulting in low concentration efficiency. In addition, the energy consumption of this process is high, which not only affects the production cost, but also imposes a certain burden on the environment. More importantly, the traditional method of judging the end point of concentration relies on the experience of workshop workers. Workers manually adjust the vacuum degree of the concentrator by observing the size and generation rate of bubbles in the concentrate, and then end the concentration. This method not only has human errors, but also increases production uncertainty. Optimizing the technology for judging the end point of Wei Fuchun concentration is an important topic to improve the efficiency and quality of Wei Fuchun concentration.
[0003] Hyperspectral imaging (HSI) is a technology that combines imaging and spectral analysis, which can obtain image data of target objects in different spectral bands. Each pixel contains information from multiple continuous spectral ranges from visible to near-infrared, forming a "spectral cube". By analyzing these data, detailed information such as the composition, physical properties and state of the target object can be obtained. Compared with traditional three-primary color imaging technology (RGB), hyperspectral imaging can collect data in dozens to hundreds of bands, provide richer spectral information, and reveal subtle differences that are difficult to detect with the naked eye and traditional imaging methods. In addition, hyperspectral imaging technology has two major advantages. One is non-destructive testing, which can obtain its internal structure and composition information without destroying the sample. The second is that it combines spatial and spectral information together, which can provide both morphological information of the object and spectral information of its components, and has powerful comprehensive analysis capabilities.
[0004] The applicant has previously developed and submitted a patent application CN 117330655 A, which discloses a hyperspectral-based quality analysis method for the granulation process of Weifuchun, which includes the following steps: S1, sample collection and quality index reference value determination during the granulation process of Weifuchun; the quality indexes include but are not limited to: index chemical component content, particle size distribution, and moisture content; the index chemical component content is: naringin, neohesperidin, rosmarinic acid, ginsenoside Rg1, ginsenoside Re, ginsenoside Rb1, and ginsenoside Rd; S2, sample hyperspectral collection, pretreatment, and feature extraction; S3, quantitative correction modeling; S4, based on the quantitative correction model, the quality of the pharmaceutical process is detected. This method has the advantages of being fast and accurate, and it is applied for the first time to the rapid detection of quality indicators in the granulation process of Weifuchun. It provides a basis and guidance for the application of hyperspectral technology in the field of quality detection of traditional Chinese medicine pharmaceutical processes, and improves the production and manufacturing level and quality control level of traditional Chinese medicine.
[0005] However, in the CN 117330655 A application, although imaging analysis was performed based on a hyperspectral camera, there was a lack of effective identification of bubble interference. Since the spectral characteristics of bubbles overlap or are similar to those of certain components, the following problems may occur in actual detection: (1) Risk of misjudgment: bubbles are mistakenly identified as certain target components, resulting in distorted detection results. (2) Limited data quality: Bubble interference will reduce the credibility of hyperspectral imaging data and affect the accuracy of subsequent modeling. Summary of the invention
[0006] This application is aimed at the problems existing in the background technology, draws on the ideas of computer vision algorithms, combines hyperspectral imaging technology, and is innovatively used for monitoring and endpoint determination of the concentration process of Wei Fuchun extract. During the concentration process of Wei Fuchun extract, a camera is used to continuously shoot it, and the production process image information at the top of Wei Fuchun concentrate can be obtained, and its bubble morphology changes can be recorded in real time. At the same time, the hyperspectral image data at the bottom of Wei Fuchun concentrate is obtained by hyperspectral imaging technology, and the spectral characteristics of Wei Fuchun concentrate under different bands are accurately analyzed. Combining these two types of data, the changes in the liquid state during the concentration process can be fully captured, including bubble spatial distribution, generation rate, density and other physicochemical properties. In addition, the present invention also measures the content of index components in the concentrated solution sample, and further establishes a quantitative correction model. Through this model, the endpoint of the Chinese medicine concentration process can be accurately judged to ensure that each concentration reaches the optimal state. At the same time, the process trajectory monitoring of the index component content is also achieved, and the changing trend of the index component can be grasped in real time to ensure that the index component content of the Wei Fuchun concentrate is stable within the set range.
[0007] Technical solution:
[0008] The present invention first discloses a method for monitoring the endpoint of the Weifuchun concentration process, which comprises the following steps:
[0009] S1. Collect sample data sets, including:
[0010] Dataset ①: Image information of the concentration process of Weifuchun extract, which includes the changes in bubble morphology and the measurement of bubble size;
[0011] Dataset ②: Hyperspectral image data of the Weifuchun extract concentration process, and the quality indicators of the Weifuchun extract corresponding to the hyperspectral image data;
[0012] S2. Based on data set ①, a bubble size detection model is constructed; based on data set ②, a quality index detection model of Weifuchun extract is constructed;
[0013] S3. During the concentration process of Weifuchun, image information and hyperspectral image data of the concentration process of Weifuchun extract are obtained in real time;
[0014] S4, inputting image information into a bubble size detection model to obtain bubble size data; inputting hyperspectral image data into a quality index detection model to obtain quality index;
[0015] S5. The bubble size data and quality indicators all meet the corresponding thresholds, and it is determined to be the end point of the Weifuchun concentration process.
[0016] Preferably, in S1, the bubble size is obtained by filtering, binarizing, edge detecting and feature extracting image information.
[0017] Preferably, in S1, the quality indicators include the relative density and component content of the Weifuchun extract, the relative density is measured by a densitometer, and the component content is measured by high performance liquid chromatography.
[0018] Preferably, in S2, the architecture of the bubble size detection model is:
[0019] The model consists of five stages from stage 0 to stage 4 and an output layer, and its structure is as follows:
[0020] Stage 0 contains (1) convolutional layer: 7×7 convolution kernel, 64 channels, stride 2, normalization layer and ReLU activation function; (2) max pooling layer: 3×3 pooling kernel, stride 2;
[0021] Stage 1 includes (1) BTNK1 module: output channel is 64, feature map size is 56×56; (2) BTNK2 module: three repetitions, output channel is 256, feature map size is 56×56;
[0022] Stage 2 includes (1) BTNK1 module: output channels are 256, feature map size is 56×56; another module has output channels of 128, feature map size is 28×28, and stride is 2; (2) BTNK2 module: repeated twice, output channels are 512, feature map size is 28×28;
[0023] Stage 3 includes (1) BTNK1 module: output channels are 512, feature map size is 28×28; another module has output channels of 256, feature map size is 14×14, and stride is 2; (2) BTNK2 module: three repetitions, output channels are 1024, feature map size is 14×14;
[0024] Stage 4 includes (1) BTNK1 module: output channel is 1024, feature map size is 14×14; another module has output channel 512, feature map size is 7×7, stride is 2; (2) BTNK2 module: output channel is 2048, feature map size is 7×7;
[0025] The input channels of the BTNK1 module pass through: (1) 1×1 convolution layer: the number of channels becomes C, using normalization layer and ReLU activation; (2) 3×3 convolution layer: the number of channels remains unchanged, using normalization layer and ReLU activation; (3) 1×1 convolution layer: the number of channels becomes 4×C, using normalization layer; the above outputs are added with residual connection and activated by ReLU;
[0026] The input channels of the BTNK2 module pass through: (1) 1×1 convolution layer: the number of channels becomes C / 4, and a normalization layer and ReLU activation are used; (2) 3×3 convolution layer: the number of channels remains unchanged, and a normalization layer and ReLU activation are used; (3) 1×1 convolution layer: the number of channels is restored to C, and a normalization layer is used; the above outputs are added with the residual connection and activated by ReLU.
[0027] Specifically, in S2, the steps for constructing the quality indicator detection model are:
[0028] S2-1-1, perform whiteboard correction on the hyperspectral image data to obtain the average spectrum of the corresponding sample;
[0029] S2-1-2, exclude abnormal data and filter out spectral data with large deviation values to obtain a modeling data set;
[0030] S2-1-3, preprocess the modeling data set using the standard normal variable SNV;
[0031] S2-1-4, divide the training set and test set, and use PLS or SVM model for modeling;
[0032] S2-1-5. Using the cross-validation method, four folds are used for training and grid search method to find the optimal hyperparameters, one fold is used as the validation set, the modeling data is modeled according to the optimal hyperparameters, and the model effect is tested on the validation set and test set.
[0033] The present invention also discloses an endpoint monitoring device for the Weifuchun concentration process, which includes an ordinary camera and a hyperspectral camera. A top window is opened on the top of the concentration tank for the ordinary camera to collect image information of the Weifuchun extract concentration process, and the image information collected by the ordinary camera is transmitted to a first data processing terminal; a bottom window is opened at the bottom of the concentration tank for the hyperspectral camera to collect hyperspectral image data of the Weifuchun extract concentration process, and the hyperspectral image data collected by the hyperspectral camera is transmitted to a second data processing terminal.
[0034] Preferably, the model of the hyperspectral camera is FS-25 near-infrared hyperspectral imaging system, Specim FX17, Headwall Nano-Hyperspec, Resonon Pika NIR-320, BaySpec OCI TM -NIR, Any one of NIRfrom Corning, Photonfocus MV1-D2048-NIR.
[0035] Preferably, the model of the hyperspectral camera is FS-25 near-infrared hyperspectral imaging system.
[0036] Preferably, the ordinary camera has a length of 163.65 mm, a width of 79 mm, and a thickness of 8.1 mm. It adopts a 6.82-inch OLED screen, supports 1-120 Hz LTPO adaptive refresh rate and 1440 Hz high-frequency PWM dimming, and has a resolution of FHD+2720×1260 pixels; it is equipped with a 50-megapixel ultra-wide-angle camera, a 12-megapixel ultra-wide-angle camera, and a 48-megapixel ultra-macro telephoto camera, supports 3.5x optical zoom and 100x digital zoom, and has 12GB RAM and 1TB ROM storage space.
[0037] Preferably, the model of the ordinary camera is any one of Samsung Galaxy S23 Ultra, Xiaomi 13Ultra, OPPO FindX6Pro, Honor Magic5 Pro, and vivo X90 Pro+.
[0038] Beneficial Effects of the Invention
[0039] This application uses the bubble changes in the production process of Wei Fuchun concentrate and the spectral characteristics of the Wei Fuchun concentrate itself in the production process as a feature to construct a quantitative correction model, which can make the concentration process of Wei Fuchun extract completed in a reliable, economical and simple process. The introduction of hyperspectral imaging technology enables the full-automatic cycle program to be realized, and the system can control and adjust itself without human intervention. This unmanned operation not only reduces the demand for operators and reduces labor costs, but also effectively shortens the concentrator downtime and significantly improves production efficiency.
[0040] Furthermore, the present application introduces a special bubble identification algorithm to distinguish bubbles from target components based on the unique characteristics of the spectrum (such as reflectivity, scattering characteristics, etc.) and morphological characteristics (such as roundness, edge sharpness, etc.). The multidimensional features of hyperspectral images (such as spectral-spatial joint analysis) are used in combination with machine learning / deep learning models (such as random forests or convolutional neural networks) to further optimize the accuracy of bubble identification. Through the effective identification of bubble interference, the algorithm misjudgment caused by the overlap or similarity between the spectral characteristics of bubbles and the spectral characteristics of certain components is avoided.
[0041] Therefore, the present invention not only improves the concentration process efficiency of the Weifuchun extract, but also ensures the quality stability and consistency of the Weifuchun tablets, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Flow chart of the method of the present invention
[0043] Figure 2 The structural diagram of the multi-classification model in the embodiment
[0044] Figure 3 An example diagram of the confusion matrix in the embodiment
[0045] Figure 4 The structural diagram of the device of the present invention is DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with embodiments, but the protection scope of the present invention is not limited thereto:
[0047] Combination Figure 1 A method for monitoring the endpoint of the Weifuchun concentration process is shown, which comprises the following steps:
[0048] S1. Collect sample data sets, including:
[0049] Dataset ①: Image information of the concentration process of Weifuchun extract, which includes the changes in bubble morphology and the measurement of bubble size;
[0050] In this embodiment, taking the concentration process of Weifuchun tablets as an example, the entire concentration process lasts about 2 hours. An industrial vision camera is used to record a short video reflecting the state of the concentrated liquid at approximately 15-18 minute intervals on the top of the concentration tank. The bubble size information is obtained through filtering, binarization, edge detection and feature extraction.
[0051] Dataset ②: Hyperspectral image data of the Weifuchun extract concentration process, and the quality indicators of the Weifuchun extract corresponding to the hyperspectral image data;
[0052] In a preferred embodiment, the quality index includes the relative density and component content of the Weifuchun extract; the component index includes but is not limited to: naringin, rosmarinic acid and neohesperidin, and naringin, rosmarinic acid and neohesperidin are specifically described as follows:
[0053] In this example, the test solution was prepared by taking about 0.5 g of Wei Fuchun extract sample (mixed with a stirring rod before sampling), accurately weighing it in a 50 ml stoppered conical flask, accurately adding 25 ml of 20% methanol, and ultrasonically extracting (53 kHz) for 30 min to dissolve it. Shake well, and after cooling to room temperature, a solution containing about 20 mg of Wei Fuchun extract per 1 mL was prepared. The solution was centrifuged at 13000 rpm for 15 min, and the supernatant was obtained.
[0054] Preparation of reference solution: Take an appropriate amount of rosmarinic acid, weigh it accurately, add 70% methanol solution (containing 2% acetic acid) to dissolve and dilute to make a reference stock solution; take an appropriate amount of naringin and neohesperidin, weigh them accurately, then accurately draw an appropriate amount of rosmarinic acid reference stock solution, add 70% methanol solution to dissolve and dilute to make a mixed reference solution containing 0.65 mg of naringin, 0.07 mg of rosmarinic acid, and 0.45 mg of neohesperidin per 1 mL, centrifuge at 13000 rpm for 15 min, and take the supernatant for use.
[0055] Chromatographic conditions: chromatographic column Waters CORTECS C18 (150×4.6mm, 2.7μm); mobile phase: 0.5% formic acid water (A)-acetonitrile (B); linear gradient elution program: 0-12min, 5-17% B; 12-19min, 17% B; 19-40min, 17-23% B; 40-41min, 23-70% B; 41-50min, 70% B; flow rate: 0.60mL / min; column temperature: 35°C; injection volume: 10μL; UV detector wavelength: 283nm for naringin and neohesperidin, 330nm for rosmarinic acid, signal acquisition time: 40min.
[0056] Content determination: Accurately measure the test sample solution and inject it into the liquid chromatograph. Analyze it according to the above chromatographic conditions, record the HPLC-UV graph, calculate the peak area of naringin and neohesperidin at a wavelength of 283nm, calculate the peak area of rosmarinic acid at a wavelength of 330nm, and calculate the content according to the standard curve method.
[0057] S2. Based on data set ①, a bubble size detection model is constructed. Based on data set ②, a quality index detection model of Weifuchun extract is constructed. Specifically:
[0058] Bubble size detection model construction:
[0059] Based on data set ①, we first read each sample video to obtain the total number of video frames, and then divide it into 30 intervals according to the total number of video frames. In each interval, we take one frame and convert it into an image in RGB format. After processing all sample videos, we get a total of 14,430 images. Finally, we adjust the image size to 224*224 to construct the data set.
[0060] Eight categories are defined according to the shooting time, and all images are divided into 8 categories. After the division, the number of images in categories 1-8 are 2040, 2040, 2040, 2040, 2040, 1950, 1560, and 720 respectively. Then the dataset is divided into training set and test set in a ratio of 4:1.
[0061] Build a pattern classification model: Use the ResNet50 modeling algorithm to build a multi-classification model. The core part of its network architecture is the residual structure. In the normal network structure, a branch structure is added, so that the output of the network is no longer F(x), but F(x)+x. The structure of the multi-classification model is as follows: Figure 2 shown.
[0062] When training the model, set the learning rate to 0.001, the loss function to the cross entropy loss function, the optimizer to AdamW, the learning rate scheduler to SGDR-5-2, and adjust the learning rate periodically. Use the constructed training set to train the model, the batch size is 4, and the training rounds are set to 30. After each round of training, set the model to eval mode to test the effect on the test set, retain the model parameters and data of the best round, and draw the confusion matrix. The 30-round training takes about 60 minutes. In the 30th round, the model has the best accuracy of 97.297%. The confusion matrix is as follows: Figure 3 shown.
[0063] Quality indicator detection model construction:
[0064] The hyperspectral image was visualized to identify the sample area and the whiteboard area. After whiteboard correction, the average spectrum of the corresponding sample was obtained and saved. After excluding abnormal hyperspectral data, a total of 407 average spectrum data of extracts were obtained. The PCA-Mahalanobis distance method was used to filter out the spectrum data with large deviation values, and finally 366 data were obtained as the modeling data set. The average spectrum obtained in the previous sequence was preprocessed with the standard normal variable (SNV).
[0065] 366 data were used as the modeling data set, and the training set and test set were divided into 9:1 ratios, and PLS and SVM models were used for modeling respectively. The training set was divided into five folds, and a cross-validation method was used. Four folds were used for training and using the grid search method to find the optimal hyperparameters. One fold was used as the validation set. The hyperspectral data was modeled according to the optimal hyperparameters, and the model effect was tested on the validation set and the test set.
[0066] 1) For the PLS modeling process, use the grid search method to optimize the selection of the optimal number of principal components between 1 and 50 principal components; set the number of principal components to range from 1 to 50 (i.e., select between 1 and 50 principal components). Select performance evaluation indicators (such as mean square error (RMSE), root mean square error (RMSECV), and coefficient of determination). Standardize the input data X, usually using Z-score standardization, so that the mean of each variable is 0 and the standard deviation is 1 to eliminate the influence of different dimensions. In each cross-validation compromise, use the training data to fit the PLS model, and then use the validation data to evaluate its performance. For each number of principal components (1 to 50), train the PLS model. For each number of principal components, fit the PLS model and calculate the prediction error (RMSECV) on the validation set. Select the optimal number of principal components by cross-validation error. Usually, the number of principal components with the lowest cross-validation error is selected. You can plot the error curve to observe the impact of different numbers of principal components on model performance. Once the optimal number of principal components is determined, retrain the PLS model using that number of principal components, usually using the entire data set for training.
[0067] 2) For the SVM modeling process, radial basis function is used as the kernel function, and the penalty term C(10 -5 ~10 -1 ) and gamma(10 -4 ~10 -1 ). Standardize the input data X. The purpose of standardization is to make all features have the same scale, making the SVM training effect more stable. Use cross validation to evaluate the performance of the model under different parameter combinations. The penalty term C is set in the range of 1 0 -5 to 1 0 -1 , kernel function parameter γ: set range is 1 0 -4 to 1 0-1 , for each combination of C and γ, train the SVM model and calculate the average validation performance (such as mean square error, accuracy or other evaluation indicators) of the combination through cross-validation. The grid search will traverse all possible combinations of C and γ. After the grid search is completed, select the C and γ parameter combination that makes the model perform best, usually the combination with the best performance on the validation set. Use the optimal C and γ parameter combination to retrain the SVM model on the entire training data set. Use the test set or cross-validation set to evaluate the final model obtained by training and calculate the prediction error.
[0068] Root mean square error (RMSE) and coefficient of determination As an evaluation indicator of the model's predictive performance. It reveals the degree of correlation between the model prediction value and the actual value. The closer its value is to 1, the more significant the correlation between the two is, and the higher the degree of model fit. RMSE is used to measure the prediction performance and robustness of the model. The smaller the RMSEC and RMSEP values and the smaller the difference between the two, the better the model prediction performance and the stronger the robustness.
[0069] The results of the five folds (including the optimal hyperparameters) were averaged to obtain the final model hyperparameters and results. The results are shown in Tables 1 and 2 below, where C, gamma, and n_components are all hyperparameters of the model, train_r2 and train_rmse are the R-square and root mean square error of the model on the training set, val_r2 and val_rmse are the R-square and root mean square error of the model on the validation set, and test_r2 and test_rmse are the R-square and root mean square error of the model on the test set. As shown in Table 1, in the multivariate quantitative calibration model constructed using the SNV-SVM algorithm, the relative density, naringin, rosmarinic acid, and neohesperidin indicators are The values were 0.897197, 0.901718, 0.878639 and 0.890914, and the RMSE were 0.312631, 0.311314, 0.331402 and 0.326642, respectively. In the multivariate quantitative correction model constructed by SNV-PLS algorithm, the relative density, naringin, rosmarinic acid and neohesperidin were The values were 0.886431, 0.894679, 0.87672 and 0.883694, and the RMSE were 0.309399, 0.317177, 0.32932 and 0.333244, respectively. The multivariate quantitative correction model constructed by the SNV-SVM algorithm was slightly better than the multivariate quantitative correction model constructed by the SNV-PLS algorithm.
[0070] Table 1. Prediction performance of the multivariate calibration model established using the SNV-SVM algorithm
[0071]
[0072] Table 2. Prediction performance of the multivariate correction model established using the SNV-PLS algorithm
[0073]
[0074] In this embodiment, the model is constructed using Python scripting language (version 3.7.6, 64-bit), and the PLS, SVM and other model construction algorithms are implemented using the machine learning library scikit-learn (version 0.23.1) for partitioning the data set, and the random state is set to 2023. The ResNet model built by the one-dimensional convolutional neural network is based on the deep learning framework PyTorch (version 1.5.0) framework. All machine learning algorithms use training sets for learning and validation sets to optimize algorithm parameters. Finally, the corresponding optimal model is saved and evaluated to predict the prediction set, using R 2 p , RMSEP and R 2 c , RMSEC evaluates model performance.
[0075] S3. During the Weifuchun concentration process, set Figure 4 The end point monitoring device of the Weifuchun concentration process shown in the figure obtains image information and hyperspectral image data of the Weifuchun extract concentration process in real time; the device specifically includes an ordinary camera 3 and a hyperspectral camera 4, and a top window 2-1 is opened at the top of the concentration tank 1 for the ordinary camera 3 to collect image information of the Weifuchun extract concentration process, and the image information collected by the ordinary camera 3 is transmitted to the first data processing terminal 5; a bottom window 2-2 is opened at the bottom of the concentration tank 1 for the hyperspectral camera 4 to collect hyperspectral image data of the Weifuchun extract concentration process, and the hyperspectral image data collected by the hyperspectral camera 4 is transmitted to the second data processing terminal 6.
[0076] In this embodiment, the imaging system of the ordinary camera 3 used in S1 and S3 is 163.65mm long, 79mm wide, and 8.1mm thick. It uses a 6.82-inch OLED screen, supports 1-120Hz LTPO adaptive refresh rate and 1440Hz high-frequency PWM dimming, and has a resolution of FHD+2720×1260 pixels. It is equipped with a 50-megapixel ultra-light zoom camera, a 12-megapixel ultra-wide-angle camera, and a 48-megapixel ultra-macro telephoto camera, supports 3.5x optical zoom and 100x digital zoom, and has 12GB RAM and 1TB ROM storage space.
[0077] The hyperspectral camera 4 used in S1 and S3 adopts the FS-25 near-infrared hyperspectral imaging system (Color Spectrum Technology Zhejiang Co., Ltd.), which includes four parts: stage, imaging module, light source illumination module and software processing system. The near-infrared hyperspectral imaging system uses a transmission grating as the spectral wavelength range, 254 spectral bands, 8nm spectral resolution, 25μm slit width, transmission efficiency>60%, stray light<0.5%, 320 spatial pixels, 30μm pixel size, 200Hz imaging speed, InGaAs detector, SNR(Peak)600 / 1. The data storage method is the number of bands × image width (pixel) × image length (pixel). The light source illumination module provides illumination, and a halogen lamp is used as the illumination module. The power of each halogen lamp is 50W, and a total of 2 halogen lamps are used.
[0078] Due to the influence of various factors, such as dark current and uneven distribution of light source intensity, images collected within the wavelength range of weak pixel intensity will have large noise points, which will lead to a large amount of information loss during data processing. In order to remove the noise caused by the environment and dark current, the following formula is first used to perform black and white correction on the hyperspectral image:
[0079]
[0080] R represents the corrected reflectance image, R D represents the original hyperspectral image obtained, Ro is the white reflectance image of about 100%, R w A dark reflectance image representing 0% reflectance.
[0081] For the hyperspectral image of the concentrated liquid collected, the segmentation between the concentrated liquid and the background is necessary to obtain accurate spectral data. In ENVI5.2, select the "Crop" tool, manually or automatically select the concentrated liquid area, and generate a sub-image containing the concentrated liquid. The cropped image only contains the region of interest (ROI), that is, the part of the concentrated liquid, and the background has been removed. For each concentrated liquid sample, use the software tool to define the region of interest (ROI). The ROI can be manually outlined according to the morphology and distribution of the concentrated liquid, or extracted by an automatic algorithm. Each concentrated liquid sample will be designated as a separate ROI. After defining each ROI, the software will calculate the spectral information of all pixels in the area. For each sample, calculate the spectral average of all pixels in its ROI area to obtain the average spectral data of the sample. The average spectral data of each sample is stored in a standard data format to facilitate subsequent analysis and processing.
[0082] S4, inputting image information into a bubble size detection model to obtain bubble size data; and inputting hyperspectral image data into a quality index detection model after being preprocessed with a standard normal variable SNV to obtain a quality index;
[0083] S5. The bubble size data and quality indicators all meet the corresponding thresholds, and it is determined to be the end point of the Weifuchun concentration process.
[0084] The method and device for determining the endpoint of a concentrated liquid process provided by the present invention obtain a first photo of the concentrated liquid and a hyperspectral image by taking pictures with a shooting camera and a hyperspectral imaging camera, and after completing the first data processing to obtain the corresponding first processing result, first detect the bubble size to determine whether it meets the preset requirements for ending the concentration, and then detect whether the relative density and the content of the index component of the concentrated liquid meet the preset requirements. If not, continue to perform the second shooting and the second data processing, and perform a loop iteration until the preset requirements are finally met, thereby ending the concentration.
[0085] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A method for monitoring the endpoint of the Weifuchun concentration process, characterized in that It includes the following steps: S1. Collect sample data sets, including: Dataset ①: Image information of the concentration process of Weifuchun extract, which includes the changes in bubble morphology and the measurement of bubble size; Dataset ②: Hyperspectral image data of the Weifuchun extract concentration process, and the quality indicators of the Weifuchun extract corresponding to the hyperspectral image data; S2. Based on data set ①, a bubble size detection model is constructed; based on data set ②, a quality index detection model of Weifuchun extract is constructed; S3. During the concentration process of Weifuchun, image information and hyperspectral image data of the concentration process of Weifuchun extract are obtained in real time; S4, inputting image information into a bubble size detection model to obtain bubble size data; inputting hyperspectral image data into a quality index detection model to obtain quality index; S5. The bubble size data and quality indicators all meet the corresponding thresholds, and it is determined to be the end point of the Weifuchun concentration process.
2. The method according to claim 1, characterized in that In S1, the bubble size is obtained by filtering, binarizing, edge detecting and feature extracting the image information.
3. The method according to claim 1, characterized in that In S1, the quality indicators include the relative density and component content of the Weifuchun extract. The relative density is measured by a densitometer, and the component content is measured by high performance liquid chromatography.
4. The method according to claim 1, characterized in that In S2, the architecture of the bubble size detection model is: The model consists of five stages from stage 0 to stage 4 and an output layer, and its structure is as follows: Stage 0 contains (1) convolutional layer: 7×7 convolution kernel, 64 channels, stride 2, normalization layer and ReLU activation function; (2) max pooling layer: 3×3 pooling kernel, stride 2; Stage 1 includes (1) BTNK1 module: output channel is 64, feature map size is 56×56; (2) BTNK2 module: three repetitions, output channel is 256, feature map size is 56×56; Stage 2 includes (1) BTNK1 module: output channels are 256, feature map size is 56×56; another module has output channels of 128, feature map size is 28×28, and stride is 2; (2) BTNK2 module: repeated twice, output channels are 512, feature map size is 28×28; Stage 3 includes (1) BTNK1 module: output channels are 512, feature map size is 28×28; another module has output channels of 256, feature map size is 14×14, and stride is 2; (2) BTNK2 module: three repetitions, output channels are 1024, feature map size is 14×14; Stage 4 includes (1) BTNK1 module: output channel is 1024, feature map size is 14×14; another module has output channel 512, feature map size is 7×7, stride is 2; (2) BTNK2 module: output channel is 2048, feature map size is 7×7; The input channels of the BTNK1 module pass through: (1) 1×1 convolution layer: the number of channels becomes C, using normalization layer and ReLU activation; (2) 3×3 convolution layer: the number of channels remains unchanged, using normalization layer and ReLU activation; (3) 1×1 convolution layer: the number of channels becomes 4×C, using normalization layer; the above outputs are added with residual connection and activated by ReLU; The input channels of the BTNK2 module pass through: (1) 1×1 convolution layer: the number of channels becomes C / 4, and a normalization layer and ReLU activation are used; (2) 3×3 convolution layer: the number of channels remains unchanged, and a normalization layer and ReLU activation are used; (3) 1×1 convolution layer: the number of channels is restored to C, and a normalization layer is used; the above outputs are added with the residual connection and activated by ReLU.
5. The method according to claim 1, characterized in that In S2, the steps for building the quality indicator detection model are: S2-1-1, perform whiteboard correction on the hyperspectral image data to obtain the average spectrum of the corresponding sample; S2-1-2, exclude abnormal data and filter out spectral data with large deviation values to obtain a modeling data set; S2-1-3, preprocess the modeling data set using the standard normal variable SNV; S2-1-4, divide the training set and test set, and use PLS or SVM model for modeling; S2-1-5. Using the cross-validation method, four folds are used for training and grid search method to find the optimal hyperparameters, one fold is used as the validation set, the modeling data is modeled according to the optimal hyperparameters, and the model effect is tested on the validation set and test set.
6. A device for monitoring the endpoint of the Weifuchun concentration process, characterized in that It comprises an ordinary camera (3) and a hyperspectral camera (4); a top window (2-1) is provided at the top of the concentration tank (1) for the ordinary camera (3) to collect image information of the concentration process of the Weifuchun extract, and the image information collected by the ordinary camera (3) is transmitted to a first data processing terminal (5); a bottom window (2-2) is provided at the bottom of the concentration tank (1) for the hyperspectral camera (4) to collect hyperspectral image data of the concentration process of the Weifuchun extract, and the hyperspectral image data collected by the hyperspectral camera (4) is transmitted to a second data processing terminal (6).
7. The device according to claim 6, characterized in that The models of the hyperspectral cameras (4) are FS-25 near-infrared hyperspectral imaging system, Specim FX17, Headwall Nano-Hyperspec, Resonon Pika NIR-320, BaySpec OCI TM -NIR, Any one of NIR from Corning, Photonfocus MV1-D2048-NIR.
8. The device according to claim 7, characterized in that The model of the hyperspectral camera (4) is the FS-25 near-infrared hyperspectral imaging system.
9. The device according to claim 6, characterized in that The ordinary camera (3) has a length of 163.65 mm, a width of 79 mm, and a thickness of 8.1 mm. It adopts a 6.82-inch OLED screen, supports a 1-120 Hz LTPO adaptive refresh rate and 1440 Hz high-frequency PWM dimming, and has a resolution of FHD+2720×1260 pixels. It is equipped with a 50-megapixel ultra-wide-angle camera, a 12-megapixel ultra-wide-angle camera, and a 48-megapixel ultra-macro telephoto camera, supports 3.5x optical zoom and 100x digital zoom, and has 12GB RAM and 1TB ROM storage space.
10. The device according to claim 6, characterized in that The model of the ordinary camera (3) is any one of Samsung Galaxy S23 Ultra, Xiaomi 13 Ultra, OPPO Find X6 Pro, Honor Magic 5 Pro, and vivo X90 Pro+.
Citation Information
Patent Citations
Bubble size monitoring method and device
CN112967335A
Guanxinning quality detection method based on hyperspectral imaging technology and application
CN116840110A
Quality analysis method for gastric rejuvenation granulation process based on hyperspectrum
CN117330655A
Platform and methods for dynamic thin film measurements using hyperspectral imaging
US20210264582A1
Film thickness gauge by near-infrared hyperspecral imaging
US20220082371A1