Operation sequence analysis methods, devices and electronic equipment

By constructing distance and similarity matrices of operation sequences and combining deep learning and spectral clustering algorithms, standard operation sequences are identified, solving the problem of low analysis efficiency of multi-dimensional and unequal-length operation sequences in the process industry, and realizing intelligent operation behavior analysis and optimization.

CN121093030BActive Publication Date: 2026-04-03SUPCON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle multi-dimensional, unequal-length, and irrelevant operation sequences in process industries, resulting in low analysis efficiency.

Method used

By acquiring a set of operation sequences, a distance matrix is ​​constructed and converted into a similarity matrix to form a behavior analysis graph. Standard operation sequences are identified using spectral clustering algorithms, and features are extracted using deep learning models such as the Transformer architecture to perform unsupervised clustering analysis.

Benefits of technology

It enables intelligent analysis of operational behavior, optimizes standard operating procedures, improves production efficiency, ensures safety and consistency, and assists in operational decision-making and training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121093030B_ABST
    Figure CN121093030B_ABST
Patent Text Reader

Abstract

This application discloses an operation sequence analysis method, apparatus, and electronic device. The method includes: acquiring an operation sequence set from an industrial control system; determining a distance matrix corresponding to the operation sequence set, wherein the distance matrix reflects the similarity distance between any two operation sequences of different lengths in the operation sequence set; converting the distance matrix into a similarity matrix, and determining a behavior analysis graph corresponding to the operation sequence set based on the similarity matrix, wherein the behavior analysis graph reflects the distribution of operation behavior patterns after unsupervised clustering of the operation sequence set based on similarity; and determining a standard operation sequence from the operation sequence set based on the behavior analysis graph. This application solves the technical problem of low efficiency in industrial operation analysis caused by the multi-dimensional, unequal-length, and irrelevant operation mixing phenomena of operation sequences generated by control systems in process industries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial data analysis, and more specifically, to an operation sequence analysis method, apparatus, and electronic device. Background Technology

[0002] In the operation and management of process industries, control systems (such as DCS (Distributed Control Systems)) are indispensable core components, recording operator operation logs in response to various production tasks and events. These logs contain rich information, such as operation type, tag type, tag ID, numerical changes before and after the operation, and operator ID. However, automatically extracting valuable operation patterns from this multi-dimensional, high-density data has always been a challenge in the field of industrial data analysis. In related technologies, the analysis of operation logs mainly relies on the following methods:

[0003] 1. Manual review and expert summary: Experienced engineers regularly review operation logs and summarize operational patterns based on their personal experience. This method relies heavily on the professional knowledge and experience of individual experts, is highly subjective, inefficient, difficult to handle large-scale datasets, and prone to overlooking atypical but effective operational strategies.

[0004] 2. Rule-based statistical analysis: This method identifies patterns by pre-setting rules or statistically analyzing the frequency and sequence of specific operations. For example, it discovers patterns by statistically analyzing the frequency of setpoint adjustments in an operation sequence. The problem with this method is its lack of flexibility; it cannot capture complex operation patterns beyond the rules, and it lacks an effective mechanism for handling the temporal flexibility of the operation sequence (such as delays between steps or differences in the overall sequence duration).

[0005] 3. Traditional sequence mining algorithms, such as the PrefixSpan algorithm, are used to discover frequent subsequences. However, these algorithms usually require that the items in the sequence are completely matched. They ignore the differences in similarity calculation between different attribute features (such as position type) in the operation sequence and cannot handle the global alignment problem of the entire operation sequence well. As a result, the mined patterns may not match the variability of the actual operation sequence.

[0006] In summary, although the above methods can analyze operation log data to some extent, they still have certain shortcomings when faced with heterogeneous attribute fusion, operation sequence processing of varying lengths, irrelevant operation filtering, and core sequence identification.

[0007] There is currently no effective solution to the above problems. Summary of the Invention

[0008] This application provides an operation sequence analysis method, apparatus, and electronic device to at least solve the technical problem of low efficiency in industrial operation analysis caused by the multi-dimensional, unequal-length, and irrelevant operation mixture in operation sequences generated by control systems in process industries.

[0009] According to one aspect of the embodiments of this application, an operation sequence analysis method is provided, comprising: obtaining an operation sequence set from an industrial control system, wherein the operation sequence set includes operation sequences after uniform feature representation of historical operation records of preset events; determining a distance matrix corresponding to the operation sequence set, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the operation sequence set; converting the distance matrix into a similarity matrix, and determining a behavior analysis graph corresponding to the operation sequence set based on the similarity matrix, wherein the behavior analysis graph is used to reflect the distribution of operation behavior patterns after unsupervised clustering of the operation sequence set based on similarity; and determining a standard operation sequence based on the behavior analysis graph, wherein the standard operation sequence is the operation sequence in the operation sequence set that can provide optimal operation guidance.

[0010] Optionally, the operation sequences in the operation sequence set are determined by: obtaining historical operation records corresponding to preset events; determining the classification attributes, identifier attributes, and numerical attributes of the historical operation records, and determining the attribute vectors corresponding to the historical operation records based on the classification attributes, identifier attributes, and numerical attributes; performing position encoding on the historical operation records to obtain the position vectors corresponding to the historical operation records; fusing the attribute vectors and position vectors to obtain the initial operation sequence corresponding to the historical operation records; and processing the initial operation sequence through a feature extraction model to obtain the operation sequences corresponding to the historical operation records.

[0011] Optionally, the initial operation sequence is processed by a feature extraction model, including: processing the initial operation sequence through a multi-head attention mechanism in the feature extraction model to obtain a first feature vector; performing residual and normalization processing on the first feature vector through a residual connection layer and a normalization layer connected to the multi-head attention mechanism, and processing the residual and normalized first feature vector through a position feedforward network in the feature extraction model to obtain a second feature vector; and performing residual and normalization processing on the second feature vector through a residual connection layer and a normalization layer connected to the position feedforward network to obtain the operation sequence.

[0012] Optionally, determining the distance matrix corresponding to the set of operation sequences includes: determining the cumulative cost matrix corresponding to the first operation sequence and the second operation sequence, wherein the cumulative cost matrix is ​​used to store the minimum cumulative distance between the first operation sequence and the second operation sequence, and the first operation sequence and the second operation sequence are any two operation sequences in the set of operation sequences; determining the cosine distance between the operation steps in the first operation sequence and the operation steps in the second operation sequence; filling the cumulative cost matrix according to the cosine distance to obtain the target distance matrix corresponding to the first operation sequence and the second operation sequence, and determining the dynamic time warping distance between the first operation sequence and the second operation sequence according to the target distance matrix, wherein the dynamic time warping distance is inversely proportional to the similarity between the first operation sequence and the second operation sequence.

