Compound production quality tracing method and system based on neural network

By evaluating the purity and time difference and historical traceability effect in the compound production process, the polynomial regression model is used to evaluate the traceability of neural networks, and the problem of insufficient accuracy of the traceability method of compound production quality in the existing technology is solved, and more reliable traceability analysis is achieved.

CN120509601AActive Publication Date: 2025-08-19SHANGHAI HEJIAN NUTRITION FOOD CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing neural network-based traceability method for traceability of compound production quality lacks the evaluation of model reliability, resulting in insufficient accuracy of traceability analysis.

Method used

By measuring the actual purity and predicted purity of the compound, calculate the purity difference value, predicted time difference value and historical traceability effect value, use the polynomial regression model to evaluate the traceability of the model, and issue an alarm or conduct manual traceability if necessary.

Benefits of technology

Ensure the reliability of the results of traceability of compound production quality, reduce analysis errors caused by relying on unreliable models, and improve the accuracy and reliability of traceability analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509601A_ABST
    Figure CN120509601A_ABST
Patent Text Reader

Abstract

The invention discloses a compound production quality traceability method and system based on a neural network, and relates to the technical field of production traceability, a batch of compounds which are produced at present are marked as target compounds, the actual purity of each compound in the target compounds is measured, and each production process parameter is input into a preset purity model, so that the purity of the target compounds is determined. Predicting the purity of the target compound; and calculating a purity difference value according to the actual purity and the predicted purity, and obtaining a predicted time difference value and a historical traceability effect value of the model. The traceable value of the model is calculated through the indexes, and the production process parameters are traced according to the traceable value. Therefore, when production quality traceability based on the neural network is carried out, the reliability of the model can be evaluated, the traceability analysis is carried out by depending on the model only when the traceability value meets the condition, the uncertainty of the traceability analysis is reduced, and the accuracy of the analysis result is ensured.
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 in particular to a method and system for tracing the production quality of a compound based on a neural network. Background Art

[0002] With the increasing complexity of industrial production, especially in the chemical and pharmaceutical industries, the stability and traceability of product quality are becoming increasingly important. A neural network-based compound production quality traceability method uses artificial intelligence technology to model and analyze various types of data in the production process, enabling real-time prediction and traceability of compound quality. This method trains a neural network model and inputs information such as raw material data, equipment status, and the production environment to predict the final quality of the compound, such as purity and stability. When quality issues arise during the production process, the model can trace back to the link that may have caused the problem, helping companies quickly identify and resolve quality bottlenecks in production and ensure that products meet quality standards.

[0003] However, existing neural network-based traceability methods often rely directly on the model to trace the production quality, and lack an assessment of the model's ability to trace the production quality. This approach may lead to unreliable results in compound production quality traceability based on the model in some cases, thereby affecting the accuracy of traceability analysis. Summary of the Invention

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

[0005] In a first aspect of the present invention, a method for tracing the quality of compound production based on a neural network is first proposed, the method comprising: Recording a batch of compounds currently produced as target compounds, and measuring the purity of each compound in the target compound, and recording it as actual purity; Inputting 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; Calculate the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluate the degree of difference between the predicted results of the preset purity model and the actual results; Obtain the actual predicted duration of the preset purity model, calculate the predicted time difference value, and evaluate the deviation degree of the reaction time predicted by the preset purity model; Obtain historical traceability data on compound quality based on 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; 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, and the production process parameters of the target compound are traced based on the traceability value.

[0006] 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: Calculate the absolute difference between the purity of each compound in the predicted target compound and the actual purity as the purity difference, and obtain a purity difference sequence; The 3-sigma method is used to identify outliers in the purity difference sequence, and the total number of outliers is divided by the total number of purity difference sequences to obtain the purity difference value.

[0007] Optionally, the steps for obtaining the actual predicted duration of the preset purity model and calculating the predicted time difference value are as follows: Obtain the actual time series and standard time series of each compound in the target compound predicted by the preset purity model; Construct a two-dimensional matrix to store each pair of elements, i.e. the longest common subsequence length between the actual time and the standard time; Fill the matrix step by step according to the recursive formula. If the actual time and the standard time are equal, increase the length of the common subsequence; otherwise, take the maximum value of the previous step; Obtain the final length of the longest common subsequence from the matrix, that is, the value in the lower right corner of the matrix is the length of the longest common subsequence; Divide the length of the longest common subsequence by the minimum value of the actual time series and the standard time series length to obtain the matching degree; Calculate the sum of the absolute differences between all actual times and standard times in the actual time series and the 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.

