Method and system for monitoring energy consumption of moderate refining of torreya grandis oil
By combining graph neural networks with bidirectional GRU networks, a semantic behavior vector F is generated. Combined with LSTM and random forest classifiers, the problem of insufficient dynamic relationship characterization in the torreya oil refining process in traditional energy consumption monitoring methods is solved. Adaptive monitoring of energy consumption deviations and accurate classification of abnormal behaviors are achieved, and a closed-loop energy consumption monitoring system is constructed.
Patent Information
- Application Number
- CN202510700048.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional energy consumption monitoring methods are difficult to comprehensively depict the dynamic relationship between energy consumption deviation and process response in the refining process of Torreya grandis oil, resulting in a lack of accuracy and universality in the judgment of appropriate standards, and are unable to achieve accurate identification and effective regulation of complex abnormal types.
A method combining graph neural networks and bidirectional GRU networks is adopted to generate a semantic behavior vector F by constructing a three-variable graph embedding. Combined with the LSTM prediction mechanism and random forest classifier, adaptive monitoring of energy consumption status and accurate classification of abnormal behavior are achieved, and the policy library is linked to perform real-time adjustments.
The adaptability and accuracy of energy consumption deviation judgment are improved, efficient and automatic energy consumption anomaly monitoring and intervention control are realized, and a closed-loop energy consumption monitoring system from behavior observation to regulation feedback is constructed.
Smart Images