[0013] Optionally, determining the behavior analysis graph corresponding to the set of operation sequences based on the similarity matrix includes: treating all operation sequences in the set of operation sequences as nodes and the similarity matrix between operation sequences as edges, connecting the nodes and edges to obtain an initial behavior analysis graph corresponding to the set of operation sequences; determining the Laplacian matrix corresponding to the initial behavior analysis graph based on the similarity matrix, wherein the Laplacian matrix is ​​used to reflect the differences between nodes and the connection strength in the initial behavior analysis graph; performing eigenvalue decomposition on the Laplacian matrix to obtain a third eigenvector; performing cluster analysis on the third eigenvector to obtain the behavior analysis graph, and determining the pattern labels of the operation sequences in the behavior analysis graph, wherein the pattern labels are used to reflect the operation behavior pattern to which the operation sequence belongs.

[0014] Optionally, determining the standard operation sequence based on the behavior analysis graph includes: identifying clusters in the behavior analysis graph, where each cluster represents an operation behavior pattern containing multiple operation sequences; determining the frequency score, stability score, and efficiency score of the operation behavior pattern corresponding to the cluster, where the frequency score reflects the prevalence of the operation behavior pattern corresponding to the cluster, the stability score reflects the consistency of the operation behavior pattern corresponding to the cluster, and the efficiency score reflects the execution efficiency of the operation behavior pattern corresponding to the cluster; determining the evaluation score corresponding to the cluster based on the frequency score, stability score, and efficiency score, and determining the cluster with the highest evaluation score as the target cluster, where the target cluster represents the optimal operation behavior pattern in the behavior analysis graph; and determining the cluster center of the target cluster as the standard operation sequence.

[0015] Optionally, before determining the clusters in the behavior analysis graph, the method further includes: determining the silhouette coefficient of the behavior analysis graph under multiple preset cluster numbers, wherein the silhouette coefficient is an index used to quantify the clustering effect of the behavior analysis graph under different cluster numbers; determining the preset cluster number corresponding to the maximum value of the silhouette coefficient as the target cluster number corresponding to the behavior analysis graph; and performing cluster analysis on the operation sequence in the behavior analysis graph based on the target cluster number.

[0016] Optionally, the method further includes: determining the interquartile range between the standard operation sequence and other operation sequences, wherein the other operation sequences are operation sequences in the target cluster other than the standard operation sequence, and the interquartile range is used to reflect the distribution of operation values ​​in the target cluster; determining the operation range for adjusting the standard operation sequence based on the interquartile range; and adjusting the standard operation sequence based on the operation range.

[0017] According to another aspect of the embodiments of this application, an operation sequence analysis apparatus is also provided, comprising: an acquisition module, configured to acquire an operation sequence set from an industrial control system, wherein the operation sequence set includes operation sequences after uniform feature representation of historical operation records of preset events; a first determination module, configured to determine a distance matrix corresponding to the operation sequence set, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the operation sequence set; a second determination module, configured to convert the distance matrix into a similarity matrix and determine a behavior analysis graph corresponding to the operation sequence set based on the similarity matrix, wherein the behavior analysis graph is used to reflect the distribution of operation behavior patterns after unsupervised clustering of the operation sequence set based on similarity; and a third determination module, configured to determine a standard operation sequence based on the behavior analysis graph, wherein the standard operation sequence is an operation sequence in the operation sequence set that can provide optimal operation guidance.

[0018] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and used to execute the above-described operation sequence analysis method.

[0019] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned operation sequence analysis method by running the computer program.

[0020] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described operation sequence analysis method.

[0021] In this embodiment, an operation sequence set is obtained from an industrial control system. This set includes operation sequences after a unified feature representation of historical operation records for preset events. A distance matrix corresponding to the operation sequence set is determined, reflecting the similarity distance between any two operation sequences of different lengths within the set. The distance matrix is ​​converted into a similarity matrix, and a behavior analysis graph corresponding to the operation sequence set is determined based on this matrix. This behavior analysis graph reflects the distribution of operation behavior patterns after unsupervised clustering of the operation sequence set based on similarity. A standard operation sequence is determined based on the behavior analysis graph. This standard operation sequence is the one that provides the optimal operation guidance within the set. This achieves the goal of intelligently analyzing operation behavior and optimizing standard operating procedures, thereby improving production efficiency, ensuring operational safety and consistency, and assisting in operational decision-making and personnel training. This solves the technical problem of low efficiency in industrial operation analysis caused by the multi-dimensional, unequal-length, and irrelevant operation mixtures in operation sequences generated by control systems in the process industry. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0023] Figure 1 This is a hardware structure diagram of a computer terminal for implementing an operation sequence analysis method according to an embodiment of this application;

[0024] Figure 2 This is a flowchart of an operation sequence analysis method according to an embodiment of this application;

[0025] Figure 3 This is an internal structure diagram of a feature extraction model according to an embodiment of this application;

[0026] Figure 4 This is a structural diagram of an operation sequence analysis device according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] First, some nouns or terms that appear in the explanation of the embodiments of this application shall be interpreted as follows:

[0030] Operation sequence: In the process industry, an operation sequence refers to a series of continuous operation steps performed by an operator within a certain period of time to complete a specific production task or handle special events (such as alarms or process abnormalities). Examples include adjusting valve opening, changing equipment setpoints, and confirming alarm information. These are usually recorded in the historical operation log of the control system.

[0031] SOP (Standard Operating Procedure) is a detailed set of work guidelines developed in the process industry to standardize operating procedures. It clarifies the steps, methods, requirements, and responsibilities for performing repetitive tasks or activities, aiming to ensure consistency, accuracy, and safety in the operating process, while also facilitating traceability and training.

[0032] Tag number: In process industry production, a tag number is used to uniquely identify a data monitoring point or control point. Each tag number corresponds to a sensor or actuator in the system, used to record and control its relevant data, such as temperature, pressure, and flow rate.

[0033] DTW (Dynamic Time Warping): An algorithm for comparing two time series that may be of different lengths. It calculates the most similar alignment path by "stretching" or "compressing" the sequences on the time axis to minimize the distance between them.

[0034] Spectral clustering: A graph-based clustering algorithm that treats data points as vertices of a graph and performs dimensionality reduction and clustering by analyzing the eigenvectors of the graph's Laplacian matrix.

[0035] IQR (Interquartile Range): A statistic used to describe the range of the middle 50% of values ​​in a data distribution. It is defined by calculating the distance between the first quartile (Q1) and the third quartile (Q3), thereby identifying outliers in the data.

[0036] Silhouette coefficient: A metric for evaluating the quality of clustering results, with a value between [-1, 1]. It represents the tightness of a data point within its own cluster and its isolation from other clusters. Generally, a larger silhouette coefficient indicates better clustering results.

[0037] To address the issue of poor sequence processing capabilities in related technologies, this application provides an operational sequence analysis method that can be run on... Figure 1 The computer terminal shown is described below.

[0038] The operation sequence analysis method embodiments provided in this application can be executed on mobile terminals, computer terminals or similar computing devices. Figure 1 A hardware block diagram of a computer terminal for implementing an operation sequence analysis method is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0039] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0040] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the operation sequence analysis method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned operation sequence analysis method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.

