A Neural Network-Based Method and System for Quality Traceability in Compound Production

By calculating purity differences, predicted time differences, and historical traceability effect values, and combining machine learning models to evaluate the reliability of compound production quality traceability, the problem of insufficient model evaluation in existing technologies is solved, and the accuracy and reliability of compound production quality traceability are achieved.

CN120509601BActive Publication Date: 2025-11-14SHANGHAI HEJIAN NUTRITION FOOD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510672257.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-11-14
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

Existing neural network-based methods for tracing the quality of compound production lack assessment of model reliability, resulting in insufficient accuracy in traceability analysis.

Method used

By calculating purity difference values, predicted time difference values, and historical traceability effect values, a comprehensive feature vector is constructed. The traceability of the model is evaluated using a machine learning model, and an alert is issued or manual traceability is performed when necessary to ensure the reliability of quality traceability.

Benefits of technology

This improves the reliability of traceability of compound production quality, reduces traceability analysis errors caused by model dependence, and ensures the accuracy and reliability of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509601B_ABST
    Figure CN120509601B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for traceability of compound production quality based on neural networks, relating to the field of production traceability technology. The method designates a batch of compounds currently produced as the target compound. By measuring the actual purity of each compound within the target compound and inputting various production process parameters into a preset purity model, the purity of the target compound is predicted. The purity difference value is calculated based on the actual purity and the predicted purity, while simultaneously acquiring the model's prediction time difference value and historical traceability effect value. These indicators are used to calculate the model's traceability value, and production process parameters are traced based on this traceability value. In this way, when conducting production quality traceability based on neural networks, the reliability of the model can be evaluated, ensuring that traceability analysis is only performed when the traceability value meets the conditions, reducing the uncertainty of traceability analysis and ensuring the accuracy of the analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of production traceability, and particularly to a method and system for tracing the production quality of compounds based on a neural network. Background Art

[0002] With the increasing complexity of industrial production, especially in industries such as chemical engineering and pharmaceuticals, the stability and traceability of product quality are particularly important. The method for tracing the production quality of compounds based on a neural network uses artificial intelligence technology to model and analyze various types of data in the production process, and can achieve real-time prediction and traceability of compound quality. By training a neural network model, inputting information such as raw material data, equipment status, and production environment, the final quality of the compound, such as purity and stability, can be predicted. When a quality problem occurs during the production process, the model can trace back to the possible problem-causing links, helping enterprises quickly identify and solve the quality bottlenecks in production, and ensuring that the products meet the quality standards.

[0003] However, existing traceability methods based on neural networks often directly rely on the model to trace the production quality, lacking an assessment of the model's ability to trace production quality; this method may lead to unreliable results in tracing the production quality of compounds based on the model in some cases, thus affecting the accuracy of traceability analysis. Summary of the Invention

[0004] The object of the present invention is to solve the above-mentioned problems, and provide a method and system for tracing the production quality of compounds based on a neural network.

[0005] In the first aspect of the implementation of the present invention, a method for tracing the production quality of compounds based on a neural network is first proposed. The method includes:

[0006] Record a batch of compounds completed in the current production as target compounds, and measure the purity of each compound in the target compounds, denoted as the actual purity.

[0007] Input various types of production process parameters during the production of each target compound into a preset purity model to predict the purity of each compound in the target compound.

[0008] Calculate the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluate the difference degree between the predicted result and the actual result of the preset purity model.

[0009] Obtain the actual prediction duration of the preset purity model and calculate the prediction time difference value to evaluate the deviation degree of the predicted reaction time of the preset purity model.

[0010] Obtain historical traceability data on compound quality from the preset purity model, calculate the historical traceability effect value based on the historical traceability data, and evaluate the historical traceability effect of the preset purity model.

[0011] The traceability value of the preset purity model is calculated based on the purity difference value, the predicted time difference value, and the historical traceability effect value. The production process parameters of the target compound are then traced based on the traceability value.

[0012] Optionally, the step of calculating the purity difference value based on the predicted purity of each compound in the target compound and the actual purity is as follows:

[0013] The absolute difference between the predicted purity and the actual purity of each compound in the target compound is calculated and used as the purity difference value to obtain the purity difference value sequence.

[0014] Outliers in the purity difference sequence are identified by the 3-sigma method, and the purity difference value is obtained by dividing the total number of outliers by the total number of purity difference sequences.

[0015] Optionally, the steps for obtaining the actual prediction duration of the preset purity model and calculating the prediction time difference value are as follows:

[0016] Obtain the actual time series and standard time series of each compound in the target compound as predicted by a preset purity model;

[0017] Construct a two-dimensional matrix to store each pair of elements, i.e., the length of the longest common subsequence between actual time and standard time;

[0018] The matrix is ​​filled step by step according to the recursive formula. If the actual time and the standard time are equal, the length of the common subsequence is increased; otherwise, the maximum value from the previous step is taken.

[0019] The final length of the longest common subsequence can be obtained from the matrix, that is, the value of the bottom right corner of the matrix is ​​the length of the longest common subsequence;

