Quality control method of potassium dihydrogen phosphate based on big data analysis
By clustering and trend analysis of the data of potassium dihydrogen phosphate production process, replenishing reaction data using correction coefficients, and combining neural networks and decision trees for quality control, the long-term dependence problem of RNN in potassium dihydrogen phosphate production is solved, and efficient quality prediction and control is achieved.
Patent Information
- Application Number
- CN202411177194.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The existing recurrent neural network (RNN) has long-term dependence on the quality prediction of potassium dihydrogen phosphate production, which is difficult to meet the real-time requirements, resulting in insufficient prediction efficiency and ineffective control of potassium dihydrogen phosphate production quality.
Through a big data analysis method, the reaction data of potassium dihydrogen phosphate is clustered, and the approximate reaction clusters are screened out. The reaction data is supplemented and corrected using trend information sequences and correction coefficients, and quality prediction and parameter adjustment are combined with neural networks and decision trees.
It improves the real-time and controllability of the potassium dihydrogen phosphate production process, reduces the calculation amount of the neural network, and enhances the accuracy of prediction and control efficiency.
Smart Images

Figure CN119069016B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical digital data processing, and specifically relates to a quality control method for potassium dihydrogen phosphate based on big data analysis. Background Art
[0002] Potassium dihydrogen phosphate is an inorganic phosphate with a wide range of application fields. To meet the actual needs, it is of great practical significance to increase the output of high-quality potassium dihydrogen phosphate. However, during the current production and preparation process of potassium dihydrogen phosphate, it is affected by various factors, and there are mutual influence relationships among various factors, making the physical and chemical reaction environments in the production process complex, resulting in fluctuations in the production quality of potassium dihydrogen phosphate.
[0003] Therefore, in order to ensure the production quality of potassium dihydrogen phosphate, currently, by combining big data technology, various data during the production process of potassium dihydrogen phosphate are analyzed and predicted to adjust various parameters during the production process of potassium dihydrogen phosphate in real time, so as to ensure the production quality. When using a recurrent neural network (RNN, Recurrent Neural Network) to predict the quality of potassium dihydrogen phosphate production process, due to certain long-term dependence problems of RNN and the inability to effectively meet the real-time requirements, the prediction efficiency of RNN is insufficient, and it is unable to effectively and timely control the production quality of potassium dihydrogen phosphate. Summary of the Invention
[0004] The present invention provides a quality control method for potassium dihydrogen phosphate based on big data analysis to solve the existing problems.
[0005] The quality control method for potassium dihydrogen phosphate based on big data analysis of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides a quality control method for potassium dihydrogen phosphate based on big data analysis, and the method includes the following steps:
[0007] Obtain a number of reaction data of current potassium dihydrogen phosphate and historical potassium dihydrogen phosphate, as well as the quality inspection data of historical potassium dihydrogen phosphate;
[0008] Based on the similarity of the quality inspection data, divide the corresponding historical potassium dihydrogen phosphate into several clustering clusters, and screen out the approximate reaction clusters of the current potassium dihydrogen phosphate according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters;
[0009] Supplement the reaction data of the current potassium dihydrogen phosphate after the latest moment by using the correlation between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate before the latest moment to obtain the new reaction data of the current potassium dihydrogen phosphate. Then, correct the new reaction data by using the slopes, values of each data point in the new reaction data, and the correlation between the new reaction data and the reaction data of the historical potassium dihydrogen phosphate in the approximate reaction cluster to obtain the final reaction data of the current potassium dihydrogen phosphate.
[0010] Based on the distribution of the quality inspection data in each clustering cluster, obtain the representative quality inspection data of each clustering cluster.
[0011] Combine the representative quality inspection data and use a neural network to predict the quality of the current potassium dihydrogen phosphate, and adjust the parameters in the production process of the current potassium dihydrogen phosphate through a decision tree to achieve quality control of the current potassium dihydrogen phosphate.
[0012] Further, the method for screening out the approximate reaction cluster of the current potassium dihydrogen phosphate according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters includes the following specific methods:
[0013] Based on the change trends of the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster, respectively obtain the trend information sequence of the current potassium dihydrogen phosphate and the trend information sequence of each clustering cluster.
[0014] Analyze the similarity of the trend information sequences of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster to obtain the reaction similarity between the current potassium dihydrogen phosphate and each clustering cluster, and take the clustering cluster corresponding to the maximum reaction similarity as the approximate reaction cluster of the current potassium dihydrogen phosphate.
[0015] Further, the specific method for obtaining the trend information sequence of the clustering cluster is as follows:
[0016] Perform STL time series decomposition on the reaction data of all historical potassium dihydrogen phosphates included in any clustering cluster respectively to obtain the corresponding trend item sequences; construct a two-dimensional rectangular coordinate system, place the trend item sequences of the reaction data of the potassium dihydrogen phosphates corresponding to all the quality inspection data of the same clustering cluster in the same two-dimensional rectangular coordinate system, and use the least square method to perform curve fitting on all the trend item sequences in the two-dimensional rectangular coordinate system to obtain the fitting curve of each clustering cluster, denoted as the reaction trend curve of the clustering cluster.
[0017] Obtain several extreme points of any reaction trend curve, divide the reaction trend curve into several curve segments by using the extreme points, obtain the moments corresponding to the extreme points at both ends of the curve segment, perform linear fitting on the curve segment between any two adjacent extremes to obtain the slope and intercept of the corresponding straight line, obtain the array formed by the moments corresponding to the extreme points at both ends of all curve segments of any reaction trend curve, and the array formed by the slopes and intercepts of the corresponding fitting straight lines of all curve segments, which are respectively denoted as the time array of the curve segment and the straight line parameter array, and obtain the sequence formed by all time arrays and straight line parameter arrays in the reaction trend curve according to the time order of each curve segment in the reaction trend curve, which is denoted as the trend information sequence of the corresponding clustering cluster.
[0018] Further, the specific method for obtaining the trend information sequence of the current potassium dihydrogen phosphate is as follows:
[0019] Perform STL time series decomposition on any reaction data of potassium dihydrogen phosphate in the current production process, obtain the corresponding trend term and perform curve fitting to obtain the corresponding reaction trend curve, obtain the extreme points of the reaction trend curve and divide them into several curve segments, and obtain the sequence formed by the time array and the straight line parameter array of each curve segment, so as to obtain the corresponding trend information sequence of the current potassium dihydrogen phosphate.
[0020] Further, the specific calculation method of the reaction similarity is as follows:
[0021]
[0022] where f a is the reaction similarity between the current potassium dihydrogen phosphate and the a-th clustering cluster; x ji represents the i-th element of the j-th trend information sequence of the current potassium dihydrogen phosphate, x' aji represents the i-th element of the j-th trend information sequence of the a-th clustering cluster, J represents the number of trend information sequences, d() represents obtaining the Euclidean distance, I represents the quantity parameter, I″ represents the number of elements of the trend information sequence corresponding to the current potassium dihydrogen phosphate, and I' a represents the number of elements of the trend information sequence corresponding to the a-th clustering cluster, and min() represents obtaining the minimum value.
[0023] Further, the specific method for obtaining the new reaction data of the current potassium dihydrogen phosphate is as follows:
[0024] For any reaction data of the current potassium dihydrogen phosphate, obtain the latest moment of the reaction data;
[0025] Use the latest moment to divide the corresponding reaction data of all historical potassium dihydrogen phosphates in the approximate reaction cluster into two segments, one is the reaction data segment before the latest moment, and the other is the reaction data segment after the latest moment;
[0026] Based on the similarity relationship between the current reaction data of potassium dihydrogen phosphate and different reaction data segments, and combining with the reaction data segments after the latest moment of all historical potassium dihydrogen phosphate reactions, the reaction data of the current potassium dihydrogen phosphate is complemented to obtain the new reaction data of the current potassium dihydrogen phosphate. The new reaction data includes new temperature time series data, new pH time series data, and new stirring speed time series data.
[0027] Furthermore, the specific method for obtaining the final reaction data of the current potassium dihydrogen phosphate is as follows:
[0028] According to the slope, magnitude of each data point in any new reaction data, and the correlation between the new reaction data and the reaction data of historical potassium dihydrogen phosphate in the approximate reaction cluster, the correction coefficient of each data point in the new reaction data is obtained;
[0029] The new reaction data is corrected using the correction coefficient to obtain the final reaction data of the current potassium dihydrogen phosphate.
[0030] Furthermore, the specific calculation method for the correction coefficient of each data point in the new reaction data is as follows:
[0031]
[0032] Among them, α1 represents the new temperature time series data, α2 represents the new pH time series data, α3 represents the new stirring speed time series data, γ(α u ) represents the correction coefficient of the u-th data point in the new reaction data α, represents the approximate factor of the new reaction data α, δ u () represents the numerical parameter for obtaining the value of the u-th data point of the new reaction data, δ1′ u represents the appropriate numerical parameter of the u-th data point in the new temperature time series data, || represents obtaining the absolute value, norm() represents the normalization function, and exp() represents the exponential function with the natural constant as the base; the numerical parameter is the product of the slope and the value of the data point in the new reaction data; the appropriate numerical parameter is the product of the slope of the data point in the new temperature time series data and Br, where Br is the appropriate temperature of potassium dihydrogen phosphate in the reaction kettle during the reaction.
[0033] Furthermore, the specific method for obtaining the representative quality inspection data of each clustering cluster based on the distribution of quality inspection data in each clustering cluster includes:
[0034] For any clustering cluster, the Euclidean distance between each quality inspection data in the clustering cluster and the clustering center of the clustering cluster is obtained, and the Euclidean distance is used to perform weighted fusion on all quality inspection data in the clustering cluster to obtain the representative quality inspection data of the clustering cluster.
[0035] Further, the method for correcting the new reaction data by using the correction coefficient to obtain the final reaction data of the current potassium dihydrogen phosphate specifically includes:
[0036] The calculation method for the value of the data point after the latest moment in the final reaction data is as follows:
[0037] L′(α u ) = γ(α u ) × L(α u )
[0038] Wherein, L(α′ u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the final reaction data α′, γ(α u ) represents the correction coefficient of the data point corresponding to the u-th moment after the latest moment in the new reaction data α, and L(α u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the new reaction data α.
[0039] The beneficial effects of the technical solution of the present invention are as follows: In the embodiments of the present invention, considering that potassium dihydrogen phosphate is affected by various factors during the production process, there are certain differences in the quality inspection results of the historically produced potassium dihydrogen phosphate. Therefore, the embodiments of the present invention use this difference to divide the historical potassium dihydrogen phosphate, and supplement and correct the reaction data of the current potassium dihydrogen phosphate based on the similarity of the reaction data between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate. By combining the commonalities in the quality inspection data of the historical potassium dihydrogen phosphate in different clustering clusters, representative quality inspection data is obtained to improve the accuracy of the neural network prediction results and reduce the computational complexity during the neural network training process. In addition, through trend analysis of the reaction data as long-time series data, the reaction data is converted into a trend information sequence on the premise of ensuring that the trend change information is not lost, greatly reducing the influence degree of the long-term dependence problem of the neural network on the neural network prediction results, improving the efficiency of the neural network in analyzing and predicting potassium dihydrogen phosphate during the real-time production process, and improving the controllability and control efficiency of potassium dihydrogen phosphate during the production process. Description of the Drawings
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0041] Figure 1 It is the step flow chart of the method for controlling the quality of potassium dihydrogen phosphate based on big data analysis of the present invention;
[0042] Figure 2 It is a schematic diagram of the quality control process of potassium dihydrogen phosphate. Specific implementation manners
[0043] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features and effects of the potassium dihydrogen phosphate quality control method based on big data analysis proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0045] The following specifically describes the specific solution of the potassium dihydrogen phosphate quality control method provided by the present invention in combination with the accompanying drawings.
[0046] Please refer to Figure 1 , which shows the step flow chart of the potassium dihydrogen phosphate quality control method provided by an embodiment of the present invention. The method includes the following steps:
[0047] Step S001: Obtain a number of reaction data of the current potassium dihydrogen phosphate and historical potassium dihydrogen phosphate, as well as the quality inspection data of the historical potassium dihydrogen phosphate.
[0048] It should be noted that potassium dihydrogen phosphate prepared by the wet method is usually obtained based on the principle of acid-base neutralization. For example, in the currently commonly used neutralization method, potassium hydroxide and phosphoric acid are neutralized according to a certain proportioning ratio to obtain potassium dihydrogen phosphate and water. After the reaction is completed, processes such as filtration, crystallization, centrifugal separation, and drying are also required. And in each process of production, there are corresponding influencing factors, including: proportioning: ensuring accurate proportioning ratio and concentration; reaction and crystallization: controlling reaction temperature and stirring speed; centrifugal separation: selecting appropriate operating parameters; drying: controlling drying temperature and time.
[0049] Since the change of various parameters inside the reaction kettle during the process of preparing potassium dihydrogen phosphate by the wet method plays an important role in the quality control of potassium dihydrogen phosphate, in order to better control the output quality of the reaction link during the production process of potassium dihydrogen phosphate, it is necessary to analyze the reaction data of the current production batch and the reaction data of the historical production batch, so as to control the production quality of potassium dihydrogen phosphate by adjusting the parameters during the reaction process. Therefore, the embodiment of the present invention selects to analyze the relevant parameter data in the reaction kettle to control the quality of potassium dihydrogen phosphate.
[0050] Specifically, in order to implement the potassium dihydrogen phosphate quality control method based on big data analysis proposed in this embodiment, it is first necessary to collect quality inspection data and multi-dimensional reaction data. The specific process is as follows:
[0051] First, divide potassium dihydrogen phosphate into current potassium dihydrogen phosphate and historical potassium dihydrogen phosphate according to the production time. Obtain the pH value of the solution in the reaction kettle through a pH sensor, that is, the acid-base value, and obtain the sequence formed by the pH values at several consecutive moments, denoted as pH time-series data; obtain the sequence formed by the temperature inside the reaction kettle at several consecutive moments through a temperature sensor, denoted as temperature time-series data; obtain the sequence formed by the stirring speed of the stirrer inside the reaction kettle at several consecutive moments through the rotation speed sensor of the stirrer inside the reaction kettle, denoted as stirring speed time-series data.
[0052] Then, obtain the quality inspection data [cd, p, rj, rw, l] of historical potassium dihydrogen phosphate, and the reaction data of historical potassium dihydrogen phosphate during the reaction stage, where cd is purity, p is pH value, rj is solubility, rw is thermal stability, and l is particle size.
[0053] The quality inspection data usually includes purity analysis, pH value determination, heavy metal content detection, microbial content detection, solubility test, thermal stability test, particle size distribution, etc. In this embodiment, an array formed by the purity, pH value, solubility, thermal stability, and particle size of historical potassium dihydrogen phosphate is selected as the quality inspection data of historical potassium dihydrogen phosphate. The parameters selected for the quality inspection data can be adjusted according to the actual situation, and no specific limitation is made in this embodiment.
[0054] Among several batches of historical potassium dihydrogen phosphate production, each batch of potassium dihydrogen phosphate has corresponding reaction data and quality inspection data.
[0055] Then, perform Gaussian filtering on all the obtained reaction data to improve the data quality.
[0056] So far, several reaction data of current potassium dihydrogen phosphate and historical potassium dihydrogen phosphate, as well as the quality inspection data of historical potassium dihydrogen phosphate, have been obtained through the above method.
[0057] Step S002: Divide the corresponding historical potassium dihydrogen phosphate into several clustering clusters based on the similarity of quality inspection data, and screen out the approximate reaction clusters of the current potassium dihydrogen phosphate according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters.
[0058] It should be noted that when controlling the production quality of potassium dihydrogen phosphate, when analyzing the real-time reaction data combined with historical data through a recurrent neural network, since the reaction data is time-series data, and RNN has a long-term dependence problem when processing long sequences, that is, it is difficult to capture the time dependence relationship in the relatively distant past. In the production process of potassium dihydrogen phosphate, the operations and reactions in the past for a long time will have an important impact on the current product quality, and traditional RNN may be difficult to effectively capture this long-term dependence relationship. At the same time, it will make the computational complexity of RNN training and prediction relatively high, and may not be suitable for application scenarios that require real-time prediction, especially the production process control that requires rapid response and processing of a large amount of data. Therefore, it is necessary to process the input data of RNN to weaken the influence of the long-term dependence problem when RNN processes and analyzes long time-series data, and improve the ability of real-time analysis, improve the prediction efficiency and accuracy, so as to improve the production quality control effect of potassium dihydrogen phosphate.
[0059] Step 2.1: Divide the corresponding historical potassium dihydrogen phosphate into several clustering clusters based on the similarity of quality inspection data.
[0060] As an embodiment, the specific division method is:
[0061] According to the Euclidean distance between the quality inspection data of different historical potassium dihydrogen phosphates, and using the DBSCAN clustering algorithm to cluster all historical potassium dihydrogen phosphates to obtain several clustering clusters.
[0062] It should be noted that since there are differences in the production quality of potassium dihydrogen phosphate in different production batches, in order to facilitate subsequent effective adjustment of the parameters in the reaction kettle according to the production quality prediction results of the current potassium dihydrogen phosphate, in this embodiment, the historical potassium dihydrogen phosphate is classified to improve the accuracy of the subsequent prediction of the production quality of the current potassium dihydrogen phosphate.
[0063] Step 2.2: Screen out the approximate reaction clusters of the current potassium dihydrogen phosphate according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters.
[0064] As an embodiment, the specific method for obtaining the approximate reaction clusters is:
[0065] Step 2.2.1: Based on the change trends of the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster, respectively obtain the trend information sequence of the current potassium dihydrogen phosphate and the trend information sequence of each clustering cluster.
[0066] As an embodiment, the method for obtaining the trend information sequence of each clustering cluster is:
[0067] First, perform STL time series decomposition on all historical reaction data of potassium dihydrogen phosphate contained in any clustering cluster respectively to obtain the corresponding trend item sequences; construct a two-dimensional rectangular coordinate system, place the trend item sequences of the reaction data of potassium dihydrogen phosphate corresponding to all quality inspection data of the same clustering cluster in the same two-dimensional rectangular coordinate system, and use the least squares method to perform curve fitting on all trend item sequences in the two-dimensional rectangular coordinate system to obtain the fitting curve of each clustering cluster, denoted as the reaction trend curve of the clustering cluster. The reaction trend curve includes the fitting curves corresponding to the temperature time series data, pH time series data, and stirring speed time series data respectively;
[0068] Then, obtain several extreme points of any reaction trend curve, divide the reaction trend curve into several curve segments by using the extreme points, obtain the moments corresponding to the extreme points at both ends of the curve segment, and perform linear fitting on the curve segment between any adjacent extreme values to obtain the slope and intercept of the corresponding straight line. Obtain the array (t1, t2) formed by the moments corresponding to the extreme points at both ends of all curve segments of any reaction trend curve, and the array (k, b) formed by the slopes and intercepts of the fitting straight lines corresponding to all curve segments, denoted as the time array of the curve segment and the straight line parameter array respectively. Obtain the sequence formed by all time arrays and straight line parameter arrays in the reaction trend curve according to the time order of each curve segment in the reaction trend curve, denoted as the trend information sequence {[(t1, t2), (k, b)]1, [(t1, t2), (k, b)]2, …, [(t1, t2), (k, b)] S}, where S is the number of curve segments contained in the reaction trend curve corresponding to the clustering cluster.
[0069] As an embodiment, the method for obtaining the trend information sequence of the current potassium dihydrogen phosphate is as follows: perform STL time series decomposition on any reaction data of potassium dihydrogen phosphate in the current production process, obtain the corresponding trend item and perform curve fitting to obtain the corresponding reaction trend curve, obtain the extreme points of the reaction trend curve and divide them into several curve segments, and obtain the sequence formed by the time array and straight line parameter array of each curve segment, so as to obtain the corresponding trend information sequence {[(t1, t2), (k, b)]′1, [(t1, t2), (k, b)]′2, …, [(t1, t2), (k, b)]′ S′}, where S′ is the number of curve segments contained in the reaction trend curve corresponding to the current potassium dihydrogen phosphate.
[0070] It should be noted that if there are no extreme points in the reaction trend curve corresponding to potassium dihydrogen phosphate in the current production process, the entire reaction trend curve is regarded as a curve segment.
[0071] Step 2.2.2: Analyze the similarity between the current potassium dihydrogen phosphate and the trend information sequences of historical potassium dihydrogen phosphate in each clustering cluster to obtain the reaction similarity between the current potassium dihydrogen phosphate and each clustering cluster. Take the clustering cluster corresponding to the maximum reaction similarity as the approximate reaction cluster of the current potassium dihydrogen phosphate.
[0072] It should be noted that during the production process of potassium dihydrogen phosphate, the reaction data in the reaction kettle has obvious trend characteristics. Therefore, in the embodiments of the present invention, in order to effectively analyze the similarity between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate during the production and preparation process based on the change trend of the reaction data, the trend terms in each reaction data are separated by the method of time series decomposition, providing a clear data basis for subsequent analysis and modeling; and by placing the trend term sequences of the reaction data of potassium dihydrogen phosphate within the same clustering cluster in a two-dimensional coordinate system for curve fitting, it can help capture the overall trend shown by each reaction data of the historical potassium dihydrogen phosphate in the same clustering cluster, facilitating subsequent similarity analysis and comparison. In addition, during the production and preparation process of potassium dihydrogen phosphate, as the concentration of different ions in the solution changes, the pH value of the solution will also change accordingly. Similarly, the solution temperature and the stirring speed of the stirrer also have stage change characteristics. Therefore, in the embodiments of the present invention, the reaction trend curve is divided into multiple curve segments using the extreme points of the reaction trend curve, which can more finely analyze the local characteristics of the trend change, and further improve the subsequent similarity analysis of the reaction trend curve for the stage trend change characteristics, and screen out the clustering cluster similar to the reaction process of the current potassium dihydrogen phosphate from all clustering clusters.
[0073] As an embodiment, the specific calculation method of the reaction similarity is as follows:
[0074]
[0075] where f a is the reaction similarity between the current potassium dihydrogen phosphate and the a-th clustering cluster; x ji represents the i-th element of the j-th trend information sequence of the current potassium dihydrogen phosphate, x' aji represents the i-th element of the j-th trend information sequence of the a-th clustering cluster, J represents the number of trend information sequences, d() represents obtaining the Euclidean distance, I represents the quantity parameter, I″ represents the number of elements of the trend information sequence corresponding to the current potassium dihydrogen phosphate, and I' a represents the number of elements of the trend information sequence corresponding to the a-th clustering cluster, and min() represents obtaining the minimum value.
[0076] It should be noted that since the reaction data includes pH time series data, temperature time series data, and stirring speed time series data, and each reaction data corresponds to a reaction trend curve, each reaction data thus corresponds to a trend information sequence.
[0077] It should be noted that the trend information sequence reflects the change trend information in different local ranges of the corresponding reaction trend curve. However, since the current reaction data of potassium dihydrogen phosphate is real-time data obtained during the production preparation process, the current reaction data of potassium dihydrogen phosphate is incomplete compared to historical potassium dihydrogen phosphate. Considering that there are differences in the change of reaction data during the production process of different batches of potassium dihydrogen phosphate, resulting in differences in the number of divided data segments. Therefore, in order to fully obtain the change characteristics of the reaction process shown by the current potassium dihydrogen phosphate and each clustering cluster as a whole, the embodiments of the present invention obtain the Euclidean distance d(x ji , x′ aji ) between the current potassium dihydrogen phosphate and each trend information sequence of the clustering cluster to obtain the reaction similarity, which reflects the similarity degree of the production preparation process of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster.
[0078] So far, the approximate reaction cluster of the current potassium dihydrogen phosphate is obtained by the above method.
[0079] Step S003: Use the correlation between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate before the latest moment to supplement the reaction data of the current potassium dihydrogen phosphate after the latest moment to obtain the new reaction data of the current potassium dihydrogen phosphate. Then, use the slope, value of each data point in the new reaction data, and the correlation between the new reaction data and the reaction data of the historical potassium dihydrogen phosphate in the approximate reaction cluster to correct the new reaction data to obtain the final reaction data of the current potassium dihydrogen phosphate.
[0080] It should be noted that, compared with the reaction data of historical potassium dihydrogen phosphate, the current potassium dihydrogen phosphate is in the reaction process, resulting in less data volume of the current potassium dihydrogen phosphate. Usually, the reaction data used for training a recurrent neural network is the reaction data corresponding to the entire production process of an entire production batch. Therefore, in this embodiment, it is selected to complete the reaction data of the current potassium dihydrogen phosphate to improve the accuracy of subsequent quality prediction using a recurrent neural network.
[0081] Step 3.1, use the correlation between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate before the latest moment to supplement the reaction data of the current potassium dihydrogen phosphate after the latest moment to obtain the new reaction data of the current potassium dihydrogen phosphate.
[0082] Specifically, as an embodiment, first, for any reaction data of the current potassium dihydrogen phosphate, obtain the latest moment of the reaction data.
[0083] Then, using the latest moment, the corresponding reaction data of all historical potassium dihydrogen phosphates in the approximate reaction cluster are divided into two segments, one is the reaction data segment before the latest moment, and the other is the reaction data segment after the latest moment.
[0084] Finally, based on the similarity relationship between the reaction data of the current potassium dihydrogen phosphate and different reaction data segments, and combining the reaction data segments after the latest moment of all historical potassium dihydrogen phosphates, the reaction data of the current potassium dihydrogen phosphate are complemented to obtain the new reaction data of the current potassium dihydrogen phosphate, and the new reaction data include new temperature time series data, new pH time series data, and new stirring speed time series data.
[0085] As an embodiment, the calculation method for the numerical value corresponding to the data point after the latest moment of the new reaction data is:
[0086]
[0087] Among them, L u represents the numerical value of the u-th moment corresponding data point after the latest moment of the new reaction data of the current potassium dihydrogen phosphate, fmax represents the reaction similarity corresponding to the current potassium dihydrogen phosphate and the approximate reaction cluster, pe m represents the Pearson correlation coefficient between the reaction data of the current potassium dihydrogen phosphate and the reaction data segment before the latest moment of the m-th reaction data in the approximate reaction cluster, M represents the number of corresponding reaction data in the approximate reaction cluster, c mu represents the numerical value of the u-th moment corresponding data point after the latest moment of the m-th reaction data in the approximate reaction cluster.
[0088] It should be noted that since the similarity relationship between the reaction data of the current potassium dihydrogen phosphate and different reaction data segments is considered in the data complementation process, and the mutual influence relationship between different reaction data of potassium dihydrogen phosphate in the reaction stage is not considered, the embodiment of the present invention corrects the complemented data through the mutual influence relationship between different reaction data.
[0089] Step 3.2, using the slope, numerical value of each data point in the new reaction data, and the correlation between the new reaction data and the reaction data of historical potassium dihydrogen phosphates in the approximate reaction cluster, correct the new reaction data to obtain the final reaction data of the current potassium dihydrogen phosphate.
[0090] First, based on the slope, magnitude of each data point in any new reaction data, and the correlation between the new reaction data and the reaction data of historical potassium dihydrogen phosphates in the approximate reaction cluster, obtain the correction coefficient of each data point in the new reaction data.
[0091] As an embodiment, the specific method for obtaining the correction coefficient of each data point in the new reaction data is:
[0092]
[0093] Among them, α1 represents the new temperature time-series data, α2 represents the new pH time-series data, α3 represents the new stirring speed time-series data, and γ(α u ) represents the correction coefficient of the u-th data point in the new reaction data α, represents the approximation factor of the new reaction data α, and δ u () represents the numerical parameter for obtaining the value of the u-th data point of the new reaction data, and δ1′ u represents the appropriate numerical parameter of the u-th data point in the new temperature time-series data. || represents obtaining the absolute value, norm() represents the normalization function, and exp() represents the exponential function with the natural constant as the base.
[0094] The numerical parameter is the product of the slope and the value of the data point in the new reaction data.
[0095] The appropriate numerical parameter is the product of the slope of the data point in the new temperature time-series data and Br, where Br is the appropriate temperature of potassium dihydrogen phosphate in the reaction kettle during the reaction.
[0096] It should be noted that in this embodiment, the normalization range of norm() is (A, B), where A and B are the preset first parameter and second parameter. According to experience, the first parameter A = 0.5 and the second parameter B = 1.5, which can be adjusted according to the actual situation and are not specifically limited in this embodiment.
[0097] It should be noted that since the production of potassium dihydrogen phosphate usually involves acid-base neutralization reactions, and under acidic conditions (lower pH values), the acid-base neutralization reaction may proceed faster because the addition of potassium hydroxide (KOH) or other alkaline substances can more quickly neutralize the phosphate ions (PO4 3- ) in the phosphoric acid solution. Therefore, the smaller the pH value of the reaction solution, the faster the reaction proceeds. At the same time, because the neutralization reaction is an exothermic reaction, more heat is released, so the temperature of the solution in the reaction kettle will increase rapidly. On the contrary, under alkaline conditions (higher pH values), the neutralization may be relatively slow, resulting in a slow change in the temperature of the solution in the reaction kettle.
[0098] In addition, the faster the stirring speed of the stirrer in the reaction kettle, the more uniform the different ions in the reaction kettle are in the solution, the faster the acid-base neutralization reaction is, the more heat is released by the reaction, the higher the temperature of the solution is, and when the difference between the temperature of the solution and the theoretical temperature is smaller, then |δ u (α1)-δ1′ uThe smaller it is, the faster the reaction rate in the solution will be, that is, the higher the degree of neutralization of acid and base in the solution, and the pH value of the solution gradually shifts from acidic to neutral. Therefore, in this embodiment, considering the influence relationship among various factors in the production and preparation of potassium dihydrogen phosphate, in order to make the new reaction data closer to the actual situation, according to the slope, magnitude of each data point in the new reaction data and the correlation between the new reaction data and the reaction data of historical potassium dihydrogen phosphate in the approximate reaction cluster, the correction coefficient of each new reaction data is obtained, so as to correct the new reaction data and obtain the more accurate final reaction data of the current potassium dihydrogen phosphate.
[0099] Then, the new reaction data is corrected by using the correction coefficient to obtain the final reaction data of the current potassium dihydrogen phosphate.
[0100] As an embodiment, the specific method for obtaining the final reaction data is:
[0101] L′(α u )=γ(α u )×L(α u )
[0102] Wherein, L(α′ u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the final reaction data α′, γ(α u ) represents the correction coefficient of the data point corresponding to the u-th moment after the latest moment in the new reaction data α, and L(α u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the new reaction data α.
[0103] So far, the final reaction data of the current potassium dihydrogen phosphate is obtained by the above method.
[0104] Step S004: Based on the distribution of the quality inspection data in each clustering cluster, obtain the representative quality inspection data of each clustering cluster.
[0105] It should be noted that in this embodiment of the present invention, considering that the amount of data of historical potassium dihydrogen phosphate is very large, when using the quality inspection data of historical potassium dihydrogen phosphate as labels to train the RNN, the RNN will try to remember the specific features of each label instead of learning the general rules between them, resulting in a longer training time and an increased prediction time. In addition, too many label categories may introduce noise, such as confusion or misclassification between labels, which will affect the learning effect of the model. Therefore, in this embodiment of the present invention, in order to avoid the above problems, the quality inspection data of historical potassium dihydrogen phosphate belonging to the same clustering cluster are weighted and fused to obtain more representative quality inspection data and reduce the number of labels.
[0106] Specifically, for any clustering cluster, obtain the Euclidean distance between each quality inspection data in the clustering cluster and the clustering center of the clustering cluster, and use the Euclidean distance to perform weighted fusion on all quality inspection data in the clustering cluster to obtain the representative quality inspection data of the clustering cluster.
[0107] As an embodiment, the calculation method of the representative quality inspection data of any clustering cluster is as follows:
[0108]
[0109] Among them, D′ represents the representative quality inspection data, D0 represents the mode of all quality inspection data in the clustering cluster, D n represents the nth quality inspection data in the clustering cluster, and d′ n represents the Euclidean distance between the nth quality inspection data in the clustering cluster and the clustering center of the clustering cluster to which it belongs. g and r are respectively the preset third parameter and fourth parameter, and exp() represents the exponential function with the natural constant as the base.
[0110] It should be noted that according to experience, the preset third parameter g and fourth parameter r are 0.5 and 2 respectively, which can be adjusted according to the actual situation, and are not specifically limited in this embodiment.
[0111] So far, the representative quality inspection data of each clustering cluster is obtained through the above method.
[0112] Step S005: Combine the representative quality inspection data and use a neural network to predict the quality of the current potassium dihydrogen phosphate, and adjust the parameters in the current potassium dihydrogen phosphate production process through a decision tree to achieve quality control of the current potassium dihydrogen phosphate.
[0113] Step 5.1, combine the representative quality inspection data and use a neural network to predict the quality of the current potassium dihydrogen phosphate.
[0114] Specifically, first, construct a recurrent neural network.
[0115] Then, obtain the trend information sequences corresponding to all historical potassium dihydrogen phosphate reaction data respectively. Take the trend information sequence of a historical potassium dihydrogen phosphate as a sample, and take the representative quality inspection data corresponding to the clustering cluster to which the historical potassium dihydrogen phosphate belongs as the label of the corresponding sample. Obtain the set formed by all samples with labels as the data set for training the recurrent neural network. Divide the data set into a training set, a validation set, and a test set according to the ratio of 6:3:1. Use the data set, according to the cross-entropy loss function, and use the stochastic gradient descent algorithm to train the recurrent neural network to make it converge, and obtain the trained recurrent neural network as the quality prediction neural network.
[0116] Finally, obtain the trend information sequence of the final reaction data of the current potassium dihydrogen phosphate, and use the trend information sequence as the input of the quality prediction neural network. Analyze it using the quality prediction neural network to obtain the predicted quality data of the current potassium dihydrogen phosphate.
[0117] Step 5.2, adjust the parameters in the current production process of potassium dihydrogen phosphate through a decision tree to achieve quality control of the current potassium dihydrogen phosphate.
[0118] As an embodiment, the specific control method is: analyze the predicted quality data using a decision tree, and adjust and control the temperature, pH in the reaction kettle and the rotation speed of the stirrer in the production process of potassium dihydrogen phosphate according to the output of the decision tree, so as to achieve quality control of potassium dihydrogen phosphate.
[0119] As Figure 2 shown is the schematic diagram of the quality control process of potassium dihydrogen phosphate.
[0120] So far, this embodiment is completed.
[0121] It should be noted that the exp(-x) model used in this embodiment is only used to represent the negative correlation relationship and constrain the output result of the model to be within the interval (0, 1). In specific implementation, it can be replaced with other models with the same purpose. This embodiment only takes the exp(-x) model as an example for description and does not make specific limitations on it, where x refers to the input of the model.
[0122] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for quality control of potassium dihydrogen phosphate based on big data analysis, characterized in that, The method includes the following steps: Obtain a number of reaction data of current potassium dihydrogen phosphate and historical potassium dihydrogen phosphate, as well as quality inspection data of historical potassium dihydrogen phosphate; Based on the similarity of the quality inspection data, divide the corresponding historical potassium dihydrogen phosphate into several clustering clusters, and screen out the approximate reaction cluster of the current potassium dihydrogen phosphate according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters; Use the correlation between the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate before the latest moment to supplement the reaction data of the current potassium dihydrogen phosphate after the latest moment, obtain the new reaction data of the current potassium dihydrogen phosphate, and use the slope, value of each data point in the new reaction data and the correlation between the new reaction data and the reaction data of the historical potassium dihydrogen phosphate in the approximate reaction cluster to correct the new reaction data to obtain the final reaction data of the current potassium dihydrogen phosphate; Based on the distribution of the quality inspection data in each clustering cluster, obtain the representative quality inspection data of each clustering cluster; Combine the representative quality inspection data and use a neural network to predict the quality of the current potassium dihydrogen phosphate, and adjust the parameters in the production process of the current potassium dihydrogen phosphate through a decision tree to achieve quality control of the current potassium dihydrogen phosphate; The said according to the similarity of the change trends between the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in different clustering clusters The specific method for screening out the approximate reaction cluster of the current potassium dihydrogen phosphate includes: Based on the change trends of the reaction data of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster, respectively obtain the trend information sequence of the current potassium dihydrogen phosphate and the trend information sequence of each clustering cluster; Analyze the similarity of the trend information sequences of the current potassium dihydrogen phosphate and the historical potassium dihydrogen phosphate in each clustering cluster to obtain the reaction similarity between the current potassium dihydrogen phosphate and each clustering cluster, and take the clustering cluster corresponding to the maximum reaction similarity as the approximate reaction cluster of the current potassium dihydrogen phosphate; The specific method for obtaining the trend information sequence of the clustering cluster is: Perform STL time series decomposition on the reaction data of all historical potassium dihydrogen phosphate included in any clustering cluster respectively to obtain the corresponding trend item sequences; construct a two-dimensional rectangular coordinate system, place the trend item sequences of the reaction data of potassium dihydrogen phosphate corresponding to all quality inspection data of the same clustering cluster in the same two-dimensional rectangular coordinate system, and use the least squares method to perform curve fitting on all trend item sequences in the two-dimensional rectangular coordinate system to obtain the fitting curve of each clustering cluster, denoted as the reaction trend curve of the clustering cluster; Obtain several extreme points of an arbitrary reaction trend curve, divide the reaction trend curve into several curve segments using the extreme points, obtain the moments corresponding to the extreme points at both ends of the curve segment, perform linear fitting on the curve segment between any two adjacent extremes to obtain the slope and intercept of the corresponding straight line, obtain the array formed by the moments corresponding to the extreme points at both ends of all curve segments of an arbitrary reaction trend curve, and the array formed by the slopes and intercepts of the fitting straight lines corresponding to all curve segments, which are respectively denoted as the time array of the curve segment and the straight line parameter array. Obtain the sequence formed by all time arrays and straight line parameter arrays in the reaction trend curve according to the time order of each curve segment in the reaction trend curve, and denote it as the trend information sequence of the corresponding clustering cluster; The specific method for obtaining the trend information sequence of the current potassium dihydrogen phosphate is as follows: Perform STL time series decomposition on any reaction data of potassium dihydrogen phosphate in the current production process, obtain the corresponding trend term and perform curve fitting to obtain the corresponding reaction trend curve, obtain the extreme points of the reaction trend curve and divide them into several curve segments, and obtain the sequence formed by the time array and the straight line parameter array of each curve segment, thereby obtaining the corresponding trend information sequence of the current potassium dihydrogen phosphate.
2. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 1, wherein The specific calculation method for the reaction similarity is as follows: Among them, f a is the reaction similarity between the current potassium dihydrogen phosphate and the a-th clustering cluster; x ji represents the i-th element of the j-th trend information sequence of the current potassium dihydrogen phosphate, x ′ aji represents the i-th element of the j-th trend information sequence of the a-th clustering cluster, J represents the number of trend information sequences, d() represents obtaining the Euclidean distance, I represents the quantity parameter, I″ represents the number of elements of the trend information sequence corresponding to the current potassium dihydrogen phosphate, I ′ a represents the number of elements of the trend information sequence corresponding to the a-th clustering cluster, and min() represents obtaining the minimum value.
3. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 1, wherein The specific method for obtaining the new reaction data of the current potassium dihydrogen phosphate is as follows: For any reaction data of the current potassium dihydrogen phosphate, obtain the latest moment of the reaction data; Use the latest moment to divide the corresponding reaction data of all historical potassium dihydrogen phosphates in the approximate reaction cluster into two segments, one is the reaction data segment before the latest moment, and the other is the reaction data segment after the latest moment; According to the similarity relationship between the reaction data of the current potassium dihydrogen phosphate and different reaction data segments, and combining the reaction data segments after the latest moment reaction of all historical potassium dihydrogen phosphates, perform data completion on the reaction data of the current potassium dihydrogen phosphate to obtain the new reaction data of the current potassium dihydrogen phosphate, and the new reaction data includes new temperature time series data, new pH time series data, and new stirring speed time series data.
4. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 1, wherein The specific method for obtaining the final reaction data of the current potassium dihydrogen phosphate is as follows: According to the slope, magnitude of each data point in any new reaction data and the correlation between the new reaction data and the reaction data of historical potassium dihydrogen phosphates in the approximate reaction cluster, obtain the correction coefficient of each data point in the new reaction data; Use the correction coefficient to correct the new reaction data to obtain the final reaction data of the current potassium dihydrogen phosphate.
5. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 4, characterized in that The specific calculation method for the correction coefficient of each data point in the new reaction data is as follows: Among them, α1 represents the new temperature time-series data, α2 represents the new pH time-series data, α3 represents the new stirring speed time-series data, and γ(α u ) represents the correction coefficient of the u-th data point in the new reaction data α, represents the approximation factor of the new reaction data α, and δ u () represents the numerical parameter for obtaining the value of the u-th data point of the new reaction data, and δ1 ′ u represents the appropriate numerical parameter of the u-th data point in the new temperature time-series data. || represents obtaining the absolute value, norm() represents the normalization function, and exp() represents the exponential function with the natural constant as the base; the numerical parameter is the product of the slope and the value of the data point in the new reaction data; the appropriate numerical parameter is the product of the slope of the data point in the new temperature time-series data and Br, where Br is the appropriate temperature of potassium dihydrogen phosphate in the reaction kettle during the reaction.
6. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 1, characterized in that Based on the distribution of quality inspection data in each clustering cluster, obtain the representative quality inspection data of each clustering cluster, and the specific method included is as follows: For any clustering cluster, obtain the Euclidean distance between each quality inspection data in the clustering cluster and the clustering center of the clustering cluster, and use the Euclidean distance to perform weighted fusion on all quality inspection data in the clustering cluster to obtain the representative quality inspection data of the clustering cluster.
7. The method for controlling the quality of potassium dihydrogen phosphate based on big data analysis according to claim 4, wherein The specific method included in using the correction coefficient to correct the new reaction data to obtain the final reaction data of the current potassium dihydrogen phosphate is as follows: The calculation method for the value of the data point after the latest moment in the final reaction data is as follows: L ′ (α u ) = γ(α u ) × L(α u ) Among them, L(α ′ u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the final reaction data δ ′ . γ(α u ) represents the correction coefficient of the data point corresponding to the u-th moment after the latest moment in the new reaction data δ. L(δ u ) represents the value of the data point corresponding to the u-th moment after the latest moment in the new reaction data δ.
Citation Information
Patent Citations
Self-adaptive temperature early warning method and system based on hydrocracking unit
CN116227673A