[0042] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0043] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0044] In the above operating environment, this application provides an embodiment of an operation sequence analysis method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0045] Figure 2 This is a flowchart of an operation sequence analysis method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0046] Step S202: Obtain an operation sequence set from the industrial control system, wherein the operation sequence set contains operation sequences after uniformly representing the historical operation records of preset events.

[0047] Step S204: Determine the distance matrix corresponding to the set of operation sequences, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the set of operation sequences.

[0048] Step S206: Convert the distance matrix into a similarity matrix, and determine the behavior analysis graph corresponding to the set of operation sequences based on the similarity matrix. The behavior analysis graph is used to reflect the distribution of operation behavior patterns after unsupervised clustering of the set of operation sequences based on similarity.

[0049] Step S208: Determine the standard operation sequence based on the behavior analysis diagram, wherein the standard operation sequence is the operation sequence in the operation sequence set that can provide the optimal operation guidance.

[0050] Through steps S202 to S208, the goal of intelligent analysis of operational behavior and optimization of standard operating procedures is achieved. This results in improved production efficiency, ensured operational safety and consistency, and assisted operational decision-making and personnel training. Furthermore, it solves the technical problem of low efficiency in industrial operation analysis caused by the multi-dimensional, unequal-length, and irrelevant operational sequences generated by control systems in process industries. A detailed explanation follows.

[0051] In step S202 above, the aim is to use a deep learning model (such as a feature extraction model based on the Transformer architecture) to map a single operation record containing multiple attributes to a unified vector space with rich semantic information, forming a set of operation sequences for subsequent similarity calculation and cluster analysis.

[0052] Optionally, the operation sequences in the operation sequence set are determined as follows: Historical operation records corresponding to preset events are obtained; the classification attributes, identifier attributes, and numerical attributes of the historical operation records are determined, and attribute vectors corresponding to the historical operation records are determined based on these attributes; the historical operation records are position-encoded to obtain position vectors corresponding to them; the attribute vectors and position vectors are fused to obtain the initial operation sequence corresponding to the historical operation records; the initial operation sequence is processed using a feature extraction model to obtain the operation sequences corresponding to the historical operation records. The specific process analysis is as follows:

[0053] 1. Data acquisition.

[0054] First, read the operation logs related to preset events (such as specific alarms or process anomalies) from the industrial control system. These logs record all historical operations performed by the operator during the event handling period. For each historical operation record, extract its inherent attributes, including but not limited to:

[0055] Category attributes: such as operation type (acknowledgment alarm, setpoint adjustment, etc.) and tag type (flow rate, temperature, etc.);

[0056] Identifier attributes: such as tag ID, used to uniquely identify a monitoring or control point in the system;

[0057] Numerical attributes: such as the specific values ​​before and after the operation, relative increments, etc. These numerical attributes are often ignored in traditional coding, but they are key inputs in this application and are crucial for guiding quantitative operations.

[0058] 2. Unified feature representation.

[0059] In this embodiment, a feature extraction model based on the Transformer architecture is used to learn a unified embedding vector for each operation step. This feature extraction model can simultaneously process heterogeneous data in the operation sequence and capture long-term dependencies between steps. Assuming an operation sequence contains L operation steps, a d-dimensional unified embedding vector is generated for each step. The specific operation steps are as follows:

[0060] S1: Construct the attribute vector.

[0061] For the categorical and identifier attributes (e.g., operation type = 1, tag ID = 1120) corresponding to each operation step in the historical operation record, they are transformed into dense vectors through a learnable embedding layer. For example, tag ID = 1120 is mapped to a 16-dimensional vector. Map operation type = 1 to an 8-dimensional vector. .

[0062] For the numerical attributes corresponding to each operation step in the historical operation record (e.g., new value = 55.0, relative increment = -0.0045), they are first normalized using Z-score to obtain values ​​with a mean of 0 and a variance of 1, resulting in a vector. .

[0063] splicing vectors and This forms the initial Token vector (i.e., attribute vector) representing the historical operation record. Its dimension is the sum of the dimensions of its parts.

[0064] S2: Construct the position vector.

[0065] Since the Transformer itself cannot perceive the order of operations, it is necessary to provide the position information of each step in the historical operation record. In this embodiment, standard positional encoding is used to generate a unique identifier for each position i (from 0 to L−1). Position vectors of the same dimension .

[0066] For each operation step in each historical operation record The numerical value at position j in the vector is calculated as follows:

[0067]

[0068] Where j is the dimension index in the vector (from 0 to d / 2−1), and d is... The length of the vector.

[0069] S3: Vector fusion.

[0070] attribute vector With position vector Add: This will give you an initial operation sequence that includes content and location information. .

[0071] 3. Feature extraction model processing.

[0072] In the embodiments of this application, such as Figure 3 As shown, the feature extraction model includes multiple Transformer encoder layers, and each Transformer encoder layer mainly consists of two sub-modules:

[0073] (1) Multi-Head Self-Attention: This mechanism performs context fusion, splitting the input sequence into multiple smaller vectors, which are then processed in different subspaces. Each subspace acts as an attention "head," focusing on different types of relationships within the operation sequence, such as the relationship between a step and previous steps, or the relationship with distant steps in the sequence. This parallel processing approach allows the model to simultaneously capture both global and local features of the operation sequence from multiple perspectives.

[0074] (2) Position-wise FFN: Performs a nonlinear transformation on the output of the self-attention mechanism to increase the model's representational power.

[0075] It should be noted that each sub-module (multi-head self-attention and position feedforward network) is followed by residual connections and layer normalization to ensure the training stability of deep networks, reduce the risk of gradient vanishing, enable the model to better learn the deep features of the operation sequence, and maintain good performance during training.

[0076] Optionally, the initial operation sequence is processed by a feature extraction model, including: processing the initial operation sequence through a multi-head attention mechanism in the feature extraction model to obtain a first feature vector; performing residual and normalization processing on the first feature vector through a residual connection layer and a normalization layer connected to the multi-head attention mechanism, and processing the residual and normalized first feature vector through a position feedforward network in the feature extraction model to obtain a second feature vector; performing residual and normalization processing on the second feature vector through a residual connection layer and a normalization layer connected to the position feedforward network to obtain the operation sequence. Specific operation analysis is as follows:

[0077] 1. Context information fusion based on multi-head self-attention mechanism (sub-layer 1: context fusion).

[0078] S1: Generate Q, K, and V.

[0079] For each vector in the initial operation sequence X of the input Through three independent trainable linear transformations (weight matrix) , , This generates three new vectors: the query vector. Key vector Value vector .

[0080] S2: Calculate the attention score.

[0081] By calculating a query vector With all key vectors The dot product is used to measure the degree of attention that step i has to step j. Scaling is required to prevent gradient vanishing.

[0082]

[0083] in, This represents the attention score between step i and step j. Indicates the number of key vectors. This represents the dimension of the key vector.

