A method and system for iteration optimization of oil blending formula based on reinforcement learning

CN122966067APending Publication Date: 2026-10-23TONGYI PETROLEUM CHEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610656702.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

油品调合兼具多变量强耦合、工况非线性波动、原料批次漂移、设备工况扰动强、指标相互制约的典型流体连续生产特征,配方配比微调、设备压力温度流量等工艺参数波动、管道传输通畅度变化、混合设备运行状态偏差,均会直接引发成品油品多项关键性能指标波动超标,极易造成批量次品返工、原料能耗浪费与生产效益损耗

Benefits of technology

[0041]分析本发明提供的上述一种基于强化学习的油品调合配方迭代寻优方法及系统可知,在具体应用时通过构建原料传输时间序列并与目标标准时序逐节点比对,能够自动标记超时节点并生成偏差传播路径图;以成品检测节点为起点反向回溯,利用目标时间戳≥实际时间戳”逻辑筛选出最上游的异常源发节点(如某路烷基化油注入阀响应延迟),避免将下游连锁反应误判为根因;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966067A_ABST
    Figure CN122966067A_ABST
Patent Text Reader

Abstract

The application discloses an oil blending formula iterative optimization method and system based on reinforcement learning, and the method comprises the following steps: collecting key performance indicators of oil quality to obtain a current performance indicator set; establishing a raw material transmission time sequence according to key physical nodes in the oil blending process; obtaining a target raw material transmission time sequence and comparing the target raw material transmission time sequence with the raw material transmission time sequence to form a deviation propagation path diagram; reversely searching from a finished product detection node as a starting point to obtain a corresponding target timestamp in the target raw material transmission time sequence of a static mixer outlet node, and screening an abnormal source node; mapping the abnormal timestamp of the abnormal source node to a time interval uniformly divided in the raw material transmission time sequence as a starting analysis interval, and screening process nodes in the time interval as key physical nodes; selecting multiple time intervals with the abnormal source node as the center, extracting an abnormal raw material batch source, adjusting a raw material proportion, and outputting an optimized raw material proportion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the petroleum industry, and in particular to an iterative optimization method and system for oil blending formulations based on reinforcement learning. Background Technology

[0002] With the continuous upgrading of national environmental protection and quality standards for motor vehicle fuels and the trend of inferior and diversified crude oil feedstocks in refining enterprises, the control requirements for key performance indicators such as octane number, distillation range vapor pressure, thiobenzene olefin content, density, gum content, and cetane number of refined oil products such as gasoline and diesel are becoming increasingly stringent. As a core and critical process at the end of refined oil production and processing, oil blending involves precisely mixing various raw materials with different properties, such as alkylated oils, aromatic oils, and base oils, according to specific proportions and process operating parameters, so that the final refined oil products consistently meet national standards for factory release and market supply requirements. Oil blending exhibits typical characteristics of continuous fluid production, including strong coupling of multiple variables, nonlinear fluctuations in operating conditions, batch drift of raw materials, strong disturbances in equipment operating conditions, and mutual constraints among indicators. Fine adjustments to formula ratios, fluctuations in process parameters such as equipment pressure, temperature, and flow rate, changes in pipeline transmission smoothness, and deviations in the operating status of mixing equipment can all directly cause fluctuations exceeding standards in multiple key performance indicators of refined oil products, easily leading to batch rework of defective products, waste of raw materials and energy, and loss of production efficiency.

[0003] Currently, the mainstream oil blending production control model of domestic refining and chemical enterprises is the conventional fixed formula automated blending method. Although it relies on basic data acquisition and sensing equipment to achieve simple data acquisition and control of raw material ratios and process parameters, it can only perform steady-state production based on preset fixed formulas. It does not fully connect the transmission time sequence characteristics of physical process nodes in the entire oil blending process, and cannot accurately capture material transmission time deviations and abnormal operating disturbances at key physical nodes such as raw material injection nodes, static mixer outlet nodes, and finished product testing nodes.

[0004] Existing anomaly investigation methods lack standardized reverse tracing logic, making it impossible to distinguish whether process anomalies are caused by high-frequency mechanical oscillations in equipment or low-frequency batch drift issues in raw material quality. They cannot accurately pinpoint the anomaly source node and type, leading to blind inspections and unclear rectification directions during operation and maintenance. This wastes maintenance resources and production time, and fails to address the root cause of recurring anomalies of the same type. Summary of the Invention

[0005] The purpose of this invention is to provide an iterative optimization method and system for oil blending formulations based on reinforcement learning, which solves the above-mentioned technical problems pointed out in the prior art.

[0006] This invention provides an iterative optimization method for oil blending formulations based on reinforcement learning, the specific steps of which include:

[0007] Data on raw material ratios and process variables during multiple batches of oil blending are collected using sensors. Simultaneously, key performance indicators of oil quality are collected, and these indicators are preprocessed to obtain a current set of performance indicators. Key physical nodes are collected according to the time sequence of raw material transfer at each process node during oil blending. These key physical nodes include the raw material injection node, the static mixer outlet node, and the finished product detection node.

[0008] Based on the location and transmission duration of key physical nodes in the oil blending process, a raw material transmission time series is established. The target raw material transmission time series is obtained and compared with the original raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram. Starting from the finished product detection node, a reverse search is performed to obtain the target timestamp corresponding to the target raw material transmission time series at the static mixer outlet node. Abnormal source nodes are screened by comparing the target timestamp with the timestamps corresponding to the raw material transmission time series. The abnormal timestamps of the abnormal source nodes are mapped to evenly divided time intervals in the raw material transmission time series as the starting analysis interval. The target performance index set is obtained, and the performance deviation values ​​between the target performance index and the current performance index are calculated within each time interval. Process nodes within the time intervals are also screened as key physical nodes. Multiple time intervals are selected centered on the abnormal source node, and performance deviation values ​​are extracted to construct a performance fluctuation time-domain signal sequence, which is then converted into a fluctuation frequency-domain signal. The source of abnormal raw material batches is extracted, the raw material ratio is adjusted, and finally, the optimized raw material ratio is output.

[0009] Preferably, a raw material transport time series is established based on the location and transport duration of key physical nodes in the oil blending process; the target raw material transport time series is obtained and compared with the raw material transport time series to obtain abnormal timestamps, forming a deviation propagation path diagram; a reverse search is performed starting from the finished product detection node to obtain the target timestamp corresponding to the target raw material transport time series at the static mixer outlet node; the abnormal source nodes are screened by comparing the target timestamps with the timestamps corresponding to the raw material transport time series; the abnormal timestamps of the abnormal source nodes are mapped to the evenly divided time intervals of the raw material transport time series as the starting analysis interval. The specific operation steps are as follows:

[0010] Establish a raw material transport time sequence based on the location of key physical nodes in chronological order;

[0011] Collect the target raw material transportation time series; calculate the time deviation of key physical nodes based on the raw material transportation time series and the target raw material transportation time series; when the time deviation is greater than a preset time threshold, record the timestamp of the key physical node as an abnormal timestamp; mark the key physical nodes with abnormal timestamps based on the raw material transportation of the key physical nodes, form a time deviation path, and construct a deviation propagation path graph.

[0012] Obtain the abnormal timestamp corresponding to the finished product detection node of the last time deviation path in the deviation propagation path diagram; starting from the finished product detection node, search upstream in reverse direction for the raw material transport to the static mixer outlet node, and obtain the target timestamp corresponding to the target raw material transport time series of the static mixer outlet node; if the target timestamp of the static mixer outlet node is greater than or equal to the timestamp corresponding to the raw material transport time series, then the static mixer outlet node is determined to be the abnormal source node; continue searching upstream for the raw material injection node from the abnormal source node, and if the target timestamp of the raw material injection node is greater than or equal to the timestamp corresponding to the raw material transport time series, then update the raw material injection node as the final abnormal source node; divide the time interval evenly according to the total timestamp of the raw material transport time series; obtain the corresponding current performance index for the abnormal timestamp of the abnormal source node, and map the abnormal timestamp of the current performance index to the corresponding time interval as the starting analysis interval.

[0013] Preferably, the target performance index set is obtained, and the performance deviation value between the target performance index and the current performance index is calculated within each time interval. The process nodes within the time interval are also selected as key physical nodes. Multiple time intervals are selected with the anomaly source node as the center, the performance deviation value is extracted to construct a performance fluctuation time domain signal sequence, which is then converted into a fluctuation frequency domain signal. The source of the abnormal raw material batch is extracted, the raw material ratio is adjusted, and finally the optimized raw material ratio is output. The specific operation steps are as follows:

[0014] Obtain the target performance index set; calculate the performance deviation value between the target performance index and the current performance index at each time point within the interval, using the initial analysis interval as the starting point; calculate the performance deviation value at each time point within each time interval, and further calculate the average performance deviation value of the time interval;

[0015] Calculate the interval deviation of the average performance deviation value of each adjacent time interval; use the interval deviation of the initial analysis interval as the starting point to determine whether the interval deviation of adjacent intervals shows an increasing trend;

[0016] If so, then all process nodes corresponding to the corresponding time intervals are also considered as key physical nodes; by selecting two time intervals before and after the anomaly source node as the center, the instantaneous deviation values ​​of the key physical nodes are extracted to form a performance fluctuation time-domain signal sequence, and the performance fluctuation time-domain signal sequence is converted into a fluctuation frequency-domain signal through a sliding window, and divided into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components; an association mapping matrix is ​​constructed based on the fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components, with the anomaly timestamp as the row index and the time interval as the column index; the source of the abnormal raw material batch is extracted through the association mapping matrix; the corresponding historical batch is obtained from the source of the abnormal raw material batch, and the raw material ratio is adjusted iteratively by step size through the historical batch until the optimized raw material ratio is output after the number of iterations.

[0017] Preferably, by selecting two time intervals before and after the anomaly source node, the instantaneous deviation values ​​of key physical nodes are extracted to form a performance fluctuation time-domain signal sequence. Then, a sliding window is used to convert the performance fluctuation time-domain signal sequence into a fluctuation frequency-domain signal, and the sequence is divided into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components. The specific operation steps are as follows:

