A method, device, equipment, medium and program product for monitoring vibration type
Through dynamic clustering and label score calculation, the problem of insufficient efficiency and accuracy in the clustering process is solved, efficient and accurate vibration type monitoring is achieved, and the security monitoring level of optical fiber communication networks is significantly improved.
Patent Information
- Application Number
- CN202410742678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-11
AI Technical Summary
During the clustering process, the existing technology requires a large number of labeled samples, resulting in reduced efficiency and increased cost. At the same time, the accuracy of unsupervised learning methods is insufficient, making it difficult to ensure efficiency and accuracy at the same time.
By obtaining multiple signal vector samples and labels of some signals, dynamically cluster edge signal samples, calculate label scores, until all samples are classified into corresponding clusters, and use thresholds and clustering quality evaluation values to determine the optimal results, reducing the need for a large number of Reliance on label data improves clustering accuracy.
Significantly improves the accuracy and efficiency of vibration event recognition, reduces the dependence on a large amount of label data, avoids the problem of low recognition accuracy, achieves a balance between model recognition accuracy and alarm processing complexity, and improves the security monitoring of optical fiber communication networks level.
Smart Images

Figure CN118312891B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of clustering, and specifically to a method, device, equipment, medium and program product for vibration type monitoring. Background Art
[0002] In the related art, in the process of clustering data, machine learning or deep learning methods are usually used to cluster the acquired data to obtain clustering results. Among these machine learning and deep learning methods, they can be mainly divided into supervised learning represented by SVM, random forest, CNN, and LSTM, and unsupervised learning represented by KNN and DBSCAN. However, in the above-mentioned methods of clustering through supervised learning, a large number of labeled samples are usually required, which not only reduces the efficiency of clustering but also increases the cost of the labeling process. The method of clustering through unsupervised learning will reduce the accuracy of clustering.
[0003] Therefore, how to ensure efficiency while improving clustering accuracy during the clustering process becomes a problem that needs to be solved. Summary of the invention
[0004] Embodiments of the present application provide a method, apparatus, device, medium, and program product for monitoring vibration types. Through some embodiments of the present application, it is at least possible to ensure efficiency during clustering while improving clustering accuracy.
[0005] In a first aspect, the present application provides a method for monitoring vibration types, the method comprising: obtaining multiple signal vector samples and labels of partial signals, wherein the labels are used to indicate the vibration type; in the process of performing clustering operations on the multiple signal vector samples, re-clustering edge signal samples to clusters other than the current cluster until a unique clustering cluster is obtained, and recording the clustering process to obtain a set of clustering results, wherein the similarity between the edge signal samples and the current cluster is lower than a threshold λ; calculating the label score of each type of the label in the set of clustering results, and when the label score is lower than the score threshold, repeating the operation of calculating the label score until all samples are classified into corresponding clusters to obtain a vibration type classification result.
[0006] Therefore, the embodiment of the present application can improve the accuracy and efficiency of vibration event recognition by dynamically clustering edge signal samples during the clustering operation. By calculating the label score for each type of label through the labels of some signals, the propagation of vibration event labels can be achieved, which significantly reduces the dependence on a large amount of label data and avoids the problem of low recognition accuracy caused by insufficient samples.
[0007] In combination with the first aspect, in one embodiment of the present application, the threshold λ includes multiple candidate thresholds λ; in the process of clustering the multiple signal vector samples, the edge signal samples are re-clustered to other clusters except the current cluster until a unique cluster cluster is obtained, and the clustering process is recorded to obtain a set of clustering results, including: in the process of clustering the multiple signal vector samples, for the current m clusters, the similarity between any signal vector sample in each cluster and other signal vector samples is calculated, and the samples with similarity lower than the candidate threshold λ are used as the edge signal samples, wherein m is an integer greater than or equal to 1 and less than or equal to the number of vibration signals, and the m clusters are any results in the clustering operation process; the edge signal samples are re-clustered to other clusters except the current cluster to obtain m cluster clusters of the target; the clustering quality of the m cluster clusters of the target is calculated to obtain a cluster quality evaluation value corresponding to the current candidate threshold λ; the above steps are repeated to obtain cluster quality evaluation values corresponding to each candidate threshold λ, and the clustering result corresponding to the largest cluster quality evaluation value is used as the optimal result of the m clusters.
[0008] Therefore, the embodiment of the present application determines the optimal result of m clusters by trying different candidate thresholds λ, and can use the clustering result with relatively high accuracy to perform the subsequent label propagation process, thereby improving the accuracy of clustering.
[0009] In combination with the first aspect, in one implementation of the present application, the clustering quality evaluation value is characterized by a ratio between an average similarity within a cluster and an average similarity between clusters.
[0010] In combination with the first aspect, in one embodiment of the present application, the calculation of the label score of each category of the label in the set of clustering results includes: calculating the label score to be corrected for each category of the label in the cluster in the optimal result of the m clusters, and normalizing the label score to be corrected to obtain the label score.
[0011] Therefore, the embodiment of the present application performs a normalization operation on the obtained scores of the labels to be corrected, which can ensure the accuracy of the comparison of the scores of the labels of each category in the cluster.
[0012] In combination with the first aspect, in one embodiment of the present application, the calculating of the to-be-corrected label scores of each type of the labels in the cluster in the optimal results of the m clusters includes: calculating the average similarity between each labeled sample in the optimal results of the m clusters and all signal vector samples in the cluster, and summing the average similarities of samples with the same label to obtain the to-be-corrected label scores of each type of labels;
[0013] In combination with the first aspect, in one embodiment of the present application, when the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain a vibration type classification result, including: if the label scores of all classes in the cluster are less than the score threshold, there is no cluster label in the current cluster, and there are sample data in the current cluster that have been eliminated by other clusters with determined cluster labels, the label score is recalculated; when it is determined through the recalculated label score that one or more labeled sample data cannot be divided into any of the m clusters, it is determined that the label propagation operation of the clustering results corresponding to the m clusters has not reached a stable state; the optimal result of m+n clusters is obtained, and the above-mentioned step of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain the vibration type classification result, wherein n is an integer greater than or equal to 1.
[0014] In combination with the first aspect, in one embodiment of the present application, after calculating the label score of each type of the label in the set of clustering results, the method also includes: if there is a type of label in the cluster whose label score is greater than or equal to the score threshold, then the label is determined as the cluster label of the current cluster; searching for samples that are different from the cluster label classification, and reclassifying the samples by calculating the similarity between the samples and other clusters to obtain the vibration type classification result.
[0015] In combination with the first aspect, in one embodiment of the present application, the process of performing clustering operations on the multiple signal vector samples includes: taking each signal vector sample in the multiple signal vector samples as a cluster cluster, calculating the average inter-cluster similarity between the cluster clusters, and merging the clusters whose inter-cluster average similarity meets the threshold.
[0016] In combination with the first aspect, in one embodiment of the present application, the obtaining of multiple signal vector samples includes: obtaining vibration signals within a preset time period; calculating index characteristics of each vibration signal to obtain signal vector samples corresponding to each vibration signal.
[0017] In a second aspect, the present application provides a device for monitoring vibration types, the device comprising:
[0018] A sample acquisition module, configured to acquire a plurality of signal vector samples and labels of a portion of the signal, wherein the labels are used to indicate a vibration type;
[0019] A sample clustering module is configured to re-cluster edge signal samples to other clusters except the current cluster during the clustering operation on the plurality of signal vector samples until a unique cluster is obtained, and record the clustering process to obtain a set of clustering results, wherein the similarity between the edge signal samples and the current cluster is lower than a threshold λ;
[0020] The vibration type classification module is configured to calculate the label score of each type of the label in the set of clustering results. When the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain the vibration type classification result.
[0021] In combination with the second aspect, in one embodiment of the present application, the threshold λ includes multiple candidate thresholds λ; the sample clustering module is also configured to: in the process of clustering the multiple signal vector samples, for the current m clusters, calculate the similarity between any signal vector sample in each cluster and other signal vector samples, and take the sample with a similarity lower than the candidate threshold λ as the edge signal sample, wherein m is an integer greater than or equal to 1 and less than or equal to the number of vibration signals, and the m clusters are any results in the clustering operation process; re-cluster the edge signal samples to other clusters except the current cluster to obtain m clustering clusters of the target; calculate the clustering quality of the m clustering clusters of the target to obtain a clustering quality evaluation value corresponding to the current candidate threshold λ; repeat the above steps to obtain the clustering quality evaluation value corresponding to each candidate threshold λ, and take the clustering result corresponding to the largest clustering quality evaluation value as the optimal result of the m clusters.
[0022] In conjunction with the second aspect, in one implementation of the present application, the clustering quality evaluation value is characterized by a ratio between an average similarity within a cluster and an average similarity between clusters.
[0023] In combination with the second aspect, in one embodiment of the present application, the vibration type classification module is further configured to: calculate the label scores to be corrected for each type of the label within the cluster in the optimal results of the m clusters, and normalize the label scores to be corrected to obtain the label scores.
[0024] In conjunction with the second aspect, in one embodiment of the present application, the vibration type classification module is further configured to: calculate the average similarity between each labeled sample in the optimal results of the m clusters and all signal vector samples in the cluster, and add the average similarities of the samples with the same label to obtain the label scores to be corrected for each type of label;
[0025] In combination with the second aspect, in one embodiment of the present application, the vibration type classification module is further configured as follows: if the label scores of all classes in the cluster are less than the score threshold, there is no cluster label in the current cluster, and there are sample data in the current cluster that have been eliminated by other clusters with determined cluster labels, the label score is recalculated; if it is determined through the recalculated label score that one or more labeled sample data cannot be divided into any of the m clusters, then it is determined that the label propagation operation of the clustering results corresponding to the m clusters has not reached a stable state; the optimal result of m+n clusters is obtained, and the above steps of calculating the label scores are repeated until all samples are classified into the corresponding clusters to obtain the vibration type classification result, wherein n is an integer greater than or equal to 1.
[0026] In combination with the second aspect, in one embodiment of the present application, the vibration type classification module is further configured to: if there is a type of label in the cluster whose label score is greater than or equal to the score threshold, determine the label as the cluster label of the current cluster; search for samples that are different from the cluster label classification, and reclassify the samples by calculating the similarity between the samples and other clusters to obtain the vibration type classification result.
[0027] In combination with the second aspect, in one embodiment of the present application, the sample clustering module is further configured to: take each signal vector sample among the multiple signal vector samples as a cluster cluster, calculate the average inter-cluster similarity between the cluster clusters, and merge the clusters whose average inter-cluster similarity meets the threshold.
[0028] In combination with the second aspect, in one embodiment of the present application, the sample acquisition module is further configured to: acquire vibration signals within a preset time period; calculate index features of each vibration signal, and obtain signal vector samples corresponding to each vibration signal.
[0029] In a third aspect, the present application provides an electronic device comprising: a processor, a memory and a bus; the processor is connected to the memory via the bus, the memory stores a computer program, and when the computer program is executed by the processor, it can implement the method described in any embodiment of the first aspect.
[0030] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can implement the method described in any embodiment of the first aspect.
[0031] In a fifth aspect, the present application provides a computer program product, comprising a computer program / instructions, characterized in that when the computer program / instructions are executed, the method described in any embodiment of the first aspect can be implemented.
[0032] Therefore, the beneficial effects of this application include: using advanced clustering technology and flexible sample similarity analysis, compared with traditional supervised learning, it reduces the reliance on a large amount of labeled data, thereby saving a lot of manpower costs caused by manual labels. And the label score TS value is applied to carry out label propagation to achieve a balance between model recognition accuracy and alarm processing complexity. Furthermore, when applied to the scenario of optical fiber vibration event clustering, it can timely identify and warn possible third-party intrusion events, significantly improving the security monitoring level of optical fiber communication networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a scene composition of a vibration type monitoring shown in an embodiment of the present application;
[0034] Figure 2 One of the flow charts of a method for monitoring vibration types shown in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of a vibration type monitoring device shown in an embodiment of the present application;
[0036] Figure 4 A schematic diagram of the composition of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0038] The embodiments of the present application can be applied to the scenario of monitoring the vibration type of the optical fiber. Specifically, the corresponding vibration signal when a vibration event occurs in the optical fiber is collected, and the vibration signal is clustered to obtain a vibration type classification result, so as to timely discover third-party intrusion events in the environment where the optical fiber is located through the vibration type classification result.
[0039] Among related technologies, optical fiber is the main medium for data transmission and its application scope is becoming increasingly wide. The popularity and extended service life of optical fiber make it essential to monitor and evaluate its health status. Ensuring the good operation of optical fiber is not only the key to maintaining data transmission efficiency, but also a necessary measure to prevent communication failures and data loss. Some human damage or bad construction behavior are very likely to affect the normal operation of optical fiber. Therefore, it is extremely necessary to promptly detect third-party intrusion incidents in the environment where the optical fiber is located.
[0040] In the existing technology, the detection of third-party intrusion events mainly relies on vibration source detection. One of the main directions is to use the sensor data of phase-sensitive optical time domain reflectometer (Φ-OTDR) and use different machine learning and deep learning methods to identify patterns in the sensor data, so as to find dangerous vibration events, identify them as third-party intrusion events and issue warnings. However, machine learning and deep learning methods require a large number of sample annotations, which not only reduces the efficiency of clustering but also increases the cost of the annotation process.
[0041] Therefore, the present application provides a vibration type monitoring method to solve the above problems.
[0042] The method steps in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0043] Figure 1 A schematic diagram of a scene composition of vibration type monitoring in some embodiments of the present application is provided, and the scene includes: a sensor 110, an optical fiber vibration signal acquisition device 120, and a processor 130. Specifically, the optical fiber vibration signal acquisition device 120 acquires the corresponding vibration signal when a vibration event occurs in the optical fiber through the sensor 110, and then transmits the vibration signal to the processor 130, and the processor 130 performs a clustering operation according to the received vibration signal to obtain a vibration type classification result.
[0044] The following uses a processor as an example to exemplify a method for monitoring a vibration type provided by some embodiments of the present application. It is understandable that the execution subject of the present application can be any electronic device capable of executing a method for monitoring a vibration type, and the above processor is only an example, and the present application does not limit this. The processor can be placed in the same device as the optical fiber, or it can be a separate server, and the present application does not limit this.
[0045] At least to solve the problems in the background technology, such as Figure 2 As shown, some embodiments of the present application provide a method for monitoring vibration types, the method comprising:
[0046] S210, obtaining multiple signal vector samples and labels of partial signals.
[0047] It should be noted that labels are used to indicate vibration types. Vibration types include: environmental noise, roller rolling, mechanical excavation, manual excavation, vehicle passing, etc. Among them, from the perspective of protecting the optical cable from external force damage, some labels are dangerous, such as: mechanical excavation, manual excavation. For some special optical cable laying methods, such as underground burial, roller rolling is also dangerous. However, labels such as environmental noise and vehicle passing are safe. For dangerous vibration types, it is necessary to determine the classification before issuing an alarm, and for safe vibration types, no alarm will be issued after the classification is determined.
[0048] It can be understood that the label of some signals means that a small number of vibration signals with labels are placed in the collected vibration signals for subsequent clustering operations. For example, 500 vibration signals with labels are placed in 10,000 collected vibration signals.
[0049] In one embodiment of the present application, the specific steps of obtaining multiple signal vector samples include: first, obtaining vibration signals within a preset time period, and then calculating the index characteristics of each vibration signal to obtain signal vector samples corresponding to each vibration signal.
[0050] It is understandable that the preset time period can be set according to actual circumstances, for example, it can be 100 milliseconds or 500 milliseconds, and this application does not limit this.
[0051] Specifically, feature extraction is performed on the vibration signal, and at least one corresponding signal vector sample is formed by finding appropriate indicator features, wherein one vibration signal corresponds to at least one signal vector sample, and at least one signal vector sample includes at least one of the peak value, minimum value, peak-to-peak value, energy, average value, average rectified value, root mean square, variance, kurtosis, skewness, clarity factor, shape factor, peak factor and impact factor of the vibration signal. In other words, each vibration signal is converted into a vector composed of indicator features, which reflect the main characteristics of the vibration signal. The calculation method and meaning of the indicator features are shown in Table 1 below:
[0052] Table 1 Index characteristics table
[0053]
[0054] Where X represents the vibration signal, Represents any vibration signal sample, n represents the number of vibration signal samples, RMS represents the average power, var represents the variance of the vibration signal, and PK represents the maximum amplitude of the signal.
[0055] S220, in the process of clustering the plurality of signal vector samples, re-clustering the edge signal samples into other clusters except the current cluster until a unique cluster is obtained, and recording the clustering process to obtain a set of clustering results.
[0056] In one embodiment of the present application, the process of clustering multiple signal vector samples is as follows: in the first clustering process, each signal vector sample is taken as a cluster cluster, and the average inter-cluster similarity between the cluster clusters is calculated. Then, in the subsequent clustering process, the clusters in the clustering results obtained after the last clustering are merged again.
[0057] Specifically, the similarity between signal vector samples is usually measured by calculating the cosine similarity between them. For the vectors of two signal vector samples d and d' and , the cosine similarity between them is defined as:
[0058] ,
[0059] in, represents the dot product of vectors, represents the norm of a signal vector sample, Represents the norm of the samples of another signal vector. Represents the cosine similarity value of two signal vector samples.
[0060] The cosine similarity value reflects the similarity between two signal vector samples. The higher the value, the higher the similarity. The similarity calculation results between all sample pairs form a similarity matrix, which is an n*n matrix, where n represents the total number of signal vector samples and each element in the matrix represents the similarity between a pair of samples.
[0061] After that, the signal vector samples with high similarity are aggregated together to form clusters. At the beginning of clustering, each signal sample is regarded as an independent cluster. Then, the algorithm selects two clusters with the highest similarity to merge according to the average similarity between clusters in each step, that is, it is obtained by calculating the average similarity between all signal vector sample pairs in the cluster. Specifically, if there are two clusters A and B, the formula for calculating the average similarity between them is as follows:
[0062]
[0063] in, represents any signal vector sample in cluster A, represents any signal vector sample in cluster B, represents the number of signal vector samples in cluster A, represents the number of signal vector samples in cluster B, express and The cosine similarity value between It represents the average similarity between cluster A and cluster B.
[0064] As a result, similar signal vector samples will gradually be merged together to form larger clusters.
[0065] Furthermore, in the process of cluster merging, edge signal samples with low similarity to other signal vector samples in the cluster will appear. In this application, in order to prevent these edge signal samples from being misclassified into inappropriate clusters, after the two clusters are merged, the average similarity between all signal vector samples in the newly formed cluster and other signal vector samples in the cluster is checked. For signal samples with average similarity lower than the threshold λ, they are marked as edge signal samples, and the edge signal samples are continuously reallocated to other clusters. In other words, the similarity between the edge signal sample and the current cluster is lower than the threshold λ.
[0066] Specifically, in order to ensure the quality of clustering, multiple candidate thresholds λ are set in the present application. Taking the current clustering as m clusters as an example, the clustering process in the present application and the process of obtaining the clustering results are exemplarily described. It can be understood that the value range of m is: an integer greater than or equal to 1 and less than or equal to the number of vibration signals (for example, the number of vibration signals is 100, then the value range of m is: 1≤m≤100), and the m clusters are any results in the clustering operation process.
[0067] S2201: For the current m clusters, calculate the similarity between any signal vector sample in each cluster and other signal vector samples, and take samples with similarity lower than the candidate threshold λ as edge signal samples.
[0068] That is to say, each of the current m clusters may have edge signal samples, so the similarity between all signal vector samples in each cluster and other signal vector samples in this cluster is calculated, and samples with similarity lower than the candidate threshold λ are found as edge signal samples.
[0069] It should be noted that different candidate thresholds λ are used, and the edge signal samples obtained are also different. In this S220 step, the present application tries each of the multiple candidate thresholds λ to obtain different clustering results, and then takes the result with the highest clustering quality as the optimal result of the m clusters.
[0070] S2202: Re-cluster the edge signal samples into clusters other than the current cluster to obtain m target clusters.
[0071] Recalculate the average inter-cluster similarity between these edge signal samples and all existing clusters (including newly formed clusters and previous clusters), and assign the edge signal samples to the cluster with the highest average similarity to obtain the target m clusters. In other words, the attribution of edge signal samples is determined based on the status of all current clusters, ensuring that edge signal samples can be assigned to the cluster that best suits them, which helps improve the accuracy of clustering and ensures that the signal samples in each cluster have high cohesion.
[0072] S2203: Calculate the clustering qualities of the target m clusters, and obtain a clustering quality evaluation value corresponding to the current candidate threshold λ.
[0073] Specifically, this application uses the Clustering Score (CS) value to measure the quality of clustering, that is, the clustering quality evaluation value. The clustering quality evaluation value is characterized by the ratio between the average similarity within the cluster and the average similarity between clusters. The larger the clustering quality evaluation value, the higher the clustering degree. The formula for calculating the clustering quality evaluation value is as follows:
[0074]
[0075] Among them, CS represents the clustering quality evaluation value, represents a cluster, K represents The number of samples in this cluster, is the cluster center vector of the cluster, represents any signal vector sample in the cluster, Represents the similarity between any signal vector sample and the cluster center vector, represents the sum of the average similarities within all clusters in the m clusters, Indicates that among the m clusters, except The cluster centroid vectors of other clusters outside this cluster are express The similarity between the cluster centroid vectors of this cluster and all other clusters, express The maximum similarity between this cluster and the cluster center vectors of all other clusters is Represents the sum of the corresponding maximum values of all clusters in the m clusters.
[0076] For example, m=4, then,
[0077]
[0078] That is, the sum of the average similarities within the four clusters divided by the sum of the maximum similarities between the four clusters. The meaning of CS represents that the greater the similarity of samples within a cluster, the better, and the smaller the similarity between clusters, the better. This clustering result is the most compact and symmetrical.
[0079] Repeat the above S2201-S2203 to obtain clustering quality evaluation values corresponding to each candidate threshold λ, and take the clustering result corresponding to the maximum clustering quality evaluation value as the optimal result of the m clusters.
[0080] Specifically, different candidate thresholds λ are used to calculate clustering quality evaluation values in m clusters, and clustering quality evaluation values corresponding to different candidate thresholds λ are obtained. The clustering result corresponding to the largest clustering quality evaluation value is selected, and then the optimal result of m clusters is obtained.
[0081] For example, multiple candidate thresholds λ include 0.1, 0.2, 0.3 and 0.4, and the clustering quality evaluation values corresponding to different candidate thresholds λ are 10, 50, 80 and 60 respectively. The clustering result A of m cluster clusters corresponds to a candidate threshold λ of 0.1, and the corresponding clustering quality evaluation value is 10. The clustering result B of m cluster clusters corresponds to a candidate threshold λ of 0.2, and the corresponding clustering quality evaluation value is 50. The clustering result C of m cluster clusters corresponds to a candidate threshold λ of 0.3, and the corresponding clustering quality evaluation value is 80. The clustering result D of m cluster clusters corresponds to a candidate threshold λ of 0.4, and the corresponding clustering quality evaluation value is 60. Then, the clustering result C of m cluster clusters corresponding to the largest clustering quality evaluation value of 80 is selected as the optimal result of m clusters.
[0082] That is to say, by trying different 𝜆 values and calculating the corresponding CS values, we can select the 𝜆 value that maximizes the CS value and the corresponding optimal result, which means that this 𝜆 value can produce the most compact and symmetrical clustering result, thereby optimizing the clustering process.
[0083] It should be noted here that since the clustering process is ongoing, the number of clusters will gradually decrease until m=1, when a large cluster containing all signal vector samples is formed. The clustering process stops here, and the clustering results of each step are recorded to form a hierarchical clustering structure. For example, the number of vibration signals is 100, and the hierarchical clustering structure includes the optimal results of 1 cluster, 2 clusters, 3 clusters, 4 clusters… the optimal results of 100 clusters, and the above m clusters are any one of them. The process of calculating each optimal result is the same as above.
[0084] Therefore, the hierarchical clustering method can not only gradually aggregate similar signal samples together, but also dynamically adjust the number of clusters according to the actual clustering situation to achieve compatibility with different environments.
[0085] S230, calculating the label score of each type of label in a set of clustering results. When the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain a vibration type classification result.
[0086] After the clusters are identified and constructed and the hierarchical cluster structure is obtained, the propagation of signal labels begins. In this stage, a signal label is assigned to each cluster as the representative of the cluster, i.e., the cluster label. The principle of selecting cluster labels is that similar samples have the same label.
[0087] S2301, calculating the label scores to be corrected for each type of label in the cluster in the optimal results of the m clusters, and normalizing the label scores to be corrected to obtain label scores.
[0088] Specifically, the average similarity between each labeled sample in the optimal results of the m clusters and all signal vector samples in the cluster is calculated, and the average similarities of samples with the same label are summed to obtain the label scores to be corrected for each type of label.
[0089] For the labels in each cluster C among the m clusters, calculate the tag score TS (Tag Score) of each type of label in the cluster to be corrected as a percentage of the total number of labels. The formula is as follows:
[0090]
[0091] Among them, TS represents any cluster among m clusters (for example, the current cluster is ) is the score of the label to be corrected for each type of label, T represents any type of label, Indicates the current Any sample with label T in the cluster, Indicates the current Any sample in the cluster except the sample with label T, express and The similarity between Indicates the current The sum of the similarities between all samples without label T in the cluster and a sample with label T, divided by |K|, represents the average similarity of the sample with label T, that is, the position of the sample with label T in this cluster (that is, the average similarity), which is equivalent to the weighted distance. K represents the current The number of samples in a cluster, It represents the sum of the average similarities of all samples with the same label.
[0092] That is, the above S2301 is equivalent to the weighting of distance. The closer the label is to the center, the greater its weight is. The importance of the data on the edge is reduced, which can achieve a trade-off between representativeness and quantity and prevent a cluster from being occupied by a relatively large number of marginalized label samples.
[0093] Then, the TS values of all labels in the cluster are normalized so that their sum is 100%. The normalization of the TS values can adapt the score threshold so that the same threshold can be used in clusters of different densities.
[0094] S2302: After obtaining the label scores of the optimal results of the m clusters, the label score of each cluster is compared with the score threshold to determine whether the cluster can be labeled.
[0095] It can be understood that the present application can start from m=2 and perform calculations in the following steps from the optimal results of 2 clusters until all samples are classified into corresponding clusters to obtain vibration type classification results.
[0096] If the label score of a certain type of label in the cluster is greater than the score threshold, this label is defined as the cluster label of the cluster, and other unlabeled samples in this cluster are marked with this label.
[0097] If the scores of all class labels of the cluster are less than the score threshold, it is considered that the cluster cannot be labeled with a certain class, that is, the cluster has no cluster label.
[0098] Further, the following situations are included:
[0099] In the first case, if there is a class of labels in the cluster whose label score is greater than or equal to the score threshold, the label is determined as the cluster label of the current cluster.
[0100] Then, find samples that are different from the cluster label classification, reclassify them by calculating the similarity between the sample and other clusters, and obtain the vibration type classification result.
[0101] For example, suppose the number of samples is 10,000, some of which are labeled with three categories: A, B, and C. The optimal result of the current m clusters is the optimal result of 4 clusters.
[0102] For those clusters with cluster labels, separate the samples whose sample labels are different from the cluster labels. For example, if the cluster label of cluster 1 is A, the cluster label of cluster 2 is B, the cluster label of cluster 3 is B, and cluster 4 has no cluster label, then the samples with labels B or C in cluster 1 and the samples with labels A or C in clusters 2 and 3 need to be separated.
[0103] For samples with label A, they can be placed in cluster 1 or cluster 4, and the similarity with cluster 1 and cluster 4 is calculated, and then placed in the cluster with the greatest similarity.
[0104] Samples corresponding to the B label can be placed in cluster 2, cluster 3, or cluster 4, and the similarity with cluster 2, cluster 3, and cluster 4 is calculated, and then placed in the cluster with the greatest similarity.
[0105] For samples with label C, they are directly placed in cluster 4 to obtain the final vibration type classification results.
[0106] In the second case, when the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain the vibration type classification result.
[0107] Specifically, first, if the label scores of all classes in the cluster are less than the score threshold, the current cluster does not have a cluster label, and there are sample data in the current cluster that have been removed from other clusters with determined cluster labels, the label scores are recalculated.
[0108] In other words, two conditions need to be met at the same time to recalculate the label score. The first condition is that the label scores of all classes in the cluster are less than the score threshold, and it is determined that there is no cluster label in the current cluster. The second condition is that the cluster that already has a cluster label will remove the sample data that does not belong to the cluster label, and these sample data are assigned to the current cluster.
[0109] Then, by recalculating the label scores, it is determined that one or more labeled sample data cannot be divided into any of the m clusters, and it is determined that the label propagation operation of the clustering results corresponding to the m clusters has not reached a stable state.
[0110] Finally, it is necessary to continue to obtain the optimal results of m+n clusters and repeat the above steps of calculating label scores until all samples are classified into corresponding clusters to obtain vibration type classification results, where n is an integer greater than or equal to 1.
[0111] It can be understood that the label propagation operation is the process of labeling each cluster and each sample data in each cluster by calculating the label score.
[0112] For example, if after recalculating the label score, cluster 4 is labeled with A or B, then cluster 1 is labeled with A, cluster 2 is labeled with B, cluster 3 is labeled with B, and cluster 4 is labeled with A or B, then the C-labeled sample cannot be divided into a certain cluster, which means that the label propagation has not achieved a stable result. In this case, the number of clusters needs to be increased (for example, when n is 1, the optimal result of m+1 clusters is used to continue the label score calculation), the corresponding clustering result is found, and the label propagation is repeated.
[0113] If cluster 4 is labeled with C, the A or B label samples in cluster 4 are reassigned to other clusters respectively. At this time, all samples are classified into the corresponding clusters, the clustering is stable, and the vibration type classification result is obtained.
[0114] Finally, check the vibration type classification results of this event. If it belongs to the label cluster and the label is a safety category (for example, the safety category can include classification results: environmental noise, vehicle passing, etc.), no alarm is issued; if it belongs to the label cluster and the label is a danger category (for example, the danger category can include classification results: roller rolling, mechanical excavation, manual excavation, etc.), an alarm is issued. If it belongs to the unlabeled cluster, an alarm is issued and it is prompted as a fuzzy event. According to the feedback of the event processing results, a label is assigned to this event and stored in the database.
[0115] It is understandable that the preset thresholds should be different in different regions due to their different environments and the different numbers of event categories they face.
[0116] Therefore, the present application is based on the fiber optic vibration event recognition method, which aims to effectively process and analyze a large amount of vibration data through the concept of representative sets, so as to improve the accuracy and efficiency of vibration event recognition. Special consideration is given to the complexity and diversity of edge samples. Traditional clustering-based vibration detection technology often ignores the processing of edge samples, and amplifies the harm caused by this uncertainty in iteration. Through the clustering operation of the present application, it is possible to select appropriate clustering clusters for vibration events in different environments, thereby improving the accuracy of alarms, especially showing its advantages when dealing with multi-category complex vibration events. At the same time, by labeling the alarm events in the unlabeled clusters according to the feedback of the event processing results, the category distribution in a specific environment can be continuously learned. This allows for continuous self-optimization and continuous improvement of future alarm accuracy.
[0117] In summary, the present application utilizes the method of dynamic reconstruction of clusters, which can not only process and analyze a large amount of vibration data, but also effectively improve the accuracy and efficiency of vibration event recognition through the back-off strategy for edge samples. Through in-depth analysis of Φ-OTDR sensing data, the optical fiber vibration data samples are dynamically clustered using advanced clustering technology, and the samples marked as specific vibration events in the clusters are weighted and scored within the clusters. According to the label characteristics of the clusters, the samples that do not belong to the clusters are clustered again, thereby realizing the propagation of vibration event labels. This method significantly reduces the dependence on a large amount of label data and avoids the problem of low recognition accuracy caused by insufficient samples in traditional methods.
[0118] A notable feature of this application is its flexibility and adaptability. It can dynamically adjust the level of clustering according to the actual situation of the vibration event, so that the model can not only capture the regular vibration mode, but also keenly identify abnormal or rare vibration events, greatly improving the early warning capability of third-party intrusion events. In addition, this application takes into account the spatiotemporal characteristics of vibration events, and can more accurately classify and identify vibration events based on the time and geographic location information of the event, further enhancing the accuracy and practicality of identification.
[0119] During the application process, this application automatically identifies and classifies the nature of the current vibration event by analyzing the similarity between the vibration event and the known third-party intrusion pattern. It is not only applicable to static data analysis, but also to real-time monitoring systems. It can timely detect and warn of possible third-party intrusion events, providing an efficient and reliable technical means for the security protection of fiber-optic communication networks. By implementing this application, the security monitoring level of the fiber-optic communication network can be significantly improved, effectively preventing communication failures caused by third-party intrusions, and ensuring the stability and reliability of data transmission.
[0120] A specific implementation of a method for monitoring vibration types is described above, and a device for monitoring vibration types will be described below.
[0121] like Figure 3 As shown, some embodiments of the present application provide a vibration type monitoring device 300 , which includes: a sample acquisition module 310 , a sample clustering module 320 and a vibration type classification module 330 .
[0122] The sample acquisition module 310 is configured to acquire a plurality of signal vector samples and labels of a portion of the signal, wherein the labels are used to indicate the vibration type;
[0123] The sample clustering module 320 is configured to re-cluster the edge signal samples into other clusters except the current cluster during the clustering operation on the plurality of signal vector samples until a unique cluster is obtained, and record the clustering process to obtain a set of clustering results, wherein the similarity between the edge signal samples and the current cluster is lower than a threshold λ;
[0124] The vibration type classification module 330 is configured to calculate the label score of each type of the label in the set of clustering results. When the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain the vibration type classification result.
[0125] In one embodiment of the present application, the threshold λ includes multiple candidate thresholds λ; the sample clustering module is also configured to: in the process of clustering the multiple signal vector samples, for the current m clusters, calculate the similarity between any signal vector sample in each cluster and other signal vector samples, and use the sample with a similarity lower than the candidate threshold λ as the edge signal sample, wherein m is an integer greater than or equal to 1 and less than or equal to the number of vibration signals, and the m clusters are any results in the clustering operation process; re-cluster the edge signal samples to other clusters except the current cluster to obtain m clustering clusters of the target; calculate the clustering quality of the m clustering clusters of the target to obtain a clustering quality evaluation value corresponding to the current candidate threshold λ; repeat the above steps to obtain the clustering quality evaluation value corresponding to each candidate threshold λ, and use the clustering result corresponding to the largest clustering quality evaluation value as the optimal result of the m clusters.
[0126] In one embodiment of the present application, the clustering quality evaluation value is characterized by the ratio between the average similarity within a cluster and the average similarity between clusters.
[0127] In one embodiment of the present application, the vibration type classification module is further configured to: calculate the label scores to be corrected for each type of the label within the cluster in the optimal results of the m clusters, and normalize the label scores to be corrected to obtain the label scores.
[0128] In one embodiment of the present application, the vibration type classification module is further configured to: calculate the average similarity between each labeled sample in the optimal results of the m clusters and all signal vector samples in the cluster, and add the average similarities of samples with the same label to obtain the label scores to be corrected for each type of label;
[0129] In one embodiment of the present application, the vibration type classification module is further configured as follows: if the label scores of all classes in the cluster are less than the score threshold, there is no cluster label in the current cluster, and there are sample data in the current cluster that have been eliminated by other clusters with determined cluster labels, the label score is recalculated; if it is determined through the recalculated label score that one or more labeled sample data cannot be divided into any of the m clusters, then it is determined that the label propagation operation of the clustering results corresponding to the m clusters has not reached a stable state; the optimal result of m+n clusters is obtained, and the above steps of calculating the label scores are repeated until all samples are classified into the corresponding clusters to obtain the vibration type classification result, wherein n is an integer greater than or equal to 1.
[0130] In one embodiment of the present application, the vibration type classification module is further configured to: if there is a type of label in the cluster whose label score is greater than or equal to the score threshold, determine the label as the cluster label of the current cluster; search for samples with different classifications from the cluster label, and reclassify the samples by calculating the similarity between the samples and other clusters to obtain the vibration type classification result.
[0131] In one embodiment of the present application, the sample clustering module is further configured to: take each signal vector sample in the multiple signal vector samples as a cluster, calculate the average inter-cluster similarity between the clusters, and merge the clusters whose average inter-cluster similarity meets the threshold.
[0132] In one embodiment of the present application, the sample acquisition module is further configured to: acquire vibration signals within a preset time period; calculate index features of each vibration signal, and obtain signal vector samples corresponding to each vibration signal.
[0133] In the embodiments of the present application, Figure 3 The modules shown can achieve Figure 1 , Figure 2 Each process in the method embodiment. Figure 3 The operations and / or functions of each module in Figure 1 , Figure 2 For details, please refer to the description in the above method embodiment. To avoid repetition, detailed description is appropriately omitted here.
[0134] like Figure 4 As shown, an embodiment of the present application provides an electronic device 400, including: a processor 410, a memory 420 and a bus 430, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement a method as described in any one of the above embodiments. For details, please refer to the description in the above method embodiments. To avoid repetition, the detailed description is appropriately omitted here.
[0135] Among them, the bus is used to realize the direct connection and communication of these components. Among them, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0136] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described in the above embodiment may be executed.
[0137] Understandably, Figure 4 The structure shown is for illustration only and may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0138] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a server, any method described in any of the above-mentioned embodiments is implemented. For details, please refer to the description in the above-mentioned method embodiments. To avoid repetition, the detailed description is appropriately omitted here.
[0139] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0140] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for monitoring vibration types, characterized in that: The method comprises: Acquire a plurality of signal vector samples and labels of a portion of the signal, wherein the labels are used to indicate a vibration type; In the process of clustering the plurality of signal vector samples, re-clustering the edge signal samples to other clusters except the current cluster until a unique cluster is obtained, and recording the clustering process to obtain a set of clustering results, wherein the similarity between the edge signal samples and the current cluster is lower than a threshold λ; Calculating the label score of each type of the label in the set of clustering results, and when the label score is lower than the score threshold, repeatedly calculating the label score until all samples are classified into corresponding clusters, thereby obtaining a vibration type classification result; The threshold λ includes a plurality of candidate thresholds λ; In the process of performing clustering operation on the plurality of signal vector samples, the edge signal samples are re-clustered into other clusters except the current cluster until a unique cluster is obtained, and the clustering process is recorded to obtain a set of clustering results, including: In the process of performing clustering operation on the multiple signal vector samples, for the current m clusters, the similarity between any signal vector sample in each cluster and other signal vector samples is calculated, and the samples with similarity lower than the candidate threshold λ are taken as the edge signal samples, wherein m is an integer greater than or equal to 1 and less than or equal to the number of vibration signals, and the m clusters are any results in the clustering operation process; Re-clustering the edge signal samples into other clusters except the current cluster to obtain m target clusters; Calculating the clustering quality of the m clusters of the target to obtain a clustering quality evaluation value corresponding to the current candidate threshold λ; Repeat the above steps to obtain clustering quality evaluation values corresponding to each candidate threshold λ, and take the clustering result corresponding to the maximum clustering quality evaluation value as the optimal result of the m clusters.
2. The method according to claim 1, characterized in that The clustering quality evaluation value is characterized by the ratio between the average similarity within a cluster and the average similarity between clusters.
3. The method according to claim 1, characterized in that: The calculating the label score of each type of the label in the set of clustering results includes: The label scores to be corrected of each type of the labels in the cluster in the optimal results of the m clusters are calculated, and the label scores to be corrected are normalized to obtain the label scores.
4. The method according to claim 3, characterized in that The step of calculating the score of the to-be-corrected label of each type of the label in the cluster in the optimal result of the m clusters comprises: The average similarity between each labeled sample in the optimal results of the m clusters and all signal vector samples in the cluster is calculated, and the average similarities of samples with the same label are summed to obtain the label scores to be corrected for each type of label.
5. The method according to any one of claims 1 to 4, characterized in that: After calculating the label score of each type of the label in the set of clustering results, the method further includes: If there is a type of label in the cluster whose label score is greater than or equal to the score threshold, the label is determined as the cluster label of the current cluster; Find samples that are different from the cluster label classification, and reclassify them by calculating the similarity between the samples and other clusters to obtain the vibration type classification result.
6. The method according to any one of claims 1 to 4, characterized in that: When the label score is lower than the score threshold, the operation of calculating the label score is repeated until all samples are classified into corresponding clusters to obtain a vibration type classification result, including: If the label scores of all classes in the cluster are less than the score threshold, the current cluster does not have a cluster label, and there are sample data in the current cluster that have been removed from other clusters with determined cluster labels, the label scores are recalculated; If it is determined through the recalculated label scores that one or more sample data with labels cannot be classified into any of the m clusters, it is determined that the label propagation operation of the clustering results corresponding to the m clusters has not reached a stable state; The optimal results of m+n clusters are obtained, and the above steps of calculating label scores are repeated until all samples are classified into corresponding clusters to obtain the vibration type classification result, where n is an integer greater than or equal to 1.
7. The method according to any one of claims 1 to 4, characterized in that: The process of performing a clustering operation on the plurality of signal vector samples comprises: Each signal vector sample in the plurality of signal vector samples is taken as a cluster, the average inter-cluster similarity between the clusters is calculated, and the clusters whose average inter-cluster similarity meets a threshold are merged.
8. The method according to any one of claims 1 to 4, characterized in that: The obtaining of a plurality of signal vector samples comprises: Obtaining vibration signals within a preset time period; The index characteristics of each vibration signal are calculated to obtain a signal vector sample corresponding to each vibration signal.
9. A device for monitoring vibration types, characterized in that: The device comprises: A sample acquisition module, configured to acquire a plurality of signal vector samples and labels of a portion of the signal, wherein the labels are used to indicate a vibration type; A sample clustering module is configured to re-cluster edge signal samples to other clusters except the current cluster during the clustering operation on the plurality of signal vector samples until a unique cluster is obtained, and record the clustering process to obtain a set of clustering results, wherein the similarity between the edge signal samples and the current cluster is lower than a threshold λ; A vibration type classification module is configured to calculate a label score of each type of the label in the set of clustering results, and when the label score is lower than a score threshold, repeatedly calculate the label score until all samples are classified into corresponding clusters, thereby obtaining a vibration type classification result; The threshold λ includes a plurality of candidate thresholds λ; The sample clustering module is configured as follows: In the process of performing clustering operation on the multiple signal vector samples, for the current m clusters, the similarity between any signal vector sample in each cluster and other signal vector samples is calculated, and the samples with similarity lower than the candidate threshold λ are taken as the edge signal samples, wherein m is an integer greater than or equal to 1 and less than or equal to the number of vibration signals, and the m clusters are any results in the clustering operation process; Re-clustering the edge signal samples into other clusters except the current cluster to obtain m target clusters; Calculating the clustering quality of the m clusters of the target to obtain a clustering quality evaluation value corresponding to the current candidate threshold λ; Repeat the above steps to obtain clustering quality evaluation values corresponding to each candidate threshold λ, and take the clustering result corresponding to the maximum clustering quality evaluation value as the optimal result of the m clusters.
10. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus, the memory stores a computer program, and the computer program, when executed by the processor, can implement the method as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed, can implement the method as claimed in any one of claims 1 to 8.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed, the method according to any one of claims 1 to 8 can be implemented.