[0008] Optionally, the steps for obtaining historical traceability data on compound quality based on a preset purity model and calculating a historical traceability effect value based on the historical traceability data are as follows: Obtain several historical traceability cases of the purity prediction model and obtain an effect score for each historical traceability case, wherein the effect score includes traceability success and traceability accuracy; The calculation steps of the traceability success degree are as follows: if the corresponding production process parameter error is determined after tracing back the historical traceability case, the traceability success degree is 1; otherwise, the traceability success degree is 0; The calculation steps of the traceability accuracy are as follows: if the corresponding production process parameters are determined after tracing back the historical traceability case, 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; Add the traceability success degree and traceability accuracy to obtain the historical traceability effect value.

[0009] 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: The purity difference value, prediction time difference value and historical traceability effect value are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as the input of the machine learning model. The machine learning model predicts each traceable value label with each set of comprehensive feature vectors as the prediction target, and minimizes the sum of prediction errors for all traceable value labels as the training target. The machine learning model is trained until the sum of prediction errors reaches convergence, and the model training is stopped. The traceability value is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

[0010] Optionally, the steps for tracing the production process parameters of the target compound based on the traceable value are: Comparing the traceability value of the preset purity model with the preset traceability value threshold; if the traceability value is not less than the preset traceability value threshold, the production quality traceability of the target compound can be performed according to the preset purity model; If the traceability value is not less than the preset traceability value threshold, the production quality traceability of the target compound cannot be performed according to the preset purity model. At this time, an alarm is issued to remind the staff to perform manual traceability.

[0011] 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 according to the preset purity model are as follows: Compare the actual purity of each compound in the target compound with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, there is no need to trace the compound production quality through the preset purity model; if the actual purity of any compound is less than the preset minimum standard purity, it is necessary to trace the compound production quality through the preset purity model, specifically: Starting from the output layer of the purity prediction model, the back propagation algorithm is used to calculate the gradient value layer by layer to reflect the contribution of each production process parameter to the output error; Analyze the gradient value to find out the production process parameters that have a greater impact on purity prediction; Based on the back-propagation results, a back-test report is generated, listing the contribution of each production process parameter to the quality problem and determining its degree of influence; Determine the traceability path, generate a traceability diagram, and provide suggestions for improving production process parameters to complete traceability.

[0012] In a second aspect of the present invention, a compound production quality traceability system based on a neural network is proposed, the system comprising: Purity measurement module: record the batch of compounds currently produced as target compounds, and measure the purity of each compound in the target compound, which is recorded as actual purity; Purity prediction module: Input various types of production process parameters in the production process 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 of the preset purity model and the actual results; Prediction time difference module: obtains the actual prediction duration of the preset purity model to calculate the prediction time difference value, and evaluates the deviation degree of the reaction time predicted by the preset purity model; Historical traceability effect module: obtains historical traceability data on compound quality based on 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, predicted time difference value and historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value.

[0013] Beneficial effects of the present invention: The present invention proposes a neural network-based compound production quality traceability method and system, which records a batch of compounds currently produced as target compounds, and measures the purity of each compound in the target compound and records it as actual purity; inputs various types of production process parameters in the production process of each target compound into a preset purity model to predict the purity of each compound in the target compound; calculates a purity difference value based on the predicted purity of each compound in the target compound and the actual purity, obtains the actual prediction duration of the preset purity model to calculate the prediction time difference value, obtains the historical traceability data on the compound quality of the preset purity model to calculate the historical traceability effect value, calculates the traceability value of the preset purity model based on the purity difference value, the prediction time difference value and the historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value; in this way, when tracing the compound production quality through the neural network-based traceability method, it is possible to evaluate whether the model relied on can perform compound production quality traceability; ensure that the results of compound production quality traceability based on the model are reliable, and reduce the impact on the accuracy of traceability analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The present invention will be further described below with reference to the accompanying drawings.

[0015] Figure 1 This is a flowchart of a neural network-based compound production quality traceability method; Figure 2This is a framework diagram of a compound production quality traceability system based on neural network. DETAILED DESCRIPTION

