A data anomaly detection method for cottonseed oil production
Through the improved adaptive local weighted distance metric and simulated annealing optimized clustering algorithm, the problems of misjudgment and missed judgment in data monitoring in cottonseed oil production were solved, the stability of the cottonseed oil production process and the improvement of product quality were achieved, and the intelligent level of production management was enhanced.
Patent Information
- Application Number
- CN202411962497.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In the existing cottonseed oil production process, traditional data monitoring methods rely on manual experience, have strong subjective factors and large errors, and are difficult to meet the needs of modern efficient and precise production. In addition, existing general data monitoring methods are prone to frequent misjudgments or omissions under complex working conditions, leading to production accidents and quality defects.
An improved clustering algorithm based on adaptive local weighted distance metric and simulated annealing optimization is adopted. Combined with the production characteristics of cottonseed oil, the cluster centers are calculated through adaptive local weighted distance metric and simulated annealing optimization, and the fuzzy weighted index is dynamically adjusted to accurately cluster and detect abnormal data.
It improves the stability of the cottonseed oil production process and the consistency of product quality, reduces the occurrence of misjudgments and missed judgments, ensures equipment safety, and improves the intelligence level and efficiency of production management.
Smart Images

Figure CN119848574B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cottonseed oil production, and in particular relates to a data anomaly detection method used in cottonseed oil production. Background Art
[0002] The cottonseed oil production process encompasses complex steps, including raw material pretreatment, oil extraction, and refining, involving the synergistic interaction of multiple parameters. The accuracy of process parameters at each stage is crucial for product quality, production efficiency, and equipment lifespan. While production equipment is gradually becoming automated with industrial upgrading and the advancement of intelligent technology, data monitoring and analysis technologies are lagging behind. Traditional monitoring methods rely heavily on manual experience to determine instrument values, which is subject to significant subjective factors, large errors, and poor timeliness, making them inadequate for modern, efficient, and precise production. Furthermore, cottonseed oil production conditions are complex and highly variable, influenced by raw material quality, equipment performance, and environmental factors. Data fluctuations are difficult to track, and subtle anomalies can easily accumulate, leading to serious production accidents and quality defects. For example, pressure fluctuations in the extraction process can cause fluctuations in oil yield, while temperature inaccuracies in the refining stage can affect the color and flavor of the oil. Existing general data monitoring methods fail to account for the specific characteristics of cottonseed oil production. Data processing and analysis models are generally general but not specific. Under complex operating conditions, they are prone to frequent misjudgments or omissions, leading to poor production management decisions. Summary of the Invention
[0003] In view of the technical problems existing in the above background technology, the present invention proposes a data anomaly detection method for cottonseed oil production.
[0004] In order to achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0005] S1. First, collect sensor data information and pre-process the data;
[0006] S2. Then, the model clustering algorithm is improved to estimate the reasonable cluster center according to the normal working condition category of cottonseed oil production;
[0007] The improvement of the model clustering algorithm in step S2 is implemented as follows:
[0008] S21, introduce adaptive local weighted distance metric and construct adaptive local weighted distance in is the adaptive local weighted distance, n is the feature dimension, ω l is the adaptive weight of feature l, σ is the variance, c jl Represents the cluster center c j The value in the lth feature dimension, x il Represents the data point x i The value in the lth feature dimension;
[0009] S22. In each iteration, the cluster center set obtained in the previous iteration is Where C is the number of clusters, and the membership matrix is calculated based on the current data point set.
[0010] S23. For data point x i and cluster center c j , calculate the adaptive local weighted distance Substitute into the membership formula Where m is the fuzzy weighted index, which is adaptively adjusted according to the dynamic characteristics of production data;
[0011] S24, based on the current membership matrix and the data point set, the simulated annealing method is introduced to optimize and calculate the new cluster center set;
[0012] S25. Finally, the membership matrix before and after the iteration is compared to determine whether it converges. If it converges, the iteration ends. If it does not converge, the cluster center and the membership matrix are updated until the convergence condition is met.
[0013] S3. Based on the clustering results obtained by the improved clustering algorithm, the real-time cottonseed production data is input to detect abnormal data.
[0014] Preferably, the sensor data information in step S1 includes temperature information, humidity information, and impurity detection information of the raw material pretreatment stage, press chamber pressure information, screw speed information, and oil outlet temperature information of the oil pressing stage, deacidification tower temperature information, alkali solution flow information, and decolorization tank pressure information of the refining stage.
[0015] Preferably, the fuzzy weighted index m in step S23 is specifically implemented as follows:
[0016] S231, first setting the value of the initial fuzzy weighted index m;
[0017] S232. Calculate the distribution entropy E of the data points in each cluster. For the j-th cluster, the entropy E j The calculation formula is: The distribution entropy of the entire dataset
[0018] S233, adjust m according to the value of entropy, Among them E max , E min are the maximum and minimum entropy values observed during the iterations, respectively.
[0019] Preferably, the specific implementation of introducing the simulated annealing idea to optimize and calculate the new cluster center set in step S24 is as follows:
[0020] S241, first set the initial temperature and cooling rate;
[0021] S242. Calculate the objective function value As an energy function, it measures the quality of clustering;
[0022] S243, then generate a new set of candidate cluster centers Through C t The middle cluster centers are obtained by random perturbation in a small range;
[0023] S244. For each cluster center For each feature dimension l, generate a random number Δ that obeys the normal distribution jl , then each feature dimension value of the candidate cluster center is
[0024] S245, then compare the objective function value, if J(C t* )<J(C t ) then accept the candidate cluster center, i.e. C t+1 =C t* , if J(C t* )≥J(C t ), then the candidate cluster center is accepted with probability p;
[0025] S246. Finally, the temperature is updated according to the cooling rate to obtain the final cluster center.
[0026] As a preference, the probability in step S245 is Where T t is the current temperature value of the simulated annealing algorithm.
[0027] Preferably, in step S25, the membership matrix before and after iteration is compared to determine whether it has converged. The criterion is: || U t+1 -U t || F <0.05, where || || F is the Frobenius norm.
[0028] Compared with the prior art, the advantages and positive effects of the present invention are that the improved model-based clustering algorithm of the present invention has outstanding improvements. The adaptive local weighted distance metric considers the multi-dimensional relationship and distribution characteristics between data points and cluster centers, dynamically adjusts the fuzzy weighted index, accurately reflects data differences, improves clustering accuracy, effectively handles complex production data fluctuations, and reduces misjudgments and missed judgments. In addition, simulated annealing optimization is introduced to help the algorithm escape from the local optimum. When cottonseed oil production is disturbed by raw materials, equipment, and environmental factors, resulting in complex and changeable data, the optimal cluster center is accurately located, and minor anomalies are keenly captured to ensure stable production, constant quality, and equipment safety, thereby improving the level and efficiency of intelligent management of the industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0030] Figure 1 Implementation flow chart of the present invention. DETAILED DESCRIPTION
[0031] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways than those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0033] Example, in the field of cottonseed oil production, it is crucial to ensure the stability of the production process, consistent product quality and safe operation of equipment. However, traditional data monitoring methods are powerless when faced with complex and changeable cottonseed oil production conditions. In the oil pressing link, if there is an abnormal fluctuation in the pressing chamber pressure, it may cause a sudden drop in oil yield and a decline in oil quality; in the refining stage, the temperature of the deacidification tower or the flow of alkali liquid is inaccurate, which can easily lead to quality defects such as excessive acid value and darker color of the product. In order to accurately monitor abnormalities in cottonseed oil production data and ensure efficient and stable production, the present invention proposes a data anomaly detection method for cottonseed oil production. The implementation process of the present invention is as follows: Figure 1 shown.
[0034] To effectively collect key data from all stages of cottonseed oil production and improve data quality, while addressing the issues of misjudgment and missed abnormality monitoring due to noise interference and data redundancy, a comprehensive preprocessing solution was implemented. The collected sensor data includes temperature, humidity, and impurity detection information from the raw material preprocessing stage; press chamber pressure, screw speed, and oil outlet temperature from the oil pressing stage; and deacidification tower temperature, alkali flow rate, and bleaching tank pressure from the refining stage. Wavelet transforms are first used to denoise each dimension of the collected data tensor. Adaptive wavelet basis functions are selected based on the data's frequency characteristics, decomposing the data into multi-layer approximations and detail coefficients. The detail coefficients are then de-noised and reconstructed using Stein's unbiased risk thresholding. PCA dimensionality reduction is then performed, and the eigenvalues and eigenvectors are calculated from the covariance matrix. Principal components are selected based on their eigenvalue proportions. A preprocessing matrix is constructed from the reduced data and the linear combination coefficients of the principal components. This low-dimensional, high-quality data enables efficient processing by subsequent algorithms.
[0035] To optimize the clustering algorithm to accurately classify cottonseed oil production data and accurately locate abnormal data, the model clustering algorithm was deeply improved. An adaptive local weighted distance metric and a dynamically adjusted m-value membership formula were introduced to fit the complex patterns of production data and improve clustering accuracy and stability. Simulated annealing was used to optimize cluster center calculation, break through local optimality, and enhance anomaly detection sensitivity. An adaptive local weighted distance metric was introduced to construct an adaptive local weighted distance in is the adaptive local weighted distance, n is the feature dimension, ω l is the adaptive weight of feature l, σ is the variance, c jl Represents the cluster center c j The value in the lth feature dimension, x il Represents the data point x i The value on the lth feature dimension; in each iteration, the cluster center set obtained based on the previous iteration Where C is the number of clusters, and the membership matrix is calculated based on the current data point set. For a data point x i and cluster center c j , calculate the adaptive local weighted distance Substitute into the membership formula Where m is the fuzzy weighted index, which is adaptively adjusted according to the dynamic characteristics of production data. The specific implementation of the fuzzy weighted index m is as follows: first, set the value of the initial fuzzy weighted index m; calculate the distribution entropy E of the data points in each cluster. For the jth cluster, the entropy E j The calculation formula is: The distribution entropy of the entire dataset Adjust m according to the value of entropy, Among them E max , E minThey are the maximum and minimum entropy values observed during the iteration process. At the same time, based on the current membership matrix and data point set, the simulated annealing idea is introduced to optimize the calculation of the new cluster center set; first set the initial temperature and cooling rate; calculate the objective function value As an energy function, measure the quality of clustering; then generate a new set of candidate cluster centers Through C t The middle cluster centers are randomly disturbed in a small range to obtain; for each cluster center For each feature dimension l, generate a random number Δ that obeys the normal distribution jl , then each feature dimension value of the candidate cluster center is Then compare the objective function values. If J(C t* )<J(C t ) then accept the candidate cluster center, i.e. C t+1 =C t* , if J(C t* )≥J(C t ), then the candidate cluster center is accepted with probability p; where the probability Where T t is the current temperature value of the simulated annealing algorithm, and the temperature is updated according to the cooling rate to obtain the final cluster center. Finally, the membership matrix before and after the iteration is compared to determine whether it has converged. If it has converged, the iteration ends. If it has not converged, the cluster center and the membership matrix are updated until the convergence condition is met. Among them, the comparison of the membership matrix before and after the iteration to determine whether it has converged is: ||U t+1 -Ut|| F <0.05, where || || F =Frobenius norm. Deep improvements to the model clustering algorithm offer multiple advantages. The introduction of an adaptive local weighted distance metric and a dynamically adjusted m-value membership formula adapts to complex production data patterns, improving clustering accuracy and stability. Simulated annealing optimizes cluster center calculation, breaking through local optimality and enhancing anomaly detection sensitivity. Accurately capturing subtle anomalies effectively ensures stable cottonseed oil production.
[0036] Finally, to accurately detect anomalies in cottonseed oil production in real time and ensure smooth and stable production processes, an improved clustering algorithm was used to detect anomalies in real-time cottonseed production data. During ongoing production, new data was fed into the improved algorithm model and compared with the clustering results. This enabled operators to respond quickly, maintain production quality and efficiency, reduce losses from failures, and enhance the intelligent and precise management of the entire production process, providing solid technical support for corporate profitability and product competitiveness.
[0037] The above description is merely a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any person skilled in the art may utilize the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes for application in other fields. However, any simple modification, equivalent change, and modification of the above embodiments made in accordance with the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for detecting data anomalies in cottonseed oil production, characterized in that: The following steps are involved: S1. First, collect sensor data information and pre-process the data; S2. Then, the model clustering algorithm is improved to estimate the reasonable cluster center according to the normal working condition category of cottonseed oil production; The improvement of the model clustering algorithm in step S2 is implemented as follows: S21, introduce adaptive local weighted distance metric and construct adaptive local weighted distance in is the adaptive local weighted distance, n is the feature dimension, ω l is the adaptive weight of feature l, σ is the variance, c jl Represents the cluster center c j The value in the lth feature dimension, x il Represents the data point x i The value in the lth feature dimension; S22. In each iteration, the cluster center set obtained in the previous iteration is Where C is the number of clusters, and the membership matrix is calculated based on the current data point set. S23. For data point x i and cluster center c j , calculate the adaptive local weighted distance Substitute into the membership formula Where m is the fuzzy weighted index, which is adaptively adjusted according to the dynamic characteristics of production data; S24, based on the current membership matrix and the data point set, the simulated annealing method is introduced to optimize and calculate the new cluster center set; S25. Finally, the membership matrix before and after the iteration is compared to determine whether it converges. If it converges, the iteration ends. If it does not converge, the cluster center and the membership matrix are updated until the convergence condition is met. S3. Based on the clustering results obtained by the improved clustering algorithm, the real-time cottonseed production data is input to detect abnormal data. The sensor data information in step S1 includes temperature information, humidity information, and impurity detection information in the raw material pretreatment stage, press chamber pressure information, screw speed information, and oil outlet temperature information in the oil pressing stage, and deacidification tower temperature information, alkali solution flow information, and decolorization tank pressure information in the refining stage; The specific implementation of the fuzzy weighted index m in step S23 is: S231, first setting the value of the initial fuzzy weighted index m; S232. Calculate the distribution entropy E of the data points in each cluster. For the j-th cluster, the entropy E j The calculation formula is: The distribution entropy of the entire dataset S233, adjust m according to the value of entropy, Among them E max , E min are the maximum and minimum entropy values observed during the iterations, respectively.
2. The method for detecting data anomaly in cottonseed oil production according to claim 1, wherein: The specific implementation of introducing the simulated annealing idea to optimize and calculate the new cluster center set in step S24 is as follows: S241, first set the initial temperature and cooling rate; S242. Calculate the objective function value As an energy function, it measures the quality of clustering; S243, then generate a new set of candidate cluster centers Through C t The middle cluster centers are obtained by random perturbation in a small range; S244. For each cluster center For each feature dimension l, generate a random number Δ that obeys the normal distribution jl , then each feature dimension value of the candidate cluster center is S245, then compare the objective function value, if Then accept the candidate cluster center, that is like Then accept the candidate cluster center with probability p; S246. Finally, the temperature is updated according to the cooling rate to obtain the final cluster center.
3. The method for detecting data anomaly in cottonseed oil production according to claim 2, wherein: The probability in step S245 Where T t is the current temperature value of the simulated annealing algorithm.
4. The method for detecting data anomaly in cottonseed oil production according to claim 1, wherein: In step S25, the membership matrix before and after iteration is compared, and the criterion for judging whether it converges is: || U t+1 -U t || F <0.05, where || || F is the Frobenius norm.