[0020] The matching degree is obtained by dividing the length of the longest common subsequence by the minimum of the lengths of the actual time series and the standard time series.

[0021] Calculate the sum of the absolute differences between all actual and standard times in the actual and standard time series, and calculate the time difference difference value. The calculation steps are: Time difference difference value = (1 - matching degree) * sum of absolute differences.

[0022] Optionally, the steps for obtaining historical traceability data on compound quality from a preset purity model and calculating the historical traceability effect value based on the historical traceability data are as follows:

[0023] Obtain several historical source tracing cases of the purity prediction model, and obtain the effect score of each historical source tracing case, wherein the effect score includes source tracing success rate and source tracing accuracy;

[0024] The steps for calculating the traceability success rate are as follows: if the traceability of historical cases determines that the corresponding production process parameters are incorrect, the traceability success rate is 1; otherwise, the traceability success rate is 0.

[0025] The calculation steps for the traceability accuracy are as follows: if, after tracing the historical traceability cases, the corresponding production process parameters are determined, and the purity of the compound produced after adjusting the corresponding production process parameters is not less than the preset minimum purity, then the traceability accuracy is 1; otherwise, the traceability accuracy is 0.

[0026] The success rate and accuracy rate of source tracing are added together to obtain the historical source tracing effect value.

[0027] Optionally, the steps for calculating the traceability value of the preset purity model based on the purity difference value, the predicted time difference value, and the historical traceability effect value are as follows:

[0028] The purity difference value, prediction time difference value, and historical traceability effect value are converted into a comprehensive feature vector. The comprehensive feature vector is used as the input of the machine learning model. The machine learning model uses the prediction of each traceable value label for each set of comprehensive feature vectors as the prediction objective and minimizes the sum of prediction errors for all traceable value labels as the training objective. The machine learning model is trained until the sum of prediction errors converges, at which point the model training stops. The traceable value is determined based on the model output. The machine learning model is a multinomial regression model.

[0029] Optionally, the steps for tracing the production process parameters of the target compound based on traceability values ​​are as follows:

[0030] The traceability value of the preset purity model is compared with the preset traceability threshold. If the traceability value is not less than the preset traceability threshold, the production quality of the target compound can be traced according to the preset purity model.

[0031] If the traceability value is not less than the preset traceability threshold, the production quality traceability of the target compound cannot be performed according to the preset purity model. At this time, an alarm will be issued to remind staff to perform manual traceability.

[0032] Optionally, if the traceability value is not less than a preset traceability value threshold, the steps for tracing the production quality of the target compound based on a preset purity model are as follows:

[0033] The actual purity of each compound in the target compound is compared with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, then traceability of the compound production quality through the preset purity model is not required. If the actual purity of any compound is less than the preset minimum standard purity, then traceability of the compound production quality through the preset purity model is required. Specifically:

[0034] Starting from the output layer of the purity prediction model, the gradient value is calculated layer by layer using the backpropagation algorithm to reflect the contribution of each production process parameter to the output error;

[0035] Analyze the gradient values ​​to identify the production process parameters that have a significant impact on purity prediction;

[0036] Based on the backpropagation results, a backtracking report is generated, listing the contribution of each production process parameter to the quality problem and judging the degree of its impact;

[0037] Determine the traceability path, generate a traceability map, and provide suggestions for improving production process parameters to complete the traceability process.

[0038] In a second aspect of this invention, a compound production quality traceability system based on a neural network is proposed, the system comprising:

[0039] Purity Measurement Module: The currently produced batch of compounds is designated as the target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity.

[0040] Purity Prediction Module: Input the various production process parameters of each target compound into the preset purity model to predict the purity of each compound in the target compound;

[0041] Purity Difference Module: Calculates the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluates the degree of difference between the predicted results and the actual results of the preset purity model;

[0042] Prediction Time Difference Module: Obtains the actual predicted duration of the preset purity model, calculates the prediction time difference value, and evaluates the degree of deviation of the preset purity model in predicting the reaction time.

[0043] Historical traceability effect module: Obtain historical traceability data on compound quality from the preset purity model, calculate the historical traceability effect value based on the historical traceability data, and evaluate the historical traceability effect of the preset purity model;

[0044] Traceability module: Calculates the traceability value of the preset purity model based on the purity difference value, the predicted time difference value, and the historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value.

[0045] The beneficial effects of this invention are:

[0046] This invention proposes a method and system for tracing the production quality of compounds based on neural networks. The method involves designating a batch of compounds currently produced as the target compound and measuring the purity of each compound within the target compound, recording this as the actual purity. Various production process parameters are input into a preset purity model to predict the purity of each compound within the target compound. The purity difference is calculated based on the predicted purity and the actual purity. The prediction time difference is calculated based on the actual prediction duration of the preset purity model. Historical traceability data regarding compound quality from the preset purity model is obtained to calculate the historical traceability effect value. The traceability value of the preset purity model is calculated based on the purity difference value, the prediction time difference value, and the historical traceability effect value. The production process parameters of the target compound are then traced based on this traceability value. This approach allows for the evaluation of the model's suitability for compound production quality traceability during the traceability process, ensuring the reliability of the results and minimizing the impact on the accuracy of traceability analysis. Attached Figure Description