[0084] S3: Calculate the weights carefully.

[0085] All attention scores are normalized using the Softmax function to obtain a set of attention weights that sum to 1. .

[0086]

[0087] S4: Weighted summation.

[0088] Attention weight Applied to the corresponding value vector We perform a weighted summation to obtain the output of the attention mechanism. :

[0089]

[0090] in, It is a feature representation of step i that integrates the information of the entire sequence.

[0091] S5: Multi-head processing.

[0092] To allow the feature extraction model to simultaneously focus on information from different representation subspaces, the above process is executed in parallel multiple times (e.g., h=8 times, i.e., 8 "heads"). Each head has independent... , , Weights, and produce an output. Finally, the outputs of all heads are concatenated, and then a linear transformation is applied to obtain the final output of the multi-head attention, which is the first feature vector.

[0093] S6: Residual connection and normalization processing.

[0094] Residual connections and layer normalization (Add & Norm) combine the output of the attention mechanism (the first feature vector) with its original input. The residual connections are added together and then layer normalization is performed to effectively solve the vanishing gradient problem in deep networks and stabilize the training process.

[0095] 2. Nonlinear transformation based on position feedforward network (sub-layer 2: nonlinear transformation).

[0096] S1: The location feedforward network performs a nonlinear transformation on the first feature vector through a two-layer fully connected neural network to obtain the second feature vector, thereby enhancing the model's representational power.

[0097] S2: Perform residual connection and layer normalization on the second feature vector again.

[0098] 3. Final embedded output.

[0099] The sequence X is passed through N stacked Transformer encoder layers (repeating the calculation steps of sub-layer 1 and sub-layer 2 as described above), and the vector sequence output by the last layer is... , serving as the unified embedding vector for operation step i. It not only contains complete information about the step itself (classification, value, ID), but also implies its contextual relationship within the entire operation sequence.

[0100] Finally, a sequence of operations containing L steps is represented as an L×d unified embedding matrix M.

[0101] In step S204 above, based on the set of operation sequences, the similarity distance between any two operation sequences of different lengths can be calculated using the Dynamic Time Warping (DTW) algorithm, thereby constructing a distance matrix that reflects the similarity between sequences in the set of operation sequences, providing a quantitative similarity value for subsequent spectral clustering analysis.

[0102] Optionally, determining the distance matrix corresponding to the set of operation sequences includes: determining the cumulative cost matrix corresponding to the first operation sequence and the second operation sequence, wherein the cumulative cost matrix is ​​used to store the minimum cumulative distance between the first operation sequence and the second operation sequence, and the first operation sequence and the second operation sequence are any two operation sequences in the set of operation sequences; determining the cosine distance between the operation steps in the first operation sequence and the operation steps in the second operation sequence; filling the cumulative cost matrix according to the cosine distance to obtain the target distance matrix corresponding to the first operation sequence and the second operation sequence, and determining the dynamic time warping distance between the first operation sequence and the second operation sequence according to the target distance matrix, wherein the dynamic time warping distance is inversely proportional to the similarity between the first operation sequence and the second operation sequence.

[0103] In this application embodiment, a similarity measurement method combining DTW and cosine distance is introduced to compensate for the shortcomings of related technologies in handling unequal-length operation sequences and multi-attribute features. For example, for the first operation sequence A and the second operation sequence B in the set of operation sequences, it is represented as a unified embedding matrix M. A (L) A ×d) and M B (L) B ×d), the DTW algorithm can be directly applied to these two matrices. The specific operation analysis is as follows:

[0104] Suppose the first operation sequence A has L A Embedded vectors The second operation sequence B has L B Embedded vectors .

[0105] 1. Construct the cumulative cost matrix.

[0106] Create a size L A ×L B The cumulative cost matrix, CostMatrix.

[0107] CostMatrix[i,j] will be used to store the values ​​from... arrive subsequences and from arrive The minimum cumulative distance between subsequences.

[0108] 2. Define the distance function between vectors.

[0109] based on and The cosine distance between two d-dimensional uniform embedding vectors is defined as a vector used to compute the cosine distance between them. and Distance function between Since the unified embedding vector is a high-dimensional vector, cosine distance is a better measure of the similarity of vector directions and is not sensitive to vector length. Its calculation formula is:

[0110]

[0111] 3. Fill in the cumulative cost matrix.

[0112] Fill in the CostMatrix following these steps.

[0113] S1: Initialization: ;

[0114] S2: Fill the first row: ;

[0115] S3: Fill the first column: ;

[0116] S4: Fill the rest: for all other points in the matrix Apply the following recursive formula:

[0117]

[0118] 4. Obtain the final DTW distance.

[0119] After the entire CostMatrix is ​​filled, the target distance matrix corresponding to the first operation sequence A and the second operation sequence B is obtained, and the elements CostMatrix[L] in the target distance matrix are set to... A -1,L B -1] is determined as the DTW distance between the first operation sequence A and the second operation sequence B, which is used to represent the minimum cumulative cost between the first operation sequence A and the second operation sequence B determined according to dynamic programming. The smaller the DTW distance, the more similar the two operation sequences are.

[0120] Repeat this process pairwise for all operation sequences in the set of operation sequences, eventually generating an N×N distance matrix (N is the total number of sequences).

[0121] In step S206 above, the main task is to convert the distance matrix obtained in step S204 into a similarity matrix, and then use a spectral clustering algorithm to automatically divide the set of operation sequences into multiple clusters of operation behavior patterns, forming a behavior analysis graph. The specific process analysis is as follows:

[0122] 1. Construct a similarity matrix.

[0123] Using methods such as the Gaussian kernel function, the distance matrix above is converted into a similarity matrix. The smaller the distance, the higher the similarity. The midpoint of the matrix... The position values ​​are calculated as follows:

[0124]

[0125] in, This is a similarity matrix. This represents the value at the corresponding position in the distance matrix. These are empirical parameters.

[0126] 2. Use spectral clustering algorithm to determine the behavior analysis graph.

[0127] Optionally, determining the behavior analysis graph corresponding to the set of operation sequences based on the similarity matrix includes: treating all operation sequences in the set of operation sequences as nodes and the similarity matrix between operation sequences as edges, connecting the nodes and edges to obtain an initial behavior analysis graph corresponding to the set of operation sequences; determining the Laplacian matrix corresponding to the initial behavior analysis graph based on the similarity matrix, wherein the Laplacian matrix is ​​used to reflect the differences between nodes and the connection strength in the initial behavior analysis graph; performing eigenvalue decomposition on the Laplacian matrix to obtain a third eigenvector; performing cluster analysis on the third eigenvector to obtain the behavior analysis graph, and determining the pattern labels of the operation sequences in the behavior analysis graph, wherein the pattern labels are used to reflect the operation behavior pattern to which the operation sequence belongs.