[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0017] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0018] The embodiment of the present invention provides a method for tracing the quality of compound production based on a neural network. Figure 1 , Figure 1 A flowchart of a neural network-based compound production quality traceability method provided in an embodiment of the present invention. The method includes the following steps: Recording a batch of compounds currently produced as target compounds, and measuring the purity of each compound in the target compound, and recording it as actual purity; Inputting 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; Calculate the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluate the degree of difference between the predicted results of the preset purity model and the actual results; Obtain the actual predicted duration of the preset purity model, calculate the predicted time difference value, and evaluate the deviation degree of the reaction time predicted by the preset purity model; Obtain historical traceability data on compound quality based on 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; 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, and the production process parameters of the target compound are traced based on the traceability value.

[0019] Based on a neural network-based compound production quality traceability method provided by an embodiment of the present invention, through the above-mentioned method, when tracing the quality of compound production through the neural network-based traceability method, it is possible to evaluate whether the model relied on can perform compound production quality traceability; ensure that the results of compound production quality traceability based on the model are reliable, and reduce the impact on the accuracy of traceability analysis.

[0020] In one embodiment, a batch of compounds currently produced is recorded as a target compound, and the purity of each compound in the target compound is measured and recorded as the actual purity; Specifically, a batch of compounds currently produced is first analyzed as the target compound. A series of analytical methods are then used to measure the purity of each compound within the target compound. Common analytical methods include high-performance liquid chromatography (HPLC), gas chromatography (GC), mass spectrometry (MS), nuclear magnetic resonance (NMR), ultraviolet-visible spectroscopy (UV-Vis), and infrared spectroscopy (IR). The most appropriate measurement method is selected based on the properties of the target compound, such as volatility, polarity, and molecular size. For example, HPLC can separate and quantify compounds, enabling accurate purity calculation; mass spectrometry analyzes the mass-to-charge ratio of a compound to help identify its molecular structure and purity; and NMR can provide structural information, enabling purity estimation. Furthermore, ultraviolet or infrared spectroscopy can be used to measure the sample's absorbance or absorption characteristics, indirectly estimating purity. During the measurement process, all data are compared with the purity data of a standard compound to calculate the actual purity of the target compound. If the purity meets the predetermined standards, the target compound is considered qualified. If there is a significant deviation, further analysis may be required to identify potential problems in the production process and conduct quality traceability. Therefore, the measurement of actual purity is achieved through precise testing of these analytical instruments and comparison with standards, providing key data support for subsequent traceability analysis.

[0021] In one embodiment, a purity difference value is calculated based on the predicted purity of each compound in the target compound and the actual purity, and the degree of difference between the predicted result of the preset purity model and the actual result is evaluated; Specifically, 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: Calculate the absolute difference between the purity of each compound in the predicted target compound and the actual purity as the purity difference, and obtain a purity difference sequence; The 3-sigma method is used to identify outliers in the purity difference sequence, and the total number of outliers is divided by the total number of purity difference sequences to obtain the purity difference value.

[0022] It should be noted that the purity difference value is a quantitative assessment of the degree of deviation between the predicted purity of each target compound and the actual purity, calculated by calculating the difference between the predicted purity of each compound and the actual purity. Specifically, the larger the purity difference value, the more significant the deviation between the predicted model and the actual situation, and the lower the model's accuracy. This means that if the purity difference value is large, the model's prediction results may contain large errors, making the results of production quality traceability based on this model unreliable. For example, if the difference between the model's predicted purity and the actual purity is large, it means that the model cannot accurately capture the key factors affecting purity during the compound production process, which may lead to misjudgment of the production process. In this case, the results of compound production quality traceability based on the model may be biased and may not accurately reflect the actual production process. Because neural network models may not fully adapt to all changes in the prediction of some complex factors, especially when faced with abnormal situations that are not fully reflected in the training data, the model's prediction results may appear less accurate. To ensure the accuracy of traceability analysis, manual traceability should be performed. Human intervention can supplement the deficiencies of model predictions. Based on more comprehensive background knowledge and professional judgment, anomalies or problems in the production process can be traced back for in-depth analysis, avoiding erroneous quality assessments or decisions caused by reliance on model predictions. Therefore, an increase in purity difference directly affects the reliability of the traceability method, suggesting the need for human intervention to ensure the accuracy of quality traceability.