[0047] The invention will now be further described with reference to the accompanying drawings.

[0048] Figure 1 This is a flowchart of a compound production quality traceability method based on neural networks;

[0049] Figure 2 This is a framework diagram of a compound production quality traceability system based on neural networks. Detailed Implementation

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

[0051] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.

[0052] This invention provides a method for tracing the quality of compound production based on neural networks. See also... Figure 1 , Figure 1 A flowchart illustrating a neural network-based method for tracing the quality of compound production, provided in an embodiment of the present invention. The method includes the following steps:

[0053] The batch of compounds that has been produced is designated as the target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity.

[0054] Input the various production process parameters of each target compound into the preset purity model to predict the purity of each compound in the target compound;

[0055] The purity difference value is calculated based on the purity of each compound in the predicted target compound and the actual purity, and the degree of difference between the predicted results and the actual results of the preset purity model is evaluated.

[0056] Obtain the actual predicted duration of the preset purity model, calculate the difference in predicted time, and evaluate the degree of deviation in the predicted reaction time of the preset purity model.

[0057] Obtain historical traceability data on compound quality from the preset purity model, calculate the historical traceability effect value based on the historical traceability data, and evaluate the historical traceability effect of the preset purity model.

[0058] The traceability value of the preset purity model is calculated based on the purity difference value, the predicted time difference value, and the historical traceability effect value. The production process parameters of the target compound are then traced based on the traceability value.

[0059] Based on the neural network-based compound production quality traceability method provided in this invention, when tracing the quality of compound production using the neural network-based traceability method, the reliability of the model used for compound production quality traceability can be assessed, ensuring the reliability of the results of model-based compound production quality traceability and reducing the impact on the accuracy of traceability analysis.

[0060] In one embodiment, a batch of compounds that has been produced is designated as the target compound, and the purity of each compound in the target compound is measured and designated as the actual purity.

[0061] Specifically, for a batch of compounds that have been produced currently, they are first analyzed as target compounds, and a series of analytical methods are adopted to measure the purity of each compound in the target compounds. Commonly used analytical methods include high-performance liquid chromatography (HPLC), gas chromatography (GC), mass spectrometry (MS), nuclear magnetic resonance (NMR), ultraviolet-visible spectroscopy (UV-Vis), infrared spectroscopy (IR), etc. According to the properties of the target compounds, such as volatility, polarity, molecular size, etc., the most suitable measurement method is selected. For example, HPLC can be used to separate and quantitatively determine compounds, so as to accurately calculate the purity; mass spectrometry can analyze the mass-to-charge ratio of compounds to help identify their molecular structure and purity; NMR can provide the structural information of compounds, thereby inferring the purity. In addition, the absorbance or absorption characteristics of the sample can be measured using ultraviolet spectroscopy or infrared spectroscopy to indirectly estimate the purity. During the measurement process, all data will be compared with the purity data of the standard compound to calculate the actual purity of the target compound. If the purity meets the predetermined standard, then the target compound is considered qualified; if there is a large deviation, further analysis may be required to find potential problems in the production process and conduct quality traceability. Therefore, the measurement of the actual purity is achieved through the precise testing of these analytical instruments and the comparison with the standard, providing key data support for subsequent traceability analysis.

[0062] In one embodiment, the purity difference value is calculated based on the predicted purity and the actual purity of each compound in the target compound, and the difference degree between the predicted result and the actual result of the preset purity model is evaluated;

[0063] Specifically, the steps for calculating the purity difference value based on the predicted purity and the actual purity of each compound in the target compound are as follows:

[0064] Calculate the absolute difference between the predicted purity and the actual purity of each compound in the target compound as the purity difference, and obtain a purity difference sequence;

[0065] Identify the outliers in the purity difference sequence by the 3-sigma method, and divide the total number of outliers by the total number of the purity difference sequence to obtain the purity difference value.

[0066] It's important to note that the purity difference value is calculated by comparing the predicted purity of each compound in the target compound with its actual purity. This quantitatively assesses the degree of deviation between the predicted and actual results of the pre-set purity model. Specifically, a larger purity difference value indicates a more significant deviation between the prediction model and reality, and lower model accuracy. This means that a large purity difference value suggests a potentially large error in the model's predictions, making the results of production quality traceability based on the model unreliable. For example, a large difference between the model's predicted and actual purity indicates that the model cannot accurately capture the key factors affecting purity during compound production, potentially leading to misjudgments of the production process. In such cases, the results of compound production quality traceability based on the model may be biased and fail to accurately reflect the actual situation during production. Furthermore, neural network models may not be able to fully adapt to all changes in predicting complex factors, especially when facing anomalies not fully reflected in the training data, making the model's predictions less accurate. At this point, to ensure the accuracy of traceability analysis, manual traceability should be conducted. Human intervention can supplement the shortcomings of model predictions, allowing for in-depth traceability analysis of anomalies or problems in the production process based on more comprehensive background knowledge and professional judgment. This avoids erroneous quality assessments or decisions caused by relying on model predictions. Therefore, an increase in purity variation directly affects the reliability of traceability methods, indicating the need for human intervention to ensure the accuracy of quality traceability.