[0128] In this embodiment, spectral clustering is cleverly applied to the clustering analysis of operation sequences, achieving effective identification of operation patterns by constructing a behavior analysis graph. First, all operation sequences are considered as nodes in the graph, and the similarity between sequences is used as the weight of the edges between nodes, constructing an initial behavior analysis graph. Then, by calculating the Laplacian matrix of the graph and performing eigenvalue decomposition, a series of eigenvectors are obtained, namely the aforementioned third eigenvector. Since the eigenvectors of the Laplacian matrix contain global structural information of the initial behavior analysis graph, the eigenvectors corresponding to the first n eigenvalues ​​in ascending order can be concatenated to construct a num*n dimensional eigenvector matrix. Each row of this eigenvector matrix is ​​considered as the representation of an operation sequence in the reduced-dimensional space, where num is the total number of operation sequences and n is the empirically determined number of eigenvectors. In the reduced-dimensional space, the K-Means clustering algorithm is used to more intuitively and efficiently divide the nodes (i.e., operation sequences) into multiple clusters, each cluster representing a specific operation behavior pattern. This approach not only overcomes the challenge of clustering high-dimensional data, but also automatically reveals the inherent relationships and differences between operation sequences, assigning a pattern label to each sequence and thus clarifying its associated operational behavior pattern. This application of spectral clustering greatly improves the accuracy and efficiency of operation sequence analysis, providing strong support for the optimization of operation guidance in the process industry.

[0129] 3. Determine the optimal cluster.

[0130] Optionally, before determining the clusters in the behavior analysis graph, the method further includes: determining the silhouette coefficient of the behavior analysis graph under multiple preset cluster numbers, wherein the silhouette coefficient is an index used to quantify the clustering effect of the behavior analysis graph under different cluster numbers; determining the preset cluster number corresponding to the maximum value of the silhouette coefficient as the target cluster number corresponding to the behavior analysis graph; and performing cluster analysis on the operation sequence in the behavior analysis graph based on the target cluster number.

[0131] In this embodiment, to avoid the limitations of subjectively setting the number of clusters, a silhouette coefficient is used to automatically determine the optimal number of clusters k. Specifically, by calculating the silhouette coefficient under multiple different k values ​​(i.e., multiple preset cluster numbers), the number of clusters corresponding to the maximum silhouette coefficient (closest to 1) is selected as the final target number of clusters. This ensures that the clustering results are both internally compact and maintain clear boundaries between clusters, thereby improving the accuracy and practicality of clustering.

[0132] In step S208 above, the aim is to automatically extract and quantify the optimal operational guidance, i.e., the standard operational sequence, from the set of operational sequences. This not only represents the optimal handling strategy but also provides a specific operational scope, facilitating online training and guidance for operators and ensuring the safety and efficiency of subsequent operations.

[0133] Optionally, determining the standard operation sequence based on the behavior analysis graph includes: identifying clusters in the behavior analysis graph, where each cluster represents an operation behavior pattern containing multiple operation sequences; determining the frequency score, stability score, and efficiency score of the operation behavior pattern corresponding to the cluster, where the frequency score reflects the prevalence of the operation behavior pattern corresponding to the cluster, the stability score reflects the consistency of the operation behavior pattern corresponding to the cluster, and the efficiency score reflects the execution efficiency of the operation behavior pattern corresponding to the cluster; determining the evaluation score corresponding to the cluster based on the frequency score, stability score, and efficiency score, and determining the cluster with the highest evaluation score as the target cluster, where the target cluster represents the optimal operation behavior pattern in the behavior analysis graph; and determining the cluster center of the target cluster as the standard operation sequence.

[0134] In this embodiment of the application, based on the clustering results of the behavior analysis graph, a multi-dimensional evaluation system is adopted to identify the optimal operation behavior pattern and extract the standard operation sequence accordingly.

[0135] First, by quantitatively evaluating the frequency, operational consistency, and execution efficiency of operation sequences in each cluster, frequency scores are obtained respectively. Stability And efficiency .in:

[0136] (1) Frequency division : Used to measure the prevalence of an operational behavior pattern, it is obtained by calculating the proportion of the number of operation sequences contained in the pattern to the total number of operation sequences.

[0137] (2) Stability : Used to measure the uniformity of operation steps within an operation behavior pattern, it is obtained by calculating the reciprocal of the average DTW distance of samples within a cluster.

[0138] (3) Efficiency score : Used to measure the execution efficiency of operation behavior patterns, it is obtained by calculating the reciprocal of the average execution time of operation sequences within a cluster.

[0139] Secondly, appropriate weights are assigned to the frequency score, stability score, and efficiency score, and the comprehensive evaluation score for each cluster is calculated. The specific calculation formula is as follows:

[0140]

[0141] in, This represents the evaluation score of cluster i. Represents the frequency score of cluster i. The stability score of cluster i represents the stability score of cluster i. The efficiency score represents the value of cluster i. and They represent the frequency components respectively. Stability And efficiency The corresponding weights;

[0142] Ultimately, the cluster with the highest evaluation score was determined as the target cluster, representing the optimal operational behavior pattern in the behavior analysis graph. The cluster center within this pattern, i.e., the most representative operational sequence that is closest to the average state within the cluster, was defined as the standard operational sequence, providing a data-supported benchmark for subsequent production operation guidance and SOP optimization.

[0143] Optionally, the above method further includes: determining the interquartile range between the standard operation sequence and other operation sequences, wherein the other operation sequences are operation sequences in the target cluster other than the standard operation sequence, and the interquartile range is used to reflect the distribution of operation values ​​in the target cluster; determining the operation range for adjusting the standard operation sequence based on the interquartile range; and adjusting the standard operation sequence based on the operation range.

[0144] In this embodiment, the interquartile range (IQR) can also be introduced to quantitatively adjust the operation values ​​in the standard operation sequence to adapt to the actual variability in the production process. By calculating the interquartile range between the standard operation sequence and other operation sequences, the distribution of operation values ​​within the target cluster can be understood, including their central tendency and dispersion, thereby providing a reasonable operation range. The interquartile range, i.e., the difference between the upper quartile (Q3) and the lower quartile (Q1), can effectively reflect the middle 50% range of the data distribution, eliminate the influence of extreme values, and ensure that the determined operation range has high robustness and practicality.

[0145] Specifically, the operation values ​​of the operation sequences within the target cluster are first collected, such as setpoints and execution times. Next, based on these operation values, Q1, Q3, and the interquartile range (IQR = Q3 - Q1) are calculated. By analyzing the values ​​of Q1 - 1.5IQR and Q3 + 1.5IQR, the lower and upper bounds of the operation values ​​are determined, ultimately defining an operation range. This range not only includes the operation values ​​of the standard operation sequence but also considers the operator's fine-tuning habits and changes in operating conditions during actual production.

[0146] This operational range is then applied to the standard operating procedure (SOP) sequence. For example, for the "reduce feed pump flow rate" step in the SOP sequence, the system will suggest a flow rate adjustment range, such as [35, 50] m³ / h, instead of a single value. This not only enhances the practicality of the SOP sequence, allowing operators to make appropriate adjustments based on actual site conditions while following the SOP, but also improves the flexibility and safety of the production process, providing further technical support for the standardization and intelligentization of process industry operations.