[0023] In one implementation, the main reason for using the 3-sigma method to identify outliers in a purity difference sequence is its ability to effectively identify extreme values that significantly deviate from the normal data distribution, thereby helping to ensure the accuracy of the purity difference values. The 3-sigma method, based on the statistical principle of the normal distribution, assumes 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 the data and avoiding the impact of human interference or errors on the results. In the process of compound production quality traceability, outliers may indicate certain unexpected problems or data deviations. Identifying these outliers through the 3-sigma method helps to clearly eliminate unexpected results, thereby more accurately evaluating the model's predictive performance. This not only improves the reliability of data analysis but also provides a clear direction for subsequent quality improvement, especially when it comes to providing targeted solutions for some atypical problems that may exist in the production process.

[0024] In one embodiment, the actual predicted duration of the preset purity model is obtained to calculate the predicted time difference value, and the degree of deviation of the reaction time predicted by the preset purity model is evaluated; Specifically: The steps to obtain the actual predicted duration of the preset purity model and calculate the predicted time difference value are: Obtain the actual time series and standard time series of each compound in the target compound predicted by the preset purity model; Construct a two-dimensional matrix to store each pair of elements, i.e. the longest common subsequence length between the actual time and the standard time; Fill the matrix step by step according to the recursive formula. If the actual time and the standard time are equal, increase the length of the common subsequence; otherwise, take the maximum value of the previous step; Obtain the final length of the longest common subsequence from the matrix, that is, the value in the lower right corner of the matrix is the length of the longest common subsequence; Divide the length of the longest common subsequence by the minimum value of the actual time series and the standard time series length to obtain the matching degree; Calculate the sum of the absolute differences between all actual times and standard times in the actual time series and the 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.

[0025] It should be noted that the predicted time difference value is an indicator used to quantify the degree of deviation between the actual time predicted by the preset purity model and the standard time. Specifically, it measures the degree of difference between the reaction time of the target compound predicted by the preset purity model during the actual production process and the standard reaction time. The calculation steps include first evaluating the matching degree of the time series using the longest common subsequence (LCS) method, and then calculating the time difference value based on 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 during the production process. This error may lead to inaccurate production quality traceability based on the model, thereby affecting the reliability of traceability analysis.

[0026] For example, if the standard reaction time of a compound should be 30 minutes, but the model predicts 50 minutes, the predicted time difference is large, indicating that the model's predicted time has significant deviations. In this case, if you rely solely on the model for production quality traceability, you may incorrectly judge the quality status of a production batch. For example, a batch of compounds may be mistakenly considered qualified or unqualified due to a deviation in the predicted reaction time, which in turn affects the final quality assessment and decision-making. Because this deviation may lead to erroneous judgments, in some cases, manual intervention for manual traceability becomes crucial, especially when the model error is large. Manual traceability can effectively make up for the deficiencies in the model prediction and ensure the accuracy of the traceability results. This manual intervention can help confirm and adjust the results of the model prediction, thereby improving the reliability and accuracy of the production quality traceability analysis.

[0027] One implementation method, using the longest common subsequence (LCS) algorithm to calculate predicted time differences, offers significant advantages, particularly when evaluating the accuracy of reaction time predictions from a pre-defined purity model. First, the LCS method captures the similarities between the actual and reference time series. By comparing the shared components, LCS not only assesses the degree of fit but also identifies potential discrepancies. This method effectively handles time series variations, particularly when there is some degree of deviation or misalignment between the predicted and reference times. LCS provides a good objective metric. Second, the calculated "match" quantifies the similarity between the two, avoiding the potential errors associated with simple direct difference calculations. For example, directly comparing each pair of time points can amplify short-term errors, especially when there are large jumps between some time points. LCS, by dynamically and gradually establishing the best fit, mitigates the impact of these unusual fluctuations and provides a more objective assessment of the degree of discrepancy between the predicted and actual values. Furthermore, combined with the "sum of absolute differences" calculation, it further captures the overall error of the time series, ensuring a comprehensive and accurate assessment.