[0067] One approach to using the 3-sigma method to identify outliers in purity difference sequences is that this method effectively identifies extreme values ​​that significantly deviate from the normal data distribution, thus helping to ensure the accuracy of purity difference values. The 3-sigma method is based on the statistical principle of normal distribution, assuming that most data points are distributed within three standard deviations of the mean; data outside this range are considered outliers. This method is simple, efficient, and reliable, automatically identifying abnormal fluctuations in data and avoiding the influence of human interference or errors on the results. In the process of quality traceability in compound production, outliers may indicate some sudden problems or data deviations. Identifying these outliers using the 3-sigma method helps to clearly eliminate results that do not meet expectations, thereby more accurately evaluating the predictive performance of the model. This not only improves the reliability of data analysis but also provides a clear direction for subsequent quality improvements, especially in the case of some atypical problems that may exist in the production process, providing targeted solutions.

[0068] In one embodiment, the actual predicted duration of the preset purity model is obtained, the predicted time difference value is calculated, and the degree of deviation of the preset purity model in predicting the reaction time is evaluated.

[0069] Specifically, the steps for obtaining the actual prediction duration of the preset purity model and calculating the prediction time difference value are as follows:

[0070] Obtain the actual time series and standard time series of each compound in the target compound as predicted by a preset purity model;

[0071] Construct a two-dimensional matrix to store each pair of elements, i.e., the length of the longest common subsequence between actual time and standard time;

[0072] The matrix is ​​filled step by step according to the recursive formula. If the actual time and the standard time are equal, the length of the common subsequence is increased; otherwise, the maximum value from the previous step is taken.

[0073] The final length of the longest common subsequence can be obtained from the matrix, that is, the value of the bottom right corner of the matrix is ​​the length of the longest common subsequence;

[0074] The matching degree is obtained by dividing the length of the longest common subsequence by the minimum of the lengths of the actual time series and the standard time series.

[0075] Calculate the sum of the absolute differences between all actual and standard times in the actual and standard time series, and calculate the time difference difference value. The calculation steps are: Time difference difference value = (1 - matching degree) * sum of absolute differences.

[0076] It should be noted that the predicted time difference value is an indicator used to quantify the deviation between the actual time predicted by the pre-defined purity model and the standard time. Specifically, it measures the difference between the reaction time of the target compound predicted by the pre-defined purity model in the actual production process and the standard reaction time. The calculation steps include first assessing the matching degree of the time series using the longest common subsequence (LCS) method, and then calculating the time difference value by combining the absolute difference between the actual time and the standard time. If the predicted time difference value is large, it means that the model has a large error in predicting the reaction time in the production process. This error may lead to inaccurate production quality traceability based on the model, thus affecting the reliability of traceability analysis.

[0077] For example, if the standard reaction time of a compound should be 30 minutes and the model predicts 50 minutes, the predicted time difference value is relatively large, indicating a significant deviation in the model's predicted time. In this case, if relying solely on this model for production quality traceability, the quality status of a certain production batch may be misjudged. For example, due to the prediction deviation of the reaction time, a certain batch of the compound may be misidentified as qualified or unqualified, thus affecting the final quality assessment and decision-making. Since such a deviation may lead to incorrect judgments, in some cases, manual intervention for manual traceability becomes crucial. Especially when the model error is large, manual traceability can effectively compensate for the deficiencies in the model prediction and ensure the accuracy of the traceability results. Such manual intervention can help confirm and adjust the results of the model prediction, thereby enhancing the reliability and accuracy of the production quality traceability analysis.

[0078] In one implementation, calculating the predicted time difference value through the Longest Common Subsequence (LCS) algorithm has great advantages, especially when evaluating the accuracy of the predicted reaction time of a preset purity model. First, the LCS method can capture the similarity between the actual time series and the standard time series. By comparing the common parts of the two, LCS can not only evaluate the matching degree between them but also identify the potential differences between them. This method can effectively handle the changes in the time series. Especially when there is a certain degree of deviation or dislocation between the predicted time and the standard time, LCS can preferably provide an objective measurement standard. Second, the calculated "matching degree" enables the quantification of the similarity between the two, avoiding the errors that may be brought by simple direct difference calculations. For example, directly comparing each pair of time points may cause short-term errors to be amplified, especially in cases where there are large jumps between some time points. However, LCS can reduce the impact of these abnormal fluctuations by dynamically and gradually establishing the best match, and more objectively evaluate the degree of difference between the predicted value and the actual value. At the same time, by combining the calculation of the "sum of absolute differences", the overall error of the time series can be further captured, ensuring the comprehensiveness and accuracy of the evaluation.