[0147] In this application embodiment, taking a reactor overheating incident as an example, the core operation sequence is automatically extracted from the historical operation sequence in detail, providing a reference for the optimization of the enterprise's standard emergency response plan and SOP.

[0148] Table 1 shows an example of a historical operation sequence corresponding to a reactor overheating event (these sequences have been desensitized and have no practical production reference value).

[0149] Table 1 Historical Operation Sequence of Reactor Overheating Events

[0150]

[0151] Step 1: Data preprocessing and unified feature representation.

[0152] 1. Convert multiple attribute features in each operation step of the operation sequence into corresponding vector representations, such as:

[0153] Attribute operation types can be converted into 5-dimensional one-hot encoded vectors. For example: "Confirm Alarm" → [0,0,1,0,0], "Set Value Adjustment" → [1,0,0,0,0], etc.

[0154] The tag type can be converted into a 6-dimensional on-hot encoded vector. For example: "Flow rate" → [1,0,0,0,0,0], "Temperature" → [0,0,1,0,0,0], etc.

[0155] The unique identifier (TagID) can be generated using a deterministic random projection-based encoding method. This generates a Gaussian random vector of fixed dimensions (e.g., d=64), and then the vector is normalized using the L2 norm to make it a unit vector.

[0156]

[0157] 2. Normalization of numerical attributes.

[0158] Based on the new values ​​and increments of the same type of steps in multiple operation sequences, the new values ​​and increments of each operation step are standardized (Z-score) to obtain a two-dimensional vector. =[-2.75,-0.40].

[0159] 3. Construct the initial Toekn vector.

[0160] splicing vectors and This forms the initial Token vector (i.e., attribute vector) representing the historical operation record. ∈ .

[0161] 4. Location coding and fusion.

[0162] Determine the position vector , and attribute vector Add each element one by one to obtain the input sequence X.

[0163] 5. Feature extraction model processing.

[0164] All steps The input sequence X is fed into a 3-layer Transformer encoder and transformed into a 3x77 unified embedding matrix M.

[0165] Step 2: Calculate sequence similarity (DTW).

[0166] With sequence lengths L A =4 and L B Taking the example sequences A and B with a value of 5 as an example, the cumulative cost matrix is ​​constructed as shown in Table 2 (the values ​​in this table are for example only):

[0167] Table 2. Similarity distance between sequences A and B

[0168]

[0169] The value 1.50 in the lower right corner is the DTW distance between sequences A and B. By repeating this process, we can obtain a matrix D composed of the pairwise distances of all historical operation sequences.

[0170] Step 3: Operation mode analysis.

[0171] The distance matrix is ​​converted into similarity values ​​using a hot kernel function, and a similarity matrix S is constructed. The corresponding Laplacian matrix L is then obtained, and its top k smallest eigenvectors are used to form the embedding. Furthermore, K-means clustering is performed with k=[2,3,4] for each cluster, and the silhouette coefficient is calculated. The cluster size corresponding to the largest silhouette coefficient is set to k=2, thus obtaining the category labels for multiple operation sequences corresponding to the time interval.

[0172] Step 4: Extraction of the optimal operation sequence and analysis of the quantization range.

[0173] 1. Extraction of the optimal operation sequence.

[0174] Assume weights : : The ratio is 1:2:1, and based on the comprehensive scoring, cluster 2 has the highest score. The operation sequences corresponding to cluster 2 that are closest to the class center are as follows:

[0175] (1) Confirm high temperature alarm TAH-101;

[0176] (2) Lower the setting value of feed pump FIC-101;

[0177] (3) Increase the cooling water flow rate setting value of FIC-201;

[0178] Meanwhile, the event trigger timestamps and the timestamps of each step of the sequence can be obtained through the control system and other host computer software to assist in the quantitative analysis of the interval time of the next operation.

[0179] 2. Quantitative range analysis.

[0180] Taking steps (2) and (3) and the time interval between the two steps as examples, the recommended ranges are given in Table 3 using the interquartile range:

[0181] Table 3 Recommended range for operational value adjustment

[0182]

[0183] The final recommended standard operation sequence text is shown in Table 4:

[0184] Table 4 Examples of Standard Operation Sequences

[0185]

[0186] In this embodiment, by introducing the Transformer architecture for unified feature representation, the Dynamic Time Warping (DTW) algorithm for similarity measurement of unequal-length operation sequences, and a clustering analysis technique combining spectral clustering and silhouette coefficients, the optimal operation patterns and specific operation ranges in historical operation logs can be automatically extracted, significantly improving the intelligence level of operation sequence analysis. Specifically:

[0187] (1) Unified feature representation and sequence similarity calculation: The Transformer model is used to deeply embed heterogeneous data in the operation sequence, capturing the complex relationships between operation steps and making up for the shortcomings of traditional methods in handling multi-attribute features. At the same time, the DTW algorithm is used to measure the similarity between sequences, which effectively solves the problems of inconsistent operation sequence lengths and time flexibility, laying a solid foundation for subsequent pattern recognition.

[0188] (2) Determining the optimal number of clusters using spectral clustering and silhouette coefficients: By converting the similarity between operation sequences into a Laplacian matrix of the graph, the spectral clustering algorithm is used to efficiently identify operation patterns in low-dimensional space, avoiding the limitations of high-dimensional data clustering. Furthermore, the optimal number of clusters is automatically selected by calculating the silhouette coefficients, ensuring the accuracy and completeness of the patterns and overcoming the subjectivity and irrationality of manually setting the number of clusters.

[0189] (3) Screening the optimal operation sequence through a comprehensive evaluation system: By using multi-dimensional evaluation (frequency score, stability score, efficiency score) to quantitatively compare different clusters, the optimal operation behavior pattern is screened out, thereby determining the standard operation sequence. This data-driven evaluation method not only considers the universality and execution efficiency of the operation, but also focuses on the consistency of the operation, ensuring the quality and practicality of the extracted operation pattern.

[0190] (4) Quantifying the range of operations to improve operational flexibility: Based on the determination of the optimal operation sequence, further through interquartile range analysis, the specific adjustment range of each operation is given, which effectively guides operators to operate in accordance with the standard operation sequence when facing actual production conditions, without losing flexibility, and greatly improves the accuracy and safety of operation.

[0191] According to embodiments of this application, an operation sequence analysis apparatus is provided. It should be noted that the operation sequence analysis apparatus of this application can be used to execute the operation sequence analysis method provided in the embodiments of this application. The operation sequence analysis apparatus provided in the embodiments of this application will be described below.

[0192] Figure 4 This is a structural diagram of an operation sequence analysis device provided according to an embodiment of this application. Figure 4 As shown, the device includes:

[0193] The acquisition module 40 is used to acquire an operation sequence set from the industrial control system, wherein the operation sequence set contains operation sequences after uniform feature representation of historical operation records of preset events;