[0018] Two time intervals are selected, one forward and one backward, centered on the time interval where the anomaly source node is located. The performance deviation values ​​of all key physical nodes at the corresponding time points within the five extracted time intervals are extracted as instantaneous deviation values. All instantaneous deviation values ​​are sorted in descending order to form a performance fluctuation time-domain signal sequence. The performance fluctuation time-domain signal sequence is converted into a fluctuation frequency-domain signal sequence using a sliding window.

[0019] A preset high-frequency threshold and a low-frequency threshold are established; based on the high-frequency threshold and the low-frequency threshold, the fluctuation rate in the fluctuation frequency domain signal sequence is divided into a fast fluctuation component, a slow fluctuation component, and a medium-speed fluctuation component.

[0020] Preferably, the construction of an association mapping matrix using the abnormal timestamp as the row index and the time interval as the column index for the fast fluctuation component, medium-speed fluctuation component, and slow fluctuation component is carried out through the following specific steps:

[0021] The high-contribution value is obtained by squaring all fast-moving components; the low-contribution value is obtained by squaring all slow-moving components; and the medium-contribution value is obtained by squaring all medium-moving components.

[0022] The total component contribution value is obtained by summing the squares of all component contribution values; the ratio of the total fast fluctuation value of all fast fluctuation components to the total component contribution value is obtained; the ratio of the total slow fluctuation value of all slow fluctuation components to the total component contribution value is obtained.

[0023] Extract the abnormal timestamps of all batches, and use the current performance index corresponding to each abnormal timestamp as the matrix row index; divide all batches into time intervals as described above, and use all time intervals as the matrix column index;

[0024] Traverse each time interval to extract all key physical nodes and their corresponding instantaneous deviation values; calculate the sum of the absolute values ​​of the instantaneous deviation values ​​of all key physical nodes; construct an association mapping matrix using the matrix row index and matrix column index, and fill the association mapping matrix with the sum of the absolute values ​​to obtain the final association mapping matrix.

[0025] Preferably, the source of abnormal raw material batches is extracted through the correlation mapping matrix, and the specific operation steps are as follows:

[0026] A preset component proportion threshold is set; if the rapid fluctuation ratio is greater than or equal to the component proportion threshold, the row corresponding to the abnormal timestamp of the rapid fluctuation component in the association mapping matrix is ​​extracted; all batches above the batch corresponding to the row corresponding to the abnormal timestamp are extracted from all batches above, and the same raw material transportation time series as the row corresponding to the abnormal timestamp is extracted from the row corresponding to the abnormal timestamp. The same abnormal timestamp row of the raw material transportation time series is extracted from the association mapping matrix; the cosine similarity is calculated between the row of the current abnormal timestamp and the row of the same abnormal timestamp in the previous batch.

[0027] If the cosine similarity is less than a preset similarity threshold, and the rapid fluctuation ratio is greater than or equal to the component proportion threshold, then the oil processing equipment is determined to be the source of the oil abnormality; if any of the above determinations are not true, then it is determined whether the slow fluctuation ratio is greater than a preset performance proportion threshold; if so, then the column corresponding to the abnormal timestamp in the association mapping matrix is ​​extracted, and the corresponding column is taken as the source of the abnormal raw material batch.

[0028] Preferably, the corresponding historical batches are obtained from the source of the abnormal raw material batches, and the raw material ratio is adjusted iteratively using step sizes based on the historical batches until the optimized raw material ratio is achieved after a certain number of iterations. The specific operation steps are as follows:

[0029] The abnormal raw material batch source is used as the target adjustment object to obtain historical batches; by analyzing the historical batches, the historical target proportion and historical batch performance indicators are obtained to construct a response relationship curve; the current proportion value of the target adjustment object is obtained, and the deviation is calculated using the current performance indicator and the historical batch performance indicator; the average slope is calculated using the current proportion value to obtain the corresponding historical target proportion in the response relationship curve; based on the positive and negative combination of the deviation and the average slope, the raw material proportion is adjusted using a step-size iterative method until a preset number of iterations is reached, and the optimized raw material proportion is output.

[0030] Preferably, the source of the abnormal raw material batch is used as the target adjustment object to obtain historical batches; by analyzing the historical batches, the historical target proportion and historical batch performance indicators are obtained, and a response relationship curve is constructed; the current proportion value of the target adjustment object is obtained, and the deviation is calculated using the current performance indicator and the historical batch performance indicator; the average slope is calculated using the current proportion value to obtain the corresponding historical target proportion in the response relationship curve. The specific operation steps are as follows:

[0031] The source of the abnormal raw material batch is taken as the target adjustment object; all historical batches of the target adjustment object in the preset past time period are retrieved from the preset historical database; the corresponding performance indicators are extracted from all historical batches as historical batch performance indicators and the historical target proportion of the target adjustment object in the historical batches are directly obtained; all historical target proportions are used as the x-axis and all historical batch performance indicators are used as the y-axis to form two-dimensional data points and construct a two-dimensional scatter plot.

[0032] Iterate through the coordinates of each two-dimensional data point on the x-axis, select two-dimensional data points at preset fixed intervals, and construct the response relationship curve;

[0033] Obtain the current percentage value of the target adjustment object; calculate the deviation between the current performance index and the historical batch performance index; adjust the y-axis direction according to the sign of the deviation, as the target recovery direction; obtain the two-dimensional data point on the response relationship curve corresponding to the historical target percentage with the same current percentage value, and filter the two-dimensional data points with the smallest distance between the historical target percentages in the left and right directions, using the two-dimensional data point as the center; calculate the average value of the historical target percentages of the two-dimensional data points with the smallest distance in the left and right directions, as the average tilt.

[0034] Preferably, the raw material ratio is adjusted using an iterative step-size method based on the positive or negative value of the combination of deviation and average tilt, until a preset number of iterations is reached, and the optimized raw material ratio is output. The specific operation steps are as follows:

[0035] The preset adjusted percentage value, the current predicted deviation, and the preset adjustment step size are used.

[0036] If the deviation is greater than the preset current predicted deviation, then the sign of the deviation is determined, and the raw material ratio is adjusted in the positive direction or in the negative direction. The adjusted raw material ratios are used as new raw material ratios, and new current performance indicators of oil quality are collected again using the new raw material ratios. The average of the adjusted raw material ratios is calculated as the predicted adjusted raw material ratio. The predicted adjusted raw material ratio is calculated and the new current performance indicators are used to obtain a new deviation. The above steps are repeated iteratively using the new current performance indicators and the new deviation to obtain the final optimized raw material ratio.

[0037] Accordingly, this invention also proposes an iterative optimization system for oil blending formulas based on reinforcement learning, including: a data acquisition module and an identification module;

[0038] The acquisition module is used to collect raw material ratio data and process variable data of multiple batches of oil blending process through sensors; at the same time, it collects key performance indicators of oil quality, preprocesses the key performance indicators to obtain the current performance indicator set; and collects key physical nodes according to the time sequence of raw material transmission at each process node in the oil blending process.

[0039] The identification module is used to establish a raw material transmission time series based on the location and transmission duration of key physical nodes in the oil blending process; acquire the target raw material transmission time series and compare it with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; perform a reverse search starting from the finished product detection node to obtain the target timestamp corresponding to the target raw material transmission time series of the static mixer outlet node; filter the abnormal source node by comparing the target timestamp with the timestamp corresponding to the raw material transmission time series; map the abnormal timestamp of the abnormal source node to the time interval evenly divided in the raw material transmission time series as the starting analysis interval; acquire the target performance index set and calculate the performance deviation value between the target performance index and the current performance index in each time interval, and filter the process nodes in the time interval as key physical nodes; select multiple time intervals centered on the abnormal source node, extract the performance deviation value to construct a performance fluctuation time domain signal sequence, convert it into a fluctuation frequency domain signal, extract the source of abnormal raw material batches, adjust the raw material ratio, and finally output the optimized raw material ratio.

[0040] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:

[0041] Analysis of the above-mentioned method and system for iterative optimization of oil blending formulation based on reinforcement learning provided by the present invention shows that, in specific applications, by constructing a raw material transmission time series and comparing it node by node with the target standard time series, it is possible to automatically mark timeout nodes and generate a deviation propagation path diagram; starting from the finished product detection node, it traces back in reverse and uses the logic of "target timestamp ≥ actual timestamp" to filter out the upstream abnormal source node (such as the response delay of a certain alkylation oil injection valve), avoiding misjudging downstream chain reactions as the root cause;

[0042] Furthermore, taking the abnormal source node as the center, multiple time intervals are selected to extract performance deviation values ​​to construct a time-domain signal, which is then converted into a frequency-domain signal. This method can separate high-frequency equipment disturbance components (such as pump pulsation and valve vibration) from low-frequency raw material drift components (such as a slow decrease in the octane number of a certain batch of aromatic oil). Combining the component proportion and matrix cosine similarity judgment, it can accurately locate the source of abnormal raw material batches in the background of equipment noise, avoiding misjudging occasional equipment fluctuations as raw material problems.

[0043] Furthermore, for identified abnormal raw materials, the system does not rely on fixed rules, but automatically explores the optimal ratio through multiple rounds of iteration step size fine-tuning, positive and negative direction rule adjustment, and dual iteration termination constraints (e.g., performance deviation < threshold and no further improvement after three consecutive rounds). Compared with traditional grid search or empirical ratio, reinforcement learning methods can converge to the optimal solution in a high-dimensional formulation space with fewer trials. Attached Figure Description

[0044] Figure 1 This is a flowchart of the main process of an iterative optimization method for oil blending formulation based on reinforcement learning, as described in Example 1.

[0045] Figure 2 This is a schematic diagram of the key physical nodes of an iterative optimization method for oil blending formulations based on reinforcement learning, as described in Example 1.

[0046] Figure 3 This is a schematic diagram of the anomaly source node in an iterative optimization method for oil blending formulation based on reinforcement learning, as described in Example 1.

[0047] Figure 4 This is a flowchart illustrating the source of abnormal batches in an iterative optimization method for oil blending formulations based on reinforcement learning, as described in Example 1.

[0048] Figure 5 This is a flowchart illustrating the adjustment of raw material proportions in an iterative optimization method for oil blending formulations based on reinforcement learning, as described in Example 1.

[0049] Figure 6 This is a schematic diagram of a two-dimensional data graph for an iterative optimization method for oil blending formulation based on reinforcement learning, as described in Example 1.

[0050] Figure 7 This is a flowchart of an iterative optimization system for oil blending formulas based on reinforcement learning, as described in Example 2.