[0079] The advantage of this method is that it doesn't just focus on errors at a single point in time, but considers the overall structure of the entire time series, resulting in a more comprehensive and stable assessment of the accuracy of time predictions. For example, assuming a reaction process has a long time span and a misalignment between the predicted and standard times, LCS can identify these misalignments and calculate an overall fit. For the accuracy of time predictions in real-world production environments, especially when reaction times are not perfectly aligned, LCS provides a more robust error calculation method. This robustness avoids the excessive influence of a single error value on decision-making, ensuring a more fair and reliable evaluation of model predictions and providing a more solid quantitative basis for potential subsequent manual attribution.

[0080] In one embodiment, historical traceability data of compound quality based on a preset purity model is obtained, and the historical traceability effect value is calculated based on the historical traceability data to evaluate the historical traceability effect of the preset purity model.

[0081] Specifically, the steps for obtaining historical traceability data on compound quality from a preset purity model and calculating the historical traceability effect value based on this data are as follows:

[0082] Obtain several historical source tracing cases of the purity prediction model, and obtain the effect score of each historical source tracing case, wherein the effect score includes source tracing success rate and source tracing accuracy;

[0083] The steps for calculating the traceability success rate are as follows: if the traceability of historical cases determines that the corresponding production process parameters are incorrect, the traceability success rate is 1; otherwise, the traceability success rate is 0.

[0084] The calculation steps for the traceability accuracy are as follows: if, after tracing the historical traceability cases, the corresponding production process parameters are determined, and the purity of the compound produced after adjusting the corresponding production process parameters is not less than the preset minimum purity, then the traceability accuracy is 1; otherwise, the traceability accuracy is 0.

[0085] The success rate and accuracy rate of source tracing are added together to obtain the historical source tracing effect value.

[0086] It's important to note that the historical traceability effectiveness value is a comprehensive indicator that measures the performance of the preset purity model in historical cases. It reflects the model's effectiveness by evaluating the success and accuracy of the traceability process. Specifically, traceability success assesses whether the model can pinpoint erroneous parameters in the production process, while traceability accuracy assesses whether the model, after adjusting parameters, can improve the compound's purity to the preset standard. The sum of these two indicators yields the historical traceability effectiveness value. A higher value indicates that the model performed well in historical traceability cases, accurately and effectively tracing and optimizing the production process; conversely, a lower value suggests that the model failed to fully achieve its intended goals in past applications, potentially indicating errors or inaccuracies.

[0087] A lower historical traceability effect value generally indicates that the model failed to solve the problem successfully or accurately. This can be due to various reasons, such as the model failing to capture certain potential errors in the production process, or even if the problem was identified, the adjusted parameters failing to truly improve the quality of the compound. A low historical traceability effect value suggests that the preset purity model may be unreliable in certain situations, leading to potentially erroneous traceability analysis results. In such cases, directly relying on the model for production quality traceability may not achieve the expected accuracy and could even lead to incorrect production decisions. Therefore, to ensure the accuracy of traceability, it is necessary to combine human experience for verification and adjustment.

[0088] For example, suppose a batch of a compound fails to meet purity standards. A pre-defined purity model might identify an incorrect production process parameter during traceability and recommend adjusting it. However, if the model has a history of similar traceability failures with low historical traceability effectiveness, this indicates that the model may not have accurately identified the problem in such cases, and the adjusted parameter failed to effectively improve the compound's purity. In this situation, relying on the model for automated traceability analysis may lead to erroneous results, while manual intervention for traceability analysis and adjustment provides a more accurate and reliable solution. Therefore, the lower the historical traceability effectiveness value, the more human intervention is needed in actual production to ensure the accuracy and effectiveness of quality control.

[0089] In one embodiment, the step of calculating the traceability value of the preset purity model based on the purity difference value, the predicted time difference value, and the historical traceability effect value is as follows:

[0090] The purity difference value, prediction time difference value, and historical traceability effect value are converted into a comprehensive feature vector. The comprehensive feature vector is used as the input of the machine learning model. The machine learning model uses the prediction of each traceable value label for each set of comprehensive feature vectors as the prediction objective and minimizes the sum of prediction errors for all traceable value labels as the training objective. The machine learning model is trained until the sum of prediction errors converges, at which point the model training stops. The traceable value is determined based on the model output. The machine learning model is a multinomial regression model.

[0091] It's important to note that calculating the traceability value of a pre-defined purity model based on purity difference, predicted time difference, and historical traceability performance is a typical machine learning problem. The goal is to predict an output value—the traceability value—regarding traceability reliability by combining these input features. The specific steps can be broken down as follows: Feature Extraction and Vectorization: First, the purity difference, predicted time difference, and historical traceability performance are used as input features, combined into a comprehensive feature vector. This vector not only includes the model's prediction error (purity difference and time difference) but also reflects the model's performance in historical traceability cases (historical traceability performance). This feature vector is typically an array containing multiple values, for example: Comprehensive Feature Vector = [Purity Difference, Predicted Time Difference, Historical Traceability Performance]; these features collectively describe the purity model's predictive ability and historical traceability effectiveness in different aspects. Training the Machine Learning Model: The machine learning model (in this step, a multinomial regression model) will use these comprehensive feature vectors as input for model training. The multinomial regression model captures the non-linear relationships between these features by mapping them to a multinomial space. The goal of training is to minimize the prediction error, that is, to make the model output predictions as close as possible to the actual traceable values.