[0194] The first determining module 42 is used to determine the distance matrix corresponding to the set of operation sequences, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the set of operation sequences;

[0195] The second determining module 44 is used to convert the distance matrix into a similarity matrix and determine the behavior analysis graph corresponding to the set of operation sequences based on the similarity matrix. The behavior analysis graph is used to reflect the distribution of operation behavior patterns after the set of operation sequences is clustered unsupervised based on similarity.

[0196] The third determination module 46 is used to determine the standard operation sequence based on the behavior analysis diagram, wherein the standard operation sequence is the operation sequence in the operation sequence set that can provide the optimal operation guidance.

[0197] Through the acquisition module, first determination module, second determination module, and third determination module in the above-mentioned operation sequence analysis device, the purpose of intelligent analysis of operator behavior and optimization of standard operating procedures is achieved. This results in improved production efficiency, guaranteed operational safety and consistency, and technical effects such as assisting in operational decision-making and personnel training. In turn, it solves the technical problem of low efficiency in industrial operation analysis caused by the multi-dimensional, unequal length, and irrelevant operation mixture in the operation sequences generated by the control system in the process industry.

[0198] In the operation sequence analysis device provided in this application embodiment, the acquisition module is further configured to acquire historical operation records corresponding to preset events; determine the classification attribute, identifier attribute, and numerical attribute of the historical operation records, and determine the attribute vector corresponding to the historical operation records based on the classification attribute, identifier attribute, and numerical attribute; perform position encoding on the historical operation records to obtain the position vector corresponding to the historical operation records; fuse the attribute vector and the position vector to obtain the initial operation sequence corresponding to the historical operation records; and process the initial operation sequence through a feature extraction model to obtain the operation sequence corresponding to the historical operation records.

[0199] In the operation sequence analysis apparatus provided in this application embodiment, the acquisition module is further configured to process the initial operation sequence through a multi-head attention mechanism in the feature extraction model to obtain a first feature vector; perform residual and normalization processing on the first feature vector through a residual connection layer and a normalization layer connected to the multi-head attention mechanism, and process the first feature vector after residual and normalization processing through a position feedforward network in the feature extraction model to obtain a second feature vector; and perform residual and normalization processing on the second feature vector through a residual connection layer and a normalization layer connected to the position feedforward network to obtain the operation sequence.

[0200] In the operation sequence analysis apparatus provided in this application embodiment, the first determining module is further configured to determine the cumulative cost matrix corresponding to the first operation sequence and the second operation sequence, wherein the cumulative cost matrix is ​​used to store the minimum cumulative distance between the first operation sequence and the second operation sequence, and the first operation sequence and the second operation sequence are any two operation sequences in the set of operation sequences; determine the cosine distance between the operation steps in the first operation sequence and the operation steps in the second operation sequence; fill the cumulative cost matrix according to the cosine distance to obtain the target distance matrix corresponding to the first operation sequence and the second operation sequence, and determine the dynamic time warping distance between the first operation sequence and the second operation sequence according to the target distance matrix, wherein the dynamic time warping distance is inversely proportional to the similarity between the first operation sequence and the second operation sequence.

[0201] In the operation sequence analysis apparatus provided in this application embodiment, the second determining module is further configured to take all operation sequences in the operation sequence set as nodes and the similarity matrix between operation sequences as edges, connect the nodes and edges to obtain an initial behavior analysis graph corresponding to the operation sequence set; determine the Laplacian matrix corresponding to the initial behavior analysis graph based on the similarity matrix, wherein the Laplacian matrix is ​​used to reflect the node differences and connection strength in the initial behavior analysis graph; perform eigenvalue decomposition on the Laplacian matrix to obtain a third eigenvector; perform cluster analysis on the third eigenvector to obtain a behavior analysis graph, and determine the pattern label of the operation sequence in the behavior analysis graph, wherein the pattern label is used to reflect the operation behavior pattern to which the operation sequence belongs.

[0202] In the operation sequence analysis device provided in this application embodiment, the third determining module is further used to determine clusters in the behavior analysis graph, wherein each cluster represents an operation behavior pattern and contains multiple operation sequences; determine the frequency score, stability score, and efficiency score of the operation behavior pattern corresponding to the cluster, wherein the frequency score is used to reflect the prevalence of the operation behavior pattern corresponding to the cluster, the stability score is used to reflect the operational consistency of the operation behavior pattern corresponding to the cluster, and the efficiency score is used to reflect the execution efficiency of the operation behavior pattern corresponding to the cluster; determine the evaluation score corresponding to the cluster based on the frequency score, stability score, and efficiency score, and determine the cluster with the largest evaluation score as the target cluster, wherein the target cluster is used to represent the optimal operation behavior pattern in the behavior analysis graph; and determine the cluster center of the target cluster as the standard operation sequence.

[0203] In the operation sequence analysis device provided in this application embodiment, the third determining module is further used to determine the contour coefficient of the behavior analysis graph under multiple preset cluster numbers, wherein the contour coefficient is an index used to quantify the clustering effect of the behavior analysis graph under different cluster numbers; the preset cluster number corresponding to the maximum value of the contour coefficient is determined as the target cluster number corresponding to the behavior analysis graph; and cluster analysis is performed on the operation sequence in the behavior analysis graph based on the target cluster number.

[0204] The operation sequence analysis device provided in this application embodiment also includes an adjustment module 48, which is used to determine the interquartile range between the standard operation sequence and other operation sequences, wherein the other operation sequences are operation sequences in the target cluster other than the standard operation sequence, and the interquartile range is used to reflect the distribution of operation values ​​in the target cluster; determine the operation range for adjusting the standard operation sequence based on the interquartile range; and adjust the standard operation sequence based on the operation range.

[0205] This application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and used to execute the above-described operation sequence analysis method.

[0206] It should be noted that the aforementioned electronic equipment is used to perform Figure 2 The operation sequence analysis method shown above is also applicable to this electronic device, and will not be repeated here.

[0207] This application also provides a non-volatile storage medium that includes a stored computer program, wherein the device containing the non-volatile storage medium executes the above-described operation sequence analysis method by running the computer program.

[0208] It should be noted that the aforementioned non-volatile storage media is used for execution. Figure 2The operation sequence analysis method shown above is also applicable to this non-volatile storage medium, and will not be repeated here.

[0209] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described operation sequence analysis method.

[0210] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The operation sequence analysis method shown above is also applicable to this computer program product, and will not be repeated here.