[0028] The advantage of this method is that it not only focuses on the error at a single point in time, but also considers the overall structure of the entire time series, making it more comprehensive and stable when evaluating the accuracy of time predictions. For example, assuming that the time span of the reaction process is long and there is a certain misalignment between the predicted time and the standard time, the LCS method can identify these misalignments and calculate an overall degree of match. For the accuracy of time predictions in actual production environments, especially when the reaction times are not completely aligned, LCS provides a more robust error calculation method. This robustness can prevent a single error value from having an excessive impact on decision-making, ensure a more fair and reliable evaluation of model prediction results, and provide a more solid quantitative basis for subsequent manual traceability.

[0029] In one embodiment, historical traceability data on the quality of the compound according to the preset purity model is obtained, and a historical traceability effect value is calculated based on the historical traceability data to evaluate the historical traceability effect of the preset purity model; Specifically, the steps of obtaining the historical traceability data on the quality of the compound according to the preset purity model and calculating the historical traceability effect value according to the historical traceability data are as follows: Obtain several historical traceability cases of the purity prediction model and obtain an effect score for each historical traceability case, wherein the effect score includes traceability success and traceability accuracy; The calculation steps of the traceability success degree are as follows: if the corresponding production process parameter error is determined after tracing back the historical traceability case, the traceability success degree is 1; otherwise, the traceability success degree is 0; The calculation steps of the traceability accuracy are as follows: if the corresponding production process parameters are determined after tracing back the historical traceability case, 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; Add the traceability success degree and traceability accuracy to obtain the historical traceability effect value.

[0030] It should be noted 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 effectiveness of the model by evaluating the success and accuracy of the traceability process. Specifically, the traceability success evaluation model can locate the incorrect parameters in the production process, while the traceability accuracy evaluates whether the model can improve the purity of the compound to the preset standard after adjusting the parameters. The sum of these two indicators is the historical traceability effectiveness value. If the value is high, it means that the model has performed well in historical traceability cases and can accurately and effectively trace and optimize the production process. If the effect value is low, it indicates that the model has not fully achieved the expected goals in past applications and may contain errors or inaccuracies.

[0031] The smaller the historical traceability effect value, the more likely it is that the model failed to successfully or accurately resolve the problem. This could be due to a variety of reasons, such as the model failing to capture certain potential errors in the production process, or even if the problem is discovered, the adjusted parameters fail to truly improve the quality of the compound. When the historical traceability effect value is small, it means that the preset purity model may be unreliable in certain situations, resulting in errors in the traceability analysis results performed by the model. In this case, directly relying on the model for production quality traceability may not achieve the expected accuracy and may even lead to incorrect production decisions. Therefore, in order to ensure the accuracy of traceability, verification and adjustment are required in combination with manual experience.

[0032] For example, suppose a production batch of a certain compound fails to meet purity standards. During the traceability process, the preset purity model may determine that a certain production process parameter is incorrect and recommend adjusting the parameter. However, if the model has experienced similar traceability failures in historical cases, the historical traceability effect value is small, indicating that the model may not have accurately identified the problem in such cases, and the adjusted parameters failed to effectively improve the purity of the compound. In this case, relying on the model for automatic traceability analysis may lead to erroneous results, while manual intervention for traceability analysis and adjustment can provide more accurate and reliable answers. Therefore, the smaller the historical traceability effect value, the more manual intervention is required in actual production to ensure the accuracy and effectiveness of quality control.

[0033] In one embodiment, the steps of calculating the traceability value of the preset purity model according to the purity difference value, the predicted time difference value and the historical traceability effect value are as follows: The purity difference value, prediction time difference value and historical traceability effect value are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as the input of the machine learning model. The machine learning model predicts each traceable value label with each set of comprehensive feature vectors as the prediction target, and minimizes the sum of prediction errors for all traceable value labels as the training target. The machine learning model is trained until the sum of prediction errors reaches convergence, and the model training is stopped. The traceability value is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

