Urban cable network third-party intrusion positioning and identification method
By combining distributed fiber sensing technology and Vision Transformer deep learning model, the accurate positioning and robustness of third-party intrusion positioning and identification of urban cable networks is solved, and efficient intrusion event recognition and location are achieved.
Patent Information
- Application Number
- CN202410375323.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately identify and locate third-party intrusions in urban cable networks, and sensor positioning errors and multipath effects limit the accurate positioning of intrusion events.
The phase-sensitive distributed fiber sensing technology is used to collect sound field data, and combine the trajectory tracking image processing algorithm and the Vision Transformer deep learning model to improve the model's positioning information capture ability and recognition robustness of dynamic intrusion events. Through the Nesterov acceleration algorithm that balances random selection and dynamic changes in learning rates, the problem of data set sample category imbalance and network model convergence speed is solved.
It effectively improves positioning accuracy and recognition accuracy, improves the multi-scale information mining capability and recognition robustness of intrusion events, and improves the convergence speed of network models.
Smart Images

Figure CN119625031A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of distributed optical fiber acoustic wave sensing foreign body intrusion monitoring, and in particular to a method for locating and identifying third-party intrusion in a city cable network. Technical Background
[0002] With the rapid development of urban cable networks, ensuring their security and reliability has become crucial. Third-party intrusions may lead to security threats such as cable network failures and information leakage. Although traditional monitoring technologies, such as video surveillance and vibration sensors, provide some security guarantees to a certain extent, they still have many limitations, including the inability to accurately identify third-party intrusions, susceptibility to environmental and magnetic field influences, and inability to provide real-time responses. Therefore, it is necessary to develop an efficient and accurate urban cable network intrusion location and identification technology.
[0003] Fiber optic sensing technology has the advantages of low cost, anti-electromagnetic interference, good tolerance to harsh environments, and the support of phase-sensitive optical time domain reflectometry technology with high detection sensitivity, which enables distributed fiber optic acoustic wave systems to complete large-scale, highly sensitive real-time monitoring functions. In recent years, various recognition methods have been applied to third-party intrusion positioning and identification, but these algorithms often have the problem of poor generalization ability. That is, the trained model performs well on the training data set, but a large number of false alarms and missed alarms occur in actual applications. At the same time, sensor positioning errors and multipath effects also limit the accurate positioning of intrusion events. Therefore, it is urgent to develop a set of reliable algorithms suitable for third-party intrusion positioning and identification in urban cable networks. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a method for locating and identifying third-party intrusions in urban cable networks. The present invention improves the model's ability to capture dynamic intrusion event location information through a trajectory tracking image processing algorithm. ViT is used to improve the recognition method's ability to mine multi-scale information on intrusion events and improve recognition robustness. Balanced random extraction is used to solve the problem of accuracy degradation caused by imbalanced sample categories in the data set; the Nesterov acceleration algorithm based on dynamic changes in the learning rate is used to improve the convergence speed of the network model.
[0005] The technical solution of the present invention is: a method for locating and identifying third-party intrusion in urban cable networks, characterized in that it comprises the following steps:
[0006] S1: Use phase-sensitive distributed optical fiber sensing technology to collect sound field data along the urban cable network and generate a third-party intrusion data set of the urban cable network. After screening, a clean data set is obtained.
[0007] S2: Based on the third-party intrusion dataset of the urban cable network, the specific process is as follows:
[0008] S21. First, clean the dataset T i Input into the trajectory tracking image processing algorithm to calculate the location information of third-party intrusion in the urban cable network;
[0009] The trajectory tracking image processing algorithm includes two methods: Canny edge detection and optical flow method. Canny edge detection first smoothes the data flow T through a Gaussian filter. i , and use the double threshold edge tracking method to calculate T i The strong edges and weak edges of the adjacent data streams are connected by the edge tracking method, so as to obtain the third-party intrusion location information P1 of the urban cable network; the optical flow method first obtains the optical flow equation about the pixel grayscale based on the assumption of constant brightness and small motion, and then transforms the solution of the optical flow field into an optimization problem of minimizing the pixel grayscale change through the optical flow equation, and finally uses the quasi-Newton method to solve the optimization problem and calculate the numerical solution of the optical flow field, so as to obtain the third-party intrusion location information P2 of the urban cable network; the third-party intrusion location information of the urban cable network is the union of P1 and P2 P = P1 ∪ P2;
[0010] S22, input the sound field data set in the intrusion positioning area into the Vision Transformer deep learning model to identify the category information of the third-party intrusion event in the urban cable network; the specific process is:
[0011] S221, the sample extraction strategy adopts a balanced random extraction method: the optimal parameter vector M = [m1, m2, m j ...m n ], where [m1,m2,m j ...m n ] represent the number of samples extracted from n categories of events in the sound field data set within the intrusion positioning area, and j is the category number; during model training, the samples corresponding to each category of events in the data set are randomly shuffled; then, samples corresponding to n categories of events are extracted based on M as the standard; finally, the above samples are merged into a batch of sample sets;
[0012] S222, Input data encoding: The Vision Transformer network first converts the sample set T i Split into matrix C = [c1, c2, c l , ..., c g ]; then C is mapped into a series of embedding vectors E = [e1, e2, e l ,...e g ]; At the same time, the radial basis function is introduced to transform C into a series of position codes S = [s1, s2, s l , ..., s g]:
[0013]
[0014] Where a and b are c l The pixel number corresponding to the ath row and the bth column in the graph is σ, which is the parameter controlling the width of the function. Finally, the embedding vector and the position code are added to obtain the input vector X = [x1, x2, x l , ..., x g ]
[0015] X = E + S;
[0016] S223, the network structure consists of K Transformer Encoder layers: each Transformer Encoder layer includes a normalization layer-1, multi-head self-attention, and a fully connected feedforward network; the input vector X first passes through the normalization layer-1, and then each component is input into the multi-head self-attention structure to extract feature F1; at the same time, the input vector X and feature F1 are connected through a residual structure and input into the normalization layer-2 to obtain feature F2; feature F2 is input into the fully connected feedforward network for further calculation to obtain feature F3; F2 and F3 are connected through a residual structure and input into the next Transformer Encoder; the output result of the fully connected feedforward network of the last Transformer Encoder layer is z;
[0017] The Softmax function maps z to the recognition confidence of each category event to obtain the output;
[0018] S224. The optimizer uses the Nesterov accelerated gradient algorithm with dynamically changing learning rate to obtain the parameter matrix θ of the entire VisionTransformer network.
[0019] According to the above-mentioned method for locating and identifying third-party intrusion in urban cable networks, it is characterized in that the Nesterov acceleration gradient formula in S224 is as follows:
[0020] v t =γv t-1 +▽ θ J(θ-γv t-1 )
[0021] θ t =θ t-1 -η*v t-1
[0022] where v t-1 and v t are the error vectors that need to be eliminated at the previous moment and the current moment, θ t-1 ,θt are the parameter matrices of the Vision Transformer network at time t-1 and t, γ is the momentum ratio, ▽ θ J(θ-γv t-1 ) is the partial derivative of the loss at the previous moment, and η is the learning rate.
[0023] According to the method for locating and identifying third-party intrusion in urban cable networks as described above, it is characterized in that when the loss of the model on the validation set has not improved for N consecutive cycles, η will be reduced to the original 0.1.
[0024] According to the above-mentioned method for locating and identifying third-party intrusion in urban cable networks, it is characterized in that S1 includes the following sub-steps: S11, using distributed optical fiber acoustic wave sensing technology to divide the urban cable network into N sensing areas, and the collected acoustic field data is a series of data streams [T1, T2, T i ,..]; data stream T i It is a matrix of size L*N, where L=d*f, d is the number of seconds per unit time, and f is the sampling rate. The intrusion events are analyzed by using data; S12. Based on the intrusion event records, the data set is labeled with event labels to form the original data set; the original data set is screened using data cleaning technology to obtain a clean data set.
[0025] According to the method for locating and identifying third-party intrusions in urban cable networks as described above, it is characterized in that the data cleaning technology step in step S12 includes deleting abnormal data based on the box packing method and deleting duplicate data through the database template matching method.
[0026] According to a method for locating and identifying third-party intrusion in urban cable networks as described above, it is characterized in that the box plot method first calculates the upper quartile Q1 and the lower quartile Q3 of the original data set, and then determines the interquartile range IQR=Q3-Q1, and then determines the threshold range of the outliers in this article as [-∞, Q1-0.5*IQ] and [Q3+0.5*IQ, ∞], where IQ is a constant determined according to actual conditions, and the data within the threshold range will be removed.
[0027] According to the method for locating and identifying third-party intrusions in urban cable networks as described above, it is characterized in that the database template matching method uses templates or structural features in the database to match and compare with existing data to find identical or highly similar records, and perform data deduplication operations based on this.
[0028] The beneficial effects of the present invention are: it can effectively improve positioning accuracy and recognition accuracy; improve the ability of the recognition method to mine multi-scale information of intrusion events through ViT, and improve recognition robustness; and use the Nesterov acceleration algorithm based on dynamic changes in learning rate to improve the convergence speed of the network model. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of the Vision Transformer model.
[0030] Name explanation: ViT is the abbreviation of Vision Transformer, and its Chinese name is visual converter. DETAILED DESCRIPTION
[0031] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0032] like Figure 1 As shown, a method for locating and identifying third-party intrusion in a city cable network of the present invention comprises the following steps:
[0033] S1: Use phase-sensitive distributed optical fiber sensing technology to collect acoustic field data along the urban cable network and generate a third-party intrusion data set for the urban cable network. The specific process is as follows:
[0034] S11, using phase-sensitive distributed optical fiber acoustic wave sensing technology to divide the urban cable network into N sensing areas, the collected acoustic field data is a series of data streams [T1, T2, T i , ..]. Data flow T i It is a matrix of size L*N, where L=d*f, d is the number of seconds per unit time, and f is the sampling rate. The intrusion events are analyzed by using data.
[0035] S12. Based on the intrusion event records, the data set is labeled with event tags to form an original data set. Then, the original data set is filtered using data cleaning technology to obtain a clean data set. The steps of data cleaning technology include deleting abnormal data based on the box packing method, deleting duplicate data through the database template matching method, and removing dirty label data based on the Gaussian mixture model clustering method.
[0036] The box plot method in this step first calculates the upper quartile (Q1) and lower quartile (Q3) of the entire original data set, and then determines the interquartile range IQR = Q3-Q1. Then the threshold range of the outliers in this article is determined to be [-∞, Q1-0.5*IQ] and [Q3+0.5*IQ, ∞], where IQ is a constant determined according to the actual situation, so that the data within the threshold range will be removed.
[0037] The database template matching method uses the template or structural features in the database to match and compare with the existing data, finds the same or highly similar records, and performs data deduplication operations accordingly. The clean data set of the present invention is a data set after deleting abnormal data, duplicate data and dirty label data on the basis of the original data set.
[0038] S2: Based on the urban cable network third-party intrusion dataset, combined with the trajectory tracking image processing algorithm and the VisionTransformer deep learning model, a third-party intrusion positioning and identification model for the urban cable network is constructed. The specific process is as follows:
[0039] S21, firstly, the clean data set T obtained after screening i The data is input into the trajectory tracking image processing algorithm to calculate the location information of third-party intrusion in the urban cable network.
[0040] Trajectory tracking image processing algorithms include Canny edge detection and optical flow. Canny edge detection first smoothes the data stream T through a Gaussian filter. i , and use the double threshold edge tracking method to calculate T i The strong edges and weak edges of the data are then connected by the edge tracking method to obtain the third-party intrusion positioning information P1 of the urban cable network. The optical flow method first obtains the optical flow equation about the pixel grayscale based on the assumptions of constant brightness and small motion. Then, the solution of the optical flow field is transformed into an optimization problem of minimizing the change of pixel grayscale through the optical flow equation. Finally, the quasi-Newton method is used to solve the optimization problem and calculate the numerical solution of the optical flow field to obtain the third-party intrusion positioning information P2 of the urban cable network. The third-party intrusion positioning information of the urban cable network of the trajectory tracking image processing algorithm is the union of P1 and P2
[0041] P=P1∪P2.
[0042] The Canny edge detection of the present invention focuses on extracting edge information in an image, while the optical flow method is mainly used to detect motion information. Combining the two can obtain more comprehensive feature information, including the combination of edge and motion, making the image features more comprehensive and rich. This combination can reduce the problems caused by false detection or missed detection of a single method.
[0043] S22, only T is retained in the third-party intrusion location information iThe sound field dataset in the intrusion positioning area is input into the Vision Transformer deep learning model to identify the category information of third-party intrusion events in the urban cable network. The Vision Transformer deep learning model includes sample extraction strategy, input data encoding, network structure and optimizer. The urban cable network third-party intrusion positioning dataset first forms category-balanced training data through a sample extraction strategy. The training data is then input into the network structure for forward calculation to obtain the network output result. Finally, the optimizer is used to minimize the error between the network output result and the data label, optimize the network structure parameters, and obtain the trained Vision Transformer deep learning model. The specific process of this sub-step is:
[0044] S221, the sample extraction strategy adopts a balanced random extraction method. First, the optimal parameter vector M = [m1, m2, m j ...m n ], where [m1,m2,m j ...m n ] represent the number of samples extracted from n categories of events in the sound field data set within the intrusion location area, and j is the category number. During model training, the samples corresponding to each category of events in the data set are randomly shuffled. Then, samples corresponding to n categories of events are extracted based on M as the standard (M is the optimal parameter of random grid search, which includes the number of samples to be extracted in each category). Finally, the above samples are merged into a batch of sample sets for model training.
[0045] S222, Input data encoding: The Vision Transformer network first converts the sample set T i Split into matrix C = [c1, c2, c l , ...c g Then, C is mapped into a series of embedding vectors E = [e1, e2, e l ,...e g At the same time, the radial basis function is introduced to transform C into a series of position codes S = [s1, s2, s l , ..., s g ]:
[0046]
[0047] Where a and b are c l The pixel number corresponding to the ath row and bth column in the graph is σ, which is the parameter controlling the width of the function. Finally, the embedding vector and the positional encoding are added to obtain the input vector X = [x1, x2, x l , ..., x g]
[0048] X=E+S
[0049] S223, the network structure consists of K Transformer Encoder layers. Each Transformer Encoder layer includes a normalization layer-1 (Transformer Encoder-1), multi-head self-attention, and a fully connected feedforward network. The input vector X first passes through the normalization layer-1 (Transformer Encoder-1), and then each component is input into the multi-head self-attention structure to extract feature F1. At the same time, the input vector X and feature F1 are connected through a residual structure and input into the normalization layer-2 (Transformer Encoder-2) to obtain feature F2. Feature F2 is input into the fully connected feedforward network for further calculation to obtain feature F3. F2 and F3 are connected through a residual structure and input into the next Transformer Encoder. The output result of the fully connected feedforward network of the last Transformer Encoder layer is z. In this embodiment, the last Transformer Encoder layer can be 8, that is, K=8, and the number of layers of the Transformer Encoder layer can be confirmed by random grid search.
[0050] The Softmax function maps z to the recognition confidence of each category event to obtain the output.
[0051]
[0052] Where e is a natural number; n represents the number of neurons in the fully connected feedforward network; j represents the neuron number corresponding to the fully connected feedforward network.
[0053] S224, the optimizer uses the Nesterov accelerated gradient algorithm with a dynamically changing learning rate. The formula is as follows:
[0054] v t =γv t-1 +▽ θ J(θ-γv t-1 )
[0055] θ t =θ t-1 -η*v t-1
[0056] where v t-1 and v t are the error vectors that need to be eliminated at the previous moment and the current moment, θ t-1 ,θ tare the parameter matrices of the Vision Transformer network at time t-1 and t, γ is the momentum ratio, ▽ θ J(θ-γv t-1 ) is the partial derivative of the loss at the previous moment, and η is the learning rate. When the loss of the model on the validation set does not improve for N consecutive cycles, η will be reduced to the original 0.1. This step is the training process of the model parameter θ. After the training is completed. The input data is tested and it is shown that the positioning and recognition method of the present invention has the characteristics of high accuracy and fast convergence speed.
[0057] The purpose of this technology is to propose a method for locating and identifying third-party intrusions in urban cable networks, which can effectively improve the positioning accuracy and recognition accuracy. The model's ability to capture dynamic intrusion event location information is improved through trajectory tracking image processing algorithms. ViT is used to improve the recognition method's ability to mine multi-scale information of intrusion events and improve recognition robustness. Balanced random sampling is used to solve the problem of accuracy degradation caused by imbalanced sample categories in the data set; the Nesterov acceleration algorithm based on dynamic changes in the learning rate is used to improve the convergence speed of the network model.
Claims
1. A method for locating and identifying third-party intrusion in urban cable networks, characterized in that: The following steps are involved: S1: Use phase-sensitive distributed optical fiber sensing technology to collect sound field data along the urban cable network and generate a third-party intrusion data set of the urban cable network. After screening, a clean data set is obtained. S2: Based on the third-party intrusion dataset of the urban cable network, the specific process is as follows: S21. First, clean the dataset T i Input into the trajectory tracking image processing algorithm to calculate the location information of third-party intrusion in the urban cable network; The trajectory tracking image processing algorithm includes two methods: Canny edge detection and optical flow method. Canny edge detection first smoothes the data flow T through a Gaussian filter. i , and use the double threshold edge tracking method to calculate T i The strong edges and weak edges of the adjacent data streams are connected by edge tracking method, so as to obtain the third-party intrusion location information P1 of the urban cable network; the optical flow method first obtains the optical flow equation about the pixel grayscale based on the assumption of constant brightness and small motion, and then transforms the solution of the optical flow field into an optimization problem of minimizing the pixel grayscale change through the optical flow equation, and finally uses the quasi-Newton method to solve the optimization problem and calculate the numerical solution of the optical flow field, so as to obtain the third-party intrusion location information P2 of the urban cable network; the third-party intrusion location information of the urban cable network is the union of P1 and P2 P = P1 ∪ P2; S22, input the sound field data set in the intrusion positioning area into the Vision Transformer deep learning model to identify the category information of the third-party intrusion event in the urban cable network; the specific process is: S221, the sample extraction strategy adopts a balanced random extraction method: the optimal parameter vector M = [m1, m2, m j ...m n ], where [m1, m2, m j ...m n ] represent the number of samples extracted from n categories of events in the sound field data set within the intrusion positioning area, and j is the category number; during model training, the samples corresponding to each category of events in the data set are randomly shuffled; then, samples corresponding to n categories of events are extracted based on M as the standard; finally, the above samples are merged into a batch of sample sets; S222, Input data encoding: The Vision Transformer network first converts the sample set T i Split into matrix C = [c1, c2, c l , ...c g ]; then C is mapped into a series of embedding vectors E = [e1, e2, e l ,...e g ]; At the same time, the radial basis function is introduced to transform C into a series of position codes S = [s1, s2, s l , ..., s g ]: Where a and b are c l The pixel number corresponding to the ath row and the bth column in the graph is σ, which is the parameter controlling the width of the function. Finally, the embedding vector and the position code are added to obtain the input vector X = [x1, x2, x l , ..., x g ] X = E + S; S223, the network structure consists of K Transformer Encoder layers: each Transformer Encoder layer includes a normalization layer-1, multi-head self-attention, and a fully connected feed-forward network; The input vector X first passes through the normalization layer-1, and then each component is input into the multi-head self-attention structure to extract feature F1; at the same time, the input vector X and feature F1 are connected through the residual structure and input into the normalization layer-2 to obtain feature F2; feature F2 is input into the fully connected feedforward network for further calculation to obtain feature F3; F2 and F3 are connected through the residual structure and input into the next Transformer Encoder; the output result of the fully connected feedforward network of the last Transformer Encoder layer is z; The Softmax function maps z to the recognition confidence of each category event to obtain the output; S224. The optimizer uses the Nesterov accelerated gradient algorithm with dynamically changing learning rate to obtain the parameter matrix θ of the entire VisionTransformer network.
2. A method for locating and identifying third-party intrusion in urban cable networks according to claim 1, characterized in that: The Nesterov acceleration gradient formula in S224 is as follows: i t =θ t-1 -h*v t-1 where v t-1 and v t are the error vectors that need to be eliminated at the previous moment and the current moment, θ t-1 ,θ t are the parameter matrices of the Vision Transformer network at time t-1 and t, respectively, γ is the momentum ratio, is the partial derivative of the loss at the previous moment, and η is the learning rate.
3. A method for locating and identifying third-party intrusion in urban cable networks according to claim 2, characterized in that: When the model loss on the validation set does not improve for N consecutive epochs, η will be reduced to its original value of 0.
1.
4. A method for locating and identifying third-party intrusion in urban cable networks according to any one of claims 1 to 3, characterized in that: S1 includes the following sub-steps: S11, using distributed optical fiber acoustic wave sensing technology to divide the urban cable network into N sensing areas, and the collected acoustic field data is a series of data streams [T1, T2, T i ,..]; data stream T i It is a matrix of size L*N, where L=d*f, d is the number of seconds per unit time, and f is the sampling rate. The intrusion events are analyzed by using data; S12. Based on the intrusion event records, the data set is labeled with event labels to form an original data set; the original data set is screened using data cleaning technology to obtain a clean data set.
5. A method for locating and identifying third-party intrusion in urban cable networks according to any one of claims 1 to 3, characterized in that: The steps of the data cleaning technology in step S12 include deleting abnormal data based on the box packing method and deleting duplicate data through the database template matching method.
6. A method for locating and identifying third-party intrusion in urban cable networks according to any one of claims 1 to 3, characterized in that: The box plot method first calculates the upper quartile Q1 and lower quartile Q3 of the original data set, then determines the interquartile range IQR = Q3-Q1, and then determines the threshold range of outliers as [-∞, Q1-0.5*IQ] and [Q3+0.5*IQ, ∞], where IQ is a constant and data within the threshold range will be removed.
7. A method for locating and identifying third-party intrusion in urban cable networks according to any one of claims 1 to 3, characterized in that: The database template matching method uses templates or structural features in the database to match and compare with existing data to find identical or highly similar records, and then perform data deduplication operations based on this.