Quality data online management method and system in traditional Chinese medicine decoction piece processing process
By collecting and processing key quality data in the process of processing traditional Chinese medicine pieces in real time, combined with the weighted average algorithm, artificial bee colony algorithm and ant colony optimization algorithm, the problems of low prediction accuracy and insufficient abnormal data processing capabilities in the existing technology are solved, and the More efficient quality monitoring and prediction reduces production costs.
Patent Information
- Application Number
- CN202411864244.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the preparation of Chinese herbal medicines, the existing technology relies on manual experience or trial and error to adjust the prediction model parameters, resulting in low prediction accuracy and real-time performance, increasing production costs, and lacking the ability to identify and process abnormal data.
Adopt a quality data online management method during the processing process of traditional Chinese medicine drinking films. Through real -time collection and cleaning key quality data, to extract relevant characteristics, use the weighted average algorithm and artificial bee colony algorithm for data fusion, timely monitor quality indicators, and use ant colony optimization The algorithm optimizes the parameters of neural network models to improve the accuracy and generalization capacity.
It improves the accuracy and real time of the quality prediction of Chinese medicine, reduce production costs, and ensure the stability of the production process and the safety of product quality through automated abnormal detection and early warning mechanisms.
Smart Images

Figure CN119338329A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an online quality data management method and system during the preparation of Chinese herbal medicine slices. Background Art
[0002] In recent years, with the continuous development of information technology and data analysis technology, more and more companies have begun to try to apply data analysis technology to the production process of Chinese herbal medicines. Among them, by collecting and analyzing key quality data in the processing process, real-time monitoring and prediction of the quality of Chinese herbal medicines can be achieved. However, in the actual application process, there are still some defects.
[0003] For example, some prediction model parameter adjustment methods rely on manual experience or trial and error, which requires a lot of time and manpower to repeatedly try and adjust. This not only affects the prediction accuracy and real-time performance of the prediction model, but also increases production costs.
[0004] For example, in the process of preparing Chinese herbal medicines, abnormal data may appear due to differences in raw medicinal materials, equipment failure or operational errors. Some existing parameter adjustment methods lack the ability to identify and process abnormal data, causing the model to be disturbed by abnormal data during the prediction process, reducing the prediction accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for online management of quality data in the process of preparing Chinese herbal medicine slices, thereby improving the prediction accuracy and real-time performance of the model and reducing production costs.
[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows: In a first aspect, a method for online management of quality data during the preparation of Chinese herbal medicine pieces is provided, the method comprising: Step 11, collecting and recording various key quality data in the process of preparing Chinese herbal medicine slices in real time; Step 12, cleaning and preprocessing the key quality data to obtain preprocessed quality data; Step 13, extracting key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of the processing temperature, the statistics of the weight of the raw medicinal materials, and the change rate of the medicinal material weight; Step 14, in the initial data fusion stage, the pre-processed quality data is initially fused using a weighted average algorithm to obtain preliminary fused data; the weight distribution in the weighted average algorithm is optimized using an artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; a fitness function is defined for evaluating the data fusion effect under various weight combinations; by simulating the foraging and searching behavior of bees, it is continuously iterated to find the optimized weight combination; the optimized weight combination is used for fusion to obtain the final fused data; Step 15, using the final fusion data to monitor the key quality indicators in the process of preparing Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, a preset warning is automatically triggered according to the key features in the abnormal data; Step 16, using the ant colony optimization algorithm to optimize the parameters of the neural network model used for quality prediction; by simulating the foraging behavior and pheromone update mechanism of ants, searching for the final solution in the parameter space to obtain the optimized parameters; retraining the neural network model using the optimized parameters to obtain the trained neural network model; predicting the quality trend of Chinese herbal medicine slices based on the trained neural network model.
[0007] Furthermore, key quality data include the properties, weight, processing time, processing temperature, processing humidity, amount of auxiliary materials, and the operating status and fault conditions of the processing equipment.
[0008] Furthermore, the calculation formula for the preliminary fusion data is: ; in, Indicates The data source is in The data value at a time point; Indicates The data source is in The true value corresponding to each time point; Represents the maximum value of the true value; Indicates The data source is in The number of missing values at each time point; Indicates The data source is in The total number of data values at each time point; Indicates The data source is in The data timestamp of a time point; Indicates the current time point; represents the time decay rate; represents the time-dependent decay rate; The weight coefficient indicating the accuracy of the data; The weight coefficient representing the data integrity; The weight coefficient indicating the timeliness of data; Indicates The weight coefficient of each data source; Indicates the total number of data sources; Indicates the total number of time points; and Represents the index value; represents the base of natural logarithms; Represents the value of the preliminary fused data.
[0009] Furthermore, the weight distribution in the weighted average algorithm is optimized by the artificial bee colony algorithm. In the artificial bee colony algorithm, each bee is regarded as a weight combination scheme. A fitness function is defined to evaluate the data fusion effect under various weight combinations. By simulating the foraging and searching behavior of bees, it is continuously iterated to find the optimized weight combination, including: is the weight coefficient , and Set the corresponding value range; Set the size of the bee colony, that is, the total number of weighted combination solutions, each bee represents a group , and The value of Define the fitness function used to evaluate the data fusion effect under each weight combination; Each employed bee, i.e. the current weight combination scheme, searches for a new weight combination in its neighborhood, calculates the fitness value of the new weight combination, and compares the fitness value of the new weight combination with the fitness value of the current weight combination to update the current weight combination to the new combination; The observer bee selects the corresponding weight combination for search based on the fitness information provided by the employed bee. After selection, the observer bee will perform the search and selection process related to the employed bee. If one of the weight combinations fails to improve in multiple consecutive iterations, the scout bee will be sent to perform a random search to explore the remaining areas in the space. The scout bee will randomly generate a new weight combination and calculate its fitness value. The search process of employed bees, observer bees and scout bees is repeated until the termination condition is met. After the iteration, the corresponding weight combination is output as the optimized weight combination.
[0010] Furthermore, the calculation formula of the fitness function is: ; in, is the value of the fitness function; Represents the total number of preliminary fusion data; Indicates The value of the initial fusion data; Indicates The true value of the preliminary fusion data; Indicates The error value of the preliminary fusion data; Represents the maximum possible value of the error in all preliminary fused data; represents the adjustment parameter; Represents the base of natural logarithms.
[0011] Furthermore, the final fusion data is used to monitor the key quality indicators in the preparation process of Chinese herbal medicines in real time; when abnormal data patterns are detected, preset warnings are automatically triggered based on the key features in the abnormal data, including: According to the process requirements and industry standards for the preparation of Chinese herbal medicines, set the normal range of key quality indicators, including temperature fluctuation range, humidity control range and preparation time; Collect and pre-process historical fusion data to obtain pre-processed historical fusion data; Using the preprocessed historical fusion data to train a support vector machine to obtain a trained support vector machine; Receive the final fused data and input it into the trained support vector machine to obtain the prediction result; According to the normal range of key quality indicators and the prediction results, the final fused data is tested for anomalies to determine whether the final fused data deviates from the normal range of key quality indicators; When abnormal data is identified, key features of the abnormal data are extracted; Based on the key features of abnormal data, abnormal warning is issued.
[0012] Furthermore, key features include the type of abnormality, the degree of abnormality, and the duration.
[0013] Furthermore, the parameters of the neural network model used for quality prediction are optimized using an ant colony optimization algorithm; by simulating the foraging behavior and pheromone update mechanism of ants, a final solution is searched in the parameter space to obtain optimized parameters; the neural network model is retrained using the optimized parameters to obtain a trained neural network model, including: Determine the parameters of the neural network model to be optimized, including weights and biases; set the corresponding search range and initial values for the parameters of the neural network model; determine the number of ants, that is, the number of solutions; Randomly generate the initial position of each ant in the parameter space, which is the initial solution of the neural network parameters; For each ant, use the parameter values of its current position to configure the neural network model, define a fitness function for evaluating the performance of the neural network model, and calculate the corresponding fitness value; According to the fitness value of each ant, the pheromone concentration on its path is updated; Each ant selects the next position, i.e., the new parameter value, based on the pheromone concentration and heuristic information around the current position, and repeatedly calculates the fitness and ant movement until the preset number of iterations is reached to obtain the optimized parameters corresponding to the final ant, and the optimized parameters are used as the final solution; The neural network model is reconfigured using the optimized parameters to obtain a trained neural network model.
[0014] In the second aspect, an online management system for quality data in the process of preparing Chinese herbal medicine pieces includes: The acquisition module is used to collect and record various key quality data in the preparation process of Chinese herbal medicine pieces in real time; A preprocessing module is used to clean and preprocess key quality data to obtain preprocessed quality data; The extraction module is used to extract key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of processing temperature, the statistics of the weight of raw medicinal materials, and the change rate of the weight of medicinal materials; The computing module is used to use the weighted average algorithm to initially fuse the preprocessed quality data in the initial data fusion stage to obtain preliminary fused data; optimize the weight distribution in the weighted average algorithm by the artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; define a fitness function for evaluating the data fusion effect under various weight combinations; simulate the foraging and searching behavior of bees, and iterate continuously to find the optimized weight combination; use the optimized weight combination for fusion to obtain the final fused data; The analysis module is used to use the final fusion data to monitor the key quality indicators in the preparation process of Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, the preset warning is automatically triggered according to the key features in the abnormal data; The optimization module is used to optimize the parameters of the neural network model used for quality prediction using the ant colony optimization algorithm; by simulating the foraging behavior and pheromone update mechanism of ants, the final solution is searched in the parameter space to obtain the optimized parameters; the neural network model is retrained using the optimized parameters to obtain the trained neural network model; and the quality trend of Chinese herbal medicine slices is predicted based on the trained neural network model.
[0015] According to a third aspect, a computing device includes: one or more processors; The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described.
[0016] In a fourth aspect, a computer-readable storage medium stores a program, and when the program is executed by a processor, the method described is implemented.
[0017] The above scheme of the present invention includes at least the following beneficial effects.
[0018] By collecting and recording the key quality data in the preparation process of Chinese herbal medicine slices in real time, and cleaning and preprocessing these data, the quality and accuracy of the data can be effectively improved. Extracting key features related to the quality of Chinese herbal medicine slices from the preprocessed quality data, such as the data range of the preparation temperature, the statistics of the weight of raw medicinal materials, and the rate of change of the weight of medicinal materials, can more accurately reflect the quality status of Chinese herbal medicine slices.
[0019] By using a weighted average algorithm to initially fuse the preprocessed quality data and optimizing the weight distribution using an artificial bee colony algorithm, more accurate fused data can be obtained. This optimization method improves the accuracy and robustness of data fusion, and helps to more accurately reflect the actual situation of the preparation process of Chinese herbal medicines.
[0020] Using the final fusion data to monitor the key quality indicators in the preparation process of Chinese herbal medicines in real time can timely discover and deal with potential quality problems. When abnormal data patterns are detected, preset warnings are automatically triggered based on the key features in the abnormal data, which helps to take timely measures to prevent further expansion of quality problems.
[0021] Optimizing the parameters of the neural network model used for quality prediction through the ant colony optimization algorithm can improve the prediction accuracy and generalization ability of the neural network model. Retraining the neural network model with the optimized parameters and predicting the quality trend of Chinese herbal medicine slices based on the trained model will help companies make production adjustments and optimization decisions in advance, thereby improving product quality and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The present invention provides a flowchart of a method for online management of quality data in the process of preparing Chinese herbal medicine slices.
[0023] Figure 2 It is a schematic diagram of an online management system for quality data during the preparation of Chinese herbal medicine pieces provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0025] like Figure 1 As shown, an embodiment of the present invention provides a method for online management of quality data during the preparation of Chinese herbal medicine pieces, the method comprising the following steps: Step 11, collecting and recording various key quality data in the process of preparing Chinese herbal medicine slices in real time; Step 12, cleaning and preprocessing the key quality data to obtain preprocessed quality data; the key quality data includes the properties, weight, processing time, processing temperature, processing humidity, amount of auxiliary materials, and the operating status and fault conditions of the processing equipment of the raw medicinal materials; Step 13, extracting key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of the processing temperature, the statistics of the weight of the raw medicinal materials, and the change rate of the medicinal material weight; Step 14, in the initial data fusion stage, the pre-processed quality data is initially fused using a weighted average algorithm to obtain preliminary fused data; the weight distribution in the weighted average algorithm is optimized using an artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; a fitness function is defined for evaluating the data fusion effect under various weight combinations; by simulating the foraging and searching behavior of bees, it is continuously iterated to find the optimized weight combination; the optimized weight combination is used for fusion to obtain the final fused data; Step 15, using the final fusion data to monitor the key quality indicators in the process of preparing Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, a preset warning is automatically triggered according to the key features in the abnormal data; Step 16, using the ant colony optimization algorithm to optimize the parameters of the neural network model used for quality prediction; by simulating the foraging behavior and pheromone update mechanism of ants, searching for the final solution in the parameter space to obtain the optimized parameters; retraining the neural network model using the optimized parameters to obtain the trained neural network model; predicting the quality trend of Chinese herbal medicine slices based on the trained neural network model.
[0026] In the embodiment of the present invention, step 11, real-time data collection ensures the timeliness and accuracy of information, and helps to capture every detail change in the production process. Step 12, data cleaning and preprocessing can eliminate noise, outliers and missing values in the original data, and improve the quality and reliability of the data. Step 13, feature extraction helps to condense the factors that have the most significant impact on the quality of Chinese herbal medicine pieces from massive data, so as to more accurately understand the quality change law in the production process. Step 14, through data fusion technology, it is possible to comprehensively consider data from multiple sources and multiple dimensions to obtain more comprehensive and accurate quality assessment results. The optimization of the artificial bee colony algorithm makes the weight distribution of data fusion more scientific, and improves the accuracy and effect of fusion. Step 15, real-time monitoring can timely discover quality problems in the production process, and the automatic early warning mechanism can notify relevant personnel to take countermeasures at the first time, thereby effectively preventing the expansion and spread of quality problems and ensuring the stability of the production process and the safety of product quality. Step 16, the parameters of the neural network model are optimized by the ant colony optimization algorithm, which can improve the prediction accuracy and generalization ability of the model. Accurate quality prediction helps companies make production adjustments and optimization decisions in advance, reduce quality risks, and improve production efficiency and product quality.
[0027] In a preferred embodiment of the present invention, the above step 11, real-time collection and recording of various key quality data during the preparation of Chinese herbal medicine pieces, may include: Real-time capture and recording of various data during the preparation of Chinese herbal medicines can be achieved by adding sensors to the preparation equipment, using data acquisition software, or integrating it into the existing production management system; determine the key quality data indicators to be collected, which cover the properties of the raw medicinal materials (such as color, smell, texture, etc.), weight, preparation time, preparation temperature, preparation humidity, amount of auxiliary materials, and the operating status and fault conditions of the preparation equipment. During the preparation process, the above key quality data are recorded in real time through sensors and data acquisition systems, and the data can be stored on a local server or in the cloud.
[0028] In a preferred embodiment of the present invention, the above step 12, cleaning and preprocessing the key quality data to obtain preprocessed quality data, may include: Clean the collected raw data to remove duplicate, erroneous or incomplete data, which includes checking data consistency, handling missing values, outliers, etc. Preprocess the cleaned data for subsequent feature extraction and analysis; preprocessing includes data normalization (scaling the data to a uniform range) and standardization (converting to a standard normal distribution).
[0029] In a preferred embodiment of the present invention, the above step 13, extracting key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, may include: According to the specific needs of the quality evaluation of Chinese herbal medicines, the corresponding feature extraction method is selected. Since the quality of Chinese herbal medicines is affected by many factors, it is necessary to extract features from multiple angles to fully reflect its quality.
[0030] Through statistical methods, various statistics of data can be calculated, such as mean, standard deviation, maximum value, minimum value, etc. These statistics can reflect the central tendency, degree of dispersion and extreme value of the data.
[0031] Apply statistical methods for feature extraction: The data range of processing temperature is one of the important factors affecting the quality of Chinese medicine slices. By calculating the difference between the highest temperature and the lowest temperature during the processing, the data range of processing temperature can be obtained. The size of this range can reflect the stability of temperature control during the processing process, which in turn affects the quality of the slices.
[0032] Statistics of the weight of raw medicinal materials: The weight of raw medicinal materials is also a key factor affecting the quality of medicinal pieces. By counting the mean, median, mode, etc. of the weight of raw medicinal materials, we can understand the overall distribution of the weight of medicinal materials. For example, the mean can reflect the average weight of the medicinal materials, the median can show the central trend of the weight, and the mode reveals the weight value with the highest frequency.
[0033] Change rate of medicinal material weight: During the processing, the weight of the medicinal material may change. This change may be related to factors such as the moisture content of the medicinal material, the processing method and time. By calculating the percentage difference in the weight of the medicinal material before and after processing, the change rate of the medicinal material weight can be obtained. This change rate can reflect the treatment effect of the medicinal material during the processing process, thereby affecting the quality of the final medicinal piece.
[0034] These extracted key features can not only help to better understand the quality characteristics of Chinese herbal medicines, but also provide important references for subsequent quality prediction, control and optimization. For example, if the data range of the processing temperature is found to be too large, it may mean that the temperature control during the processing is not stable enough, and corresponding measures need to be taken to improve it. Similarly, if the weight statistics of the raw medicinal materials show a large degree of dispersion, it means that there are problems in the selection or processing of the medicinal materials, which also need further investigation and improvement.
[0035] In a preferred embodiment of the present invention, in the above step 14, the calculation formula for preliminary fusion data is as follows: ; in, Indicates The data source is in The data value at a time point; Indicates The data source is in The true value corresponding to each time point; Represents the maximum value of the true value; Indicates The data source is in The number of missing values at each time point; Indicates The data source is in The total number of data values at each time point; Indicates The data source is in The data timestamp of a time point; Indicates the current time point; represents the time decay rate; represents the time-dependent decay rate; The weight coefficient indicating the accuracy of the data; The weight coefficient representing the data integrity; The weight coefficient indicating the timeliness of data; Indicates The weight coefficient of each data source; Indicates the total number of data sources; Indicates the total number of time points; and Represents the index value; represents the base of natural logarithms; Represents the value of the preliminary fused data.
[0036] In the embodiment of the present invention, the algorithm can comprehensively consider the information from different data sources and fuse the data by weighted average, so as to obtain a more comprehensive and accurate preliminary fusion data. This helps to reduce the deviation or error that may be caused by a single data source and improve the reliability and accuracy of the data. The algorithm introduces multiple weight coefficients, including the weight coefficient of data accuracy. , weight coefficient of data integrity and the weight coefficient of data timeliness , and the weight coefficient of each data source These weight coefficients can be dynamically adjusted according to the actual situation to reflect the importance of different data sources and different data characteristics, thereby improving the pertinence of fused data. and time-dependent decay rate , the algorithm can take into account the impact of data changes over time. The impact of older data on the fusion result will gradually decrease, while more recent data has a greater influence, which meets the needs of data timeliness in many practical situations. The algorithm explicitly considers missing data values The situation is solved by calculating the missing values and reducing the impact of missing values on the fusion results. With the true value The algorithm can identify and process outliers to a certain extent and improve the robustness of fused data by adjusting the differences and giving corresponding weights in the calculation. The algorithm has strong flexibility and scalability. By adjusting different parameters and weight coefficients, it can adapt to the data fusion requirements in different scenarios. At the same time, as the data source increases or decreases, the algorithm can be easily expanded or reduced.
[0037] The data fusion process in step 14 aims to effectively integrate the quality data from different data sources and different time points to obtain a comprehensive and preliminary fused data value. The following is a detailed description of the process of this step: Data preparation and parameter setting: First, determine the data values of all data sources that need to be fused (n in total) at each time point (m in total) , true value , the number of missing values , total number of data values and data timestamp . Set the time decay rate and time-dependent decay rate , these two parameters are used to adjust the impact of time factors on data fusion results. Set the weight coefficients of data accuracy, completeness and timeliness , and , and the weight coefficient of each data source These weight coefficients will be used to balance the importance of different data sources and different data features during the fusion process.
[0038] Calculate the weighted value of each data source at each time point: For each data source i at each time point j, calculate its weighted value. This weighted value consists of three parts: a. Data Accuracy Section: ,in, Indicates The data source is in The data value at a time point is compared with the true value to assess the accuracy of the data.
[0039] b. Data integrity section: , by the number of missing values The total number of data values ratio to assess the completeness of the data.
[0040] c. Data timeliness: , using timestamp With the current time point The timeliness of the data is evaluated by using an exponential function.
[0041] Add these three parts weighted together and multiply by the weight coefficient of the data source and data values , get the The data source is in The weighted value of a time point.
[0042] Time decay weighting: For each time point j, sum the weighted values of all data sources at that time point and multiply them by a time decay factor This factor is used to reduce the impact of data at earlier time points on the fusion results to reflect the timeliness of the data.
[0043] Calculate the initial fusion data value: The weighted sums of attenuation at all time points are added together to obtain the overall weighted sum; the sum of attenuation factors at all time points is calculated to normalize the overall weighted sum; the overall weighted sum is divided by the sum of attenuation factors to obtain the preliminary fused data value R.
[0044] In a preferred embodiment of the present invention, the weight distribution in the weighted average algorithm is optimized by an artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; a fitness function for evaluating the data fusion effect under various weight combinations is defined; by simulating the foraging and searching behavior of bees, it is continuously iterated to find the optimized weight combination, including: is the weight coefficient , and Set the corresponding value range, including: determine the weight coefficient that needs to be optimized, such as the weight coefficient of data accuracy , weight coefficient of data integrity , weight coefficient of data timeliness . According to the actual application scenario and previous experience, a reasonable value range is set for each weight coefficient. For example, Can be between [0, 1], and They also have their own value ranges. Ensure that the sum of the value ranges of all weight coefficients does not exceed the overall weight upper limit to maintain the rationality of weight distribution; Set the size of the bee colony, that is, the total number of weighted combination solutions, each bee represents a group , and The value of includes: based on the complexity of the problem, the availability of computing resources, and the expected search accuracy, preliminarily estimate a reasonable bee colony size N, which represents the total number of weighted combination schemes to be generated. For example, small-scale experiments can be conducted to test the impact of different colony sizes on search performance and result quality, so as to adjust and determine the final N; for each bee in the colony (i.e., each weighted combination scheme), use a random number generator in , and Generate a random number within the value range of each bee as the value of the weight; ensure that each set of weights generated , and All satisfy the constraint of the sum of weights, that is, (Normalized weights). Combine the N groups of weight combinations generated in the above steps to form the initial bee colony. At this point, each bee represents a specific weight combination scheme, that is, a specific set of , and The value of .
[0045] Define a fitness function for evaluating the data fusion effect under each weight combination. This function should be able to reflect the accuracy, completeness and timeliness of the fused data in order to compare the advantages and disadvantages of different weight combination schemes.
[0046] Each employed bee, that is, the current weight combination scheme, searches for a new weight combination in its neighborhood, calculates the fitness value of the new weight combination, and compares the fitness value of the new weight combination with the fitness value of the current weight combination to update the current weight combination to a new combination, specifically including: each employed bee (that is, the current weight combination scheme) searches for a new weight combination in its neighborhood, which involves making slight adjustments to the current weights, calculating the fitness value of the new weight combination, and using the previously defined fitness function to compare the fitness value of the new weight combination with the fitness value of the current weight combination; if the fitness of the new combination is higher (that is, the data fusion effect is better), the current weight combination is updated to the new combination.
[0047] The observer bee selects the corresponding weight combination for search based on the fitness information provided by the employed bee. After selection, the observer bee will perform the search and selection process related to the employed bee. If one of the weight combinations fails to improve in multiple consecutive iterations, the scout bee will be sent to perform a random search to explore the remaining areas in the space. The scout bee will randomly generate a new weight combination and calculate its fitness value, including: The observer bee selects the corresponding weight combination for further search based on the fitness information provided by the employed bee. Once a weight combination is selected, the observer bee will perform a search and selection process similar to that of the employed bee, which helps to further optimize the existing good solutions. If a weight combination fails to improve in multiple consecutive iterations (i.e., it falls into a local optimum), the scout bee will be dispatched to perform a random search. The scout bee will randomly generate a new weight combination in the entire solution space and calculate its fitness value. This randomness helps the algorithm to escape the local optimum and explore a wider solution space.
[0048] The search process of employed bees, observer bees and scout bees is repeated until the termination condition is met. After the iteration, the corresponding weight combination is output as the optimized weight combination. Specifically, it includes: repeatedly executing the search process of employed bees, observer bees and scout bees until a termination condition is met (such as reaching the maximum number of iterations); after the iteration, the corresponding weight combination is output as the optimized weight combination. This combination should be able to provide better data fusion effect in the weighted average algorithm.
[0049] In an embodiment of the present invention, the artificial bee colony algorithm can adaptively adjust the weight combination by simulating the foraging and searching behavior of bees, making the data fusion process more flexible and intelligent. This adaptability helps to handle complex and changeable data fusion scenarios. The artificial bee colony algorithm has a strong global search capability and can find a near-optimal weight combination in a large solution space. This helps to improve the accuracy and effect of data fusion, making the fused data closer to the real situation. In traditional optimization methods, it is easy to fall into a local optimal solution and cannot jump out. The artificial bee colony algorithm can effectively avoid falling into a local optimal solution through the collaborative work of employed bees, observation bees and scout bees, thereby finding a more optimal solution globally. The artificial bee colony algorithm is insensitive to the selection of the initial weight combination, and can gradually adjust and optimize the weight combination during the iteration process. This robustness enables the algorithm to maintain a stable data fusion effect when facing different data sources and data of varying quality. Each bee in the artificial bee colony algorithm can perform search and optimization work in parallel, which helps to improve the execution efficiency of the algorithm. The artificial bee colony algorithm can be easily extended to more dimensional and more complex data fusion problems.
[0050] In a preferred embodiment of the present invention, the calculation formula of the fitness function is: ; in, is the value of the fitness function; Represents the total number of preliminary fusion data; Indicates The value of the initial fusion data; Indicates The true value of the preliminary fusion data; Indicates The error value of the preliminary fusion data; Represents the maximum possible value of the error in all preliminary fused data; represents the adjustment parameter; Represents the base of natural logarithms.
[0051] In the embodiment of the present invention, the fitness function can accurately reflect the accuracy of data fusion under the current weight combination by calculating the proportional deviation between the preliminary fusion data and the true value, which helps to guide the algorithm to search in the direction of a more accurate weight combination. The error value of the previous data is introduced into the function , so that the algorithm can dynamically consider the error accumulation during the data fusion process. This design helps to reduce the accumulation of continuous errors and improve the overall data fusion quality. and the base of natural logarithms , the function can regulate the impact of error on fitness to a certain extent, increasing the robustness of the algorithm. This means that the algorithm can work more stably when faced with data sources of different qualities. The fitness function is designed to find the optimal weight combination globally. By comprehensively considering multiple factors, the function can guide the algorithm to avoid falling into local optimality during the search process, making it more likely to find the global optimal solution. The various components in the function (such as deviation calculation, error adjustment, etc.) are modular, which makes the function highly flexible and scalable.
[0052] In a preferred embodiment of the present invention, the above step 15 uses the final fusion data to monitor the key quality indicators in the process of preparing Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, the preset warning is automatically triggered according to the key features in the abnormal data, which may include: Step 151, according to the process requirements and industry standards for the preparation of Chinese herbal medicines, set the normal range of key quality indicators, including temperature fluctuation range, humidity control range and preparation time, specifically including: studying the process requirements and industry standards for the preparation of Chinese herbal medicines, which includes consulting relevant professional literature, specification documents and industry standards. Based on the research, determine the key quality indicators that need to be monitored during the preparation of Chinese herbal medicines, such as temperature, humidity and preparation time. Based on industry standards, process requirements and actual operating experience, set reasonable normal ranges for these key quality indicators. For example, the temperature may need to be within a certain range of degrees Celsius, the humidity needs to be maintained at a relatively constant percentage, and the preparation time needs to be determined based on the specific medicinal materials and preparation methods.
[0053] Step 152, collect and pre-process the historical fusion data to obtain the pre-processed historical fusion data, specifically including: collecting fusion data related to the processing process of Chinese herbal medicine pieces from historical records. These data may include records of key indicators such as temperature, humidity, and processing time; cleaning the data to remove duplicate, erroneous or incomplete data; performing necessary pre-processing on the data, such as normalization and standardization, to ensure the quality and consistency of the data, in preparation for subsequent machine learning model training.
[0054] Step 153, using the pre-processed historical fusion data to train a support vector machine to obtain a trained support vector machine, specifically includes: Initialize the parameters of the SVM algorithm, such as the penalty coefficient C, kernel function type (such as linear kernel, polynomial kernel, radial basis function kernel, etc.), kernel function parameters (such as the degree of the polynomial kernel, the width parameter of the radial basis function kernel), and insensitive loss parameters (for regression problems).
[0055] Analyze the preprocessed historical fusion data and identify the features that are most relevant to the key quality indicators. This can be achieved by calculating the Pearson correlation between the features and the target variable. Extract the selected features and form a feature matrix for training the SVM model. Divide the preprocessed historical fusion data into a training set and a validation set (or test set). Usually 70%-80% of the data is used as the training set, and the remaining data is used as the validation set. In order to more accurately evaluate the model performance, cross-validation techniques such as k-fold cross-validation can be used. Use the training set and the selected features to train the SVM model, which involves solving an optimization problem to find the optimal hyperplane or regression function. During the training process, the parameters of the SVM can be adjusted as needed to optimize the performance of the model. Use the validation set (or test set) to evaluate the performance of the trained SVM model. For classification problems, indicators such as accuracy, recall, and F1 score can be used; for regression problems, indicators such as mean square error and mean absolute error can be used; if the model performance is poor, you can try to adjust the parameters of the SVM, change the kernel function, or replace other models. In addition, techniques such as grid search can be used to automatically find the optimal parameter combination.
[0056] Step 154, receiving the final fused data and inputting it into the trained support vector machine to obtain the prediction result, specifically including: receiving the fused data from the monitoring system in real time, inputting the received fused data into the previously trained support vector machine model, and obtaining the prediction result of the key quality indicator through model calculation.
[0057] Step 155, based on the normal range of the key quality indicator and the prediction result, anomaly detection is performed on the final fused data to determine whether the final fused data deviates from the normal range of the key quality indicator, specifically including: The upper and lower limits of each indicator are read from the normal range data of the key quality indicators (such as temperature, humidity, and preparation time) set in step 151. The prediction results of the support vector machine model for the final fusion data are received from step 154. The prediction results should include the predicted values of the key quality indicators at the current time point or batch. The prediction results of each key quality indicator are compared with the normal range of the corresponding indicator. For each indicator, check whether the predicted value exceeds its normal range (i.e., whether it is lower than the lower limit or higher than the upper limit). If the predicted value of any indicator exceeds the normal range, the data point is marked as abnormal data.
[0058] Create an abnormal data record table or database to store the detected abnormal data. When abnormal data is detected, the following information is recorded in the abnormal data record: The timestamp or batch number of the anomaly, the specific indicator of the anomaly (such as temperature, humidity, etc.), the predicted value of the indicator, the normal range of the indicator (upper and lower limits), the possible cause of the anomaly (if known), and ensure that the anomaly data recording system has sufficient capacity and backup mechanisms to prevent data loss.
[0059] Once abnormal data is detected, relevant personnel can be notified in a timely manner through a preset notification mechanism (such as an alarm system, email, text message, etc.). After receiving the notification, the relevant personnel should quickly check the abnormal data records, analyze the causes of the abnormality, and take necessary corrective measures. Corrective measures may include adjusting process parameters, checking equipment status, replacing raw materials, etc., to ensure that the quality of Chinese herbal medicines meets the requirements.
[0060] Step 156, when abnormal data is identified, extract key features of the abnormal data, specifically including: Locate the latest detected abnormal data point from the abnormal data record, confirm the specific key quality indicators involved in the abnormal data (such as temperature, humidity, and preparation time); analyze the abnormal data and determine the type of abnormality. For example, if the temperature data exceeds the upper limit of the normal range, the abnormal type can be defined as "temperature is too high"; if the humidity data is lower than the lower limit of the normal range, it is defined as "humidity is too low", and the abnormal type is clearly recorded in the key feature extraction table of the abnormal data.
[0061] Calculate the degree to which the abnormal data deviates from the normal range. This can be done by calculating the difference between the abnormal value and the normal range boundary, and may be further converted to a percentage to express the degree of deviation; for example, if the normal temperature range is 20-25 degrees Celsius, and the actual temperature is 28 degrees Celsius, then the degree of abnormality can be 3 degrees Celsius exceeding the upper limit, or expressed as 12% exceeding the upper limit (3÷25×100%), and the degree of abnormality is recorded in the key feature extraction table. Check the abnormal data records to determine the duration of the abnormal state. This involves analyzing the data of consecutive time points or batches to determine when the abnormality starts and when it ends. If the abnormality is still ongoing, it is necessary to continue to track and record the duration until the abnormal state ends. Record the abnormal start time, end time and total duration in the key feature extraction table; summarize the extracted key features such as abnormality type, abnormality degree and abnormality duration, and continuously update the key feature extraction table as new abnormal data appears for subsequent early warning and processing.
[0062] Step 157, based on the key features of the abnormal data, an abnormal warning is issued; the key features include the abnormal type, abnormal degree and duration, specifically including: Based on the key features of abnormal data (anomaly type, degree of abnormality, and duration), clearly set the specific conditions for triggering warnings. For example, you can set a warning to be triggered when the temperature abnormality exceeds the preset threshold (such as exceeding the normal range by more than 5%) and lasts for more than 5 minutes. Different warning conditions and thresholds may need to be set for different types of abnormalities (such as high temperature, low humidity, etc.).
[0063] The early warning system continuously monitors the key features extracted from abnormal data records. Once the system detects abnormal data that meets the early warning conditions, the early warning mechanism is immediately triggered. When the early warning is triggered, the system automatically records the early warning time, key features of the abnormal data, and triggering conditions for subsequent analysis. When the early warning is triggered, the system sends early warning information to relevant personnel through preset notification methods (such as sound, light, text message, email, etc.). The early warning information should include a clear description of the abnormality (type of abnormality, degree of abnormality and duration), as well as recommended countermeasures or emergency handling guidelines. Ensure that the communication of early warning information is timely, accurate and reliable so that relevant personnel can respond and handle abnormal situations quickly.
[0064] In an embodiment of the present invention, by real-time monitoring of key quality indicators such as temperature, humidity and processing time, deviations in the production process can be discovered and corrected in a timely manner, thereby ensuring that the quality of Chinese herbal medicine slices meets process requirements and industry standards. This helps to improve the overall quality and stability of the product. The introduction of an early warning system can greatly reduce production accidents caused by operating errors or equipment failures. Once an abnormal data pattern is detected, the system can respond quickly and remind the operator to take timely measures to prevent the problem from expanding. Through automated anomaly detection and early warning, the cost and time of manual monitoring can be reduced, allowing operators to focus more on other important production tasks. In addition, timely problem discovery and resolution can also avoid delays and waste in the production process.
[0065] In a preferred embodiment of the present invention, the above step 16, using an ant colony optimization algorithm to optimize the parameters of the neural network model for quality prediction; by simulating the foraging behavior and pheromone update mechanism of ants, searching for a final solution in the parameter space to obtain optimized parameters; using the optimized parameters to retrain the neural network model to obtain a trained neural network model, includes: Step 161, determining the parameters of the neural network model to be optimized, the parameters including weights and biases; setting corresponding search ranges and initial values for the parameters of the neural network model; determining the number of ants, i.e., the number of solutions, specifically including: Determine which layers in the neural network model need to optimize their weights and biases. This includes all connection parameters from the input layer to the hidden layer, from the hidden layer to the hidden layer, and from the hidden layer to the output layer. Set a reasonable search range for each weight and bias parameter, for example, the weight can be between [-1, 1] or [-0.5, 0.5], and the bias can be between [-0.1, 0.1], depending on the complexity of the problem and the network structure. Set the initial value of the parameter, which can be a random value within the search range, or a specific value based on some prior knowledge. Determine the number of ants (i.e., solutions) based on the scale of the problem and the availability of computing resources.
[0066] Step 162, randomly generating the initial position of each ant in the parameter space, that is, the initial solution of the neural network parameters, specifically includes: randomly generating a set of initial values of the neural network parameters for each ant within the search range set in step 161. These initial values constitute the initial position of the ant in the parameter space; Step 163, for each ant, use the parameter value of its current position to configure the neural network model, define a fitness function for evaluating the performance of the neural network model, and calculate the corresponding fitness value, specifically including: Extract the parameter values of the ant's current position, which include the weights and biases of the neural network. Use these parameter values to configure the neural network model, that is, update the corresponding weights and biases in the network; prepare an independent validation set, which contains the input data and the corresponding true labels; pass the input data of the validation set to the configured neural network model, perform forward propagation calculations, obtain the model's predicted output, compare the model's predicted output with the true label of the validation set, and calculate the model's accuracy; define a fitness function to quantitatively evaluate the performance of the neural network model. The fitness function should be designed so that the better the model performance, the higher the fitness value, for example: fitness function = model accuracy. The calculation formula for the model's accuracy is: ; in, represents the weighted accuracy; Indicates the number of categories; Indicates category The weight of Indicates category The number of correctly classified samples in ; Indicates category The total number of samples in .
[0067] Step 164, based on the fitness value of each ant, updates the pheromone concentration on its path, specifically including: based on the fitness value of each ant, updates the pheromone concentration on its path. Specifically, ants with high fitness values will leave more pheromones on their paths to attract other ants to search the area. The update of pheromones usually follows certain rules, such as volatilization and enhancement mechanisms, to ensure the diversity and convergence of the search. As fitness value To calculate the pheromone update, the pheromone update process can be defined as: ; in, Indicates the pheromone concentration of the current path (i, j) at the tth iteration; Pheromone volatile factor ∈[0, 1], controls the volatilization rate of pheromone over time; is a constant used to adjust the strength of the pheromone; is the updated pheromone concentration; t represents the number of iterations.
[0068] Step 165, each ant selects the next position, i.e., the new parameter value, according to the pheromone concentration and heuristic information around the current position, and repeatedly calculates the fitness and ant movement until a preset number of iterations is reached to obtain the optimized parameters corresponding to the final ant, and the optimized parameters are used as the final solution; the neural network model is reconfigured using the optimized parameters to obtain the trained neural network model, specifically including: each ant selects the next position, i.e., the new parameter value, according to the pheromone concentration and heuristic information (such as the trend of parameter changes or prior knowledge) around the current position. This process simulates the movement behavior of ants during foraging. After the ants move to a new location, the neural network model is reconfigured and its performance is evaluated to obtain a new fitness value. The pheromone concentration is updated according to the new fitness value, and the ants' movement selection is repeated again. The above process is repeated until the preset number of iterations is reached or other stopping conditions are met (such as no significant performance improvement after multiple consecutive iterations). After the iteration, the parameters corresponding to the ant with the highest fitness value (or the best performance) are selected as the final solution after optimization. The neural network model is reconfigured using the optimized parameters to obtain a trained neural network model, which should perform better on the validation set.
[0069] According to the fitness value of each ant on the path , local pheromones can be updated. Paths with higher fitness values will get more pheromones, thus attracting more ants to move toward the path. The movement strategy of ants is based on the pheromone concentration of the current path and heuristic information (such as the fitness of the current path). Each ant will choose the strategy for the next position (i, j) during the search process, which depends on the following probability formula: ; in, Indicates that ants select slave nodes To Node The probability of represents the pheromone concentration on path (i, j); Represents the heuristic information of path (i, j); and Control the influence index of pheromone and heuristic information on ant selection respectively, usually and The value range of is [0, 1], where the heuristic information is related to the inverse distance of the path, i.e. ,in, is the actual distance from node i to node j.
[0070] In the embodiment of the present invention, the ant colony optimization algorithm has a powerful global search capability and can effectively find parameter configurations close to the global optimum in a complex parameter space. This helps to overcome the local optimum problem that may be encountered in neural network training and improve the generalization performance of the model. By simulating the pheromone update mechanism of ants, the algorithm can adaptively adjust the search path and focus on those parameter areas with better performance. This adaptive learning ability makes the optimization process more efficient and can quickly converge to a high-quality solution. Each ant in the ant colony optimization algorithm searches independently in the parameter space. This parallelism enables the algorithm to make full use of computing resources and speed up the optimization speed. At the same time, the collaboration of multiple ants also increases the diversity of the search, which helps to discover more potential high-quality parameter configurations. Since the ant colony optimization algorithm does not rely on the specific mathematical properties of the problem, such as continuity, differentiability, etc., it has strong applicability to different types of neural network models. In addition, the algorithm is insensitive to the selection of initial parameters and can stably find high-quality solutions under different initial conditions, which enhances the robustness of the model. The parameters of the neural network model optimized by the ant colony optimization algorithm can significantly improve the performance of the model on the validation set. This means that the optimized model may have higher prediction accuracy and stronger generalization ability in practical applications, thus better meeting actual needs.
[0071] In a preferred embodiment of the present invention, predicting the quality trend of Chinese herbal medicine slices according to the trained neural network model may include: Organize the processed Chinese herbal medicine slice data according to the input format requirements of the neural network model. The input data can be in batches or in single samples, depending on actual needs; load the neural network model that has been retrained after the ant colony optimization algorithm optimizes the parameters to ensure that the model is in the best state, that is, use the model weights and configurations that perform best on the validation set. Input the prepared Chinese herbal medicine slice data into the loaded neural network model, run the forward propagation calculation of the model, and obtain the prediction results of the model output. The prediction results can be a specific quality score and classification label (such as qualified or unqualified).
[0072] like Figure 2 As shown, an embodiment of the present invention also provides an online management system for quality data in the process of preparing Chinese herbal medicine pieces, comprising: The acquisition module is used to collect and record various key quality data in the preparation process of Chinese herbal medicine pieces in real time; A preprocessing module is used to clean and preprocess key quality data to obtain preprocessed quality data; The extraction module is used to extract key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of processing temperature, the statistics of the weight of raw medicinal materials, and the change rate of the weight of medicinal materials; The computing module is used to use the weighted average algorithm to initially fuse the preprocessed quality data in the initial data fusion stage to obtain preliminary fused data; optimize the weight distribution in the weighted average algorithm by the artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; define a fitness function for evaluating the data fusion effect under various weight combinations; simulate the foraging and searching behavior of bees, and iterate continuously to find the optimized weight combination; use the optimized weight combination for fusion to obtain the final fused data; The analysis module is used to use the final fusion data to monitor the key quality indicators in the preparation process of Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, the preset warning is automatically triggered according to the key features in the abnormal data; The optimization module is used to optimize the parameters of the neural network model used for quality prediction using the ant colony optimization algorithm; by simulating the foraging behavior and pheromone update mechanism of ants, the final solution is searched in the parameter space to obtain the optimized parameters; the neural network model is retrained using the optimized parameters to obtain the trained neural network model; and the quality trend of Chinese herbal medicine slices is predicted based on the trained neural network model.
[0073] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0074] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0075] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0076] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for online management of quality data during the preparation of Chinese herbal medicine pieces, characterized in that: The method comprises: Step 11, collecting and recording various key quality data in the process of preparing Chinese herbal medicine slices in real time; Step 12, cleaning and preprocessing the key quality data to obtain preprocessed quality data; Step 13, extracting key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of the processing temperature, the statistics of the weight of the raw medicinal materials, and the change rate of the medicinal material weight; Step 14, in the initial data fusion stage, the pre-processed quality data is initially fused using a weighted average algorithm to obtain preliminary fused data; the weight distribution in the weighted average algorithm is optimized using an artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; a fitness function is defined for evaluating the data fusion effect under various weight combinations; by simulating the foraging and searching behavior of bees, it is continuously iterated to find the optimized weight combination; the optimized weight combination is used for fusion to obtain the final fused data; Step 15, using the final fusion data to monitor the key quality indicators in the process of preparing Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, a preset warning is automatically triggered according to the key features in the abnormal data; Step 16, using the ant colony optimization algorithm to optimize the parameters of the neural network model used for quality prediction; by simulating the foraging behavior and pheromone update mechanism of ants, searching for the final solution in the parameter space to obtain the optimized parameters; retraining the neural network model using the optimized parameters to obtain the trained neural network model; predicting the quality trend of Chinese herbal medicine slices based on the trained neural network model.
2. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 1, characterized in that: Key quality data include the properties, weight, processing time, processing temperature, processing humidity, amount of auxiliary materials, and the operating status and fault conditions of the processing equipment.
3. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 2, characterized in that: The calculation formula for the preliminary fusion data is: ; in, Indicates The data source is in The data value at a time point; Indicates The data source is in The true value corresponding to each time point; Represents the maximum value of the true value; Indicates The data source is in The number of missing values at each time point; Indicates The data source is in The total number of data values at each time point; Indicates The data source is in The data timestamp of a time point; Indicates the current time point; represents the time decay rate; represents the time-dependent decay rate; The weight coefficient indicating the accuracy of the data; The weight coefficient representing the data integrity; The weight coefficient indicating the timeliness of data; Indicates The weight coefficient of each data source; Indicates the total number of data sources; Indicates the total number of time points; and Represents the index value; represents the base of natural logarithms; Represents the value of the preliminary fused data.
4. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 3, characterized in that: The weight distribution in the weighted average algorithm is optimized by the artificial bee colony algorithm. In the artificial bee colony algorithm, each bee is regarded as a weight combination scheme. A fitness function is defined to evaluate the data fusion effect under various weight combinations. By simulating the foraging and searching behavior of bees, we continuously iterate to find the optimized weight combination, including: is the weight coefficient , and Set the corresponding value range; Set the size of the bee colony, that is, the total number of weighted combination solutions, each bee represents a group , and The value of Define the fitness function used to evaluate the data fusion effect under each weight combination; Each employed bee, i.e. the current weight combination scheme, searches for a new weight combination in its neighborhood, calculates the fitness value of the new weight combination, and compares the fitness value of the new weight combination with the fitness value of the current weight combination to update the current weight combination to the new combination; The observer bee selects the corresponding weight combination for search based on the fitness information provided by the employed bee. After selection, the observer bee will perform the search and selection process related to the employed bee. If one of the weight combinations fails to improve in multiple consecutive iterations, the scout bee will be sent to perform a random search to explore the remaining areas in the space. The scout bee will randomly generate a new weight combination and calculate its fitness value. The search process of employed bees, observer bees and scout bees is repeated until the termination condition is met. After the iteration, the corresponding weight combination is output as the optimized weight combination.
5. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 4, characterized in that: The calculation formula of the fitness function is: ; in, is the value of the fitness function; Represents the total number of preliminary fusion data; Indicates The value of the initial fusion data; Indicates The true value of the preliminary fusion data; Indicates The error value of the preliminary fusion data; Represents the maximum possible value of the error in all preliminary fused data; represents the adjustment parameter; Represents the base of natural logarithms.
6. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 5, characterized in that: The final fusion data is used to monitor the key quality indicators in the preparation process of Chinese herbal medicines in real time; When an abnormal data pattern is detected, preset warnings are automatically triggered based on the key features in the abnormal data, including: According to the process requirements and industry standards for the preparation of Chinese herbal medicines, set the normal range of key quality indicators, including temperature fluctuation range, humidity control range and preparation time; Collect and pre-process historical fusion data to obtain pre-processed historical fusion data; Using the preprocessed historical fusion data to train a support vector machine to obtain a trained support vector machine; Receive the final fused data and input it into the trained support vector machine to obtain the prediction result; According to the normal range of key quality indicators and the prediction results, the final fused data is tested for anomalies to determine whether the final fused data deviates from the normal range of key quality indicators; When abnormal data is identified, key features of the abnormal data are extracted; Based on the key features of abnormal data, abnormal warning is issued.
7. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 6, characterized in that: Key characteristics include the type of anomaly, the degree of anomaly, and the duration.
8. The method for online management of quality data in the process of preparing Chinese herbal medicine slices according to claim 7, characterized in that: The parameters of the neural network model used for quality prediction are optimized using the ant colony optimization algorithm. The final solution is searched in the parameter space by simulating the foraging behavior and pheromone update mechanism of ants to obtain the optimized parameters. Retrain the neural network model using the optimized parameters to obtain a trained neural network model, including: Determine the parameters of the neural network model to be optimized, including weights and biases; set the corresponding search range and initial values for the parameters of the neural network model; determine the number of ants, that is, the number of solutions; Randomly generate the initial position of each ant in the parameter space, which is the initial solution of the neural network parameters; For each ant, use the parameter values of its current position to configure the neural network model, define a fitness function for evaluating the performance of the neural network model, and calculate the corresponding fitness value; According to the fitness value of each ant, the pheromone concentration on its path is updated; Each ant selects the next position, i.e., the new parameter value, based on the pheromone concentration and heuristic information around the current position, and repeatedly calculates the fitness and ant movement until the preset number of iterations is reached to obtain the optimized parameters corresponding to the final ant, and the optimized parameters are used as the final solution; The neural network model is reconfigured using the optimized parameters to obtain a trained neural network model.
9. An online management system for quality data in the process of preparing Chinese herbal medicine slices, characterized in that: Applied to the method according to any one of claims 1 to 8, comprising: The acquisition module is used to collect and record various key quality data in the preparation process of Chinese herbal medicine pieces in real time; A preprocessing module is used to clean and preprocess key quality data to obtain preprocessed quality data; The extraction module is used to extract key features related to the quality of Chinese herbal medicine pieces from the pre-processed quality data, including the data range of processing temperature, the statistics of the weight of raw medicinal materials, and the change rate of the weight of medicinal materials; The computing module is used to use the weighted average algorithm to initially fuse the preprocessed quality data in the initial data fusion stage to obtain preliminary fused data; optimize the weight distribution in the weighted average algorithm by the artificial bee colony algorithm; in the artificial bee colony algorithm, each bee is regarded as a weight combination scheme; define a fitness function for evaluating the data fusion effect under various weight combinations; simulate the foraging and searching behavior of bees, and iterate continuously to find the optimized weight combination; use the optimized weight combination for fusion to obtain the final fused data; The analysis module is used to use the final fusion data to monitor the key quality indicators in the preparation process of Chinese herbal medicine slices in real time; when an abnormal data pattern is detected, the preset warning is automatically triggered according to the key features in the abnormal data; The optimization module is used to optimize the parameters of the neural network model used for quality prediction using the ant colony optimization algorithm; by simulating the foraging behavior and pheromone update mechanism of ants, the final solution is searched in the parameter space to obtain the optimized parameters; the neural network model is retrained using the optimized parameters to obtain the trained neural network model; and the quality trend of Chinese herbal medicine slices is predicted based on the trained neural network model.
10. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-dimensional dynamic quality monitoring system and method of traditional Chinese medicine decoction piece production
CN108346058A
Traditional Chinese medicine formula granule preparation quality supervision system based on artificial intelligence
CN116151691A
Pharmaceutical product manufacturing execution system and method
CN117787678A
Method for controlling production quality of pharmaceutical preparation
CN117893088A
Traditional Chinese medicinal material data acquisition and real-time monitoring system and method thereof
CN118133187A
Cited By
Full-automatic integrated traditional Chinese medicine detection method and equipment
CN119757775A
Intelligent production management system based on interface agent performance test data
CN120198022A
Large model feature classification algorithm and system for anomaly detection in traditional Chinese medicine processing process
CN122087668A
Large model feature classification algorithm and system for abnormal detection in traditional chinese medicine processing
CN122087668B