[0092] Training Objective: The training objective of the model is to minimize the sum of prediction errors for all traceable value labels. Training stops only after the prediction error converges to its minimum by continuously adjusting the model parameters. This process typically employs optimization algorithms such as gradient descent to adjust the model's coefficients, minimizing the loss function and thus improving the model's prediction accuracy. Output Prediction Results: Once the model is trained, it can be used to predict the traceable values ​​corresponding to new comprehensive feature vectors. These predictions, based on the model's output, will be reflected in new production quality traceability cases, helping to evaluate the model's traceability and the reliability of its predictions.

[0093] One implementation approach offers several significant advantages based on machine learning training: Improved prediction accuracy: Multinomial regression models capture the non-linear relationships between features, handling complex traceability issues better than traditional linear models, especially when there are strong interactions between purity differences, temporal differences, and historical data. Automated traceability judgment: A well-trained model can automatically predict traceable values ​​in new traceability cases, reducing the need for manual intervention and quickly responding to new production data. Flexibility and adaptability: By continuously collecting new data and optimizing the model, the system can be constantly adjusted and improved to adapt to different production environments and traceability needs.

[0094] In one embodiment, the steps for tracing the production process parameters of a target compound based on traceability values ​​are as follows:

[0095] The traceability value of the preset purity model is compared with the preset traceability threshold. If the traceability value is not less than the preset traceability threshold, the production quality of the target compound can be traced according to the preset purity model.

[0096] If the traceability value is not less than the preset traceability threshold, the production quality traceability of the target compound cannot be performed according to the preset purity model. At this time, an alarm will be issued to remind staff to perform manual traceability.

[0097] It should be noted that in the step of tracing the production process parameters of a target compound based on its traceability value, the traceability value calculated by the preset purity model is first compared with a preset traceability threshold. If the traceability value is greater than or equal to the threshold, it indicates that the model's prediction results have sufficient reliability, and the production quality traceability of the target compound can be performed based on the model to guide the adjustment of production process parameters. Conversely, if the traceability value is lower than the preset threshold, it indicates that the model's traceability reliability is insufficient, which may lead to inaccurate traceability results. In this case, the system will issue an alarm to remind staff to perform manual traceability processing to ensure that the production process parameters are correctly adjusted, thereby avoiding potential quality problems.

[0098] In one embodiment, if the traceability value is not less than a preset traceability value threshold, the steps for tracing the production quality of the target compound based on a preset purity model are as follows:

[0099] The actual purity of each compound in the target compound is compared with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, then traceability of the compound production quality through the preset purity model is not required. If the actual purity of any compound is less than the preset minimum standard purity, then traceability of the compound production quality through the preset purity model is required. Specifically:

[0100] Starting from the output layer of the purity prediction model, the gradient value is calculated layer by layer using the backpropagation algorithm to reflect the contribution of each production process parameter to the output error;

[0101] Analyze the gradient values ​​to identify the production process parameters that have a significant impact on purity prediction;

[0102] Based on the backpropagation results, a backtracking report is generated, listing the contribution of each production process parameter to the quality problem and judging the degree of its impact;

[0103] Determine the traceability path, generate a traceability map, and provide suggestions for improving production process parameters to complete the traceability process.

[0104] It's important to note that the first step is to examine each component of the target compound to ensure its purity meets the pre-defined minimum standards. For example, suppose the target compound is a drug, and the goal is to ensure the purity of its active ingredient reaches 98% or higher. If the actual purity of all compounds reaches or exceeds 98%, then the production quality is considered acceptable, and further traceability is unnecessary.

[0105] Traceability Initiation Conditions: If the purity of any compound falls below the minimum standard (e.g., the purity of a component is only 95%), the traceability procedure needs to be initiated. In this case, a pre-defined purity model will be used to trace the cause of the low purity, specifically identifying which production process parameters might have led to this quality deviation.

[0106] Backpropagation calculation: The backpropagation algorithm of the purity prediction model is used to calculate the contribution of each production process parameter to the purity prediction error layer by layer. Backpropagation is an algorithm that optimizes model parameters through gradient descent. It gradually adjusts the model by calculating the gradient of the error with respect to each parameter to reduce the error. For example, the model may find that temperature, reaction time, or raw material quality are key factors leading to insufficient purity.

[0107] Analyzing influencing factors: By analyzing the backpropagation results, it is possible to determine which production process parameters (such as temperature, reaction time, stirring speed, raw material ratio, etc.) have the greatest impact on purity. For example, assuming that the traceability results show that temperature fluctuations lead to unstable purity, then inaccurate temperature control during the production process may be the main reason for low purity.

[0108] Generate a backpropagation report: Based on the analysis results from backpropagation, a backpropagation report is generated, listing the contribution of each production process parameter to the quality of the compound. For example, the report may indicate that improper temperature control led to the formation of more byproducts in a certain reaction process, thereby affecting the purity of the target compound.

