A stress curve clustering method for building fiber Bragg grating stress sensors
By adopting the inverse neighbor-based density estimation clustering algorithm in the processing of building stress sensor data, the problems of low efficiency and poor effect in processing large data sets and non-convex shape data are solved, and effective clustering of building stress data and support for building health analysis models are realized.
Patent Information
- Application Number
- CN202111573767.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-12-21
AI Technical Summary
Traditional clustering algorithms are inefficient and have poor results when processing building stress sensor data. Especially when processing large data sets and non-convex shape data, it is difficult to adapt and the parameter adjustment is difficult, resulting in the inability to effectively reflect the potential laws and changing characteristics of fiber stress data.
The density estimation clustering algorithm based on inverse neighbors is used to cluster the building stress sensor data, and the dimensionality reduction data is clustered through the density estimation clustering algorithm of inverse neighbors to obtain sensor groups with similar characteristics, and the clustering results are evaluated using the Calinski-Harabasz index.
This method can effectively cluster data of any shape, especially suitable for large data sets and non-convex shape data. The results are stable and easy to adjust parameters, which can better reflect the potential laws and changing characteristics of fiber stress data, and support the construction of a building health analysis model.
Smart Images

Figure CN114386485B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of building stress sensor data analysis, and in particular to a stress curve clustering method of a fiber grating stress sensor for building. Background Art
[0002] With the widespread application of fiber optic stress sensor monitoring systems in many fields such as national defense, railways, chemical industry, environment, nuclear power, bridge and tunnel monitoring, etc., obtaining building stress monitoring data through fiber optic stress sensors has become more real-time and accurate. At the same time, the fiber optic stress monitoring system will obtain more massive and accurate building stress data.
[0003] Since geological and environmental changes are a slow evolutionary process, it is not feasible to make safety judgments based on certain data alone. It is necessary to collect reliable data and analyze correct mathematical models over time to make highly reliable safety predictions. Therefore, in the face of huge building stress data, using existing data mining and analysis techniques, clustering analysis algorithms are used to analyze the rules and extract features of daily load data of building stress sensors, thereby constructing a mathematical analysis model to predict the overall health of the building, which is of great significance to building safety monitoring scenarios.
[0004] However, traditional clustering algorithms have low clustering efficiency and poor clustering effect. For example, the clustering effect of the K-means algorithm is heavily dependent on the selection of cluster centers. For data sets with large sample data volumes, clustering results often fall into local optimality due to inappropriate initial cluster centers or the influence of noise and boundary points, and cannot adapt to non-convex shape data. The K-means algorithm also needs to specify the number of clusters, and the DBSCAN algorithm needs to specify the scanning radius and the minimum number of included points for different data. Researchers need to test them one by one, and the adjustment of parameters is difficult, resulting in low clustering efficiency. As a result, it cannot well reflect the potential laws and change characteristics of optical fiber stress data, and cannot provide good support for the construction of mathematical analysis models for building health. Summary of the invention
[0005] In order to solve the technical problem that the traditional clustering algorithm has low clustering efficiency and poor clustering effect when used for building stress sensor data, the present invention provides a stress curve clustering method for a fiber Bragg grating stress sensor for building.
[0006] The technical solution of the present invention to solve the above technical problems is as follows:
[0007] A stress curve clustering method for a building fiber Bragg grating stress sensor comprises the following steps:
[0008] S1. Obtain daily load data of multiple building stress sensors;
[0009] S2, preprocessing the daily load data of each building stress sensor to obtain initial cluster data;
[0010] S3, performing dimensionality reduction processing on the initial cluster data to obtain dimensionality-reduced cluster data;
[0011] S4, clustering the dimension reduction cluster data based on the density estimation clustering algorithm based on the inverse nearest neighbor to obtain a sensor group with similar characteristics; the calculation method of the sample distance of the density estimation clustering algorithm based on the inverse nearest neighbor is a cosine similarity calculation method;
[0012] S5. Establishing a daily load clustering feature set of the sensor group based on the sensor group with similar characteristics;
[0013] S6. Establishing a full-year model analysis chain according to the daily load clustering feature set of the sensor group;
[0014] S7. Construct a building health analysis model based on the full-year model analysis chain.
[0015] The beneficial effects of the present invention are:
[0016] 1. The present invention adopts a density estimation clustering algorithm based on inverse nearest neighbor to cluster the building stress sensor data, which can cluster data of any shape, while traditional clustering algorithms such as K-Means are only applicable to convex data; at the same time, the density estimation clustering algorithm based on inverse nearest neighbor is insensitive to abnormal points in the data, and the algorithm results are stable, while the initial value has a great influence on the results of clustering algorithms such as traditional K-Means; and compared with traditional density-based clustering algorithms such as DBSCAN, the density estimation clustering algorithm based on inverse nearest neighbor has fewer input parameters, is easier to tune, and has better clustering effect on sample data with uneven spatial distribution density.
[0017] 2. The fiber Bragg grating sensor stress daily load sample data in the present invention has a large latitude. The fiber Bragg grating sensor stress data is subjected to dimensionality reduction processing, and the cosine similarity is used to calculate the sample distance to avoid the problem of sample space sparseness caused by excessive dimension of sample data, reduce the data processing workload in clustering, and improve clustering efficiency.
[0018] Based on the above technical solution, the present invention can also be improved as follows.
[0019] Furthermore, S1 also includes establishing multiple original sample sets, so that the multiple original sample sets correspond one-to-one to the multiple building stress sensors; wherein each of the original sample sets contains daily load data collected by the building stress sensor corresponding to the current original sample set at multiple time points within a day.
[0020] Furthermore, S2 specifically includes: performing data missing value processing on all the original sample sets to obtain multiple initial sample sets; performing data standardization processing and data regularization processing on all daily load data in each of the initial sample sets to obtain multiple initial daily load data.
[0021] Furthermore, the method for processing missing data values is specifically to delete the original sample set in which the effective daily load data accounts for less than 30%, and to complete the missing data of the original sample set in which the effective daily load data accounts for greater than or equal to 30%.
[0022] Furthermore, the method for data normalization processing is specifically to normalize the daily load data in each of the initial sample sets to a range of [-1, 1].
[0023] Furthermore, the method of data regularization processing is specifically as follows: after subtracting the average value of all daily load data in the initial sample set where the daily load data is located from each daily load data after data normalization processing, the average value is divided by the variance of all daily load data in the initial sample set where the daily load data is located.
[0024] Furthermore, the specific method of the dimensionality reduction processing is to use the principal component analysis method to reduce the dimension of the initial daily load data in each initial sample set to obtain multiple reduced dimension sample sets; wherein each of the reduced dimension sample sets contains multiple reduced dimension daily load data.
[0025] Furthermore, S4 specifically comprises: adopting a density estimation clustering algorithm based on inverse nearest neighbor to cluster the plurality of the reduced-dimensionality samples into multiple categories, and using the internal evaluation index of the cluster to evaluate the clustering result, selecting the result with the largest value of the internal evaluation index of the cluster to obtain a multi-category reduced-dimensionality sample set, thereby obtaining a multi-category sensor group with similar characteristics.
[0026] Furthermore, the density estimation clustering algorithm based on inverse nearest neighbor specifically includes the following steps:
[0027] S10, given the number of nearest neighbors k, given the sample point class label L, and the initial value of L is 1, select the unclustered reduced dimension sample set, and define the reduced dimension sample set as S, where the number of nearest neighbors k is a positive integer;
[0028] S20, defining the reduced dimension daily load data in the reduced dimension sample set S as sample si;
[0029] S30, calling the class identification iterative function CREATECLUSTER(S, si, k, L) for each sample si in the dimension reduction sample set S in turn, and forming a class set CL with the return values of calling the class identification iterative function CREATECLUSTER(S, si, k, L) for all samples si;
[0030] S40, judging whether the number of set elements of the class set CL is greater than k; if the number of set elements of the class set CL is greater than k, performing an assignment operation of L=L+1 on the sample point class label L of the sample si; if the number of set elements of the class set CL is less than or equal to k, deleting the sample si corresponding to the class label L;
[0031] S50, determining whether the complement of the reduced-dimensionality sample set S and the class set CL is an empty set; if the complement of the reduced-dimensionality sample set S and the class set CL is an empty set, obtaining a sensor group with similar features according to the reduced-dimensionality sample set S corresponding to each class set CL; if the complement of the reduced-dimensionality sample set S and the class set CL is not an empty set, repeating S20 to S50 until the complement of the reduced-dimensionality sample set S and the class set CL is an empty set;
[0032] S60: The algorithm ends.
[0033] Furthermore, the specific calculation formula of the internal evaluation index of the cluster is as follows:
[0034]
[0035] Among them, m represents the number of clusters, h represents the current class, trB(h) represents the trace of the inter-class difference matrix, trW(h) represents the trace of the intra-class difference matrix, and CH represents the internal evaluation index of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flowchart of the present invention;
[0037] Figure 2 It is a flowchart of clustering algorithm;
[0038] Figure 3 A flowchart of the iterative function for class identification. DETAILED DESCRIPTION
[0039] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0040] K-Meansk, or k-means clustering algorithm, is an iterative clustering analysis algorithm. Its steps are: divide the data into K groups in advance, randomly select K objects as the initial cluster centers, and then calculate the distance between each object and each seed cluster center, and assign each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster center of the cluster will be recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no or the minimum number of objects are reassigned to different clusters, no or the minimum number of cluster centers change again, and the sum of squared errors is locally minimized.
[0041] The full name of the DBSCAN algorithm is Density-Based Spatial Clustering of Applications with Noise. It is a density-based clustering algorithm. The so-called density means that the density of samples corresponds to their categories, and samples belonging to the same cluster are closely connected.
[0042] Example 1
[0043] like Figure 1 As shown, this embodiment provides a stress curve clustering method for a building fiber Bragg grating stress sensor, comprising the following steps:
[0044] S1. Obtain daily load data of multiple building stress sensors, establish P original sample sets, and let the P original sample sets correspond one-to-one to the multiple building stress sensors; wherein each of the original sample sets contains the daily load data collected by the building stress sensor corresponding to the current sample set at Q time points within a day, wherein P and Q are both positive integers.
[0045] S2. Preprocess the daily load data of each building stress sensor to obtain initial cluster data.
[0046] Specifically, data missing value processing is performed on all the original sample sets to obtain multiple initial sample sets; data standardization processing and data regularization processing are performed on all daily load data in each of the initial sample sets to obtain multiple initial daily load data; the data missing value processing method is specifically to delete the original sample sets whose effective daily load data accounts for less than 30%, and to complete the missing data of the original sample sets whose effective daily load data accounts for more than or equal to 30%. In the process of deleting samples, if n samples are deleted, p samples remain, wherein the number of remaining samples p is equal to the original sample number P minus the number of samples to be deleted n, that is, p = Pn, and n and p are both positive integers.
[0047] The data normalization method is specifically as follows: the data normalization processing method is specifically as follows: normalizing the daily load data in each of the initial sample sets to the range of [-1, 1], that is, converting the value of the original data in the original sample to the range of -1 to 1 using a linearization method, and the normalization calculation formula is:
[0048]
[0049] This method achieves proportional scaling of the original data, where X norm is the normalized data, and X is the original data.
[0050] The specific method of data regularization is to subtract the average value of all data in the initial sample set where the daily load data is located from each daily load data after data normalization, and then divide it by the variance of all data in the initial sample set where the daily load data is located. After standardization and regularization, the data of each attribute is clustered around 0, and the variance is 1, that is, the obtained sample data has zero mean and unit variance.
[0051] S3. Perform dimensionality reduction processing on the initial cluster data to obtain reduced-dimensionality cluster data; specifically, use the principal component analysis method to reduce the dimension of the initial daily load data in each initial sample set to obtain a reduced-dimensionality cluster R. During the dimensionality reduction process, if the number of reduced dimensions is q, then the reduced-dimensionality cluster R after dimensionality reduction is a data set matrix with p samples, each sample having q attributes.
[0052] S4. Clustering the dimension reduction cluster data based on an inverse nearest neighbor density estimation clustering algorithm to obtain a sensor group with similar characteristics.
[0053] S5. Establish a daily load clustering feature set of the sensor group based on the sensor group with similar characteristics.
[0054] S6. Establishing a full-year model analysis chain based on the daily load clustering feature set of the sensor group.
[0055] S7. Construct a building health analysis model based on the full-year model analysis chain.
[0056] S4 specifically adopts a clustering algorithm to cluster the data in the data set R to obtain a sensor group with similar features, which specifically includes: first, adopting an inverse nearest neighbor-based density estimation clustering algorithm to cluster the p samples in the data set into M categories, where M is a positive integer, and using the internal evaluation index of the clustering, namely the Calinski-Harabasz index, abbreviated as the CH index, to evaluate the clustering results, select the result with the largest CH value, and finally obtain a sensor group of M categories.
[0057] like Figure 2 As shown in the figure, in the clustering process, the specific process of density estimation clustering based on inverse nearest neighbor includes:
[0058] Calculation process definition: Given the number of nearest neighbors k, k is a positive integer, the distance between samples is calculated using cosine similarity:
[0059]
[0060] Assume that the sample set is S, the k nearest neighbor set of a sample point x in the set, that is, the set of k sample points closest to the sample point x, is expressed as:
[0061]
[0062] The k-inverse neighbor set of a sample point is expressed as:
[0063] RNN k (x) = {z∈S|x∈NN k (z)}
[0064] The k-nearest neighbor set of a sample point is expressed as:
[0065] MNN k (x) = NN k (x)∩RNN k (x)
[0066] The specific clustering algorithm steps are as follows:
[0067] S1, defining the dimension-reduced daily load data in the dimension-reduced sample set S as si;
[0068] S2. Call the class identification iterative function CREATECLUSTER(S, si, k, L) for each sample si in the dimension reduction sample set S in turn, and the return values of all samples si calling the class identification iterative function CREATECLUSTER(S, si, k, L) constitute the class set CL;
[0069] S3. Determine whether the number of set elements of the class set CL is greater than k; if the number of set elements of the class set CL is greater than k, set the class label of the sample point to L, and let L=L+1; if the number of set elements of the class set CL is less than or equal to k, set the class label of the sample point si to a noise point; then, set S equal to the complement of S and the class set CL.
[0070] S4, determine whether the complement set S is an empty set; if the complement set S is an empty set, obtain multiple clustered sample point sets CL, and obtain a sensor group with similar features based on the reduced dimensionality sample set corresponding to each sample point set CL; if the complement set S is not an empty set, repeat steps S2 to S4.
[0071] S5. The algorithm ends.
[0072] The specific calculation formula of the internal evaluation index of the cluster is as follows:
[0073]
[0074] Among them, m represents the number of clusters, h represents the current class, trB(h) represents the trace of the inter-class difference matrix, trW(h) represents the trace of the intra-class difference matrix, and CH represents the internal evaluation index of the cluster.
[0075] like Figure 3 As shown, in the function CREATECLUSTER(S,si,k,L), S represents the sample set, Si represents the starting sample point of class construction, K represents the number of nearest neighbors k, L represents the class label, and the return value is the clustering result set.
[0076] The specific steps are as follows:
[0077] S10, S defines an empty set C;
[0078] S20, judgment: if s i Mutual nearest neighbor set MNN k (s i ) If the number of elements is greater than 2k / 3, execute step S30, otherwise execute S40;
[0079] S30, extract MNN k (s i ) for each sample point v, judge: if the sample point v has not been set with a class label, execute: set the class label of the sample point v to L, let C = C∪{v}, let C = C∪CREATECLUSTER(S,v,k,L);
[0080] S40. Return to C and the function ends.
[0081] Example 2
[0082] In this embodiment, different data sets with classification labels are clustered using the inverse nearest neighbor-based density estimation clustering algorithm, namely the RNN-DBSCAN algorithm, the K-Means algorithm, and the DBSCAN algorithm. When the actual category information is unknown, the Calinski-Harabasz indicator, namely the CH indicator, is used to evaluate the clustering effect. For data sets with known classification labels, the clustering effect index can be evaluated using the Normalized Mutual Information and the Adjusted Mutual Information.
[0083] Assuming that U and V are the distribution of N sample labels, the entropy of the two distributions are: where P(i)=|U i | / N,P(j)=|U j | / N, the mutual information between U and V is defined as: where P(i,j)=|U i ∩U j | / N, then the standardized mutual information is: Adjust mutual information: The NMI value range is [0,1], and the AMI value range is [-1,1]. The larger the values, the better the clustering effect.
[0084] Table 1
[0085]
[0086]
[0087] Table 1 shows the NMI experimental results of clustering data sets with classification labels, where data sets P1 to P14 are data sets of different building fiber Bragg grating stress sensors. As shown in Table 1, under the standardized mutual information evaluation standard, the clustering effect of the RNN-DBSCAN clustering algorithm based on the inverse nearest neighbor density estimation clustering algorithm is better than the traditional K-Means clustering algorithm and the DBSCAN clustering algorithm applied to the stress data clustering analysis of the building fiber Bragg grating stress sensor.
[0088] Table 2
[0089]
[0090]
[0091] Table 2 shows the experimental results of clustering AMI of data sets with classification labels, where data sets P1 to P14 are data sets of different building fiber Bragg grating stress sensors. As shown in Table 2, under the adjustment of the mutual information evaluation standard, the clustering effect of the RNN-DBSCAN clustering algorithm based on the density estimation of the inverse nearest neighbor is better than the traditional K-Means clustering algorithm and the DBSCAN clustering algorithm applied to the stress data clustering analysis of the building fiber Bragg grating stress sensor.
[0092] Table 3
[0093]
[0094] Table 3 shows the comparative experimental results of the RNN-DBSCAN clustering algorithm, K-Means clustering algorithm and DBSCAN clustering algorithm based on the Calinski-Harabasz index. As shown in Table 3, after preprocessing the collected stress data of multiple fiber Bragg grating sensors, the clustering effect is compared with the K-Means and DBSCAN algorithms using the density estimation clustering algorithm based on inverse nearest neighbor. Among them, the clustering effect of RNN-DBSCAN is better than that of K-Means and DBSCAN, so it can cluster the stress data of fiber Bragg grating stress sensors with higher accuracy.
[0095] The present invention clusters the huge amount of stress data of fiber Bragg grating building stress sensors into sensor groups with similar characteristics; the building safety enterprise manager analyzes the clustered sensor groups to better predict the stress change trends of key structures of different types of buildings, construct a building health analysis model, and provide a more reliable method for smart building safety monitoring.
[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the concept and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A stress curve clustering method for a building fiber Bragg grating stress sensor, characterized in that: The following steps are included: S1. Obtain daily load data of multiple building stress sensors; S2, preprocessing the daily load data of each building stress sensor to obtain initial cluster data; S3, performing dimensionality reduction processing on the initial cluster data to obtain dimensionality-reduced cluster data; S4, clustering the dimension reduction cluster data based on an inverse nearest neighbor density estimation clustering algorithm to obtain a sensor group with similar characteristics; The sample distance calculation method of the density estimation clustering algorithm based on inverse nearest neighbor is a cosine similarity calculation method; S5. Establishing a daily load clustering feature set of the sensor group based on the sensor group with similar characteristics; S6. Establishing a full-year model analysis chain according to the daily load clustering feature set of the sensor group; S7. Construct a building health analysis model based on the full-year model analysis chain.
2. The stress curve clustering method of the building fiber Bragg grating stress sensor according to claim 1, characterized in that: The S1 also includes establishing multiple original sample sets, and making the multiple original sample sets correspond one-to-one to the multiple building stress sensors; wherein each of the original sample sets contains daily load data collected by the building stress sensor corresponding to the current original sample set at multiple time points within a day.
3. The stress curve clustering method of the building fiber Bragg grating stress sensor according to claim 2, characterized in that: Specifically, S2 is to perform data missing value processing on all the original sample sets to obtain multiple initial sample sets; perform data standardization processing and data regularization processing on all daily load data in each of the initial sample sets to obtain multiple initial daily load data.
4. The stress curve clustering method of the building fiber Bragg grating stress sensor according to claim 3, characterized in that: The method for processing missing data values is specifically to delete the original sample set in which the effective daily load data accounts for less than 30%, and to complete the missing data of the original sample set in which the effective daily load data accounts for greater than or equal to 30%.
5. The stress curve clustering method of the architectural fiber Bragg grating stress sensor according to claim 3, characterized in that: The method for data normalization processing is specifically to normalize the daily load data in each of the initial sample sets to a range of [-1, 1].
6. The stress curve clustering method of the building fiber Bragg grating stress sensor according to claim 3, characterized in that: The method of data regularization processing is specifically to subtract the average value of all daily load data in the initial sample set where the daily load data is located from each daily load data after data normalization processing, and then divide it by the variance of all daily load data in the initial sample set where the daily load data is located.
7. The stress curve clustering method of the building fiber Bragg grating stress sensor according to claim 3, characterized in that: The specific method of the dimensionality reduction processing is to use the principal component analysis method to reduce the dimension of the initial daily load data in each initial sample set to obtain multiple reduced dimension sample sets; wherein each of the reduced dimension sample sets contains multiple reduced dimension daily load data.
8. The stress curve clustering method of the architectural fiber Bragg grating stress sensor according to claim 7, characterized in that: Specifically, S4 is to cluster the plurality of dimension reduction samples into multiple categories using a density estimation clustering algorithm based on inverse nearest neighbor, evaluate the clustering results using the internal evaluation index of the cluster, select the result with the largest value of the internal evaluation index of the cluster, obtain a multi-category dimension reduction sample set, and thus obtain a multi-category sensor group with similar characteristics.
9. The stress curve clustering method of the architectural fiber Bragg grating stress sensor according to claim 8, characterized in that: The density estimation clustering algorithm based on inverse nearest neighbor specifically includes the following steps: S10, given the number of nearest neighbors k, given the sample point class label L, and the initial value of L is 1, select the unclustered reduced dimension sample set, and define the reduced dimension sample set as S, where the number of nearest neighbors k is a positive integer; S20, defining the reduced dimension daily load data in the reduced dimension sample set S as sample si; S30, calling the class identification iterative function CREATECLUSTER(S, si, k, L) for each sample si in the dimension reduction sample set S in turn, and forming a class set CL with the return values of calling the class identification iterative function CREATECLUSTER(S, si, k, L) for all samples si; S40, judging whether the number of set elements of the class set CL is greater than k; if the number of set elements of the class set CL is greater than k, performing an assignment operation of L=L+1 on the sample point class label L of the sample si; if the number of set elements of the class set CL is less than or equal to k, deleting the sample si corresponding to the class label L; S50, determining whether the complement of the reduced-dimensionality sample set S and the class set CL is an empty set; if the complement of the reduced-dimensionality sample set S and the class set CL is an empty set, obtaining a sensor group with similar features according to the reduced-dimensionality sample set S corresponding to each class set CL; if the complement of the reduced-dimensionality sample set S and the class set CL is not an empty set, repeating S20 to S50 until the complement of the reduced-dimensionality sample set S and the class set CL is an empty set; S60: The algorithm ends.
10. The stress curve clustering method of the architectural fiber Bragg grating stress sensor according to claim 8, characterized in that: The specific calculation formula of the internal evaluation index of the cluster is as follows: Among them, m represents the number of clusters, h represents the current class, trB(h) represents the trace of the inter-class difference matrix, trW(h) represents the trace of the intra-class difference matrix, and CH represents the internal evaluation index of the cluster.
Citation Information
Patent Citations
Novel power system load curve clustering method
CN106446967A
Building load forecasting method and device based on improved IHCMAC neural network
CN107704875A