[0034] It should be noted that calculating the traceability value of a pre-set purity model based on the purity difference value, predicted time difference value, and historical traceability effect value is a typical machine learning problem. The goal is to predict an output value regarding traceability reliability, namely the traceability value, by combining these input features. The specific steps can be broken down as follows: Feature extraction and vectorization: First, the purity difference value, predicted time difference value, and historical traceability effect value are used as input features and combined into a comprehensive feature vector. This vector not only contains the model's prediction error (purity difference value and time difference value) but also reflects the model's performance in historical traceability cases (historical traceability effect value). This feature vector is typically an array containing multiple values, for example: comprehensive feature vector = [purity difference value, predicted time difference value, historical traceability effect value]; these features collectively describe the purity model's predictive ability and historical traceability performance in different aspects. Training the machine learning model: The machine learning model (in this step, a polynomial regression model) uses these comprehensive feature vectors as input for model training. By mapping input features into a polynomial space, the polynomial regression model can capture nonlinear relationships between these features. The goal of training is to minimize the prediction error, that is, to make the predicted values output by the model as close as possible to the actual traceable values.

[0035] Training Objective: The model's training objective is to minimize the sum of the prediction errors for all traceable value labels. Model training stops by continuously adjusting model parameters until the prediction error converges to a minimum. This process typically uses optimization algorithms such as gradient descent to adjust the model coefficients to minimize the loss function, thereby improving the model's prediction accuracy. Outputting Prediction Results: Once model training is complete, the model can be used to predict the traceability values corresponding to new comprehensive feature vectors. These predicted values, based on the model's output, are reflected in new production quality traceability cases, helping to assess the model's traceability and the reliability of its predictions.

[0036] In one implementation, this machine learning-based training method offers several significant benefits: Improved prediction accuracy: Polynomial regression models can capture nonlinear relationships between features and handle complex traceability issues better than traditional linear models, especially when there are strong interactions between purity differences, time differences, and historical data. Automated traceability judgment: Trained models can automatically predict traceability 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 models, the system can be continuously adjusted and improved to adapt to different production environments and traceability requirements.

[0037] In one embodiment, the steps of tracing the production process parameters of the target compound according to the traceable value are: Comparing the traceability value of the preset purity model with the preset traceability value threshold; if the traceability value is not less than the preset traceability value threshold, the production quality traceability of the target compound can be performed according to the preset purity model; If the traceability value is not less than the preset traceability value threshold, the production quality traceability of the target compound cannot be performed according to the preset purity model. At this time, an alarm is issued to remind the staff to perform manual traceability.

[0038] It should be noted that when tracing the production process parameters of the target compound based on the traceability value, the traceability value calculated by the preset purity model is first compared with the preset traceability value threshold. If the traceability value is greater than or equal to the threshold, it indicates that the model's prediction results are sufficiently reliable, and the model can be used to trace the production quality of the target compound and guide the adjustment of the 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. At this time, the system will issue an alarm, reminding the staff to perform manual traceability processing to ensure that the production process parameters are correctly adjusted, thereby avoiding potential quality issues.

[0039] 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 according to the preset purity model are: Compare the actual purity of each compound in the target compound with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, there is no need to trace the compound production quality through the preset purity model; if the actual purity of any compound is less than the preset minimum standard purity, it is necessary to trace the compound production quality through the preset purity model, specifically: Starting from the output layer of the purity prediction model, the back propagation algorithm is used to calculate the gradient value layer by layer to reflect the contribution of each production process parameter to the output error; Analyze the gradient value to find out the production process parameters that have a greater impact on purity prediction; Based on the back-propagation results, a back-test report is generated, listing the contribution of each production process parameter to the quality problem and determining its degree of influence; Determine the traceability path, generate a traceability diagram, and provide suggestions for improving production process parameters to complete traceability.

[0040] It's important to note that each component of the target compound must first be inspected to ensure that their purity meets a predetermined minimum standard. For example, if the target compound is a pharmaceutical, the goal is to ensure that the active ingredient is at least 98% pure. If the actual purity of all compounds reaches or exceeds 98%, the production quality is considered acceptable, and no further traceability is required.

[0041] Traceability initiation conditions: If the purity of any compound falls below the minimum standard (for example, the purity of a component is only 95%), the traceability process needs to be initiated. In this case, the pre-set purity model will be used to trace the cause of the low purity, specifically to identify which production process parameters may have caused this quality deviation.

[0042] Backpropagation calculation: The purity prediction model uses a backpropagation algorithm 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. By calculating the gradient of the error with respect to each parameter, it gradually adjusts the model to reduce the error. For example, the model may identify temperature, reaction time, or raw material quality as the key factors contributing to insufficient purity.