[0109] Source tracing and improvement recommendations: Based on the backtracking report, generate a source tracing diagram showing the impact path of different process parameters in the production process, and provide improvement recommendations to the production team based on the source tracing diagram. Assuming the backtracking diagram shows that "temperature control" is the key issue, recommendations might include "enhancing the accuracy of the temperature control system" or "adding a temperature feedback system to the reaction process."

[0110] For example: Suppose a pharmaceutical company produces drug compound A with an active ingredient purity of less than 98%, while the actual purity is only 95%. To find the cause, a production quality traceability process based on a purity model is initiated. Purity check: The company first checks each component of the target compound. The purity of the active ingredient is below 98%, thus triggering traceability analysis.

[0111] Backpropagation analysis: Using a pre-defined purity model, the backpropagation algorithm began calculating the contribution of each production process parameter to the purity variation. The results showed that temperature and reaction time had the greatest impact on purity. Specifically, the model found that the reaction temperature fluctuated significantly throughout the production process, leading to the formation of byproducts and thus affecting the purity of the target compound.

[0112] Retrospective Report: The generated retrospective report indicates that temperature fluctuations may lead to incomplete reactions or the formation of byproducts in chemical reactions. The report recommends optimizing the temperature control system to improve temperature stability.

[0113] Improvement Recommendations and Traceability Diagram: The report also includes a traceability diagram illustrating the critical role of reaction temperature control throughout the production process. Based on this diagram, it is recommended that the production team improve the accuracy of the temperature control system, for example, by introducing more precise temperature control equipment to reduce temperature fluctuations during the reaction.

[0114] Through this series of source tracing analyses, the production team was able to identify the root cause of the problem (such as improper temperature control) and propose corresponding improvement measures. This not only helps improve the purity of the current batch of products but also optimizes future production processes and prevents similar problems from recurring.

[0115] In one implementation, this backpropagation-based traceability method can accurately locate and resolve quality issues during production through purity model analysis and optimization of production process parameters. By generating traceability reports and maps, the production team can clearly understand which process parameters affect the quality of the compound and take targeted measures to improve the production process, thereby ensuring that the final product quality meets standards. This method not only improves traceability efficiency but also effectively reduces human error, enhancing the stability and controllability of the production process.

[0116] Based on the same inventive concept, this invention also provides a neural network-based compound production quality traceability system. See also Figure 2 , Figure 2 A framework diagram of a compound production quality traceability system based on a neural network is provided in this embodiment of the invention. The system includes:

[0117] Purity Measurement Module: The currently produced batch of compounds is designated as the target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity.

[0118] Purity Prediction Module: Input the various production process parameters of each target compound into the preset purity model to predict the purity of each compound in the target compound;

[0119] Purity Difference Module: Calculates the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluates the degree of difference between the predicted results and the actual results of the preset purity model;

[0120] Prediction Time Difference Module: Obtains the actual predicted duration of the preset purity model, calculates the prediction time difference value, and evaluates the degree of deviation of the preset purity model in predicting the reaction time.

[0121] Historical traceability effect module: Obtain historical traceability data on compound quality from the preset purity model, calculate the historical traceability effect value based on the historical traceability data, and evaluate the historical traceability effect of the preset purity model;

[0122] Traceability module: Calculates the traceability value of the preset purity model based on the purity difference value, the predicted time difference value, and the historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value.

[0123] Based on the neural network-based compound production quality traceability system provided in this embodiment of the invention, when tracing the quality of compound production using the neural network-based traceability method, the system can assess whether the model on which the system is based can perform compound production quality traceability; this ensures the reliability of the results of compound production quality traceability based on the model and reduces the impact on the accuracy of traceability analysis.

[0124] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the patent coverage of the present invention.

Claims

1. A method for tracing the production quality of compounds based on neural networks, characterized in that, Includes the following steps: The batch of compounds that has been produced is designated as the target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity. Input the various production process parameters of each target compound into the preset purity model to predict the purity of each compound in the target compound; The purity difference value is calculated based on the purity of each compound in the predicted target compound and the actual purity, and the degree of difference between the predicted results and the actual results of the preset purity model is evaluated. Obtain the actual predicted duration of the preset purity model, calculate the difference in predicted time, and evaluate the degree of deviation in the predicted reaction time of the preset purity model. Obtain historical traceability data regarding compound quality from a preset purity model, calculate the historical traceability effect value based on the historical traceability data, and evaluate the historical traceability effect of the preset purity model; specifically: Obtain several historical source tracing cases of the purity prediction model, and obtain the effect score of each historical source tracing case, wherein the effect score includes source tracing success rate and source tracing accuracy; The steps for calculating the traceability success rate are as follows: if the traceability of historical cases determines that the corresponding production process parameters are incorrect, the traceability success rate is 1; otherwise, the traceability success rate is 0. The calculation steps for the traceability accuracy are as follows: if the purity of the compound produced after adjusting the corresponding production process parameters is not less than the preset minimum purity after the traceability of historical cases is determined, then the traceability accuracy is 1. Conversely, the accuracy of tracing the source is 0; The success rate and accuracy rate of source tracing are added together to obtain the historical source tracing effect value; The traceability value of the preset purity model is calculated based on the purity difference value, the predicted time difference value, and the historical traceability effect value. The production process parameters of the target compound are then traced based on this traceability value. Specifically: The purity difference value, prediction time difference value, and historical traceability effect value are converted into a comprehensive feature vector. The comprehensive feature vector is used as the input of the machine learning model. The machine learning model uses the prediction of each traceable value label for each set of comprehensive feature vectors as the prediction objective and minimizes the sum of prediction errors for all traceable value labels as the training objective. The machine learning model is trained until the sum of prediction errors converges, at which point the model training stops. The traceable value is determined based on the model output. The machine learning model is a multinomial regression model.