[0051] Labels: Acquisition module 10; Recognition module 20. Detailed Implementation

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

[0053] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0054] Example 1

[0055] like Figure 1 As shown, this invention provides an iterative optimization method for oil blending formulations based on reinforcement learning, the specific operation steps of which include:

[0056] S10: Collect raw material ratio data and process variable data during the blending process of multiple batches of oil products in the oil product equipment through sensors; at the same time, collect key performance indicators of oil product quality, preprocess the key performance indicators, and obtain the current performance indicator set;

[0057] Key physical nodes were collected based on the time sequence of raw material transfer at each process node in the oil blending process;

[0058] The key physical nodes include the raw material injection node (i.e., the location where each raw material pipeline enters the mixer), the static mixer outlet node (i.e., the output location of the material after passing through the mixer), and the finished product detection node (i.e., the location of the online analyzer on the final finished product tank or output pipeline); the process nodes mentioned above also include the raw material injection node, the static mixer outlet node, and the finished product detection node, and also include nodes at various locations such as pipeline bends; the process node is a general term for all nodes, while the key physical nodes only include the three nodes: the raw material injection node, the static mixer outlet node, and the finished product detection node. This can be used for rapid analysis of performance anomalies of the main key nodes in the raw material transmission process in the early stage;

[0059] It should be noted that the raw material ratio data collected by sensors for oil blending refers to the proportion of raw materials used in the blending process. This raw material ratio data (mainly used for later adjustments to the proportion of raw materials to maximize oil quality and reduce anomalies during transmission) refers to the proportional distribution of raw materials during the oil blending process, such as 15% alkylating oil and 10% aromatic oil, which together form 100% complete oil. The process variable data refers to continuously measured parameters reflecting the operating status and conditions of the equipment during the blending process, such as pressure, temperature, and flow rate. The raw material ratio data and the process variable data together form the formula ratio for oil blending and the corresponding operating parameters that can be implemented under the operating conditions of the adjusted equipment. This yields the key performance indicators (KPIs) for the final quality, which are the various key performance indicators obtained under this formula and equipment operation.

[0060] Because sensors are prone to noise during data acquisition, a moving average filtering technique is used to smooth the time series of this key performance indicator. A sliding window length is set to eliminate high-frequency electrical noise interference introduced by the sensor during sampling, resulting in a noise-cleaned set of current performance indicators (which includes octane number, distillation range / vapor pressure, sulfur / benzene / olefin content, cetane number, density, gum content, etc., i.e., sulfur content of 8.5 ppm, octane number of 92.3, etc.; the current performance indicator set reflects the quality of the oil).

[0061] S20: Based on the location and transmission duration of key physical nodes in the oil blending process (i.e., the overall pipeline location of the raw material injection node, static mixer outlet node, and finished product inspection node), establish a raw material transmission time series; obtain the target raw material transmission time series and compare it with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; starting from the finished product inspection node, perform a reverse search to obtain the target timestamp corresponding to the target raw material transmission time series of the static mixer outlet node; compare the target timestamp with the timestamp corresponding to the raw material transmission time series (i.e., the actual timestamp corresponding to the static mixer outlet node) to screen the abnormal source node; map the abnormal timestamp of the abnormal source node to the time interval evenly divided by the raw material transmission time series as the starting analysis interval; obtain the target performance index set and calculate the performance deviation value between the target performance index and the current performance index in each time interval, and screen the process nodes in the time interval as key physical nodes; select multiple time intervals centered on the abnormal source node, extract the performance deviation value to construct a performance fluctuation time domain signal sequence, convert it into a fluctuation frequency domain signal, extract the source of abnormal raw material batches, adjust the raw material ratio, and finally output the optimized raw material ratio. Once the locations of any two key physical nodes are determined, the material transfer time between the two key physical nodes can be determined accordingly.

[0062] It should be noted that, based on the actual spatial location of all key physical nodes in the entire oil blending process and the rated material transport time, and according to the actual flow sequence of raw materials from feed to finished product discharge, a standardized raw material transport time series under actual operating conditions is constructed, and the actual arrival timestamp of materials at each process node is fully recorded. Simultaneously, standard operating conditions calibrated by historical stable production big data are retrieved to establish a target raw material transport time series as a standard comparison benchmark. The measured time series and the target standard time series are accurately compared node by node to calculate the time deviation. Nodes with deviations exceeding the preset safety threshold are uniformly marked with abnormal timestamps. According to the upstream and downstream correlation of material transport, a deviation propagation path diagram is constructed to clearly show the complete process of the abnormality gradually spreading and propagating from the starting node to the downstream.

[0063] Using the final product inspection node at the end of the process flow as the sole starting point for reverse tracing, the search proceeds upstream level by level, not along the material flow direction. It focuses on verifying the standard target timestamps and actual measured timestamps of key upstream nodes such as the static mixer outlet. By comparing the sizes of these two types of timestamps, the system identifies the upstream node that first triggers the anomaly, accurately pinpointing the initial location of the process failure. The total residence time of the raw material transport process is evenly divided into multiple standardized time analysis intervals of equal duration. The anomaly timestamps corresponding to the anomaly source nodes are precisely mapped and matched to the corresponding intervals, determining the starting analysis interval for subsequent performance index analysis. The system retrieves the complete set of standard target performance indicators for oil blending, calculating the performance deviation between the current measured performance indicators and the standard target performance indicators at each time point and time interval. Based on the continuously increasing and deteriorating trend of the interval deviation, the system identifies the process nodes with the most drastic fluctuations and the most significant impact, marking them as newly added key physical nodes.

[0064] Centered on the core time interval where the anomaly originates, multiple related time intervals are selected sequentially before and after. All instantaneous performance deviation values ​​within the intervals are extracted to construct a time-domain signal sequence of performance fluctuations. The time-domain fluctuation signal is converted into a frequency-domain fluctuation signal, and high-frequency equipment disturbance components and low-frequency raw material drift components are separated. Combining component proportions and matrix cosine similarity, the source of the abnormal raw material batch is accurately located. For the identified problematic raw materials, the relationship curve between raw material proportion and finished product performance response is fitted based on historical production data. Through multiple rounds of iterative step size fine-tuning, positive and negative direction rule adjustment, and dual iteration termination constraints, the performance deviation is continuously converged. Finally, the optimal raw material blending ratio that adapts to the current working conditions and eliminates process anomalies is calculated and output, completing the full-process anomaly management and process condition restoration.

[0065] like Figure 2As shown, specifically, in step S20, a raw material transmission time series is established based on the location and transmission duration of key physical nodes in the oil blending process; the target raw material transmission time series is obtained and compared with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; a reverse search is performed starting from the finished product detection node to obtain the target timestamp corresponding to the target raw material transmission time series of the static mixer outlet node; the abnormal source node is screened by comparing the target timestamp with the timestamp corresponding to the raw material transmission time series (i.e., the actual timestamp corresponding to the static mixer outlet node); the abnormal timestamp of the abnormal source node is mapped to the time interval evenly divided by the raw material transmission time series as the starting analysis interval; the target performance index set is obtained, and the performance deviation value between the target performance index and the current performance index in each time interval is calculated, and the process nodes in the time interval are also screened as key physical nodes; multiple time intervals are selected with the abnormal source node as the center, the performance deviation value is extracted to construct a performance fluctuation time domain signal sequence, and converted into a fluctuation frequency domain signal, and the source of abnormal raw material batches is extracted, the raw material ratio is adjusted, and finally the optimized raw material ratio is output. The specific operation steps are as follows:

[0066] S21: Establish a raw material transport time sequence based on the location of key physical nodes in chronological order (that is, arrange the above nodes in the order of their location (from raw materials to finished products) into a node sequence on a time axis, that is, each node is associated with a raw material transport time (that is, the standard time required for materials to flow from the previous node to this node, such as the time required for the raw material injection node to be transported to the static mixer outlet node), extract the time period of each node to form a raw material transport time sequence (that is, the raw material transport time sequence is the actual transport time in the oil blending process, in which it is possible that the current performance index of a certain node is abnormal during transport, thus causing the transport time to be abnormal).

[0067] Collect the target raw material transport time series (i.e., the target raw material transport time series is the correct time that the raw material should arrive at during transport in history, that is, the time that should be reached under normal circumstances at each node of the raw material transport. If an anomaly occurs, it is because of the actual measured time point, that is, the transport deviation that occurs during actual transportation, indicating that the node has an abnormal performance index; the target raw material transport time series is an idealized material transport time benchmark without any abnormal delays, established based on process design parameters and the optimal batch data of historical stable operation and 100% qualified products).

[0068] The time deviation of key physical nodes is calculated based on the raw material transport time series and the target raw material transport time series (i.e., one of the nodes has an abnormal current performance index, which causes the transport time to be abnormal); when the time deviation is greater than a preset time threshold, the timestamp of the key physical node is recorded as an abnormal timestamp.

[0069] Based on the raw material transport of the key physical nodes as edges, the key physical nodes with the abnormal timestamps are marked to form a time deviation path and construct a deviation propagation path diagram (i.e., if the raw material injection node has a deviation at 09:00 and the static mixer outlet node has a deviation at 09:05, then the time difference on the path is 5 minutes; the deviation propagation path diagram is represented by its nodes being key measurement nodes and its edges being material transport paths; when the transport time deviation of a node exceeds a threshold, the node is marked as abnormal; by connecting all abnormal nodes, one or more paths from upstream to downstream are formed to visualize the diffusion process of the abnormality).

[0070] It should be noted that the actual physical process flow sequence of oil blending from raw material input to finished product output determines the standard material transmission time for each key physical node, that is, the rated standard time required for material to be transported from the previous upstream node to the current node. Based on this, an actual raw material transmission time series is constructed. This series records the measured timestamp of the actual arrival of material at each node throughout the production process. A separate target raw material transmission time series is constructed. This series is calibrated based on historical normal and stable production data. It is the standard time benchmark for oil blending process without faults, equipment without aging, indicators without fluctuations, and transmission without obstacles. It clarifies the standard target timestamp that material should arrive at each key physical node under normal production conditions, without any time deviation caused by abnormal operating conditions. It serves as a benchmark for measuring whether actual production is abnormal.

[0071] Align the measured actual transmission timestamps with the standard target timestamps of the same key physical nodes one by one, and accurately calculate the time deviation value of each node; preset time deviation thresholds are set. If the time deviation calculated for a certain node exceeds the preset time deviation threshold, it is directly determined that the node has a transmission anomaly. The precise timestamp of the anomaly at that node is recorded synchronously and marked as an anomaly timestamp to prevent minor normal fluctuations from being misjudged as process anomalies; using the upstream and downstream physical connection relationships of material transmission in the oil blending process as edges, and all key physical nodes marked with anomaly timestamps as core points, a deviation propagation path diagram is constructed in series according to the chronological order of the anomalies. This visually presents the entire process of the anomaly gradually spreading and propagating from the first node to each downstream node along the material transmission process, clearly marking the deviation time difference, the chronological order of the anomalies, and the direction of the anomaly propagation for each anomaly node;

[0072] S22: Obtain the abnormal timestamp corresponding to the finished product inspection node of the last time deviation path in the deviation propagation path diagram (that is, the last deviation node usually refers to the finished product inspection node, and here the finished product inspection node is the node to be inspected).

[0073] Starting from the finished product inspection node, the raw material transmission is searched in reverse direction to the upstream static mixer outlet node to obtain the target timestamp corresponding to the target raw material transmission time sequence of the static mixer outlet node (that is, the actual time required from the mixer outlet to the finished product inspection is 10 minutes, which is the target timestamp).

[0074] If the target timestamp of the static mixer outlet node is greater than or equal to the timestamp corresponding to the raw material transport time series (i.e., the actual timestamp corresponding to the static mixer outlet node), then the static mixer outlet node is determined to be the source node of the anomaly. The search continues upstream to the raw material injection node. If the target timestamp of the raw material injection node is greater than or equal to the timestamp corresponding to the raw material transport time series (i.e., the timestamp corresponding to the raw material injection node), then the raw material injection node is updated as the final source node of the anomaly (i.e., if the deviation time of the upstream static mixer outlet node is the source, then the upstream static mixer outlet node may be the source). At this point, the search continues upstream until the first node that no longer satisfies the above time window relationship is encountered. The node preceding this node (i.e., the upstreammost node whose deviation time satisfies the material transport logic with the downstream node) is determined to be the source node of the anomaly. Figure 3 As shown; the specific source node of the anomaly is represented in the deviation propagation path graph as the upstream node that satisfies the condition that the target timestamp ≥ the actual timestamp, which is considered the starting point of the time deviation.

[0075] The time intervals are evenly divided according to the total timestamp of the raw material transport time series (i.e., if the total dwell time is 60 minutes, then each 5 minutes is divided into a sample interval, for a total of 12 intervals).

[0076] Obtain the corresponding current performance index for the abnormal timestamp of the abnormal source node, and map the abnormal timestamp of the current performance index to the corresponding time interval as the starting analysis interval (that is, after the entire production cycle is evenly divided into time intervals, the specific time interval where the abnormal timestamp of the abnormal source node is located will be the starting point for subsequent detailed performance deviation analysis).

[0077] It should be noted that in the deviation propagation path diagram constructed in S21, the finished product inspection node is used as the only starting point for reverse tracing. The finished product inspection node is the last critical physical node in the entire oil blending process. All upstream process anomalies will eventually be transmitted to this finished product inspection node, which is the final bearing point of the anomaly impact. The anomaly timestamp corresponding to this finished product inspection node is extracted as the starting reference time for the reverse tracing work.

[0078] Starting from the finished product inspection node, instead of following the material flow direction, we trace back upstream step by step in the reverse process flow, sequentially searching all upstream core nodes such as the static mixer outlet node, pipeline transfer node, and raw material injection node. We retrieve the standard target timestamp in the target raw material transmission time series of each upstream node and make a precise comparison with the measured timestamp of the actual raw material transmission time series of the same node.

[0079] If the standard target timestamp of the upstream node is greater than or equal to the actual measured timestamp, it indicates that the upstream node has experienced an abnormal operating condition in advance, and the abnormality is consistent with the material transmission and propagation. The node is initially determined to be the source node of the abnormality. The verification is carried out by tracing back upstream level by level, and the relationship between the timestamps is repeatedly compared until the first upstream node that meets the time deviation and has no upstream node that triggers the abnormality is found. This node is determined to be the final source node of the abnormality, which is the initial location of the abnormality in the entire oil blending process.

[0080] Based on the total standard dwell time of the entire raw material transportation process, the continuous time sample intervals are evenly divided according to a fixed and equal duration. For example, if the total harmonization time is 60 minutes, the intervals are divided into 12 continuous analysis intervals, each lasting 5 minutes. The timestamp of the anomaly originating node is extracted and accurately mapped to the corresponding time sample interval. This interval is used as the starting analysis interval for subsequent performance index deviation analysis.

[0081] S23: Obtain the target performance index set (i.e., the target performance index is the standard that the performance index should reach, that is, the standard performance index of the normal value).

[0082] Starting from the initial analysis interval, calculate the performance deviation between the target performance index and the current performance index at each time point within the interval (i.e., each time interval is 5 minutes, and 1 minute is a time point);

[0083] Calculate the performance deviation value at each time point within each time interval, and further calculate the average performance deviation value for the time interval;

[0084] Calculate the interval deviation of the average performance deviation value for each adjacent time interval (that is, the difference between the average performance deviation values ​​calculated between adjacent time intervals, which is used as the interval deviation, representing the trend of the deviation of the performance index between adjacent time intervals; if the mean of interval B is greater than the mean of interval A, the interval deviation is positive (the deviation is increasing); if the mean of interval B is less than the mean of interval A, the interval deviation is negative (the deviation is decreasing)).

[0085] Starting from the initial analysis interval deviation, determine whether the adjacent interval deviations show an increasing trend (i.e., the interval deviations gradually increase).

[0086] If so, then all process nodes corresponding to the corresponding time intervals are also treated as key physical nodes (i.e., calculate the interval deviation between the initial analysis interval and the second time interval (called deviation 1); calculate the interval deviation between the second interval and the third interval (called deviation 2); compare whether deviation 2 is greater than (or equal to) deviation 1 (i.e., whether the deviation is accelerating), look for a continuous monotonically increasing (i.e. trend increasing) sequence, start from the initial analysis interval and scan backwards. If three (or more) consecutive adjacent interval pairs are found, their interval deviations show a monotonically increasing trend (e.g., deviation 1 < deviation 2 < deviation 3), then it is determined that the deviation is continuously accelerating and deteriorating. All process nodes (i.e., mixer outlet, pipe bend, detection point, etc.) corresponding to all time intervals that constitute this continuous monotonically increasing interval deviation sequence are marked as key sensitive node sequences. Key sensitive nodes represent the process flow segment with the most severe abnormal impact and the most significant changes).

[0087] It should be noted that the established target performance index set covers all core process performance indicators of oil blending, such as the proportion of oil components. All values ​​within the set are standard qualified values ​​required by process design and normal production calibration, serving as the standard reference for whether performance indicators meet the standards and whether deviations occur. Starting from the initial analysis interval determined in step S22 above, the time interval is further refined and broken down into detailed time points. For example, a 5-minute interval is broken down into 1-minute time points. For each time point, the single-point performance deviation value between the current measured performance index of the equipment and the target standard performance index is calculated, quantifying the magnitude of the deviation from the standard at each moment. Based on the performance deviation values ​​of all nodes, the interval average of each complete time interval is calculated. The deviation value eliminates noise fluctuations within the interval and intuitively reflects the overall performance deviation level of each time period. The difference between the average performance deviation values ​​of two adjacent time intervals is then calculated to obtain the interval deviation. Positive values ​​indicate a continuous expansion of the deviation and abnormal deterioration of the process, while negative values ​​indicate a contraction of the deviation and a gradual return to stable operating conditions. Starting from the initial analysis interval, the deviation trends of adjacent intervals are continuously compared one by one. The core judgment is whether the interval deviation shows a continuously monotonically increasing trend of accelerated deterioration. Three or more consecutive adjacent interval pairs are strictly selected, satisfying an increasing sequence where the deviation of the later interval is greater than that of the previous interval. All process physical nodes corresponding to this continuously increasing deviation sequence are designated as critical physical nodes (i.e., sensitive nodes of anomalies).

[0088] According to the oil blending process mechanism, anomalies caused by equipment mechanical failures (such as pump speed fluctuations and valve vibrations) usually manifest as high-frequency rapid oscillations (which may lead to oil quality problems caused by equipment factors), while anomalies caused by changes in the quality of raw material batches (such as component content drift) usually manifest as low-frequency slow shifts. Based on this principle, the following frequency domain analysis is used to distinguish the types of anomalies.

[0089] S24: By selecting two time intervals before and after the anomaly source node, extract the instantaneous deviation values ​​of key physical nodes to form a performance fluctuation time-domain signal sequence. Then, convert the performance fluctuation time-domain signal sequence into a fluctuation frequency-domain signal using a sliding window, and divide it into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components. Construct an association mapping matrix using the anomaly timestamp as the row index and the time interval as the column index for the fast, medium, and slow fluctuation components. Extract the source of the abnormal raw material batch using the association mapping matrix. Obtain the corresponding historical batches from the source of the abnormal raw material batches, and iteratively adjust the raw material ratio using the historical batches with a step size until the optimized raw material ratio is achieved after the number of iterations.

[0090] It should be noted that the above steps, by extracting the instantaneous deviation values ​​of key physical nodes and forming a time-domain signal sequence of performance fluctuations, are used to monitor system performance fluctuations in a timely manner, helping to identify and track potential anomaly sources. Converting the time-domain signal to a frequency-domain signal allows for more in-depth analysis of the fluctuation signal. By dividing the fluctuation into fast, medium, and slow components, the fluctuation characteristics within different fluctuation ranges can be distinguished, improving the accuracy of anomaly detection and helping to understand the impact of different types of fluctuations on system performance. The next step involves constructing a correlation mapping matrix between anomaly timestamps and time intervals to systematically analyze the relationship between raw material batches and performance fluctuations. This analysis reveals which raw material batches may be related to anomalies, thus more accurately locating the source of the problem. Using the obtained sources of anomalous raw material batches to trace historical data allows the optimization process to be based on more comprehensive historical performance, helping to avoid blind adjustments, reduce interference with the system, and improve optimization effectiveness using existing data. The method of iteratively adjusting the raw material ratio with a step size is used to gradually find the optimal raw material ratio, reducing the risk during the adjustment process and flexibly responding to real-time changes in system requirements.

[0091] like Figure 4 As shown, specifically, in step S24, by selecting two time intervals before and after the anomaly source node as the center, the instantaneous deviation values ​​of key physical nodes are extracted to form a performance fluctuation time-domain signal sequence. This performance fluctuation time-domain signal sequence is then converted into a fluctuation frequency-domain signal using a sliding window, and divided into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components. An association mapping matrix is ​​constructed using the fast, medium, and slow fluctuation components, with the anomaly timestamp as the row index and the time interval as the column index. The source of the abnormal raw material batch is extracted using this association mapping matrix. The corresponding historical batches are obtained from the source of the abnormal raw material batches, and the raw material ratio is iteratively adjusted using the historical batches with a step size until the optimized raw material ratio is achieved after the number of iterations. The specific operation steps are as follows:

[0092] S241: Select two time intervals forward and backward from the time interval where the anomaly source node is located (i.e., if the anomaly source node is located in the 10th time interval, then extract the data from the 8th, 9th, 10th, 11th and 12th time intervals).

[0093] The performance deviation values ​​of all key physical nodes at the corresponding time points within the five extracted time intervals are used as instantaneous deviation values.

[0094] All instantaneous deviation values ​​are sorted in descending order to form a time-domain signal sequence of performance fluctuations (i.e., the horizontal axis is time and the vertical axis is deviation amplitude; a one-dimensional discrete signal composed of a series of instantaneous deviation values ​​in time point order).

[0095] A sliding window is applied to the time-domain signal sequence of performance fluctuations, with each time point in the sequence used as a time-domain sampling point; the fluctuation rate (i.e., ...) is calculated for each sliding window. Where, v represents the fluctuation rate of the sliding window, which is the average fluctuation speed of the signal within the current time window; the larger the v value, the more violent the fluctuation (high frequency); the smaller the v value, the smoother the change (low frequency); L represents the length of the sliding window, which is the number of time points contained in each sliding window; L-1 represents the number of adjacent differences, where L time points within the sliding window are subtracted from each other pairwise, resulting in L-1 differences; i represents the index within the sliding window, which ranges from 1 to L-1, and iterates through each pair of adjacent time points within the sliding window; This is represented as the instantaneous deviation value corresponding to the i-th time point within the sliding window (e.g., octane number deviation of 0.5). It is represented as the instantaneous deviation value of the previous instantaneous point in time i within the sliding window; This is expressed as the instantaneous change in deviation between two adjacent sampling points; a positive number indicates an increase in deviation, and a negative number indicates a decrease in deviation.

[0096] Based on all the output fluctuation rates, all time-domain sampling points are used to form a fluctuation frequency-domain signal sequence;

[0097] Preset high-frequency threshold (referring to rapid high-frequency fluctuation rate) and low-frequency threshold (referring to slow low-frequency fluctuation rate).

[0098] If each fluctuation rate is greater than or equal to the high-frequency threshold, then the fluctuation rate is treated as a fast fluctuation component.

[0099] If each fluctuation rate is less than or equal to the low-frequency threshold, then the fluctuation rate is treated as a slow fluctuation component.

[0100] The remaining fluctuation rate is taken as the medium-speed fluctuation component.

[0101] It should be noted that, taking the time interval of the anomaly source node in step S22 above as the center point, two adjacent time intervals are selected before and after it, and a total of five consecutive related time intervals are fixedly extracted; for example, if the anomaly source falls in the 10th interval, then the 8th, 9th, 10th, 11th and 12th intervals are uniformly extracted to form a local core analysis window to ensure complete coverage of the anomaly propagation process; extract the instantaneous deviation values ​​of performance indicators corresponding to all key physical nodes and all subdivided time points within these five time intervals as the basic instantaneous deviation value dataset, completely retain the original fluctuation details of the indicator deviation at every moment (each time point in the time interval) of the entire anomaly occurrence process, without performing pre-averaging and noise reduction, and retain the original time domain fluctuation characteristics; sort all instantaneous deviation values ​​in descending order of numerical value to construct a standardized performance fluctuation time domain signal sequence, with time as the horizontal axis and deviation fluctuation amplitude as the vertical axis, intuitively presenting the entire picture of the time domain fluctuation change of the anomaly from weak to strong, from stable to disturbed;

[0102] Preprocessing is performed on the time-domain signal sequence of performance fluctuations, using each time point in the sequence as a time-domain sampling point to generate the complete fluctuation rate of the signal. The original time-domain fluctuation signal is completely converted into a frequency-domain fluctuation signal sequence. Based on preset fixed high-frequency and low-frequency thresholds, all fluctuation rates are divided into three levels: those greater than or equal to the high-frequency threshold are defined as high-frequency fluctuation rates, those less than or equal to the low-frequency threshold are defined as low-frequency fluctuation rates, and all those between the two thresholds are classified as medium-frequency fluctuation rates. This completes the classification of abnormal fluctuation signals into high, medium, and low frequencies (i.e., high, medium, and slow fluctuation components, whose dimensions are the dimensions of the original signal deviation values ​​(e.g., octane number deviation or sulfur content deviation in ppm). The setting of high-frequency and low-frequency thresholds needs to be based on prior knowledge of the fluctuation characteristics of equipment and raw materials).

[0103] S242: Squaring all fast fluctuation components yields the contribution value of high-frequency components;

[0104] The contribution value of the low-speed oscillation component is obtained by squaring all slow-speed oscillation components.

[0105] The contribution value of the medium-speed fluctuation component is obtained by squaring all medium-speed fluctuation components.

[0106] The total component contribution value is obtained by summing the squares of all component contribution values.

[0107] The proportion of the total fast fluctuation component to the total contribution value of all fast fluctuation components is calculated to obtain the fast fluctuation ratio (i.e., the higher the proportion, the more dominant the fast oscillation component is in the abnormal signal).

[0108] The ratio of the total slow fluctuation component to the total component contribution value is calculated to obtain the slow fluctuation ratio (i.e., the higher the ratio, the more dominant the slow drift component is in the abnormal signal).

[0109] Extract the abnormal timestamps of all batches, and use the corresponding current performance metric as a matrix row index according to the order of the abnormal timestamps (that is, arrange these timestamps in chronological order, and use the corresponding current performance metric (that is, treat the abnormal performance metric as the event) as a row of the matrix, with the number of rows equal to the number of switches in the past 24 hours).

[0110] Divide all batches into time intervals as described in steps S21-S22 above, and use all time intervals as matrix column indices (i.e., assign each sample interval a number (such as interval 1, interval 2... interval N) as a column of the matrix, and each time interval contains the timestamp of the abnormal performance index and the type of performance index of the raw material with the problem (such as benzene, acid, etc.)).

[0111] Traverse each time interval (i.e., each interval contains the time intervals of all batches) to extract all key physical nodes and their corresponding instantaneous deviation values ​​(i.e., the instantaneous deviation values ​​corresponding to the key physical nodes).

[0112] Calculate the sum of the absolute values ​​of the instantaneous deviations of all critical physical nodes (i.e., the total deviation component representing that interval).

[0113] An association mapping matrix is ​​constructed using the matrix row index and matrix column index. The sum of absolute values ​​is used to fill the association mapping matrix to obtain the final association mapping matrix (that is, the sum value is filled into the matrix, the row index is mapped to the batch switching event that occurred in the interval (if there are multiple switches in the interval, it corresponds to multiple rows; if there is no switch, it corresponds to an empty row or a zero value row), and the column index is the interval number; the consecutive rows and columns in the matrix actually constitute the time segment of continuous operation of the equipment; the association mapping matrix further represents the construction of a feature matrix of multiple batches and multiple intervals; for the production process of each batch, after determining the abnormal source node and the key time interval, the features extracted in each time interval (such as the ratio of high, medium and slow fluctuations, average deviation value, etc.) are taken as a vector; these vectors of all batches are arranged by row to form a feature matrix, and each row represents all the features of an abnormal event).

[0114] It should be noted that the high, medium, and low fluctuation rates divided in step S241 are squared separately to obtain the contribution values ​​of the high, low, and medium components, respectively. The squaring operation amplifies the differences in fluctuation components. The contribution values ​​of the three components are then squared and summed to calculate the total contribution value, which serves as the overall benchmark for all abnormal fluctuation components. The ratios of the high total component, low total component, and total component contribution value are then calculated to obtain the fast fluctuation ratio and the slow fluctuation ratio. A higher fast fluctuation ratio indicates that the anomaly is mainly caused by rapid equipment oscillation disturbances; a higher slow fluctuation ratio indicates that the anomaly is mainly caused by slow drift and displacement of raw materials. A two-dimensional matrix for anomaly correlation analysis is constructed, with the timestamps of all abnormal events in the past 24 hours arranged in chronological order as the matrix row index. Each row... For each abnormal batch, process switch, or abnormal event, the number of rows matches the actual number of abnormalities and switches within the cycle. Using all standardized time intervals divided in steps S21-S22 above as matrix column indices, each column corresponds to a fixed time interval, and the column information is synchronously bound to the interval abnormal timestamp and abnormal raw material category (such as benzene, acidic components, etc.). Traverse all time intervals and key physical nodes, extract all corresponding instantaneous deviation values ​​and sum them to obtain the sum of absolute values. According to the correlation between rows corresponding to abnormal batches and columns corresponding to time intervals, fill the sum of absolute values ​​one by one to generate the final correlation mapping matrix. The matrix intuitively presents the overall strength distribution of process performance deviations under different time batches and different time intervals, and fully reflects the abnormal fluctuation distribution pattern of the equipment during continuous operation.

[0115] S243: Preset component proportion threshold; if the rapid fluctuation ratio is greater than or equal to the component proportion threshold, then extract the row of the abnormal timestamp corresponding to the rapid fluctuation component in the correlation mapping matrix (i.e., the row vector involved in the abnormal time period).

[0116] Filter all batches to extract the row corresponding to the abnormal timestamp. Extract the raw material transport time series with the same row as the corresponding abnormal timestamp from all batches. Extract the row with the same abnormal timestamp in the raw material transport time series from the association mapping matrix (i.e., find a period of the same length before the current abnormality occurred (e.g., the previous 24 hours or the previous production shift), and extract the row vector with the same row index position from the matrix).

[0117] Calculate the cosine similarity between the current abnormal timestamp row and the row with the same abnormal timestamp in the previous batch (that is, treat the current row vector and the row vector of the previous period as two vectors in two multi-dimensional spaces, calculate the closeness of the directions of the two vectors, the closer the value is to 1, the more consistent the directions are. If the directions of the two vectors are highly consistent, it means that the current deviation distribution pattern is similar to the historical cycle and belongs to regular and periodic fluctuations).

[0118] If the cosine similarity is less than the preset similarity threshold and the rapid fluctuation ratio is greater than or equal to the component proportion threshold, then the oil equipment is determined to be the source of the oil abnormality.

[0119] If any of the above conditions are not met (i.e., the cosine similarity is greater than or equal to the preset similarity threshold or the fast fluctuation ratio is less than the component proportion threshold), then it is determined whether the slow fluctuation ratio is greater than the preset performance proportion threshold.

[0120] If so, extract the column corresponding to the abnormal timestamp in the association mapping matrix (i.e., the specific time interval), and take the corresponding column as the source of the abnormal raw material batch (i.e., there is a problem with one of the raw material categories, such as benzene; therefore, the abnormal timestamp indicates that the oil blending is abnormal because the raw material is problematic, which leads to the abnormality in the oil blending process).

[0121] It should be noted that a fixed component proportion threshold and a similarity threshold are preset in advance as the ultimate hard quantitative standard for judgment. If the rapid fluctuation ratio is greater than or equal to the component proportion threshold, it indicates that the anomaly is mainly a rapid oscillation disturbance. The row vector corresponding to the abnormal timestamp of the high-frequency component in the correlation mapping matrix is ​​extracted to lock the current abnormal batch deviation distribution data. The historical row vectors of the same production cycle (such as the previous 24 hours or the previous production batch), the same raw material transmission time series, and the same row index position are extracted to form the current abnormal vector and the historical cycle comparison vector. The cosine similarity between the current row vector and the historical row vector of the same period is calculated. The two multi-dimensional vectors are included in the same multi-dimensional space to calculate the directional similarity. The closer the value is to 1, the more consistent the current deviation distribution pattern is with the historical periodic fluctuation. The lower the value, the more the fluctuation is a sudden new anomaly, not caused by the historical regularity cycle.

[0122] If the cosine similarity is less than the preset similarity threshold and the rapid fluctuation ratio meets the standard, then the source of the anomaly is directly determined to be the oil blending equipment itself, which is a sudden high-frequency disturbance caused by equipment aging, component failure, or sudden change in operating conditions. If the equipment does not meet any of the conditions, i.e., the high similarity is a periodic fluctuation or the proportion of rapid fluctuation is low, then it is determined whether the slow fluctuation ratio is greater than the preset performance ratio threshold. If the slow fluctuation ratio meets the standard, then the column vector corresponding to the abnormal timestamp in the association mapping matrix is ​​extracted, the corresponding time interval and the associated raw material category are locked, and finally it is determined that the source of the anomaly is a raw material batch quality problem, which is an overall process anomaly caused by the slow drift of raw material composition, concentration, and performance.

[0123] S244: Obtain historical batches by taking the source of the abnormal raw material batch as the target adjustment object; obtain the historical target proportion and historical batch performance index by analyzing the historical batches, and construct a response relationship curve; obtain the current proportion value of the target adjustment object, and calculate the deviation using the current performance index and the historical batch performance index; use the current proportion value to obtain the corresponding historical target proportion in the response relationship curve and calculate the average inclination; adjust the raw material proportion (positive or negative) by step-size iteration according to the combination of deviation and average inclination, until the preset number of iterations is reached, and output the optimized raw material proportion;

[0124] It should be noted that the above steps, by using the source of abnormal raw material batches as the target for adjustment to obtain historical batches, can fully utilize existing data, ensure that the optimization process is based on historical performance, reduce invalid attempts, and thus improve the reliability of optimization. A response relationship curve is constructed based on the historical target proportion and historical batch performance indicators to clearly understand the impact of different proportions on performance. The above steps, by calculating the deviation between the current performance indicators and the historical batch performance indicators, can promptly reflect the difference between the current production state and the historical best state, providing accurate deviation calculations. Using the average tilt angle to guide the adjustment direction allows for flexible responses to actual situations during the optimization process. If the current performance deviates from the historical best state, the system will dynamically adjust the raw material proportion based on the positive or negative value of the tilt angle, ensuring the effectiveness of improvement measures. The step-size iterative approach ensures the gradual nature of the optimization process, avoiding system instability that may result from a large-scale adjustment at once. Setting a preset number of iterations ensures the orderly progress of the optimization process.

[0125] like Figure 5 As shown, specifically, in step S244, the source of the abnormal raw material batch is used as the target adjustment object to obtain historical batches; by analyzing the historical batches, the historical target proportion and historical batch performance indicators are obtained to construct a response relationship curve; the current proportion value of the target adjustment object is obtained, and the deviation is calculated using the current performance indicator and the historical batch performance indicator; the average tilt is calculated using the current proportion value to obtain the corresponding historical target proportion in the response relationship curve; based on the positive or negative combination of the deviation and the average tilt, the raw material proportion is adjusted (positive or negative) using a step-size iteration method until a preset number of iterations is reached, and the optimized raw material ratio is output. The specific operation steps are as follows:

[0126] S2441: The source of the abnormal raw material batch is taken as the target for adjustment;

[0127] According to the preset historical database, retrieve all historical batches of the target adjustment object in the preset past time period (e.g., if benzene has a problem, extract all blending records of benzene raw materials in the oil blending batches within the past 30 days).

[0128] Extract the corresponding performance metrics for all historical batches, and use them as the historical batch performance metrics and the historical target proportion of the target adjustment object in the historical batches;

[0129] Sort the percentage of historical targets in all historical batches in descending order, and sort the performance indicators of all historical batches in descending order;

[0130] Using all historical target percentages as the x-axis and all historical batch performance indicators as the y-axis, a two-dimensional data point is formed. A two-dimensional scatter plot is then constructed (i.e., a two-dimensional coordinate system is formed based on the x and y axes, and data pairs (i.e., two-dimensional data points) are created by placing the historical target percentages and historical batch performance indicators within the two-dimensional coordinate system, thus forming a two-dimensional scatter plot, as shown below). Figure 6 (as shown)

[0131] Iterate through the coordinates of each two-dimensional data point on the x-axis, select two-dimensional data points at preset fixed intervals, assign weights to the adjacent two-dimensional data points of each selected two-dimensional data point (the closer the data points are, the higher the weights, and the farther the data points are, the lower the weights), perform weighted linear regression on the weighted adjacent two-dimensional data points to obtain the local fitted value of the selected two-dimensional data point, and connect the local fitted values ​​of all selected two-dimensional data points by curve fitting to obtain the response relationship curve (that is, describing how the historical performance index is expected to change when the proportion of the target raw material is adjusted alone, while the relative proportions of other raw materials remain stable).

[0132] It should be noted that the source of the abnormal raw material batch in step S243 is used as the sole target for adjustment. The core problem raw material category of this oil blending anomaly is determined, such as the specific raw material with problems, such as benzene or acid components. All subsequent optimization and adjustment are only implemented precisely for this target raw material, without changing the proportion of other normal raw materials, to avoid secondary imbalance of the overall blending system. The system's preset historical process database is retrieved to search for all historical production and blending batch records of the target abnormal raw material within a preset long period. From all the selected historical batches, the measured values ​​of the key performance indicators of the finished product corresponding to each batch and the historical actual target proportion of the target adjustment raw material in the corresponding batch are extracted simultaneously to form paired basic data of raw material proportion and finished product performance.

[0133] For both types of data, a descending sort operation is performed, uniformly arranging all historical target raw material proportions in descending order, and simultaneously arranging the corresponding historical batch finished product performance indicators in descending order to ensure that the data pairing logic is not disordered and the order is well-maintained. Using the historical target raw material proportion as the X-axis and the historical batch finished product performance indicators as the Y-axis, each pair of raw material proportion and performance indicator data is used to generate independent two-dimensional data points. Based on all data points, a two-dimensional scatter plot of raw material proportion-finished product performance is constructed to intuitively present the original historical correlation distribution pattern between the change of raw material ratio and the final blending performance of the oil. Traversing all two-dimensional data point coordinates on the X-axis, core representative data points are uniformly selected at fixed intervals preset by the system, and for each For each selected core data point, a weight is dynamically assigned to its surrounding scattered points based on spatial distance, following the core principle that the closer the data point, the higher the weight, and the farther the data point, the lower the weight. Closely adjacent data points have a greater correlation and influence, while distant data points have a smaller interference effect. Local weighted linear regression calculations are then performed on the adjacent scattered points after assigning differentiated weights to solve for the local optimal fit value of each core selected data point. Finally, all local fit values ​​are continuously fitted and connected to generate a unique raw material ratio-finished product performance response curve. This curve accurately depicts the historical expected change pattern of the oil product performance indicators when only the ratio of the abnormal target raw material is adjusted, assuming that all other raw material ratios and process conditions remain stable.

[0134] S2442: Obtain the current percentage value of the target adjustment object;

[0135] Calculate the deviation between the current performance index and the historical batch performance index (i.e., the current performance index minus the historical batch performance index).

[0136] The direction of adjustment of the y-axis is determined by the sign of the deviation, serving as the target recovery direction. (If the deviation is negative (performance is lower than the target), the finished product performance value needs to be increased, so the adjustment should be made in the direction that increases the Y value; if the deviation is positive (performance is higher than the target), the finished product performance value needs to be decreased, so the adjustment should be made in the direction that decreases the Y value.)

[0137] Obtain the two-dimensional data point on the response relationship curve that corresponds to the historical target percentage with the same current percentage value (that is, the current percentage value is the current batch of oil, while the historical target percentage is the historical blended oil). Find the historical target percentage with the current percentage value of the current oil in the response relationship curve and filter out the two-dimensional data point corresponding to the historical target percentage. Using the two-dimensional data point as the center, find the two-dimensional data point with the minimum distance to the left and right of the two-dimensional data points corresponding to the historical target percentage (that is, the two-dimensional data point with the minimum distance is the historical target percentage with the same distance to the left and right of the two-dimensional data point). Calculate the distance between the equal historical target percentage and the two-dimensional data point, and filter out the two-dimensional data points with the closest distance to the equal historical target percentage in the left and right directions. This results in one two-dimensional data point in each direction.

[0138] The average value of the historical target proportions of the two-dimensional data points with the minimum distance in the left and right directions is calculated as the average tilt (i.e., a positive average tilt increases the proportion of raw materials, improving the performance of the finished product; a negative average tilt increases the proportion of raw materials, decreasing the performance of the finished product; that is, the average value calculated from the two-dimensional data points with the minimum distance in the left and right directions; the average tilt represents the local change rate of the performance index with respect to the proportion of raw materials).

[0139] It should be noted that the real-time actual proportion of the target abnormal raw materials in the current abnormal production batch is extracted as the starting point for adjustment; the difference between the current measured finished product performance index and the process standard target performance index is calculated to obtain the real-time performance deviation, quantifying the specific extent of current performance exceeding or failing to meet the standard; if the deviation is negative, it means that the current finished product performance is lower than the qualified standard, and adjustment is required along the Y-axis performance increasing direction; if the deviation is positive, it means that the current finished product performance is higher than the qualified standard, and adjustment is required along the Y-axis performance decreasing direction, clarifying the core objective of adjustment.

[0140] On the response curve, accurately locate the two-dimensional data point corresponding to the historical target proportion that is equal to the current real-time proportion of raw materials. Using the corresponding two-dimensional data point as the central reference point, filter the two adjacent two-dimensional data points with the smallest difference in historical target proportion values ​​and the closest spatial distance in both left and right directions to lock the local core correlation points in the current proportion range. Calculate the average value of the historical target proportion values ​​corresponding to the two nearest adjacent data points to obtain the average slope corresponding to the proportion in this range. A positive average slope means that increasing the proportion of this raw material will improve the performance of the finished product. A negative average slope means that increasing the proportion of this raw material will decrease the performance of the finished product, thus clarifying the positive and negative correlation between changes in raw material proportion and changes in performance.

[0141] S2443: Preset the current adjusted percentage value, the current predicted deviation (i.e., a preset, acceptable performance deviation range; when the actual deviation falls within this range, the formula is considered to have reached its optimal state, and the iteration terminates), and the preset adjustment step size;

[0142] Determine whether the deviation is less than or equal to the preset deviation of the current prediction;

[0143] If so, stop the iteration and use the current adjusted percentage as the optimized raw material ratio (that is, the adjusted raw material ratio).

[0144] If the deviation is greater than the preset current predicted deviation, then continue to determine the sign of the deviation (that is, reduce the proportion of raw materials).

[0145] If the deviation is negative (less than 0) and the average tilt is positive (greater than 0), then the proportion of raw materials is adjusted in the positive direction (that is, the proportion of raw materials (i.e., the target adjustment object, which is the source of the raw material abnormality; when the raw materials are abnormal, the oil blending will have an abnormal timestamp)).

[0146] If the deviation is negative and the average tilt is negative (less than 0), then the proportion of raw materials is adjusted in the negative direction.

[0147] If the deviation is positive (greater than 0) and the average tilt is positive (greater than 0), then the raw material ratio is adjusted in the negative direction;

[0148] If the deviation is positive and the average tilt is negative, then the proportion of raw materials is adjusted in the positive direction.

[0149] It should be noted that the initial proportion value after adjustment, the target prediction deviation allowed for iteration, and the fixed adjustment step size are preset in advance. All iterative adjustments are strictly executed according to the parameters to ensure a stable and controllable adjustment rhythm. The current performance deviation is checked in real time to see if it is less than or equal to the preset allowable prediction deviation. If the condition is met, it means that the current raw material ratio has reached the process qualification standard, and there is no need to continue the adjustment iteration. The current adjusted proportion value is directly determined as the final optimized raw material ratio, and the adjustment work ends. If the current deviation is greater than the preset allowable deviation, it means that the performance is still not up to standard and iterative adjustment is required. The positive or negative attribute of the deviation is further judged, and the scenario-specific precise adjustment rules are executed in combination with the positive or negative average tilt.

[0150] If the deviation is negative and the average inclination is positive, the proportion of raw materials needs to be increased positively in the synchronous and symmetrical direction; if the deviation is negative and the average inclination is negative, the proportion of raw materials needs to be decreased negatively in the reverse balancing direction; if the deviation is positive and the average inclination is positive, the proportion of raw materials needs to be decreased negatively in the reverse decline direction; if the deviation is positive and the average inclination is negative, the proportion of raw materials needs to be increased positively in the synchronous balancing direction. All scenarios are fully covered without any logical omissions, and the adjustment is strictly based on the curve linkage law.

[0151] S2444: The adjustment of the raw material ratio in the positive direction is the sum of the current adjusted ratio and the adjustment step (that is, the increase in the raw material ratio is the sum of the current adjusted ratio and the adjustment step).

[0152] The negative adjustment of the raw material ratio is the difference between the current adjusted ratio and the adjustment step size (that is, the reduced raw material ratio minus the adjustment step size).

[0153] The positive and negative adjustments to the raw material ratios are used as new raw material ratio ratios, and new current performance indicators of oil quality are collected again using these new raw material ratio ratios.

[0154] Calculate the average of the raw material ratio adjustments in the positive and negative directions as the predicted adjusted raw material ratio;

[0155] The new deviation is obtained by calculating the predicted adjusted raw material ratio and the new current performance index.

[0156] The above steps are repeated iteratively using the new current performance index and the new deviation until the preset number of iterations is reached, to obtain the final optimized raw material ratio (that is, to continue iterating the adjusted current performance index and the adjusted deviation until the number of iterations is reached, to prevent infinite loops caused by abnormal curves, and after the number of iterations ends, the optimal raw material ratio is reached so that the oil will no longer be abnormal after readjustment).

[0157] It should be noted that positive raw material ratio adjustment = current adjusted ratio value + preset fixed adjustment step size, thereby increasing the raw material ratio; negative raw material ratio adjustment = current adjusted ratio value - preset fixed adjustment step size, thereby decreasing the raw material ratio. The two types of raw material ratios after positive and negative adjustments are matched and updated to the new current operating condition performance indicators respectively, and the average value of the two types of adjusted ratios is calculated simultaneously to generate the predicted adjusted raw material ratio. Based on the predicted adjusted raw material ratio and the updated new current performance indicators, the new deviation amount after the new round of calibration is calculated in real time, completing the single iteration data update. According to the logic of all steps S2442 to S2443 above, the new performance indicators and new deviation amounts are used to repeatedly iterate and calibrate, while superimposing a hard constraint of the preset maximum number of iterations to prevent abnormal special inflection points of the response curve from causing the program to iterate indefinitely. When the performance deviation meets the termination condition or the number of iterations reaches the preset upper limit, the iteration stops immediately, and the final converged and stable optimal optimized raw material ratio is output to ensure that the adjusted oil blending process no longer has time deviations and performance anomalies caused by the same type of raw material.

[0158] Example 2

[0159] like Figure 7 As shown, the present invention also provides an iterative optimization system for oil blending formula based on reinforcement learning, including: a data acquisition module 10 and an identification module 20;

[0160] The acquisition module 10 is used to acquire raw material ratio data and process variable data of multiple batches of oil blending process through sensors; at the same time, it acquires key performance indicators of oil quality, preprocesses the key performance indicators to obtain the current performance indicator set; and acquires key physical nodes according to the time sequence of raw material transmission at each process node in the oil blending process.

[0161] The identification module 20 is used to establish a raw material transmission time series based on the location and transmission duration of key physical nodes in the oil blending process; obtain the target raw material transmission time series and compare it with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; perform a reverse search starting from the finished product detection node to obtain the target timestamp corresponding to the target raw material transmission time series of the static mixer outlet node; filter the abnormal source node by comparing the target timestamp with the timestamp corresponding to the raw material transmission time series; map the abnormal timestamp of the abnormal source node to the time interval evenly divided in the raw material transmission time series as the starting analysis interval; obtain the target performance index set and calculate the performance deviation value between the target performance index and the current performance index in each time interval, and filter the process nodes in the time interval as key physical nodes; select multiple time intervals centered on the abnormal source node, extract the performance deviation value to construct a performance fluctuation time domain signal sequence, convert it into a fluctuation frequency domain signal, extract the source of abnormal raw material batches, adjust the raw material ratio, and finally output the optimized raw material ratio.

[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; those skilled in the art can modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An iterative optimization method for oil blending formulations based on reinforcement learning, characterized in that, The specific operating steps include: The key performance indicators of oil quality during the blending process of multiple batches of oil products are collected by sensors. The key performance indicators are preprocessed to obtain the current performance indicator set. Key physical nodes are collected according to the time sequence of raw material transmission at each process node in the oil blending process. The key physical nodes include the raw material injection node, the static mixer outlet node, and the finished product detection node. Based on the location and transmission duration of key physical nodes in the oil blending process, a raw material transmission time series is established; the target raw material transmission time series is obtained and compared with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; Starting from the finished product inspection node, a reverse search is performed to obtain the target timestamp corresponding to the target raw material transport time series of the static mixer outlet node; the abnormal source node is screened by comparing the target timestamp with the timestamp corresponding to the raw material transport time series; the abnormal timestamp of the abnormal source node is mapped to the time interval evenly divided in the raw material transport time series as the starting analysis interval; the target performance index set is obtained, and the performance deviation value between the target performance index and the current performance index in each time interval is calculated, and the process nodes in the time interval are also screened as key physical nodes; multiple time intervals are selected with the abnormal source node as the center, the performance deviation value is extracted to construct the performance fluctuation time domain signal sequence, and it is converted into a fluctuation frequency domain signal, and the source of abnormal raw material batch is extracted, the raw material ratio is adjusted, and finally the optimized raw material ratio is output.

2. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 1, characterized in that, Based on the location and transmission duration of key physical nodes in the oil blending process, a raw material transmission time series is established; the target raw material transmission time series is obtained and compared with the raw material transmission time series to obtain abnormal timestamps, forming a deviation propagation path diagram; starting from the finished product detection node, a reverse search is performed to obtain the target timestamp corresponding to the target raw material transmission time series at the static mixer outlet node; the abnormal source nodes are screened by comparing the target timestamps with the timestamps corresponding to the raw material transmission time series; the abnormal timestamps of the abnormal source nodes are mapped to the evenly divided time intervals of the raw material transmission time series as the starting analysis interval. The specific operation steps are as follows: Establish a raw material transport time sequence based on the location of key physical nodes in chronological order; Collect the target raw material transportation time series; calculate the time deviation of key physical nodes based on the raw material transportation time series and the target raw material transportation time series; when the time deviation is greater than a preset time threshold, record the timestamp of the key physical node as an abnormal timestamp; mark the key physical nodes with abnormal timestamps based on the raw material transportation of the key physical nodes, form a time deviation path, and construct a deviation propagation path graph. Obtain the abnormal timestamp corresponding to the finished product detection node of the last time deviation path in the deviation propagation path diagram; starting from the finished product detection node, search upstream in reverse direction for the raw material transmission to the static mixer outlet node, and obtain the target timestamp corresponding to the target raw material transmission time sequence of the static mixer outlet node; if the target timestamp of the static mixer outlet node is greater than or equal to the timestamp corresponding to the raw material transmission time sequence, then the static mixer outlet node is determined to be the abnormal source node; and continue to search upstream for the raw material injection node from the abnormal source node. If the target timestamp of the raw material injection node is greater than or equal to the timestamp corresponding to the raw material transmission time sequence, then update the raw material injection node as the final abnormal source node; The time intervals are evenly divided according to the total timestamp of the raw material transportation time series; Obtain the corresponding current performance index for the abnormal timestamp of the abnormal source node, and map the abnormal timestamp of the current performance index to the corresponding time interval as the starting analysis interval.

3. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 2, characterized in that, Obtain the target performance index set, calculate the performance deviation between the target performance index and the current performance index in each time interval, and screen the process nodes in the time interval as key physical nodes. Multiple time intervals are selected centered on the abnormality source node. Performance deviation values ​​are extracted to construct a performance fluctuation time-domain signal sequence, which is then converted into a fluctuation frequency-domain signal. The source of the abnormal raw material batch is extracted, the raw material ratio is adjusted, and finally the optimized raw material ratio is output. The specific operation steps are as follows: Obtain the target performance index set; calculate the performance deviation value between the target performance index and the current performance index at each time point within the interval, using the initial analysis interval as the starting point; calculate the performance deviation value at each time point within each time interval, and further calculate the average performance deviation value of the time interval; Calculate the interval deviation of the average performance deviation value of each adjacent time interval; use the interval deviation of the initial analysis interval as the starting point to determine whether the interval deviation of adjacent intervals shows an increasing trend; If so, then all process nodes corresponding to the corresponding time intervals are also considered as key physical nodes; by selecting two time intervals before and after the anomaly source node as the center, the instantaneous deviation values ​​of the key physical nodes are extracted to form a performance fluctuation time-domain signal sequence, and the performance fluctuation time-domain signal sequence is converted into a fluctuation frequency-domain signal through a sliding window, and divided into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components; an association mapping matrix is ​​constructed based on the fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components, with the anomaly timestamp as the row index and the time interval as the column index; the source of the abnormal raw material batch is extracted through the association mapping matrix; the corresponding historical batch is obtained from the source of the abnormal raw material batch, and the raw material ratio is adjusted iteratively by step size through the historical batch until the optimized raw material ratio is output after the number of iterations.

4. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 3, characterized in that, By selecting two time intervals before and after the anomaly source node, the instantaneous deviation values ​​of key physical nodes are extracted to form a performance fluctuation time-domain signal sequence. This performance fluctuation time-domain signal sequence is then converted into a fluctuation frequency-domain signal using a sliding window, and further divided into fast fluctuation components, medium-speed fluctuation components, and slow fluctuation components. The specific operation steps are as follows: Two time intervals are selected, one forward and one backward, centered on the time interval where the anomaly source node is located. The performance deviation values ​​of all key physical nodes at the corresponding time points within the five extracted time intervals are extracted as instantaneous deviation values. All instantaneous deviation values ​​are sorted in descending order to form a performance fluctuation time-domain signal sequence. The performance fluctuation time-domain signal sequence is converted into a fluctuation frequency-domain signal sequence using a sliding window. A preset high-frequency threshold and a low-frequency threshold are established; based on the high-frequency threshold and the low-frequency threshold, the fluctuation rate in the fluctuation frequency domain signal sequence is divided into a fast fluctuation component, a slow fluctuation component, and a medium-speed fluctuation component.

5. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 4, characterized in that, The specific steps for constructing an association mapping matrix using the abnormal timestamp as the row index and the time interval as the column index for the fast, medium, and slow fluctuation components are as follows: The high-contribution value is obtained by squaring all fast-moving components; the low-contribution value is obtained by squaring all slow-moving components; and the medium-contribution value is obtained by squaring all medium-moving components. The total component contribution value is obtained by summing the squares of all component contribution values; the rapid fluctuation ratio is obtained by calculating the ratio of the total rapid fluctuation value of all rapid fluctuation components to the total component contribution value. The ratio of the total slow fluctuation component to the total contribution value of all slow fluctuation components is calculated to obtain the slow fluctuation ratio. Extract the abnormal timestamps of all batches, and use the current performance index corresponding to each abnormal timestamp as the matrix row index; divide all batches into time intervals as described above, and use all time intervals as the matrix column index; Traverse each time interval to extract all key physical nodes and their corresponding instantaneous deviation values; calculate the sum of the absolute values ​​of the instantaneous deviation values ​​of all key physical nodes; construct an association mapping matrix using the matrix row index and matrix column index, and fill the association mapping matrix with the sum of the absolute values ​​to obtain the final association mapping matrix.

6. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 5, characterized in that, The specific steps for extracting the source of abnormal raw material batches using the aforementioned correlation mapping matrix are as follows: A preset component proportion threshold is set; if the rapid fluctuation ratio is greater than or equal to the component proportion threshold, the row corresponding to the abnormal timestamp of the rapid fluctuation component in the association mapping matrix is ​​extracted; all batches above the batch corresponding to the row corresponding to the abnormal timestamp are extracted from all batches above, and the same raw material transportation time series as the row corresponding to the abnormal timestamp is extracted from the row corresponding to the abnormal timestamp. The same abnormal timestamp row of the raw material transportation time series is extracted from the association mapping matrix; the cosine similarity is calculated between the row of the current abnormal timestamp and the row of the same abnormal timestamp in the previous batch. If the cosine similarity is less than a preset similarity threshold, and the rapid fluctuation ratio is greater than or equal to the component proportion threshold, then the oil processing equipment is determined to be the source of the oil abnormality; if any of the above determinations are not true, then it is determined whether the slow fluctuation ratio is greater than a preset performance proportion threshold; if so, then the column corresponding to the abnormal timestamp in the association mapping matrix is ​​extracted, and the corresponding column is taken as the source of the abnormal raw material batch.

7. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 6, characterized in that, The source of the abnormal raw material batch is obtained from the corresponding historical batch. The proportion of raw materials is adjusted iteratively using step size based on the historical batch until the optimized proportion of raw materials is achieved after a certain number of iterations. The specific operation steps are as follows: The abnormal raw material batch source is used as the target adjustment object to obtain historical batches; by analyzing the historical batches, the historical target proportion and historical batch performance indicators are obtained to construct a response relationship curve; the current proportion value of the target adjustment object is obtained, and the deviation is calculated using the current performance indicator and the historical batch performance indicator; the average slope is calculated using the current proportion value to obtain the corresponding historical target proportion in the response relationship curve; based on the positive and negative combination of the deviation and the average slope, the raw material proportion is adjusted using a step-size iterative method until a preset number of iterations is reached, and the optimized raw material proportion is output.

8. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 1, characterized in that, The following steps are taken: First, the source of the abnormal raw material batch is used as the target adjustment object to obtain historical batches. Second, historical target proportions and historical batch performance indicators are obtained by analyzing these historical batches to construct a response relationship curve. Third, the current proportion value of the target adjustment object is obtained, and the deviation is calculated using the current performance indicator and the historical batch performance indicator. Fourth, the average slope is calculated using the current proportion value to obtain the corresponding historical target proportion in the response relationship curve. The source of the abnormal raw material batch is taken as the target adjustment object; all historical batches of the target adjustment object in the preset past time period are retrieved from the preset historical database; the corresponding performance indicators are extracted from all historical batches as historical batch performance indicators and the historical target proportion of the target adjustment object in the historical batches are directly obtained; all historical target proportions are used as the x-axis and all historical batch performance indicators are used as the y-axis to form two-dimensional data points and construct a two-dimensional scatter plot. Iterate through the coordinates of each two-dimensional data point on the x-axis, select two-dimensional data points at preset fixed intervals, and construct the response relationship curve; Obtain the current percentage value of the target adjustment object; Calculate the deviation between the current performance index and the historical batch performance index; adjust the y-axis direction according to the sign of the deviation as the target recovery direction; obtain the two-dimensional data point on the response relationship curve corresponding to the historical target percentage with the same current percentage value; use the two-dimensional data point as the center to filter the two-dimensional data points with the smallest distance between the historical target percentages in the left and right directions; calculate the average value of the historical target percentages of the two-dimensional data points with the smallest distance in the left and right directions as the average tilt.

9. The method for iterative optimization of oil blending formulations based on reinforcement learning according to claim 8, characterized in that, Based on the positive or negative value of the combination of deviation and average tilt, the raw material ratio is adjusted using an iterative step-size method until a preset number of iterations is reached, and the optimized raw material ratio is output. The specific operation steps are as follows: The preset adjusted percentage value, the current predicted deviation, and the preset adjustment step size are used. If the deviation is greater than the preset current predicted deviation, then the sign of the deviation is determined, and the raw material ratio is adjusted in the positive direction or in the negative direction. The adjusted raw material ratios are used as new raw material ratios, and new current performance indicators of oil quality are collected again using the new raw material ratios. The average of the adjusted raw material ratios is calculated as the predicted adjusted raw material ratio. The predicted adjusted raw material ratio is calculated and the new current performance indicators are used to obtain a new deviation. The above steps are repeated iteratively using the new current performance indicators and the new deviation to obtain the final optimized raw material ratio.