A multivariate dynamic alarm threshold optimization design method and electronic equipment
Patent Information
- Application Number
- CN202311035646.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-08-16
AI Technical Summary
[0004]复杂工业过程的过程变量数据分布类型复杂,采用空间模型或相关性分析因其自身模型存在局限性,将会仍然存在误漏报警区域
[0060] This invention provides and implements a multivariate dynamic alarm threshold optimization design method and electronic device. It achieves normal working zone division for multivariate data by performing grid mapping on data and calculating local density through grid clustering. A method for extracting multidimensional grid boundaries is proposed, expanding from two-variable to multivariable data by extracting two-dimensional grid cluster boundaries layer by layer. A novel method for extracting thresholds corresponding to sample points is also proposed. For normal sample points, the boundary value corresponding to the point value is selected as the threshold; for abnormal sample points, the nearest boundary point is selected as the corresponding point, and the threshold corresponding to the corresponding point is used as the threshold for the abnormal sample point. Finally, a parallel coordinate system is used to visualize the sample point values and corresponding thresholds. Therefore, this invention solves the problem of false alarms still existing in the prior art due to the limitations of spatial models, and achieves optimized design of multivariate dynamic alarm thresholds.
Smart Images

Figure CN117131673B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of alarm monitoring systems for complex industrial processes, and in particular to a multivariable dynamic alarm threshold optimization design method and electronic device. Background Technology
[0002] As modern industry continues to develop towards larger scales, more equipment, and more complex processes, the requirements for production safety, reliability, and intelligence are constantly increasing. Alarm systems, through thousands of monitoring points, monitor various process variables in real time, reflecting the operational status of each stage of the production process, and are a crucial guarantee for production safety. However, due to the ever-expanding scale of monitoring data, the number of alarms has also risen sharply, making it difficult for operators to troubleshoot them. Therefore, how to reduce interfering alarms and optimize alarm thresholds is a significant issue in the current field of industrial alarm research.
[0003] Compared to univariate alarm system design, multivariate alarm systems involve process variables that are often interconnected, with the value of one process variable being influenced by the values of others. Correlation analysis or spatial models are effective solutions in multivariate alarm threshold research. Correlation analysis measures the degree of correlation between variables, using correlation coefficients to uncover hidden relationships between data; spatial models divide the variable data into normal operating ranges, defining and calculating the dynamic alarm threshold for each related variable.
[0004] The process variable data of complex industrial processes are distributed in a variety of ways. Spatial models or correlation analysis, due to their inherent limitations, will still have areas of false alarms. Therefore, it is particularly important to conduct research on the design of multivariate dynamic alarm thresholds. Summary of the Invention
[0005] To address the technical problem of false alarms still existing due to limitations in spatial models in current technologies, this invention provides a multivariate dynamic alarm threshold optimization design method and electronic device based on grid clustering. Grid clustering maps data to a grid and calculates local density, thus defining the normal working area for multivariate data. A method for extracting multidimensional grid boundaries is proposed, extending from two-variable to multivariable data by extracting two-dimensional grid cluster boundaries layer by layer. A novel method for extracting thresholds corresponding to sample points is also proposed. For normal sample points, the boundary value corresponding to that point is selected as the threshold; for abnormal sample points, the nearest boundary point is selected as the corresponding point, and the threshold corresponding to that point is used as the threshold for the abnormal sample point. Finally, a parallel coordinate system is used to visualize the sample point values and corresponding thresholds. Therefore, the optimization design of multivariate dynamic alarm thresholds is achieved.
[0006] To achieve the above objectives, this invention first provides a multivariate dynamic alarm threshold optimization design method based on grid clustering, comprising the following steps:
[0007] The original multivariate data is divided into grids, and the local density of each grid is calculated. Starting from the grid with the largest local density, elements inside the cluster are added layer by layer according to the neighborhood relationship. The grid clustering results and the cluster labels corresponding to each original data sample are output.
[0008] Based on the grid clustering results, the boundary grid of each cluster is extracted layer by layer as the boundary of the dynamic alarm threshold;
[0009] For normal sample points in the new sample data, the boundary value corresponding to that point is selected as the threshold; for abnormal sample points in the new sample data, the nearest boundary point is selected as the corresponding point, and the threshold corresponding to the corresponding point is used as the threshold corresponding to the abnormal sample point.
[0010] Optionally, the step of dividing the original multivariate data into a grid includes:
[0011] Obtain the original multivariate data D = [x1, x2, x3, ..., x j ,...,x n ], where x j Let be a column vector representing the historical data of the j-th variable. There are n variables in total, i.e., n-dimensional data. If the number of grid divisions is K, then the grid size for the j-th variable is I. j :
[0012]
[0013] Where max(x) j ) represents the maximum value of the j-th variable, min(x) j ) represents the minimum value of the j-th variable.
[0014] Optionally, the step of dividing the original multivariate data into a grid includes:
[0015] Obtain the raw multivariate data D = [s 1 ;s 2 ;s 3 ;...;s i ;...;s m ], where s i It is a row vector representing the i-th data sample. There are m data samples in total, with n variables. The j-th variable data of the i-th sample is represented as... Corresponding grid partitioning mapping code Represented as:
[0016]
[0017] Where i = 1, 2, ..., m, j = 1, 2, ..., n, and floor() represents rounding to negative infinity.
[0018] Optionally, the step of calculating the local density of each grid cell includes:
[0019] Obtain any single grid G within the grid space, and calculate the center position G of that grid. c inverse mapping sample values s c :
[0020]
[0021]
[0022]
[0023] Where j = 1, 2, ..., n, The j-th variable represents the grid data at the center position of the grid. The j-th variable represents the numerical value mapped back to the center position of the grid.
[0024] Calculate the data points s mapped to this grid. q The value s corresponding to the grid center c The sum of Euclidean distances R and the grid size I, where Q represents the number of data points mapped to the grid;
[0025]
[0026]
[0027] Calculate the local density ρ of the Gaussian kernel function for this mesh:
[0028] ρ=exp[-(R / I) 2 ]
[0029] As can be seen from the above formula, the smaller the sum of the Euclidean distances R between the data points in the grid and the grid center, the greater the local density ρ of the grid, and the closer it is to the center of the cluster.
[0030] Optionally, the step of starting from the grid with the highest local density, adding elements within the cluster layer by layer according to neighborhood relationships, and outputting the grid clustering results and the clustering labels corresponding to each original data sample includes:
[0031] Find the grid with the highest local density among all current grids and use it as the neighborhood center C, which is also the center of the first type of cluster;
[0032] C = max(ρ)
[0033] Calculate each grid G with non-zero local density u Calculate the Euclidean distance r between the grid G and the current neighborhood center C, and select grids whose Euclidean distance is less than the set neighborhood radius d as elements to be newly added to the cluster;
[0034]
[0035] Taking the boundary points of the current cluster as each neighborhood center point, calculate the Euclidean distance between the remaining grids and each neighborhood center point respectively; if there exists a grid satisfying r<d, add new grid elements to the cluster; if there is no grid satisfying r<d, select the grid with the largest local density among the remaining grids as the neighborhood center point, and also as the center point of the second type of cluster;
[0036] Repeat the above steps until all grids with non-zero local density are added to different clusters, then terminate the clustering, output the grid clustering result and the clustering labels corresponding to each original data sample, and the grid clustering result is the multivariate normal working area.
[0037] Optionally, said step of extracting the boundary grids of each cluster layer by layer as the dynamic alarm threshold boundary based on the grid clustering result comprises:
[0038] Select grids in the grid clustering result that have non-zero local density and are connected to at least one grid with zero local density as boundary grids;
[0039] Extend from two variables to multiple variables, and repeatedly extract two-dimensional grid boundaries layer by layer until the boundary grid G of multi-dimensional grid clustering is obtained e .
[0040] Optionally, said step of, for normal sample points in new sample data, selecting the boundary value corresponding to the value of the point as a threshold; and for abnormal sample points in new sample data, selecting the closest boundary point as the corresponding point, and taking the threshold corresponding to the corresponding point as the threshold corresponding to the abnormal sample point comprises:
[0041] For the new sample data s m+1 perform grid mapping, wherein represents the value of the j-th variable of the new sample data, there are values of n variables in total, and the grid position f corresponding to the new sample data is obtained after grid mapping m+1 ;
[0042]
[0043]
[0044]
[0045] wherein j=1,2,...,n, This represents the grid position of the j-th variable in the new sample data;
[0046] By querying the new sample grid position f m+1 If the new sample point is within the normal working area obtained after grid clustering, it is considered a normal sample point and threshold extraction is performed directly. Otherwise, it is considered an outlier sample point, and the grid boundary point closest to the outlier sample point's grid location is selected as the corresponding grid point.
[0047]
[0048] Where arg min represents the value of variable G when it reaches its minimum. e The value at this point;
[0049] Obtain the grid position f of the normal sample points m+1 Or the boundary grid location corresponding to the abnormal sample point Then, the grid threshold L is obtained. m+1 :
[0050]
[0051] in, This represents the grid threshold for the j-th variable of a new sample point, which is the value when the grid clustering boundary G... e The range of values for the grid position of variable j when the grid positions of all other variables except variable j are fixed;
[0052] The grid threshold L of the obtained new sample points m+1 Inverse mapping to the actual threshold T m+1 :
[0053]
[0054] Where j = 1, 2, ..., n, Indicates the actual threshold T m+1 The actual threshold of the j-th variable, min(x) j ) represents the minimum value of the j-th variable, I j This represents the grid size of the j-th variable.
[0055] Optionally, after extracting the actual thresholds of all variables in the new sample data, the method further includes: processing the new sample data s m +1 and actual threshold T m+1 Visualize it.
[0056] Optionally, the visualization step includes:
[0057] A parallel coordinate system is used, with each coordinate system representing each dimension and each variable. The corresponding threshold and sample point value are marked on each coordinate system.
[0058] In addition, to achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the multivariate dynamic alarm threshold optimization design method.
[0059] The technical solution provided by this invention has the following beneficial effects:
[0060] This invention provides and implements a multivariate dynamic alarm threshold optimization design method and electronic device. It achieves normal working zone division for multivariate data by performing grid mapping on data and calculating local density through grid clustering. A method for extracting multidimensional grid boundaries is proposed, expanding from two-variable to multivariable data by extracting two-dimensional grid cluster boundaries layer by layer. A novel method for extracting thresholds corresponding to sample points is also proposed. For normal sample points, the boundary value corresponding to the point value is selected as the threshold; for abnormal sample points, the nearest boundary point is selected as the corresponding point, and the threshold corresponding to the corresponding point is used as the threshold for the abnormal sample point. Finally, a parallel coordinate system is used to visualize the sample point values and corresponding thresholds. Therefore, this invention solves the problem of false alarms still existing in the prior art due to the limitations of spatial models, and achieves optimized design of multivariate dynamic alarm thresholds. Attached Figure Description
[0061] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0062] Figure 1 This is an execution flowchart of a multivariable dynamic alarm threshold optimization design method provided by the present invention;
[0063] Figure 2 This is a schematic diagram of the mesh generation and local density calculation provided by the present invention;
[0064] Figure 3 This is a schematic diagram of two-dimensional grid clustering boundary extraction provided by the present invention;
[0065] Figure 4 This is a schematic diagram of three-dimensional mesh clustering boundary extraction provided by the present invention;
[0066] Figure 5 This is a schematic diagram of threshold extraction corresponding to normal / abnormal sample points provided by the present invention;
[0067] Figure 6 This is a three-variable data graph obtained after simulation using the TEP model provided by this invention;
[0068] Figure 7 This is a two-dimensional grid clustering result diagram of the reactor pressure (P7) provided by the present invention when the grid is 30;
[0069] Figure 8 This is a graph showing the results of grid clustering boundary extraction when the reactor pressure (P7) is 30, as provided by this invention.
[0070] Figure 9 This is a visualization of the parallel coordinate system between the new sample points and the corresponding thresholds provided by the present invention;
[0071] Figure 10 This is a schematic diagram of an electronic device structure provided by the present invention. Detailed Implementation
[0072] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0073] refer to Figure 1 This invention provides a multivariable dynamic alarm threshold optimization design method, the specific process of which is as follows:
[0074] (1) Grid clustering:
[0075] To make the normal working area suitable for process variable data, this invention uses grid clustering to divide the normal working area. Grid clustering is a method that divides data into different grids, each grid representing all data within that grid, and all subsequent data processing is based on a single grid.
[0076] Grid clustering divides multivariate data into normal working regions. The specific process includes: dividing the original data into a grid, calculating the local density of each grid, and then, starting with the grid with the highest local density, adding elements that are likely to be within the cluster layer by layer based on neighborhood relationships. The detailed steps are as follows:
[0077] 1) Data grid partitioning. For example... Figure 2 As shown, the original variable data D = [x1, x2, x3, ..., x j ,...,x n ], where x j This is a column vector representing the historical data of the j-th variable. There are n variables in total, i.e., n-dimensional data. Let the number of grid divisions be K, then the grid size for the j-th variable is I. j ,
[0078]
[0079] Where max(x) j ) represents the maximum value of the j-th variable, min(x) j) represents the minimum value of the j-th variable.
[0080] The original variable data D can also be represented as D = [s] 1 ;s 2 ;s 3 ;...;s i ;...;s m ], where s i Let be a row vector representing the i-th data sample, and there are m data samples in total. Therefore, the j-th variable data of the i-th sample can be represented as: Corresponding grid partitioning mapping code It can be represented as
[0081]
[0082] Where i = 1, 2, ..., m, j = 1, 2, ..., n, floor() represents rounding to negative infinity, which is the largest integer not exceeding the value of the element inside the parentheses.
[0083] 2) Calculate the local density of the mesh. After dividing the original data into meshes to obtain the mesh mapping for each data point, calculate the local density of each mesh within the mesh space. For example... Figure 2 As shown, taking any single grid G in the grid space as an example, the center position G of the grid is first calculated. c inverse mapping sample values s c ,
[0084]
[0085]
[0086]
[0087] Where j = 1, 2, ..., n, The j-th variable represents the grid data at the center position of the grid. The j-th variable represents the value mapped back to the center position of the grid.
[0088] Then calculate the data points s mapped to that grid. q The value s corresponding to the grid center c The sum of Euclidean distances R and the grid size I, where Q represents the number of data points mapped to the grid.
[0089]
[0090]
[0091] Then calculate the local density ρ of the Gaussian kernel function of the mesh:
[0092] ρ=exp[-(R / I) 2
[0093] It can be known from the above that the smaller the sum R of Euclidean distances between the data points in the grid and the grid center is, the larger the local density ρ of the grid is, and the closer the grid is to the cluster center.
[0094] 3) Selection of clustering center points. Since a larger local density ρ indicates that the grid is closer to the cluster center, the grid with the largest local density among all current grids is found as the neighborhood center C and also serves as the center of the first cluster.
[0095] C=max(ρ)
[0096] 4) Adding intra-cluster grids. Calculate, for each grid G with a non-zero local density, u the Euclidean distance r between the grid G and the current neighborhood center C, and select the grids whose Euclidean distance is less than the set neighborhood radius d as new elements to be added into the cluster.
[0097]
[0098] 5) Updating intra-cluster grids. Take the boundary points of the current cluster as respective neighborhood center points, and calculate the distances between the remaining grids and each neighborhood center point respectively. If there exists a grid satisfying r<d, add new grid elements to the cluster according to step 4); if there is no grid satisfying r<d, proceed to step 3), select the grid with the largest local density from the remaining grids as the neighborhood center point, which is also the center point of the second cluster, and repeat the subsequent steps.
[0099] 6) Ending clustering. Until all grids with non-zero local density are added into different clusters, the clustering is ended, and the clustering result and the clustering labels corresponding to each original data sample are output.
[0100] (2) Extracting the boundary of grid clustering:
[0101] After the grid clustering of multivariate data is completed, the clustering result is the multivariate normal working area. This division of the normal working area by grid clustering enables the normal working area to be a "stacked n-dimensional cube", and the subsequently extracted boundary is also formed by connecting small straight line segments, so that the normal working area can be further fitted to the multivariate data.
[0102] To implement the design of multivariate dynamic alarm thresholds, the present invention proposes a method for extracting multi-dimensional grid boundaries. For the grid clustering result, the boundaries of clusters are extracted layer by layer as the dynamic alarm threshold boundaries. The principle is as follows:
[0103] For two-variable 2D grid clustering boundary extraction, select grids with non-zero local density in the clustering results that are connected to at least one grid with zero local density as boundary grids. The connectivity can be set to 4 / 8 connectivity. Figure 3 As shown, the light gray grid is the boundary grid.
[0104] Extending from two variables to multiple variables. For example, deriving from a two-dimensional mesh to a three-dimensional mesh: First, when the three-dimensional mesh of variable 3 is 1, extract the two-dimensional mesh clustering boundary between variable 1 and variable 2 at this time; then, when the three-dimensional mesh of variable 3 is 2, repeat the previous step to extract the two-dimensional mesh boundary at this time; until the three-dimensional mesh of variable 3 is K (the number of meshes defined during mesh clustering). A specific illustration can be found in... Figure 4 This is represented as follows. If it is four-dimensional grid data, the approach is the same as above: determine the grid values in the fourth and third dimensions of the variable, repeatedly extract the two-dimensional grid boundaries, until the boundary grid G of the multi-dimensional grid cluster is obtained. e .
[0105] (3) Threshold extraction for new sample data:
[0106] After performing grid clustering on historical data and extracting the cluster boundaries as the boundaries of the normal working area, a corresponding threshold is extracted for new sample data based on this. The specific steps are as follows:
[0107] 1) Map the new sample data to the corresponding grid location. Since the boundary of the normal working area is grid data, it is necessary to perform grid mapping on the new sample data. The first step in grid-based clustering is to map the new sample data s... m+1 Perform mesh mapping, where Let f represent the value of the j-th variable in the new sample data. There are n variables in total. After grid mapping, the grid position f corresponding to the new sample data is obtained. m+1 .
[0108]
[0109]
[0110]
[0111] Where j = 1, 2, ..., n, This represents the grid position of the j-th variable in the new sample data.
[0112] 2) Determine whether the new sample point is a normal sample point. This invention provides a sample point determination method, which involves querying the new sample grid position f. m+1Is it a grid within the normal working area obtained after grid clustering? If yes, the new sample point is a normal sample point, and proceed directly to step 4) for threshold extraction; otherwise, the new sample point is an abnormal sample point, and proceed to step 3). Before performing threshold extraction, it is necessary to find the corresponding grid point.
[0113] 3) Selection of corresponding grid points for abnormal sample points. For example... Figure 5 As shown, if a new sample point is an outlier, in order to extract the thresholds of each process variable corresponding to the sample point, it is necessary to find a normal sample point and use the threshold of the normal sample point as the threshold of the outlier sample point. Therefore, this invention selects the grid boundary point closest to the grid position of the outlier sample point as the corresponding grid point. The distance here is still measured using Euclidean distance.
[0114]
[0115] Where arg min represents the value of variable G when it reaches its minimum. e The value at this point.
[0116] 4) Grid threshold extraction for internal / boundary sample points. This yields the grid positions f of normal sample points. m+1 Or the boundary grid location corresponding to the abnormal sample point Afterwards, as Figure 5 As shown, the grid threshold L is obtained. m+1 :
[0117]
[0118] in, This represents the grid threshold for the j-th variable of a new sample point, which is the value when the grid clustering boundary G... e The range of values for the grid position of variable j when the grid positions of all other variables except variable j are fixed.
[0119] 5) The grid threshold is inversely mapped to the actual value. The grid threshold L for the new sample points is obtained. m+1 Then, it is inversely mapped to the actual threshold T. m+1 :
[0120]
[0121]
[0122] Where j = 1, 2, ..., n, Indicates the actual threshold T m+1 The actual threshold of the j-th variable, min(x) j ) represents the minimum value of the j-th variable, I j This represents the grid size of the j-th variable.
[0123] 6) Visualization of the parallel coordinate system. After extracting the actual thresholds of all variables for the new sample points, it is necessary to visualize the new sample point data s. m+1 and actual threshold T m+1 Visualization is performed. This invention employs existing technology: a parallel coordinate system, where each coordinate system represents a dimension and a variable, and the corresponding threshold and sample point values are marked on each coordinate system.
[0124] In one specific embodiment, the effectiveness of the method provided by this invention is verified based on data generated from simulations of the TEP model in MATLAB. The TEP model has 11 operational variables (XMV1-11) and 41 measurement variables (XMEAS1-41), of which the measurement variables are divided into 22 process variables and 19 component variables. To ensure sufficient normal data to support the division of the normal working area, this invention sets the sampling period to 0.01h and the running time to 4000h during the TEP model simulation, and ensures no failures occur. After obtaining a total of 400,001 data samples, experimental verification is performed.
[0125] This invention presents a multivariate dynamic alarm threshold optimization design method based on grid clustering. Therefore, three variables from the TEP model were selected for experimental verification: reactor feed flow rate (F6), reactor liquid level (L8), and reactor pressure (P7). Simulation data are as follows: Figure 6 As shown.
[0126] Grid clustering:
[0127] Grid clustering is performed on the simulation data to divide the normal operating area. The original variable data is D = [x1, x2, x3], where x1 represents variable one (reactor feed flow rate), x2 represents variable two (reactor liquid level), and x3 represents (reactor pressure). The data is then meshed. First, the number of meshes K is set, and the mesh size I for each variable is calculated. j ,
[0128]
[0129] Where j = 1, 2, 3, max(x j ) represents the maximum value of the j-th variable, min(x) j ) represents the minimum value of the j-th variable.
[0130] The original variable data D can be represented as D = [s] 1 ;s 2 ;s 3 ;...;s i ;...;s m], m = 400001, the j-th variable data of the i-th sample can be represented as The corresponding grid partitioning mapping code It can be represented as
[0131]
[0132] Where i = 1, 2, ..., m, j = 1, 2, 3, and floor() represents rounding to negative infinity.
[0133] After obtaining the grid mappings corresponding to all data, the local density of each grid is calculated, and the local density is used to represent the grid for clustering. First, the center position G of a single grid is calculated. c The inverse mapping corresponds to the numerical value s c ,
[0134]
[0135] Where j = 1, 2, 3, The j-th variable represents the grid data at the center position of the grid. The j-th variable represents the value mapped back to the center position of the grid.
[0136] Then calculate the data points s mapped to that grid. q Data s corresponding to the grid center point c The sum of the Euclidean distances R and the grid size I are used to obtain the local density ρ of each grid.
[0137]
[0138]
[0139] ρ=exp[-(R / I) 2 ]
[0140] Here, Q represents the number of data points within the grid. Therefore, the smaller the distance between a data point within the grid and the grid center, the higher the local density of the grid, and the more likely it is to be close to the center of the cluster.
[0141] Select the cluster center point, choose the grid with the highest local density as the center point of the first type of cluster, and use this grid as the neighborhood center to add and update the grids within the cluster.
[0142] Add meshes within the cluster, calculate the Euclidean distance between each mesh with a non-zero local density and the current neighborhood center, and select all meshes whose Euclidean distance is less than the set neighborhood radius d as new elements to be added to the cluster.
[0143] Update the intra-cluster grid, using the current cluster's boundary points as neighborhood centers, and calculate the distances between the remaining grid cells and each neighborhood center. If a grid cell exists with an Euclidean distance less than d, add a new grid element to that cluster; otherwise, select the grid cell with the highest local density among the remaining cells as its neighborhood center, which is also the center of the second type of cluster, and repeat the subsequent steps. Continue until all grid cells with non-zero local density are added to different clusters, then end the clustering process and output the clustering results and the cluster labels corresponding to each original data sample. The experiment sets the number of grid cells K to 70. Figure 7 The results of grid clustering are shown when the grid size is 30 for the reactor pressure (P7).
[0144] Extracting the boundaries of grid clusters:
[0145] After obtaining the multivariate normal operating range results of grid clustering, three-dimensional grid boundary extraction is performed to achieve the design of multivariate dynamic alarm thresholds. This invention uses a method of deriving three variables from two variables to obtain the grid boundaries of the multidimensional data. The three variable reactor pressures (P7) are set to 1 to K, and the two-dimensional grid clustering boundaries of each layer are extracted sequentially, ultimately obtaining the three-dimensional grid clustering boundaries for this experiment. Figure 8 The results show the mesh clustering boundary when the reactor pressure (P7) is 30.
[0146] Threshold extraction for new sample data:
[0147] For the new sample data s m+1 It is necessary to extract the corresponding threshold for the sample point based on the grid clustering boundary. First, the new sample data is mapped to the grid, using the same mapping formula as grid clustering, to obtain the grid position f corresponding to the new sample data. m+1 ,
[0148]
[0149]
[0150]
[0151] Where j = 1, 2, 3, This represents the value of the j-th variable in the new sample data. This represents the grid position of the j-th variable in the new sample data.
[0152] Determining whether a new sample point is a normal or abnormal sample point prepares for threshold extraction. This invention queries the grid position f of the new sample. m+1The new sample point is determined to be a normal sample point by checking if it falls within the normal working area obtained after grid clustering. If it is a normal sample point, a threshold is directly extracted, fixing the grid positions of two variables for that sample point, and extracting the grid boundary of the other variable as the grid threshold for that variable. If it is an outlier sample point, before threshold extraction, the boundary grid closest to the corresponding grid position of the new sample point is selected as the corresponding grid point. Use the grid threshold of the corresponding grid point as the grid threshold L of the new sample point. m+1 ,in This represents the grid threshold of the j-th variable.
[0153]
[0154] Inversely map the grid threshold to the actual threshold T m+1 :
[0155]
[0156]
[0157] Where j = 1, 2, 3, This represents the actual threshold of the j-th variable in the new sample point.
[0158] Finally, the new sample point data and corresponding thresholds are visualized using a parallel coordinate system. This invention uses two new sample points for threshold extraction experiments. One is a normal sample point with F6 = 47.5, L8 = 64, and P7 = 2800.1. The threshold extraction and visualization results are as follows: Figure 9 As shown in (a); the other is an anomaly sample point, F6=47.5, L8=64, P7=2794, the threshold extraction and visualization results are as follows. Figure 9 As shown in (b), two thicker black lines indicate the threshold range, while a thinner black line indicates the value of a new sample point. Therefore, it can be seen that changes in variable P7 not only cause changes in its own threshold but also affect the thresholds of variables F6 and L8, and normal sample points become abnormal sample points.
[0159] refer to Figure 10 , Figure 10A schematic diagram of the physical structure of an electronic device is provided. This electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute the steps of the aforementioned multivariate dynamic alarm threshold optimization design method, including: dividing the original multivariate data into a grid and calculating the local density of each grid; starting from the grid with the highest local density, adding elements within the cluster layer by layer according to neighborhood relationships; outputting the grid clustering results and the cluster labels corresponding to each original data sample; extracting the boundary grids of each cluster layer by layer as the dynamic alarm threshold boundaries for the grid clustering results; selecting the boundary value corresponding to the normal sample point in the new sample data as the threshold; and selecting the nearest boundary point as the corresponding point for the abnormal sample point in the new sample data, and using the threshold corresponding to the corresponding point as the threshold corresponding to the abnormal sample point.
[0160] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0161] As an optional implementation, the present invention also provides a storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described multivariate dynamic alarm threshold optimization design method, including: dividing the original multivariate data into a grid and calculating the local density of each grid; starting from the grid with the largest local density, adding elements within the cluster layer by layer according to neighborhood relationships, and outputting the grid clustering results and the cluster labels corresponding to each original data sample; extracting the boundary grids of each cluster as dynamic alarm threshold boundaries for the grid clustering results layer by layer; selecting the boundary value corresponding to the normal sample point in the new sample data as the threshold; and selecting the nearest boundary point as the corresponding point for the abnormal sample point in the new sample data, and using the threshold corresponding to the corresponding point as the threshold corresponding to the abnormal sample point.
[0162] This invention provides and implements a multivariate dynamic alarm threshold optimization design method and electronic device, as well as a corresponding storage medium. It achieves normal working area division for multivariate data by performing grid mapping on data and calculating local density through grid clustering. A method for extracting multidimensional grid boundaries is proposed, expanding from two-variable to multivariable data by extracting two-dimensional grid cluster boundaries layer by layer. A new method for extracting thresholds corresponding to sample points is also proposed: for normal sample points, the boundary value corresponding to the point value is selected as the threshold; for abnormal sample points, the nearest boundary point is selected as the corresponding point, and the threshold corresponding to the corresponding point is used as the threshold for the abnormal sample point. Finally, a parallel coordinate system is used to visualize the sample point values and corresponding thresholds. Therefore, this invention solves the problem of false alarms still existing due to spatial model limitations in the prior art, and achieves optimized design of multivariate dynamic alarm thresholds.
[0163] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0164] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as identifiers.
[0165] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A multivariate dynamic alarm threshold optimization design method based on grid clustering, characterized in that, comprising the following steps: dividing original multivariate data into grids, calculating the local density of each grid, starting from the grid with the maximum local density, adding elements inside a cluster layer by layer according to neighborhood relationships, and outputting a grid clustering result and clustering labels corresponding to each original data sample; for the grid clustering result, extracting boundary grids of each cluster layer by layer as dynamic alarm threshold boundaries; for a normal sample point in new sample data, selecting a boundary value corresponding to the value of the point as a threshold; for an abnormal sample point in new sample data, selecting the nearest boundary point as a corresponding point, and taking a threshold corresponding to the corresponding point as a threshold corresponding to the abnormal sample point; the step of calculating the local density of each grid comprises: Obtain any single grid G within the grid space and calculate the center position of that grid. inverse mapping sample values : in, , The j-th variable represents the grid data at the center position of the grid. The j-th variable represents the value mapped back to the center position of the grid. No. The grid size for each variable, Indicates the first Historical data for each variable; Calculate the data points mapped to this grid. Value corresponding to the center of the grid The sum of Euclidean distances R and the grid size I, where Q represents the number of data points mapped to the grid; Calculate the local density of the Gaussian kernel function for this mesh. : As shown in the above formula, the smaller the sum of the Euclidean distances R between the data points within the grid and the grid center, the higher the local density of the grid. The larger it is, the closer it is to the center of the cluster; the step of starting from the grid with the maximum local density, adding elements inside the cluster layer by layer according to the neighborhood relationship, and outputting the grid clustering result and the clustering labels corresponding to each original data sample comprises: searching for the grid with the maximum local density among all current grids as a neighborhood center C, which is also used as the center of a first cluster; Calculate the mesh where the local density is not zero. The Euclidean distance r between the current neighborhood center C and the grid is used to select grids whose Euclidean distance is less than the set neighborhood radius d as the new elements to be added to the cluster. taking boundary points of the current cluster as respective neighborhood center points, calculating Euclidean distances between remaining grids and each neighborhood center point respectively; if there is a grid with r<d, adding a new grid element to the cluster; if there is no grid with r<d, selecting the grid with the maximum local density from the remaining grids as a neighborhood center point, which is also used as the center point of a second cluster; repeating the above steps until all grids with non-zero local density are added to different clusters, ending the clustering, outputting the grid clustering result and clustering labels corresponding to each original data sample, and the grid clustering result is a multivariate normal working area.
2. The multivariable dynamic alarm threshold optimization design method according to claim 1, characterized in that, the step of dividing the original multivariate data into grids comprises: Obtain raw multivariate data ,in It is a column vector, representing the first... Historical data for each variable, totaling [number] One variable, namely 3D data; set the number of grid divisions to 1. Then the first The grid size for each variable is... : in, Indicates the first The maximum value of each variable. Indicates the first The minimum value of data for each variable.
3. The multivariable dynamic alarm threshold optimization design method according to claim 2, characterized in that, the step of dividing the original multivariate data into grids comprises: Obtain raw multivariate data ,in It is a row vector, representing the row vector. There are data samples, totaling There are data samples, totaling The variable; the first The first sample The data of each variable are represented as follows: The corresponding grid partitioning mapping code Represented as: in, , floor() means rounding to negative infinity.
4. The multivariable dynamic alarm threshold optimization design method according to claim 1, characterized in that, the step of extracting boundary grids of each cluster layer by layer as dynamic alarm threshold boundaries for the grid clustering result comprises: selecting, from the grid clustering result, grids with non-zero local density and being communicated with at least one grid with zero local density as boundary grids; The process is expanded from two variables to multiple variables, with the two-dimensional mesh boundaries extracted layer by layer until the boundary mesh of the multi-dimensional mesh cluster is obtained. .
5. The multivariable dynamic alarm threshold optimization design method according to claim 1, characterized in that, for the normal sample point in the new sample data, selecting the boundary value corresponding to the value of the point as the threshold; for the abnormal sample point in the new sample data, selecting the nearest boundary point as the corresponding point, and the step of taking the threshold corresponding to the corresponding point as the threshold corresponding to the abnormal sample point comprises: For new sample data Perform mesh mapping, where Represents the first of the new sample data j The values of each variable are: n The values of each variable are used to obtain the grid positions corresponding to the new sample data after grid mapping. ; in, , Represents the first of the new sample data j The grid positions of each variable; By querying the new sample grid position If the new sample point is within the normal working area obtained after grid clustering, it is considered a normal sample point and threshold extraction is performed directly. Otherwise, it is considered an outlier sample point, and the grid boundary point closest to the outlier sample point's grid location is selected as the corresponding grid point. : Where arg min represents the variable at its minimum value. The value at this point; Obtain the grid position of normal sample points Or the boundary grid location corresponding to the abnormal sample point Then, the grid threshold is obtained. : in, Indicates the number of new sample points The grid threshold for each variable, that is, when the grid cluster boundary... G e For the division variable j When the grid positions of all other variables are fixed, the variables j The range of values for the grid position; Grid threshold of the new sample points Inverse mapping to the actual threshold : in, , Indicates the actual threshold The j The actual threshold of each variable Indicates the first j The minimum value of data for each variable. I j Indicates the first j The grid size for each variable.
6. The multivariable dynamic alarm threshold optimization design method according to claim 5, characterized in that, After extracting the actual thresholds of all variables in the new sample data, the process also includes: processing the new sample data... and actual threshold Visualize it.
7. The multivariable dynamic alarm threshold optimization design method according to claim 6, characterized in that, the step of visualization comprises: adopting a parallel coordinate system, each coordinate system represents each dimension and represents each variable, and corresponding threshold values and sample point values are marked on each coordinate system.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the program, the steps of the multivariate dynamic alarm threshold optimization design method according to any one of claims 1-7 are implemented.