2. The method for tracing the quality of compound production based on neural networks according to claim 1, characterized in that, The steps for calculating the purity difference value based on the predicted purity of each compound in the target compound and the actual purity are as follows: The absolute difference between the predicted purity and the actual purity of each compound in the target compound is calculated and used as the purity difference value to obtain the purity difference value sequence. Outliers in the purity difference sequence are identified by the 3-sigma method, and the purity difference value is obtained by dividing the total number of outliers by the total number of purity difference sequences.

3. The method for tracing the quality of compound production based on neural networks according to claim 1, characterized in that, The steps for obtaining the actual prediction duration of the preset purity model and calculating the prediction time difference value are as follows: Obtain the actual time series and standard time series of each compound in the target compound as predicted by a preset purity model; Construct a two-dimensional matrix to store each pair of elements, i.e., the length of the longest common subsequence between actual time and standard time; The matrix is ​​filled step by step according to the recursive formula. If the actual time and the standard time are equal, the length of the common subsequence is increased; otherwise, the maximum value of the previous step is taken. The final length of the longest common subsequence can be obtained from the matrix, that is, the value of the bottom right corner of the matrix is ​​the length of the longest common subsequence; The matching degree is obtained by dividing the length of the longest common subsequence by the minimum of the lengths of the actual time series and the standard time series. Calculate the sum of the absolute differences between all actual and standard times in the actual and standard time series, and calculate the time difference difference value. The calculation steps are: Time difference difference value = (1 - matching degree) * sum of absolute differences.

4. The method for tracing the quality of compound production based on neural networks according to claim 1, characterized in that, The steps for tracing the production process parameters of a target compound based on traceability values ​​are as follows: The traceability value of the preset purity model is compared with the preset traceability threshold. If the traceability value is not less than the preset traceability threshold, the production quality of the target compound can be traced according to the preset purity model. If the traceability value is not less than the preset traceability threshold, the production quality traceability of the target compound cannot be performed according to the preset purity model. At this time, an alarm will be issued to remind staff to perform manual traceability.

5. The method for tracing the quality of compound production based on neural networks according to claim 4, characterized in that, If the traceable value is not less than the preset traceable value threshold, the steps for tracing the production quality of the target compound based on the preset purity model are as follows: The actual purity of each compound in the target compound is compared with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, then it is not necessary to trace the production quality of the compound through the preset purity model. If the actual purity of any compound is less than the preset minimum standard purity, then traceability of the compound's production quality needs to be performed using a preset purity model, specifically: Starting from the output layer of the purity prediction model, the gradient value is calculated layer by layer using the backpropagation algorithm to reflect the contribution of each production process parameter to the output error; Analyze the gradient values ​​to identify the production process parameters that have a significant impact on purity prediction; Based on the backpropagation results, a backtracking report is generated, listing the contribution of each production process parameter to the quality problem and judging the degree of its impact; Determine the traceability path, generate a traceability map, and provide suggestions for improving production process parameters to complete the traceability process.

6. A compound production quality traceability system based on neural networks, used to implement the compound production quality traceability method based on neural networks as described in any one of claims 1-5, characterized in that, The system includes: Purity Measurement Module: The currently produced batch of compounds is designated as the target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity. Purity Prediction Module: Input the various production process parameters of each target compound into the preset purity model to predict the purity of each compound in the target compound; Purity Difference Module: Calculates the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluates the degree of difference between the predicted results and the actual results of the preset purity model; Prediction Time Difference Module: Obtains the actual predicted duration of the preset purity model, calculates the prediction time difference value, and evaluates the degree of deviation of the preset purity model in predicting the reaction time. Historical traceability effect module: Obtains historical traceability data on compound quality from the preset purity model, calculates the historical traceability effect value based on the historical traceability data, and evaluates the historical traceability effect of the preset purity model; Traceability module: Calculates the traceability value of the preset purity model based on the purity difference value, the predicted time difference value, and the historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value.

Citation Information

Patent Citations

  • Essence production quality whole-process traceability method and system based on data analysis

    CN118428608A

  • Engineering decoration intelligent management system and method based on artificial intelligence

    CN119005886A