Figure CN120597110A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy consumption monitoring, in particular to a method and system for monitoring energy consumption during moderate refining of torreya oil. Background Art
[0002] With the continuous advancement of vegetable oil deep processing technology, the refining process, as a key link in ensuring oil quality and improving product stability, has gradually evolved from a traditional experience-driven approach to an intelligent and digital one. As a high-end specialty edible oil, the proper refining process of Torreya grandis oil is particularly important, not only affecting the final quality but also directly related to energy efficiency, production costs, and environmental emissions. Currently, refining systems mostly use multi-stage processing methods such as segmented temperature control, stirring, and vacuum deodorization. However, energy consumption behavior is affected by factors such as raw material characteristics, inter-stage transition efficiency, and uneven thermal distribution, and is characterized by nonlinearity, non-stationarity, and multi-stage coupling. Traditional energy consumption monitoring methods are mostly based on local heat metering, rule-based threshold warnings, or fixed-stage analysis. These methods make it difficult to comprehensively characterize the dynamic relationship between "energy consumption deviation-process response" in the Torreya grandis oil refining process, resulting in a lack of accuracy and universality in determining the "appropriate" standard.
[0003] Existing research methods for industrial energy consumption monitoring mostly rely on trend modeling of time series and threshold analysis of statistical rules. Although they have certain application value in some industrial fields, they have three shortcomings: First, they lack the ability to model multi-variable coupling structures, making it difficult to characterize the dynamic interaction patterns between variables such as electric power, thermal power and flow; second, they cannot accurately identify the semantics of process behavior and cannot distinguish complex anomaly types such as "heat consumption redundancy" and "excessive deacidification"; third, the processing strategy lags behind and cannot link the control system to form a feedback loop, resulting in the ability to only detect abnormal conditions but difficult to control them. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method and system for monitoring the energy consumption of torreya oil during moderate refining, which solves the problem that traditional energy consumption monitoring methods are mostly based on local heat metering, rule threshold warning, or fixed-segment analysis, which makes it difficult to comprehensively characterize the dynamic relationship between "energy consumption deviation-process response" in the torreya oil refining process, resulting in a lack of accuracy and universality in judging the "moderate" standard.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for monitoring energy consumption of moderate refining of Torreya grandis oil, comprising:
[0008] Multimodal energy consumption data is collected from the refinery and preprocessed to generate a time series feature matrix. A feature variable graph is constructed based on the feature dimensions and a graph attention mechanism is introduced to generate a graph embedding representation.
[0009] Input the graph embedding features into the two-layer GRU structure to learn the dynamic evolution features in the process time series and obtain the semantic behavior vector F;
[0010] Based on the semantic behavior vector F, the energy consumption state is predicted, the energy consumption deviation is identified and the abnormal state is marked. The abnormality classification is performed using random forest to obtain the abnormal behavior type, and treatment measures are formulated and implemented.
[0011] As a preferred solution of the method for monitoring energy consumption of moderate refining of Torreya grandis oil described in the present invention, the method comprises the following steps: constructing a feature variable graph based on the feature dimension and introducing a graph attention mechanism for modeling, generating a graph embedding representation, and taking the three variables in the current vector as three nodes in the graph for each moment t, constructing a three-node complete graph, and the edge set E includes 3 pairs of undirected edges (v1, v2), (v1, v3), and (v2, v3). The initial input variables of each node are linearly mapped and embedded into an m-dimensional vector. A single-layer feedforward neural network is used to concatenate the features of any two nodes i and j and calculate the scores to obtain the interaction influence score of node i on node j. For each node i, all its scores are normalized into aggregation weights, and each node is weighted and aggregated by neighbor features to generate a graph enhancement representation The graph enhancement representation is concatenated as the input feature at that moment to finally form the graph embedding sequence matrix.
[0012] As a preferred solution of the method for monitoring energy consumption of moderate refining of Torreya grandis oil according to the present invention, the method of inputting graph embedding features into a double-layer GRU structure to learn the dynamic evolution features in the process time series to obtain the semantic behavior vector F includes:
[0013] Build a bidirectional GRU network, including two independent state update modules: forward GRU and reverse GRU;
[0014] The graph embedding sequence is sequentially input into the forward GRU module and the reverse GRU module for updating, and the hidden states in the forward and reverse directions are spliced in the feature dimension to obtain the complete behavior state representation h at the current moment t ;
[0015] Denote the state at all moments as h t Summarize and construct a complete sequence of behavioral evolution states;
[0016] The state vector h at all moments t Input the attention mechanism and calculate the corresponding attention scores respectively;
[0017] Use attention weight αt Perform weighted summation on the bidirectional GRU state sequence to obtain the final global process behavior representation vector F;
[0018] Based on the GRU and attention mechanism model structure, three key parameters are extracted, including the number of GRU hidden state units, the attention mechanism mapping dimension, and the Dropout ratio;
[0019] According to the difference between the behavior representation vector F and the actual energy consumption behavior, a multi-objective fitness function is constructed;
[0020] The chaotic variables are generated by using the Logistic mapping formula. By iterating the Logistic mapping formula, the chaotic variable sequence is obtained and assigned to the whale individual structure representation to construct the whale individual set P. (0) ;
[0021] For each individual whale, the GRU and attention structure are reconfigured, the network is retrained, and the corresponding behavior representation vector F is generated. The vector is compared with the actual energy consumption behavior to calculate the fitness score;
[0022] In each iteration, the global adjustment factor is calculated and the structural parameter vector of each individual is updated;
[0023] After each round of structural fitness evaluation is completed, the average change rate Δ of consecutive k rounds is calculated i ;
[0024] If Δ i If it is less than the preset threshold E, the individual is considered to be trapped in a local optimum and needs to perform a jump optimization operation;
[0025] Update the structure vector of the individual that needs to jump, use the updated structure to configure the network parameters, reconfigure the GRU and attention modules, and input the graph embedding sequence for forward propagation. Calculate the hidden state and the corresponding attention weight α at each moment to generate a new behavior state representation vector F'. Compare the newly generated F' with the current real energy consumption behavior data, calculate the key fitness indicators, and compare the fitness of each individual. If the individual's fitness value is higher than the current global optimal value, update the global optimal solution to the structure of the individual. Otherwise, retain the original global optimal structure.
[0026] Based on the optimal structural configuration, the final GRU model structure is constructed. Through the final model, the entire refining process of Torreya grandis oil is modeled to obtain a semantic behavior vector F with high expressiveness.
[0027] As a preferred solution of the method for monitoring energy consumption of moderately refined torreya oil described in the present invention, the method includes predicting energy consumption status based on the semantic behavior vector F, identifying energy consumption deviation, and marking abnormal status, which includes using an LSTM model to predict the energy consumption status to obtain an energy consumption status prediction value, calculating the RMSE error between the actual energy consumption and the prediction to obtain an abnormal score value, recording the abnormal score values at consecutive time steps in sequence to form an abnormal score sequence, inputting the continuous abnormal score sequence into a POT extreme value analysis algorithm, fitting its tail distribution to obtain an optimal threshold D, and marking time t as a candidate abnormal point of energy consumption deviation when the abnormal score is greater than the threshold D.
[0028] As a preferred solution of the method for monitoring the energy consumption of moderate refining of Torreya grandis oil of the present invention, wherein: the abnormal behavior type obtained by using random forest for abnormal classification refers to collecting the corresponding acid value a according to the abnormal time t. t and color data c t And calculate the ratio of heat energy to acid value g, and construct the behavior type label set U={(b i ,c i )},c i ∈{0,1,2}, where b i =[a t ,c t ,g] is the input feature vector of the i-th sample, c i is the behavior type label corresponding to the sample;
[0029] The Torreya grandis oil data corresponding to the abnormal time t is input into the random forest model to obtain the category label and the corresponding abnormal behavior type.
[0030] As a preferred solution of the method for monitoring energy consumption of moderate refining of Torreya grandis oil according to the present invention, the formulation and implementation of treatment measures refers to formulating and implementing corresponding treatment measures according to the identified heat consumption redundancy type anomaly and excessive deacidification type anomaly types.
[0031] As a preferred embodiment of the method for monitoring energy consumption during moderate refining of Torreya grandis oil according to the present invention, the method of collecting multimodal energy consumption data from the refining workshop and preprocessing the data to generate a time series feature matrix comprises collecting the electric power, thermal power, and flow data of the refining workshop, standardizing the data, combining all standardized results to form a behavior vector under a unified numerical scale, and performing time series splicing to form a time series feature matrix X.
[0032] In a second aspect, the present invention provides a torreya oil moderate refining energy consumption monitoring system, comprising:
[0033] Data acquisition module, used to collect energy consumption data in real time and generate time series feature matrix after preprocessing;
[0034] The graph attention modeling module treats each behavior vector as a three-node graph, uses the GAT mechanism to calculate the attention scores between nodes, generates a graph embedding representation, and outputs a sequence;
[0035] The attention modeling module takes as input a graph embedding sequence, models the process evolution, outputs a bidirectional state sequence, and uses the attention mechanism to generate a semantic behavior vector.
[0036] The energy consumption state prediction module is used to use the LSTM model to predict the energy consumption at the next moment, calculate the RMSE error, form an anomaly score sequence, use the POT algorithm to fit the anomaly score distribution, generate the threshold D, and determine the deviation point;
[0037] The anomaly recognition module is used to construct a three-dimensional feature vector using the collected acid value, color, and heat energy / acid value ratio features, and classify the abnormal behavior type using a random forest model;
[0038] The process execution control module is used to select corresponding treatment measures according to the type of abnormal behavior, record execution logs and generate alarms or prompts.
[0039] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for monitoring energy consumption of moderate refining of torreya oil as described in the first aspect of the present invention is implemented.
[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the method for monitoring energy consumption of moderate refining of Torreya grandis oil as described in the first aspect of the present invention is implemented.
[0041] The present invention has the following beneficial effects: Based on a structure combining a graph neural network and a bidirectional GRU network, it proposes constructing a three-variable graph embedding, generating a semantic behavior vector F, and integrating an LSTM prediction mechanism to identify energy consumption deviations. The POT algorithm accurately sets dynamic thresholds, improving the adaptability of deviation judgment. Combining a random forest classifier with semantic rules, it accurately classifies energy consumption deviations as process response mismatches, and uses a linked strategy library to adjust temperature settings or process stage switching in real time, thereby achieving efficient, automatic, and feedback-based energy consumption anomaly monitoring and intervention control. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only 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 work.
[0043] Figure 1 This is a flow chart of the method for monitoring energy consumption during moderate refining of Torreya grandis oil in Example 1.
[0044] Figure 2 This is a structural diagram of the energy consumption monitoring system for moderate refining of Torreya grandis oil in Example 1.
[0045] Figure 3 This is a flow chart of the three-node graph construction process in Example 1. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0047] 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 different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0048] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0049] Example 1, with reference to Figures 1 to 3 , which is the first embodiment of the present invention, provides a method for monitoring energy consumption of moderate refining of Torreya grandis oil, comprising the following steps:
[0050] S1. Collect multimodal energy consumption data from the refinery and preprocess it to generate a time series feature matrix. Based on the feature dimensions, a feature variable graph is constructed and a graph attention mechanism is introduced to model the data to generate a graph embedding representation.
[0051] Specifically, collecting multimodal energy consumption data from the refining workshop and preprocessing it to generate a time series feature matrix means deploying electric power sensors, thermal power monitoring devices, and flow meters in the refining workshop to collect data such as electric power, thermal power, and flow, and then standardizing the data and combining all standardized results to form a behavior vector under a unified numerical scale. The standardized vectors generated in the past m sampling periods (e.g., the past 2 hours, a total of 240 groups of samples) are spliced in time series to form the time series feature matrix X.
[0052] Multimodal energy consumption data mainly refers to three key variables in the refining process: electric power (P), thermal power (Q), and flow rate (F). Electric power reflects the behavior of electrical loads such as stirring, transmission, and driving. Thermal power corresponds to the intensity of thermal energy consumed by oil heating, while flow rate describes the oil processing rate per unit time and is an important reflection of process rhythm and load changes. By deploying electric power sensors, thermal energy monitoring modules, and high-precision flow meters at key locations in the refining workshop, a complete multivariable operating data stream can be obtained within the sampling period. Compared with the traditional energy consumption recording method that relies only on a single variable, this multimodal data structure significantly enhances the holographic perception of the process operation status. First, by integrating three types of heterogeneous energy consumption indicators, the system can fully construct a dynamic mapping between process input and energy efficiency output, forming a behavior-driven modeling mechanism; second, the introduction of time series structure enables short-term fluctuations, trend changes, and interactive relationships to be fully learned by the modeling network, improving the model's ability to identify the "moderately refined" state boundary; third, standardized preprocessing ensures data quality consistency, providing clean and normalized modeling input for subsequent graph neural networks and GRU models, which is conducive to stable parameter convergence and outlier suppression; finally, the input model constructed based on the structured time matrix is easy to deploy in embedded edge systems, realizing real-time data-driven energy consumption monitoring and dynamic modeling, which is suitable for scalable application scenarios in the continuous refining process of various types of industrial oils and fats.
[0053] Furthermore, a feature variable graph is constructed based on the feature dimension and a graph attention mechanism is introduced for modeling. The generated graph embedding representation means that for each moment t, the three variables in the current vector are used as three nodes in the graph to construct a three-node complete graph. The edge set E includes 3 pairs of undirected edges (v1, v2), (v1, v3), and (v2, v3), which represent the possible interaction between the three variables at that moment. The initial input variable of each node is linearly mapped and embedded into an m-dimensional vector. A single-layer feedforward neural network is used to splice the features of any two nodes i and j and calculate the scores to obtain the interaction effect score of node i on node j.
[0054]
[0055] Where LeakyReLU() is the activation function, a T [] represents the weighted projection of the splicing vector in the attention space, It is to concatenate the embedding vectors of nodes i and j;
[0056] For each node i, normalize all its scores to the aggregate weight:
[0057]
[0058] Where, is the final attention weight of node j to node i, is the set of all nodes adjacent to node i, is the interactive impact score of node i on node k;
[0059] Each node is weighted and aggregated through neighbor features to generate a graph enhancement representation
[0060]
[0061] Where, is the feature embedding vector of neighbor node j, σ() is the activation function;
[0062] The graph enhancement representation is concatenated as the input feature at that moment to finally form the graph embedding sequence matrix.
[0063] This paper explores the structural dependencies between variables and improves the ability to express "energy consumption coupling behavior"; realizes adaptive weighting of neighbor influence through the attention mechanism to avoid redundant information interfering with the main feature learning; forms a context-sensitive embedding representation, laying a high semantic foundation for subsequent time series modeling and anomaly detection.
[0064] S2. Input the graph embedding features into the two-layer GRU structure to learn the dynamic evolution features in the process time series and obtain the semantic behavior vector F;
[0065] Specifically, the graph embedding features are input into the two-layer GRU structure to learn the dynamic evolution features in the process time series. The semantic behavior vector F is obtained, which includes:
[0066] To capture the temporal evolution of energy consumption and process indicators during the torreya oil refining process, particularly the impact of previous process behavior on current behavior and how the current state translates into future performance, a bidirectional GRU network structure was used.
[0067] Build a bidirectional GRU network, including two independent state update modules: forward GRU and reverse GRU;
[0068] The graph embedding sequence is sequentially input into the forward GRU module and the following updates are performed:
[0069]
[0070] Where, is the forward GRU hidden state, H t is the input graph embedding vector, is the previous hidden state of the forward GRU, GRU fw It is a forward GRU module;
[0071] Its internal operations include updating the gate, resetting the gate, and generating candidate states. Considering that the flow of sections in the torreya oil refining process has inverse constraints on the current state (for example, the section to be switched will affect the heating strategy), the graph embedding sequence is input into the reverse GRU from back to front:
[0072]
[0073] It is the reverse GRU module;
[0074] Its internal parameters are trained independently from the forward GRU, and the hidden states in the forward and reverse directions are spliced in the feature dimension to obtain the complete behavior state representation h at the current moment. t :
[0075]
[0076] Where 2h is the output dimension after bidirectional splicing;
[0077] This vector combines the "historical trend" of the forward GRU modeling and the "future evolution" of the backward GRU modeling, representing the complete temporal context of the torreya oil refining behavior at the current time point;
[0078] Denote the state at all moments as h t Summarize and construct a complete sequence of behavioral evolution states;
[0079] The state vector h at all moments t Input the attention mechanism and calculate its corresponding attention score (that is, the contribution to the global behavior at that moment):
[0080]
[0081] Where h t is the behavior state vector output by GRU at time t, W a is the mapping matrix used to transform h t Mapped to the attention space, v is the score weight vector, b a is the bias vector, tanh() is the activation function, α t is the attention score at time t, and n is the number of time steps in the current modeling window;
[0082] Use attention weight α t Perform weighted summation on the bidirectional GRU state sequence to obtain the final global process behavior representation vector F:
[0083]
[0084] Where n is the number of time steps in the current modeling window;
[0085] Based on the GRU and attention mechanism model structure, three key parameters are extracted, including the number of GRU hidden state units, the attention mechanism mapping dimension, and the Dropout ratio;
[0086] In order to perform a quantifiable evaluation of each set of structural configurations, the following multi-objective fitness function F(X) is constructed based on the difference between the behavior vector F generated by the model in the previous step and the actual energy consumption behavior:
[0087] F(X)=[1-RMSE,R 2 , S]
[0088] Where RMSE is the prediction error, R 2 is the goodness of fit, S is the stability index of the behavioral sequence;
[0089] In order to construct the candidate space for structure search, the Logistic mapping formula is used to generate chaotic variables:
[0090] x k+1 =μ×x k ×(1-x k )
[0091] Where x k is the chaotic variable generated by the kth iteration, μ is the growth rate coefficient of the Logistic mapping, which is fixed at 4 (making the mapping completely chaotic), and x k+1 is the k+1th chaotic variable;
[0092] By iterating the Logistic mapping formula, we can get the chaotic variable sequence { x1,x2,...,x 90}, and assign it to the whale individual structure representation:
[0093] x i,j =x 3(i-1)+j
[0094] Where x i,j is the chaotic value of the jth parameter of the i-th individual, x 3(i-1)+j It refers to the one-dimensional sequence {x1,x2,...,x 90}, take out the chaotic variable value for the jth structural parameter (one of the three structural parameters) of the i-th whale individual;
[0095] Then normalize and map them to the domain of each parameter:
[0096]
[0097]
[0098] p i =p min +x i,3 ·(p max -p min )
[0099] Where h i is the GRU hidden layer dimension of the i-th individual, h min is the minimum number of units in the GRU hidden layer, h max is the maximum number of units in the GRU hidden layer, x i,1 is the chaotic variable of the GRU parameter corresponding to the i-th individual, is the dimension of the i-th individual attention layer, and are the minimum and maximum dimensions of attention, respectively, x i,2 is the chaotic variable of the i-th individual attention dimension, p i is the Dropout rate of the i-th individual, p min and p max They are the minimum and maximum values of Dropout, x i,3 is the i-th individual Dropout chaotic variable;
[0100] Finally, construct the whale individual set P (0) :
[0101]
[0102] Where, It is an individual whale;
[0103] Each initial whale individual represents a model structure configuration, which will be used in subsequent steps to replace the original structure to generate a behavior representation vector F and score it;
[0104] For each individual whale Reconfigure the GRU and attention structures, retrain the network, generate the corresponding behavior representation vector F, and compare the vector with the actual energy consumption behavior to calculate the fitness score, including the calculation of prediction error, goodness of fit, and behavior sequence stability index:
[0105]
[0106] S=Var(F' i,t -F' i,t-1 )
[0107] Where μ Y is the mean of actual energy consumption, σ Y is the standard deviation of actual energy consumption, μ F is the mean of the model output behavior, σ F is the standard deviation of the model output behavior, Y't is the actual energy consumption after normalization, F' i,t is the normalized model output behavior value, RMSE i is the root mean square error, n is the length of the time series, is the goodness of fit, is the mean of the actual energy consumption after normalization, S is the stability index of the behavior sequence, Var() is the variance of the calculated sequence, F' i,t-1 is the normalized behavior state representation value of the i-th structural individual at time step t-1;
[0108] The prediction error, goodness of fit and behavior sequence stability index are weighted and summed to obtain the individual fitness score;
[0109] After each whale obtains a fitness score, it is necessary to decide which individuals should converge to the global optimal individual and to what extent. In order to control the dynamic changes of this "convergence degree", a cosine adaptive inertia factor is introduced;
[0110] The global adjustment factor is calculated in each iteration:
[0111]
[0112] Where T is the maximum number of iterations set, is the maximum fitness of all whale individuals in round t, is the minimum fitness value in round t, is the fitness score of the best individual in the current iteration round, ∈' is a minimum constant to avoid the denominator being 0, λ t is the inertial control factor;
[0113] Update the structural parameter vector of each individual:
[0114]
[0115] Where, X * is the optimal structural individual parameter vector, D i is the Euclidean distance between the current individual and the optimal individual, l is the disturbance factor;
[0116] Through the inertia factor λ t Guiding individuals to shrink toward the current optimal solution allows for rapid convergence to high-quality structural regions in most scenarios. However, as the search iterates, the structural differences between some individuals decrease and their fitness scores become more consistent, leading to convergence stagnation and localization of the search space. Therefore, the LevyFlight jump mechanism is introduced to help the system break through the convergence boundary, "jumping" from the current region to a new parameter region to maintain structural diversity.
[0117] After each round of structural fitness evaluation is completed, the average change rate of consecutive k rounds is calculated Δi :
[0118]
[0119] Where k is the iteration window length of convergence detection, t is the current iteration round, is the fitness vector score of the individual in round j, X i is the i-th structural individual;
[0120] If Δ i If it is less than the preset threshold E (set through experimental tuning), it is considered that the individual is trapped in the local optimum and a jump optimization operation needs to be performed;
[0121] For individuals that need to jump, execute the following jump formula to update their structure vector:
[0122]
[0123]
[0124] Where a(t) is the current individual jump amplitude coefficient, RMSE best is the minimum RMSE value of the current global optimal structure, is individual X i The prediction error generated in the tth round, ∈ is a very small positive number to prevent the denominator from being 0, s is the jump step size, μ is a normally distributed random variable (jump direction), v is a normally distributed variable (jump disturbance), β is the Levy distribution index, σ 2 is the normal sampling variance, is the structure vector of round t, is the new structural parameter combination after the jump, rand(-1,1) is the uniformly distributed perturbation variable, and sign() is the output direction (+1 or -1);
[0125] Considering that jumps may cause structural parameters to go out of bounds, the following boundary constraints are implemented for each parameter dimension:
[0126]
[0127] Where, is the jth parameter of the i-th individual, x min,j and x max,j It is the upper and lower limits of the value of the jth parameter, min and max are correction operations;
[0128] Use the updated structure to configure network parameters, reconfigure the GRU and attention modules, and input the graph embedding sequence for forward propagation. Calculate the hidden state and corresponding attention weight α at each moment to generate a new behavior state representation vector F'. Compare the newly generated F' with the current real energy consumption behavior data, calculate key fitness indicators, and compare the fitness of each individual. If the individual's fitness value is higher than the current global optimal value, update the global optimal solution to the individual's structure. Otherwise, retain the original global optimal structure.
[0129] Based on the optimal structural configuration, the final GRU model structure is constructed. Through the final model, the entire refining process of Torreya grandis oil is modeled to obtain a semantic behavior vector F with high expressiveness.
[0130] In the in-depth modeling process of monitoring the energy consumption of moderately refined Torreya oil, a modeling strategy combining a graph embedding mechanism with a bidirectional GRU network was adopted to effectively solve key problems such as "nonlinear dynamic evolution, unclear variable coupling, and unstable structural parameters" of process energy consumption behavior. Among them, "graph embedding representation" refers to treating input multimodal energy consumption variables such as electric power, thermal power, and flow as nodes in a graph structure, and using the graph attention mechanism to model the real-time interaction between variables, and dynamically generate a structurally enhanced moment input expression. This mechanism avoids the defects of traditional time series modeling of independent variable modeling, can capture the inherent coupling characteristics of process variables that change over time, and improve the expressiveness and discriminative ability of feature representation. The keyword "GRU" (Gated Recurrent Unit) refers to a lightweight recurrent neural network structure with an update gate and reset gate mechanism, which can effectively retain historical information and control the flow of information. The "bidirectional GRU" further models forward time information and reverse future information at the same time. In the refining process of Torreya grandis oil, there is a significant temporal dependency between the preceding process (such as heating and stirring) and the subsequent response (such as acid value change and color change). This structure uses the forward GRU to model the "historical trend" and the reverse GRU to model the "future feedback". Its spliced state is represented as the "semantic behavior vector" F, which represents the global process behavior state at the current moment. The present invention combines graph structure enhancement with the bidirectional temporal modeling mechanism, introduces an evolutionary structural optimization algorithm, and performs multi-layer semantic modeling on the energy consumption behavior of Torreya grandis oil refining. The behavior vector F finally generated is not only predictable, but also has the function of anomaly identification and regulation suggestion support. Compared with the traditional static modeling method, this solution has significant advantages in behavior information compression rate, anomaly detection accuracy and structural transferability. The generated F can not only be used for subsequent LSTM prediction model to perform deviation identification, but also directly support behavior classification and response strategy generation, and build a closed-loop energy consumption monitoring system from "behavior observation" to "regulation feedback".
[0131] S3. Predict energy consumption status based on semantic behavior vector F, identify energy consumption deviation and mark abnormal status, use random forest to perform abnormal classification to obtain abnormal behavior type, and formulate and implement treatment measures;
[0132] Specifically, predicting energy consumption status based on the semantic behavior vector F, identifying energy consumption deviation and marking abnormal status refers to using an LSTM model to predict energy consumption status, using historical energy consumption data as a training set to input the LSTM model for model training, defining a loss function and an Adam optimizer to iteratively optimize model parameters, stopping the iteration and outputting model parameters to update the LSTM model when the loss of the LSTM model no longer decreases significantly during continuous iterations, inputting the semantic behavior vector F into the LSTM model to obtain an energy consumption status prediction value, calculating the RMSE error between the actual energy consumption and the prediction to obtain an anomaly score value, recording the anomaly score values at consecutive time steps in sequence to form an anomaly score sequence, inputting the continuous anomaly score sequence into the POT extreme value analysis algorithm, fitting its tail distribution to obtain the optimal threshold D, and when the anomaly score is greater than the threshold D, marking time t as a candidate anomaly point of energy consumption deviation.
[0133] The POT extreme value analysis algorithm, also known as the Peak Over Threshold (POT) method, is a classic method in Extreme Value Theory (EVT). It is specifically used to analyze and model extreme abnormal data that exceeds a certain high threshold. It is widely used in scenarios such as financial risk monitoring, earthquake intensity analysis, equipment failure prediction, and energy consumption deviation detection in this invention.
[0134] The "semantic behavior vector F" proposed in the present invention is a high-order feature representation extracted after the upstream graph embedding and GRU network perform sequence modeling on the process behavior. It integrates the context dynamics of the work section, time dependencies, and structural interaction information between variables. This vector not only serves as the input for energy consumption status prediction, but also carries a comprehensive expression of the evolution path of multi-variable behavior in the refining process of Torreya oil. Therefore, it has stronger semantic understanding and predictive modeling capabilities than the original energy consumption vector. The present invention realizes energy consumption deviation detection at the semantic level by constructing an LSTM prediction model and a POT extreme value judgment structure based on the F vector. It overcomes the problem of insufficient adaptability of traditional rule-setting methods under complex processes, improves the dynamics and accuracy of energy consumption status judgment; reduces the false positive rate and missed detection rate through the adaptive threshold recognition mechanism; and provides a high-confidence timing anomaly basis for subsequent process response and control.
[0135] Furthermore, using random forest to perform anomaly classification to obtain the abnormal behavior type refers to collecting the corresponding acid value a according to the abnormal time t t and color data c tAnd calculate the ratio of heat energy to acid value g, and construct the behavior type label set U={(b i ,c i )},c i ∈{0,1,2}, where b i =[a t ,c t ,g] is the input feature vector of the i-th sample, c i is the behavior type label corresponding to the sample;
[0136] Based on historical Torreya grandis oil refining data, the acid value threshold I, color threshold Y, and heat energy to acid value ratio threshold R are set;
[0137] Label 0 refers to normal behavior, and the judgment basis is a t-1 -a t ≥I,|c t -c t-1 |≥Y,g≤R, where a t-1 is the acid price at the previous moment, c t-1 is the color value at the previous moment;
[0138] Label 1 refers to the heat consumption redundancy type abnormality, and the judgment basis is a t-1 -a t <I,|c t -c t-1 | <Y,Q t >0, where Q t is the current thermal power;
[0139] Label 2 refers to excessive deacidification abnormality, the judgment basis is a t ≤I,g>R,Q t >0;
[0140] Based on historical Torreya oil data (acid value t and color data c t The random forest model is trained based on the thermal energy and acid value ratio g), and the Torreya grandis oil data corresponding to the abnormal time t is input into the random forest model to obtain the category label and the corresponding abnormal behavior type.
[0141] Furthermore, treatment measures are formulated and implemented. If a heat consumption redundancy anomaly is identified, the temperature of the thermostat is lowered, the refining process is suspended, and manual intervention is performed to check whether there are any mixing or heat distribution problems in the oil product. The "heat consumption redundancy" status is marked on the human-machine interface to prompt the operator to evaluate whether the current process parameter settings are reasonable.
[0142] If an over-deacidification anomaly is identified, the heating device in this section will be shut down to prevent continued thermal reaction from causing oil oxidation or structural damage. The process flow jump instruction will be executed to enter the next section (such as switching to color filtration or deodorization). The current situation will be marked as "over-deacidification anomaly" in the system log and sent to the process management end simultaneously to recommend the review of the stage switching condition settings.
[0143] Compared with the traditional energy consumption anomaly identification method based on fixed rules or experience judgment, the present invention adopts a data-driven semantic behavior classification strategy, which significantly improves the accuracy of anomaly judgment and the discrimination of behavior types, laying the foundation for the formulation of downstream response strategies. The present invention constructs a behavioral labeling system with the relationship between acid value, color and thermal energy response as the core, combines the random forest model to build a multi-classification semantic identifier, and links the process strategy execution to achieve a full process closed loop from "energy consumption anomaly perception" to "behavioral semantic discrimination" to "process response implementation". It has good on-site deployment value and scalability, and is suitable for moderate refining process energy consumption management of Torreya oil and other high-end vegetable oils.
[0144] This embodiment also provides a torreya oil moderate refining energy consumption monitoring system, comprising:
[0145] Data acquisition module, used to collect energy consumption data in real time and generate time series feature matrix after preprocessing;
[0146] The graph attention modeling module treats each behavior vector as a three-node graph, uses the GAT mechanism to calculate the attention scores between nodes, generates a graph embedding representation, and outputs a sequence;
[0147] The attention modeling module takes as input a graph embedding sequence, models the process evolution, outputs a bidirectional state sequence, and uses the attention mechanism to generate a semantic behavior vector.
[0148] The energy consumption state prediction module is used to use the LSTM model to predict the energy consumption at the next moment, calculate the RMSE error, form an anomaly score sequence, use the POT algorithm to fit the anomaly score distribution, generate the threshold D, and determine the deviation point;
[0149] The anomaly recognition module is used to construct a three-dimensional feature vector using the collected acid value, color, and heat energy / acid value ratio features, and classify the abnormal behavior type using a random forest model;
[0150] The process execution control module is used to select corresponding treatment measures according to the type of abnormal behavior, record execution logs and generate alarms or prompts.
[0151] This embodiment also provides a computer device, which is applicable to the method for monitoring the energy consumption of moderate refining of torreya oil, and includes: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for monitoring the energy consumption of moderate refining of torreya oil proposed in the above embodiment.
[0152] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0153] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for monitoring energy consumption of moderate refining of torreya oil as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0154] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for monitoring energy consumption of moderate refining of Torreya grandis oil, characterized by: include, Multimodal energy consumption data is collected from the refinery and preprocessed to generate a time series feature matrix. A feature variable graph is constructed based on the feature dimensions and a graph attention mechanism is introduced to generate a graph embedding representation. Input the graph embedding features into the two-layer GRU structure to learn the dynamic evolution features in the process time series and obtain the semantic behavior vector F; Based on the semantic behavior vector F, the energy consumption state is predicted, the energy consumption deviation is identified and the abnormal state is marked. The abnormality classification is performed using random forest to obtain the abnormal behavior type, and treatment measures are formulated and implemented.
2. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 1, wherein: The feature variable graph is constructed based on the feature dimension and the graph attention mechanism is introduced to model the graph embedding. For each time t, the three variables in the current vector are used as three nodes in the graph to construct a three-node complete graph. The edge set E includes 3 pairs of undirected edges (v1, v2), (v1, v3), and (v2, v3). The initial input variable of each node is linearly mapped and embedded into an m-dimensional vector. A single-layer feedforward neural network is used to splice the features of any two nodes i and j and calculate the scores to obtain the interactive influence score of node i on node j. For each node i, all its scores are normalized into aggregation weights, and each node is weighted and aggregated by neighbor features to generate a graph enhancement representation The graph enhancement representation is concatenated as the input feature at that moment to finally form the graph embedding sequence matrix.
3. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 2, wherein: The graph embedding features are input into the double-layer GRU structure to learn the dynamic evolution features in the process time series to obtain the semantic behavior vector F, which includes: Build a bidirectional GRU network, including two independent state update modules: forward GRU and reverse GRU; The graph embedding sequence is sequentially input into the forward GRU module and the reverse GRU module for updating, and the hidden states in the forward and reverse directions are spliced in the feature dimension to obtain the complete behavior state representation h at the current moment t ; Denote the state at all moments as h t Summarize and construct a complete sequence of behavioral evolution states; The state vector h at all moments t Input the attention mechanism and calculate the corresponding attention scores respectively; Use attention weight α t Perform weighted summation on the bidirectional GRU state sequence to obtain the final global process behavior representation vector F; Based on the GRU and attention mechanism model structure, three key parameters are extracted, including the number of GRU hidden state units, the attention mechanism mapping dimension, and the Dropout ratio; According to the difference between the behavior representation vector F and the actual energy consumption behavior, a multi-objective fitness function is constructed; The chaotic variables are generated by using the Logistic mapping formula. By iterating the Logistic mapping formula, the chaotic variable sequence is obtained and assigned to the whale individual structure representation to construct the whale individual set P. (0) ; For each individual whale, the GRU and attention structure are reconfigured, the network is retrained, and the corresponding behavior representation vector F is generated. The vector is compared with the actual energy consumption behavior to calculate the fitness score; In each iteration, the global adjustment factor is calculated and the structural parameter vector of each individual is updated; After each round of structural fitness evaluation is completed, the average change rate Δ of consecutive k rounds is calculated i ; If Δ i If it is less than the preset threshold E, the individual is considered to be trapped in a local optimum and needs to perform a jump optimization operation; Update the structure vector of the individual that needs to jump, use the updated structure to configure the network parameters, reconfigure the GRU and attention modules, and input the graph embedding sequence for forward propagation. Calculate the hidden state and the corresponding attention weight α at each moment to generate a new behavior state representation vector F'. Compare the newly generated F' with the current real energy consumption behavior data, calculate the key fitness indicators, and compare the fitness of each individual. If the individual's fitness value is higher than the current global optimal value, update the global optimal solution to the structure of the individual. Otherwise, retain the original global optimal structure. Based on the optimal structural configuration, the final GRU model structure is constructed. Through the final model, the entire refining process of Torreya grandis oil is modeled to obtain a semantic behavior vector F with high expressiveness.
4. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 3, wherein: The method of predicting the energy consumption state based on the semantic behavior vector F, identifying the energy consumption deviation and marking the abnormal state refers to using the LSTM model to predict the energy consumption state to obtain the energy consumption state prediction value, calculating the RMSE error between the actual energy consumption and the prediction to obtain the abnormal score value, recording the abnormal score values at consecutive time steps in sequence to form an abnormal score sequence, inputting the continuous abnormal score sequence into the POT extreme value analysis algorithm, fitting its tail distribution to obtain the optimal threshold D, and when the abnormal score is greater than the threshold D, marking the time t as a candidate abnormal point of energy consumption deviation.
5. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 4, characterized in that: The abnormal behavior type obtained by using random forest for abnormal classification refers to collecting the corresponding acid value a according to the abnormal time t t and color data c t And calculate the ratio of heat energy to acid value g, and construct the behavior type label set U={(b i ,c i )},c i ∈{0,1,2}, where b i =[a t ,c t ,g] is the input feature vector of the i-th sample, c i is the behavior type label corresponding to the sample; The Torreya grandis oil data corresponding to the abnormal time t is input into the random forest model to obtain the category label and the corresponding abnormal behavior type.
6. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 5, characterized in that: The formulation and implementation of treatment measures refers to the formulation and implementation of corresponding treatment measures based on the identified heat consumption redundancy type anomaly and excessive deacidification type anomaly types.
7. The method for monitoring energy consumption of moderate refining of Torreya grandis oil according to claim 6, characterized in that: The collecting of multimodal energy consumption data from the refinery and preprocessing to generate a time series feature matrix refers to collecting the electric power, thermal power, and flow data of the refinery, standardizing the data, combining all standardized results to form a behavior vector under a unified numerical scale, and performing time series splicing to form a time series feature matrix X.
8. A system for monitoring energy consumption during moderate refining of torreya oil, based on the method for monitoring energy consumption during moderate refining of torreya oil according to any one of claims 1 to 7, characterized in that: include, Data acquisition module, used to collect energy consumption data in real time and generate time series feature matrix after preprocessing; The graph attention modeling module treats each behavior vector as a three-node graph, uses the GAT mechanism to calculate the attention scores between nodes, generates a graph embedding representation, and outputs a sequence; The attention modeling module takes as input a graph embedding sequence, models the process evolution, outputs a bidirectional state sequence, and uses the attention mechanism to generate a semantic behavior vector. The energy consumption state prediction module is used to use the LSTM model to predict the energy consumption at the next moment, calculate the RMSE error, form an anomaly score sequence, use the POT algorithm to fit the anomaly score distribution, generate the threshold D, and determine the deviation point; The anomaly recognition module is used to construct a three-dimensional feature vector using the collected acid value, color, and heat energy / acid value ratio features, and classify the abnormal behavior type using a random forest model; The process execution control module is used to select corresponding treatment measures according to the type of abnormal behavior, record execution logs and generate alarms or prompts.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for monitoring energy consumption of moderate refining of torreya oil according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for monitoring energy consumption of moderate refining of torreya oil according to any one of claims 1 to 7 are implemented.