[0211] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0212] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0213] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0215] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0216] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0217] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for analyzing operation sequences, characterized in that, include: Obtain an operation sequence set from an industrial control system, wherein the operation sequence set includes operation sequences after uniformly representing historical operation records of preset events; Determine a distance matrix corresponding to the set of operation sequences, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the set of operation sequences; The distance matrix is ​​converted into a similarity matrix, and a behavior analysis graph corresponding to the set of operation sequences is determined based on the similarity matrix. The behavior analysis graph is used to reflect the distribution of operation behavior patterns after unsupervised clustering of the set of operation sequences based on similarity. Based on the behavior analysis diagram, a standard operation sequence is determined, wherein the standard operation sequence is the operation sequence in the operation sequence set that can provide optimal operation guidance; Determining the standard operation sequence based on the behavior analysis graph includes: identifying clusters in the behavior analysis graph, where each cluster represents an operation behavior pattern and contains multiple operation sequences; determining the frequency score, stability score, and efficiency score of the operation behavior pattern corresponding to the cluster, where the frequency score reflects the prevalence of the operation behavior pattern corresponding to the cluster, the stability score reflects the consistency of the operation behavior pattern corresponding to the cluster, and the efficiency score reflects the execution efficiency of the operation behavior pattern corresponding to the cluster; determining the evaluation score corresponding to the cluster based on the frequency score, the stability score, and the efficiency score, and identifying the cluster with the highest evaluation score as the target cluster, where the target cluster represents the optimal operation behavior pattern in the behavior analysis graph; and identifying the cluster center of the target cluster as the standard operation sequence.

2. The method according to claim 1, characterized in that, The operation sequences in the set of operation sequences are determined in the following way: Retrieve historical operation records corresponding to the preset event; The classification attribute, identifier attribute, and numerical attribute of the historical operation record are determined, and the attribute vector corresponding to the historical operation record is determined based on the classification attribute, the identifier attribute, and the numerical attribute. The historical operation record is position-encoded to obtain a position vector corresponding to the historical operation record; By fusing the attribute vector and the position vector, an initial operation sequence corresponding to the historical operation record is obtained; The initial operation sequence is processed by a feature extraction model to obtain the operation sequence corresponding to the historical operation record.

3. The method according to claim 2, characterized in that, The initial operation sequence is processed using a feature extraction model, including: The initial operation sequence is processed by the multi-head attention mechanism in the feature extraction model to obtain the first feature vector; The first feature vector is subjected to residual and normalization processing through the residual connection layer and normalization layer connected to the multi-head attention mechanism, and the first feature vector after residual and normalization processing is processed through the position feedforward network in the feature extraction model to obtain the second feature vector. The operation sequence is obtained by performing residual and normalization processing on the second feature vector through residual connection layer and normalization layer connected to the position feedforward network.

4. The method according to claim 1, characterized in that, Determining the distance matrix corresponding to the set of operation sequences includes: Determine the cumulative cost matrix corresponding to the first operation sequence and the second operation sequence, wherein the cumulative cost matrix is ​​used to store the minimum cumulative distance between the first operation sequence and the second operation sequence, and the first operation sequence and the second operation sequence are any two operation sequences in the set of operation sequences; Determine the cosine distance between the operation steps in the first operation sequence and the operation steps in the second operation sequence; The cumulative cost matrix is ​​filled with the cosine distance to obtain the target distance matrix corresponding to the first operation sequence and the second operation sequence. The dynamic time warping distance between the first operation sequence and the second operation sequence is determined based on the target distance matrix, wherein the dynamic time warping distance is inversely proportional to the similarity between the first operation sequence and the second operation sequence.

5. The method according to claim 1, characterized in that, Determining the behavioral analysis graph corresponding to the set of operation sequences based on the similarity matrix includes: By taking all operation sequences in the operation sequence set as nodes and the similarity matrix between the operation sequences as edges, the nodes and edges are connected to obtain the initial behavior analysis graph corresponding to the operation sequence set. Based on the similarity matrix, a Laplacian matrix corresponding to the initial behavior analysis graph is determined, wherein the Laplacian matrix is ​​used to reflect the node differences and connection strength in the initial behavior analysis graph; The Laplacian matrix is ​​subjected to eigenvalue decomposition to obtain the third eigenvector; Cluster analysis is performed on the third feature vector to obtain the behavior analysis graph, and the pattern labels of the operation sequences in the behavior analysis graph are determined, wherein the pattern labels are used to reflect the operation behavior pattern to which the operation sequence belongs.

6. The method according to claim 1, characterized in that, Before determining the clusters in the behavior analysis graph, the method further includes: Determine the silhouette coefficient of the behavior analysis graph under multiple preset cluster numbers, wherein the silhouette coefficient is an index used to quantify the clustering effect of the behavior analysis graph under different cluster numbers; The preset number of clusters corresponding to the maximum value of the silhouette coefficient is determined as the target number of clusters corresponding to the behavior analysis map; Cluster analysis is performed on the operation sequences in the behavior analysis graph based on the target cluster number.

7. The method according to claim 5, characterized in that, The method further includes: Determine the interquartile range between the standard operation sequence and other operation sequences, wherein the other operation sequences are operation sequences in the target cluster other than the standard operation sequence, and the interquartile range is used to reflect the distribution of operation values ​​in the target cluster; The operational range for adjusting the standard operation sequence is determined based on the interquartile range. The standard operation sequence is adjusted according to the operation range.

8. An operation sequence analysis device, characterized in that, include: The acquisition module is used to acquire an operation sequence set from the industrial control system, wherein the operation sequence set includes operation sequences after uniform feature representation of historical operation records of preset events; The first determining module is used to determine the distance matrix corresponding to the set of operation sequences, wherein the distance matrix is ​​used to reflect the similarity distance between any two operation sequences of different lengths in the set of operation sequences; The second determining module is used to convert the distance matrix into a similarity matrix and determine the behavior analysis graph corresponding to the set of operation sequences based on the similarity matrix, wherein the behavior analysis graph is used to reflect the distribution of operation behavior patterns after the set of operation sequences is clustered according to similarity in an unsupervised manner; The third determining module is used to determine standard operation sequences based on the behavior analysis graph, wherein the standard operation sequences are operation sequences in the set of operation sequences that can provide optimal operation guidance; determining standard operation sequences based on the behavior analysis graph includes: determining clusters in the behavior analysis graph, wherein each cluster represents an operation behavior pattern and contains multiple operation sequences; determining the frequency score, stability score, and efficiency score of the operation behavior pattern corresponding to the cluster, wherein the frequency score is used to reflect the prevalence of the operation behavior pattern corresponding to the cluster, the stability score is used to reflect the operational consistency of the operation behavior pattern corresponding to the cluster, and the efficiency score is used to reflect the execution efficiency of the operation behavior pattern corresponding to the cluster; determining the evaluation score corresponding to the cluster based on the frequency score, the stability score, and the efficiency score, and determining the cluster with the highest evaluation score as the target cluster, wherein the target cluster represents the optimal operation behavior pattern in the behavior analysis graph; and determining the cluster center of the target cluster as the standard operation sequence.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store program instructions; The processor, connected to the memory, is used to execute the operation sequence analysis method according to any one of claims 1 to 7.

10. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the operation sequence analysis method according to any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the operation sequence analysis method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Energy storage EMS abnormal user behavior detection method based on sparse attention mechanism

    CN119202766A

  • DTW and K-means clustering-based flight training quality evaluation method

    CN120689178A