[0043] Analyze influencing factors: By analyzing the backpropagation results, you can determine which production process parameters (such as temperature, reaction time, stirring speed, and raw material ratio) have the greatest impact on purity. For example, if the traceability results show that temperature fluctuations lead to unstable purity, then inaccurate temperature control during the production process may be the main cause of low purity.

[0044] Generate a retrospective report: Based on the back-propagation analysis results, a retrospective report is generated, listing the contribution of each production process parameter to the compound quality. For example, the report may indicate that improper temperature control leads to the formation of more byproducts in a certain reaction process, thus affecting the purity of the target compound.

[0045] Traceability Diagram and Improvement Suggestions: Based on the traceability report, a traceability diagram is generated to show the impact path of different process parameters in the production process. Based on the traceability diagram, improvement suggestions are provided to the production team. For example, if the traceability diagram shows that "temperature control" is the key issue, suggestions may include "enhancing the accuracy of the temperature control system" or "introducing a temperature feedback system during the reaction process."

[0046] For example, suppose a pharmaceutical company's active ingredient in drug compound A fails to reach 98% purity, actually reaching only 95%. To identify the cause, they initiate production quality traceability based on a purity model. Purity testing: The company first checks the individual components of the target compound. The active ingredient's purity falls below 98%, triggering traceability analysis.

[0047] Backpropagation Analysis: Using a pre-defined purity model, the backpropagation algorithm calculated the contribution of various process parameters to purity variation. The results showed that temperature and reaction time had the greatest impact on purity. Specifically, the model found that reaction temperature fluctuated significantly throughout the production process, leading to the formation of byproducts that affected the purity of the target compound.

[0048] Retrospective report: The generated retrospective report points out that temperature fluctuations may lead to incomplete reactions or the formation of by-products in chemical reactions. The report recommends optimizing the temperature control system to improve temperature stability.

[0049] Improvement Suggestions and Traceability Diagram: The report also includes a traceability diagram that illustrates the critical role of reaction temperature control throughout the production process. Based on this diagram, the production team is advised to improve the accuracy of the temperature control system, for example by introducing higher-precision temperature control equipment to reduce temperature fluctuations during the reaction.

[0050] Through this series of traceability analyses, the production team can identify the root cause of the problem (such as improper temperature control) and propose corresponding improvement measures. This not only helps to improve the purity of the current batch of product, but also optimizes future production processes to avoid similar problems.

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

[0052] Based on the same inventive concept, the present invention also provides a compound production quality traceability system based on a neural network. Figure 2 , Figure 2 A framework diagram of a compound production quality traceability system based on a neural network provided in an embodiment of the present invention, the system comprising: Purity measurement module: record the batch of compounds currently produced as target compounds, and measure the purity of each compound in the target compound, which is recorded as actual purity; Purity prediction module: Input various types of production process parameters in the production process 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 of the preset purity model and the actual results; Prediction time difference module: obtains the actual prediction duration of the preset purity model to calculate the prediction time difference value, and evaluates the deviation degree of the reaction time predicted by the preset purity model; Historical traceability effect module: obtains historical traceability data on compound quality based on 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, predicted time difference value and historical traceability effect value, and traces the production process parameters of the target compound based on the traceability value.

[0053] Based on a neural network-based compound production quality traceability system provided by an embodiment of the present invention, through the above-mentioned method, when tracing the quality of compound production through a neural network-based traceability method, it is possible to evaluate whether the model relied on can perform compound production quality traceability; ensure that the results of compound production quality traceability based on the model are reliable, and reduce the impact on the accuracy of traceability analysis.

[0054] The above is a detailed description of an embodiment of the present invention. However, the content is only a preferred embodiment of the present invention and should not be used to artificially limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A method for tracing the quality of compound production based on neural networks, characterized in that: The following steps are involved: Recording a batch of compounds currently produced as target compounds, and measuring the purity of each compound in the target compound, and recording it as actual purity; Inputting 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; Calculate the purity difference value based on the predicted purity of each compound in the target compound and the actual purity, and evaluate the degree of difference between the predicted results of the preset purity model and the actual results; Obtain the actual predicted duration of the preset purity model, calculate the predicted time difference value, and evaluate the deviation degree of the reaction time predicted by the preset purity model; Obtain historical traceability data on compound quality based on 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; 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, and the production process parameters of the target compound are traced based on the traceability value.

2. The method for tracing compound production quality based on a neural network 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: Calculate the absolute difference between the purity of each compound in the predicted target compound and the actual purity as the purity difference, and obtain a purity difference sequence; The 3-sigma method is used to identify outliers in the purity difference sequence, and the total number of outliers is divided by the total number of purity difference sequences to obtain the purity difference value.

3. The method for tracing compound production quality based on neural network according to claim 1, characterized in that: The steps to obtain the actual predicted duration of the preset purity model and calculate the predicted time difference value are: Obtain the actual time series and standard time series of each compound in the target compound predicted by the preset purity model; Construct a two-dimensional matrix to store each pair of elements, i.e. the longest common subsequence length between the actual time and the standard time; Fill the matrix step by step according to the recursive formula. If the actual time and the standard time are equal, increase the length of the common subsequence; otherwise, take the maximum value of the previous step; Obtain the final length of the longest common subsequence from the matrix, that is, the value in the lower right corner of the matrix is the length of the longest common subsequence; Divide the length of the longest common subsequence by the minimum value of the actual time series and the standard time series length to obtain the matching degree; Calculate the sum of the absolute differences between all actual times and standard times in the actual time series and the 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 compound production quality based on a neural network according to claim 1, characterized in that: The steps for obtaining the historical traceability data on the quality of the compound based on the preset purity model and calculating the historical traceability effect value based on the historical traceability data are as follows: Obtain several historical traceability cases of the purity prediction model and obtain an effect score for each historical traceability case, wherein the effect score includes traceability success and traceability accuracy; The calculation steps of the traceability success degree are as follows: if the corresponding production process parameter error is determined after tracing back the historical traceability case, the traceability success degree is 1; otherwise, the traceability success degree is 0; The traceability accuracy is calculated as follows: if the corresponding production process parameters are determined after tracing back the historical traceability case, 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; Add the traceability success degree and traceability accuracy to obtain the historical traceability effect value.

5. The method for tracing compound production quality based on neural network according to claim 1, characterized in that: 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: The purity difference value, prediction time difference value and historical traceability effect value are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as the input of the machine learning model. The machine learning model predicts each traceable value label with each set of comprehensive feature vectors as the prediction target, and minimizes the sum of prediction errors for all traceable value labels as the training target. The machine learning model is trained until the sum of prediction errors reaches convergence, and the model training is stopped. The traceability value is determined according to the model output results, wherein the machine learning model is a polynomial regression model.

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

7. The method for tracing compound production quality based on neural network according to claim 6, characterized in that: If the traceability value is not less than the preset traceability value threshold, the steps for tracing the production quality of the target compound according to the preset purity model are as follows: Compare the actual purity of each compound in the target compound with the preset minimum standard purity. If the actual purity of all compounds is not less than the preset minimum standard purity, there is no need to trace the compound production quality through the preset purity model; If the actual purity of any compound is less than the preset minimum standard purity, the compound production quality needs to be traced through the preset purity model, specifically: Starting from the output layer of the purity prediction model, the back propagation algorithm is used to calculate the gradient value layer by layer to reflect the contribution of each production process parameter to the output error; Analyze the gradient value to find out the production process parameters that have a greater impact on purity prediction; Based on the back-propagation results, a back-test report is generated, listing the contribution of each production process parameter to the quality problem and determining its degree of influence; Determine the traceability path, generate a traceability diagram, and provide suggestions for improving production process parameters to complete traceability.

8. A compound production quality traceability system based on a neural network, used to implement the compound production quality traceability method based on a neural network according to any one of claims 1 to 7, characterized in that: The system comprises: Purity measurement module: record the batch of compounds currently produced as target compounds, and measure the purity of each compound in the target compound, which is recorded as actual purity; Purity prediction module: Input various types of production process parameters in the production process 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 of the preset purity model and the actual results; Prediction time difference module: obtains the actual prediction duration of the preset purity model to calculate the prediction time difference value, and evaluates the deviation degree of the reaction time predicted by the preset purity model; Historical traceability effect module: obtains historical traceability data on compound quality based on 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, predicted time difference value and 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

  • Medical quality management method and system based on big data and artificial intelligence

    CN119557779A

  • Rapid sewage source tracing method and system

    CN119807603A

  • Prediction model for predicting product quality parameter values

    US20240144043A1