Visual identification method and system for external damage event based on optical cable
By processing and feature extraction of optical fiber line vibration data, an external break recognition model was constructed, which solved the problem of insufficient monitoring and identification accuracy of foreign break events in the existing technology, and achieved higher identification accuracy and intuitive analysis capabilities.
Patent Information
- Application Number
- CN202311870638.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
The prior art has the problem of insufficient accuracy in monitoring and identification of external disruption events in optical cable communications, and lacks an effective basis for determining.
By collecting vibration data in the optical fiber line, calculating the mean square valid value, and comparing it with the preset threshold, if the threshold is exceeded, a vibration recognition image is constructed, feature vectors are extracted, different types of external breaking event, building a training set and training of external breaking recognition model, realizing the recognition of external breaking event types.
It improves the accuracy of external breaking event recognition, can intuitively display the types of external breaking event, reduces interference data, and improves the accuracy of model recognition.
Smart Images

Figure CN120236086A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical fiber external break event recognition, and more specifically, to a method and system for visually recognizing external force damage events based on optical cables. Background Art
[0002] In the field of optical cable communication technology, an external break event refers to the damage of an optical cable line caused by artificial external forces, mainly including illegal construction, fire, foreign object short circuit, tree damage, theft and damage, etc. These external break events will seriously affect the normal communication of the optical cable line and cause huge economic losses. Therefore, it is necessary to monitor various external break events to reduce or avoid the occurrence of external break events. In the existing technology, most external break events are monitored based on optical fiber sensing technology for destructive construction around the optical cable. Simple vibration amplitude threshold settings are used for monitoring, or simple mathematical transformations are performed on the signals to obtain the source of the construction. There is a lack of basis and accuracy for judging destructive construction events. Summary of the Invention
[0003] The present invention aims to overcome at least one defect of the above-mentioned existing technology, and provides a method and system for visually recognizing external force damage events based on optical cables, for providing a method and system that can accurately recognize and intuitively display the types of external break events.
[0004] The technical solution adopted by the present invention is as follows:
[0005] The present invention provides a method for visually recognizing external force damage events based on optical cables, and the method includes:
[0006] Collect vibration data in the optical fiber line;
[0007] Calculate the root mean square value of the vibration data;
[0008] Compare the calculated root mean square value with a preset effective threshold;
[0009] If the root mean square value is greater than the preset effective threshold, construct a vibration recognition image according to the vibration data;
[0010] Extract the feature vector of the vibration recognition image;
[0011] Continuously collect vibration data in the optical fiber line according to the above method and obtain the corresponding feature vectors;
[0012] Mark the feature vectors of the vibration recognition image according to different types of external break events;
[0013] Construct a training set according to the marked feature vectors, and input the training set into an external break recognition model for model training to obtain a trained external break recognition model;
[0014] Identify the type of external break event through the trained external break identification model.
[0015] By calculating the root mean square (RMS) value of the collected vibration data and comparing it with the preset effective threshold, interference data in the optical fiber line can be filtered out, making the collected vibration data more accurate. Consequently, the accuracy of the subsequent trained model for identification is higher. Converting the vibration data into a visual vibration identification image enables a simple analysis of the type of vibration event through the image, determining whether it is an external break event and obtaining the type of the external break event. By extracting the feature vectors of the vibration identification image to train the external break identification model, the type of external break event can be quickly identified through the trained external break identification model.
[0016] Further, the collection of vibration data in the optical fiber line specifically includes:
[0017] Sample the vibration signals of X frames in the optical fiber line, where each frame of the vibration signal contains Y sampling points, and both X and Y are greater than 0;
[0018] Convert the collected vibration signals into frequencies and extract the local frequency domain cumulative values to form vibration data.
[0019] Further, the calculation of the root mean square (RMS) value of the vibration data specifically includes:
[0020] Construct an identification matrix of X×Y based on the vibration data;
[0021] Where the X rows of the identification matrix correspond to the X frames of the vibration signals, and the Y data in each row represent the vibration data at Y position points within the time interval of one frame of the vibration signal; the Y columns of the identification matrix correspond to Y position points, and the X data in each column represent the vibration data at the corresponding position point over the time of X frames of the vibration signal;
[0022] Calculate the difference between the maximum and minimum values of each column of the identification matrix to obtain the difference array Rms_pk;
[0023] Calculate the average value Rms_pk_mean of all the data in the difference array Rms_pk;
[0024] Calculate the root mean square value of each column of the identification matrix to obtain the root mean square value array;
[0025] Calculate the average value Rms_x of the root mean square value array of the identification matrix;
[0026] Calculate the root mean square (RMS) value of the vibration data: RMS value = Rms_pk_mean / Rms_x.
[0027] By constructing an identification matrix and calculating the root mean square value of the identification matrix, the noise situation of the collected vibration data can be obtained more accurately. If the noise is too large, the vibration data can be denoised or the vibration data can be removed to improve the accuracy of the corresponding analysis results.
[0028] Further, constructing a vibration identification image according to the vibration data specifically includes:
[0029] Taking the X frames of the vibration data as the horizontal axis, taking the Y sampling points as the vertical axis, and mapping the vibration data into RGB data to construct a heat map as the vibration identification image.
[0030] By taking the X frames and Y sampling points of the vibration data as the horizontal axis and the vertical axis respectively to construct the vibration identification image, the vibration identification image can intuitively reflect the spatio-temporal relationship of the vibration data and is more convenient and intuitive for analysis.
[0031] Further, extracting the feature vector of the vibration identification image specifically includes:
[0032] Converting the vibration identification image into a grayscale image and integrating the grayscale image to obtain the integral image SAT of the grayscale image;
[0033] Convolving the integral image SAT with box filters of different sizes to obtain the positions of feature points;
[0034] Taking the positions of the feature points as the center, determining a divided area, and dividing the divided area into several sub-areas;
[0035] Calculating the Haar wavelet response of each sub-area, summing the Haar wavelet responses of each sub-area, and obtaining the feature vector.
[0036] Further, convolving the integral image SAT with box filters of different sizes to obtain the positions of feature points specifically includes:
[0037] Successively convolving the integral image SAT with a number of box filters with gradually increasing sizes to obtain an approximate Hessian matrix for each pixel; the approximate Hessian matrix is expressed as follows:
[0038]
[0039] The determinant of the approximate Hessian matrix is expressed as:
[0040] det(H) = D xx *Dyy -(ω * D xy ) 2
[0041] In the above formula, H represents the approximate Hessian matrix, det(H) represents the determinant value of the approximate Hessian matrix, and D xx represents the convolution of the box filter and the image function I(x, y) of the grayscale image; D yy represents the convolution of the box filter and the image function I(x, y) of the grayscale image; D xy represents the convolution of the box filter and the image function I(x, y) of the grayscale image; ω represents the weighting coefficient using the box filter; g(σ) represents the Gaussian function of the grayscale image, and σ represents the Gaussian parameter;
[0042] According to the determinant value of the approximate Hessian matrix, the corresponding response images of the box filters of each size are obtained;
[0043] According to the response images corresponding to the box filters of each size, a scale space is constructed;
[0044] In the scale space, each pixel point in each response image is compared with m pixel points in its three-dimensional neighborhood to determine the maximum value points, and then a three-dimensional quadratic fitting method is used to determine the feature point positions.
[0045] Taking the feature point position as the center, a division area is determined, and the division area is divided into several sub-areas, specifically including:
[0046] Taking the feature point position as the center, and determining the division area according to the size of the box filter; the division area is separated into several square sub-areas of the same size.
[0047] Further, calculating the Haar wavelet response of each sub-region, and summing the Haar wavelet responses of each sub-region to obtain the feature vector, specifically including:
[0048] Calculating the response values of the images of each sub-region through the Haar wavelet, and respectively obtaining the response dx in the horizontal direction and the response dy in the vertical direction;
[0049] Summing the response dx and the response dy of each sub-region to obtain the descriptor vector of the sub-region;
[0050] Aggregating all the descriptor vectors and performing histogram statistics to obtain the feature vector of the vibration recognition image.
[0051] The present invention also provides a visualization recognition system for external force damage events based on an optical cable, and the system includes:
[0052] A data sampling module, which is used to collect vibration data in the optical fiber line;
[0053] A data storage module, which is used to store the vibration data collected by the data sampling module;
[0054] A data calculation module, which is used to calculate the root mean square value of the vibration data, compare the root mean square value with a preset effective threshold, and screen out the vibration data whose root mean square value is greater than the preset effective threshold;
[0055] An image conversion module, which is used to construct a vibration recognition image according to the vibration data screened out by the data calculation module;
[0056] A feature extraction module, which is used to extract the feature vector of the vibration recognition image;
[0057] A feature marking module, which is used to mark the feature vectors extracted by the feature extraction module according to different types of external damage events, and construct a training set according to the marked feature vectors;
[0058] A model training module, which is used to train an external damage recognition model according to the training set to obtain a trained external damage recognition model;
[0059] A model analysis module, which is used to obtain the trained external damage recognition model of the model training module, and identify the type of external damage event through the trained external damage recognition model.
[0060] Further, the data calculation module is used to calculate the root mean square value of the vibration data, specifically including:
[0061] The data calculation module constructs an X×Y recognition matrix according to the vibration data;
[0062] Wherein the X rows of the recognition matrix correspond to the X frames of vibration signals collected by the data sampling module, and the Y data in each row represent the vibration data at Y position points within the time interval of one frame of vibration signal; the Y columns of the recognition matrix correspond to Y position points, and the X data in each column represent the vibration data of the corresponding position point at the time of X frames of vibration signals;
[0063] The data calculation module calculates the difference between the maximum value and the minimum value of each column of the recognition matrix to obtain a difference array Rms_pk;
[0064] The data calculation module calculates the average value Rms_pk_mean of all the data in the difference array Rms_pk;
[0065] The data calculation module calculates the root mean square value of each column of the recognition matrix to obtain a root mean square value array;
[0066] The data calculation module calculates the average value Rms_x of the root mean square value array of the recognition matrix;
[0067] The data calculation module calculates the root mean square effective value of the vibration data: root mean square effective value = Rms_pk_mean / Rms_x.
[0068] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0069] 1. By calculating the root mean square effective value of the vibration data and screening out the vibration data whose root mean square effective value is greater than a preset effective threshold, the present invention can effectively reduce interference data and improve the accuracy of external break event recognition;
[0070] 2. By converting the vibration data into a vibration recognition image, the present invention can intuitively analyze the vibration type through the vibration recognition image and identify the type of external break event;
[0071] 3. By extracting the feature vectors of the vibration recognition image, marking the feature vectors according to the type of external break event to construct a training set, and training an external break recognition model through the training set to obtain a trained external break recognition model, the trained external break recognition model can more quickly and accurately identify the type of external break event. Description of the Drawings
[0072] Figure 1 It is a flowchart of the method steps of the present invention.
[0073] Figure 2 It is a flowchart of the steps for calculating the root mean square effective value of the present invention.
[0074] Figure 3 It is a flowchart of the steps for feature vector extraction of the present invention
[0075] Figure 4 It is a system structure diagram of the present invention.
[0076] Annotation of the drawings: data sampling module 1, data storage module 2, data calculation module 3, image conversion module 4, feature extraction module 5, feature marking module 6, model training module 7, model analysis module 8. Detailed Embodiments
[0077] The accompanying drawings of the present invention are only for illustrative purposes and should not be construed as a limitation of the present invention. To better illustrate the following embodiments, some components in the drawings will be omitted, enlarged or reduced, which do not represent the dimensions of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0078] Embodiment 1
[0079] As Figure 1 shown, this embodiment provides a method for visually identifying external force damage events based on optical cables, and the method includes:
[0080] S1: Collect vibration data in the optical fiber line;
[0081] Specifically, in this step, sample the X-frame vibration signals in the optical fiber line, and collect the vibration signals of Y sampling points for each frame of the vibration signal, where both X and Y are greater than 0; where X frames represent the time relationship of the collected vibration signals, and the Y sampling points of each frame of the vibration signal represent the spatial relationship of the vibration signal. The number of frames of the collected vibration signals is set according to actual needs.
[0082] Then convert the collected vibration signals into frequencies and extract the local frequency domain cumulative values to form vibration data.
[0083] S2: Calculate the root mean square value of the vibration data;
[0084] Specifically, the calculation steps in this step are as follows:
[0085] A1: Construct an X×Y recognition matrix according to the vibration data;
[0086] Among them, the X rows of the recognition matrix correspond to the X-frame vibration signals, and the Y data in each row represent the vibration data of Y position points within the time interval of one frame of the vibration signal; the Y columns of the recognition matrix correspond to Y position points, and the X data in each column represent the vibration data of the corresponding position point in the time of the X-frame vibration signal; then the constructed X×Y recognition matrix can well reflect the spatio-temporal relationship of the vibration data.
[0087] A2: Calculate the difference between the maximum value and the minimum value of each column of the recognition matrix to obtain a difference array Rms_pk;
[0088] A3: Calculate the average value Rms_pk_mean of all the data in the difference array Rms_pk;
[0089] A4: Calculate the root mean square value of each column of the recognition matrix to obtain a root mean square value array;
[0090] A5: Calculate the average value Rms_x of the root mean square array of the recognition matrix;
[0091] A6: Calculate the root mean square value of the vibration data: Root mean square value = Rms_pk_mean / Rms_x.
[0092] The calculated root mean square value can well reflect the noise level of the vibration data.
[0093] S3: Compare the calculated root mean square value with a preset effective threshold; if the root mean square value is greater than the preset effective threshold, construct a vibration recognition image based on the vibration data; preferably, the preset effective threshold is set according to the actual situation;
[0094] In this step, specifically, take the X frames of the vibration data as the horizontal axis, the Y sampling points as the vertical axis, and map the vibration data to RGB (RGB color mode) data to construct a heat map as the vibration recognition image. Taking the X frames as the horizontal axis and the Y sampling points as the vertical axis, the constructed vibration recognition image can well reflect the spatio-temporal relationship of the vibration data, and can facilitate and intuitively analyze the vibration recognition image to identify the type of external break event.
[0095] S4: Extract the feature vector of the vibration recognition image;
[0096] Specifically, the specific steps for extracting the feature vector are as follows:
[0097] B1: Convert the vibration recognition image into a grayscale image and perform integration on the grayscale image to obtain the integrated image SAT of the grayscale image;
[0098] Since an image is composed of a series of discrete pixel points, the integration of the image is actually the summation of all pixel points. The value of each point in the integrated image is the sum of all pixel values in the upper left corner of that point in the original image.
[0099] The corresponding formula is expressed as:
[0100]
[0101] In the formula, SAT(x, y) represents the pixel of the integrated image SAT at the coordinate (x, y), and I(x i , y i ) represents the pixel of the grayscale image at the coordinate (x i , y i );
[0102] It can be seen from the above formula that the integrated image SAT can be calculated in an incremental manner:
[0103] SAT(x,y) = SAT(x,y - 1) + SAT(x - 1,y) - SAT(x - 1,y - 1) + I(x,y)
[0104] Where SAT(x,y) represents the pixel of the integral image SAT at the coordinate (x,y), and I(x,y) represents the pixel of the grayscale image at the coordinate (x,y);
[0105] B2: Convolve the integral image SAT with box filters of different sizes to obtain the positions of feature points;
[0106] In this step, specifically, first convolve the integral image SAT with a number of the box filters whose sizes are gradually enlarged in sequence to obtain the approximate Hessian matrix of each pixel; More specifically, in order to obtain a number of the box filters whose sizes are gradually enlarged, it is necessary to first determine a box filter with the smallest size, and then enlarge the size based on this box filter with the smallest size according to a certain rule;
[0107] The approximate Hessian matrix is expressed as follows:
[0108]
[0109] The determinant of the approximate Hessian matrix is expressed as:
[0110] det(H) = D xx *D yy -(ωD xy ) 2
[0111] In the above formula, H represents the approximate Hessian matrix, det(H) represents the determinant value of the approximate Hessian matrix, D xx represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximated to the convolution of the second-order Gaussian differential and the image function I(x,y); D yy represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximated to the convolution of the second-order Gaussian differential and the image function I(x,y); D xy represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximated to the convolution of the second-order Gaussian differential and the image function I(x,y); ω represents the weighting coefficient using the box filter, which can be set to 0.95 in this embodiment; g(σ) represents the Gaussian function of the grayscale image;
[0112]
[0113] σ represents the scale factor of the second-order Gaussian filter;
[0114] After obtaining the value of the determinant of the approximate Hessian matrix, it is possible to traverse all the pixel points in the image according to the value of the determinant of the approximate Hessian matrix, and then it is possible to obtain the response image corresponding to the box filter;
[0115] Thus, through the above method, the response image corresponding to the smallest n×n size box filter of this embodiment can be obtained and used as the initial size space layer; then the size of the n×m size box filter is expanded and enlarged, and then the response images corresponding to the respective sizes are obtained, and the response images are sequentially set according to the scale values to form a size space;
[0116] Among them, due to the discretization of the integral image, the minimum scale change amount between two scale space layers is determined by the response length l0 of the Gaussian second-order differential filter in the differential direction for positive and negative spots under the same size. The response length l0 is one-third of the size of the box filter. For the n×n size box filter, its response length And the response length l0 of the next scale space layer should be increased by at least 2 pixels on the basis of the current scale space layer to ensure one pixel on each side, that is, the response length of the next scale space layer So the size of the corresponding box filter should be set to And so on, the size of the n×n size box filter is expanded and enlarged.
[0117] Then in the scale space, each pixel point in each response image is compared with m 3 -1 pixel points within its m×m×m three-dimensional neighborhood to determine the maximum value points, and then the three-dimensional quadratic fitting method is used to determine the position of the feature points. Preferably, in this embodiment, the value of m can be set to 3.
[0118] B3: Taking the position of the feature point as the center, a division region is determined, and the division region is divided into several sub-regions;
[0119] Specifically, taking the position of the feature point as the center, and determining the division region according to the size of the box filter; the division region is divided into several square sub-regions of the same size.
[0120] In this embodiment, the divided region is a square region with a side length of 20s, where s = 1.2*L / 9 and L is the size of the corresponding cassette filter; then the divided region is divided into q×q square sub-regions, and for each sub-region, it contains pixels of (w*s)×(w*s), where q×w = 20.
[0121] B4: Calculate the Haar wavelet response of each sub-region, and sum up the Haar wavelet responses of each sub-region to obtain the feature vector.
[0122] In this step, specifically, use a Haar wavelet with a size of 2s to calculate the response value of each sub-window, and perform 25 samplings in total to obtain the Haar wavelet response dx in the horizontal direction and the Haar wavelet response dy in the vertical direction respectively; in order to increase the robustness to geometric deformation and positioning error, centered on the feature point, perform Gaussian weighting calculation on the responses dx and dy, set the Gaussian kernel parameter to 1.3s, and then sum up the responses dx and dy of each sub-region to obtain the descriptor vector of each sub-region;
[0123] At the same time, in order to introduce information about the polarity of intensity change, in this embodiment, the sums ∑|dx| and ∑|dy| of the absolute values of the responses dx and dy are also extracted respectively. Therefore, each sub-region has a four-dimensional descriptor vector v for its basic intensity structure, v = (∑dx, ∑dy, ∑|dx|, ∑|dy|). Since each divided region has a total of q×q sub-regions, the feature dimension of each divided region is q×q×q.
[0124] Then collect all the descriptor vectors and perform histogram statistics on them to obtain the feature vector of the vibration recognition image; the dimension of the feature vector is e dimensions.
[0125] Exemplarily, the minimum size of the cassette filter can be set to 9×9, and then the cassette filter is successively expanded and enlarged to sizes of 15×15, 21×21, and 27×27; during the process of dividing the divided region with a side length of 20s, the divided region can be divided into 4×4 square sub-regions, then each sub-region contains pixels of 5s×5s, and the feature dimension of each corresponding divided region is 4×4×4 = 64.
[0126] S5: Repeat steps S1 - S4 to obtain the corresponding feature vectors, and mark the feature vectors of the vibration recognition image according to different external break event types;
[0127] S6: Construct a training set based on the marked feature vectors, and input the training set into the external damage recognition model for model training to obtain a trained external damage recognition model; preferably, the external damage recognition model is constructed based on SVM (Support Vector Machine).
[0128] S7: Identify the type of external damage event through the trained external damage recognition model.
[0129] Embodiment 2
[0130] As Figure 2 shown, this embodiment provides a visual recognition system for external force damage events based on optical cables. The system includes:
[0131] A data sampling module 1, which is used to collect vibration data in the optical fiber line;
[0132] Specifically, the data sampling module 1 samples X frames of vibration signals in the optical fiber line. Each frame of the vibration signal contains Y sampling points, where both X and Y are greater than 0; where X frames represent the time relationship of the collected vibration signals, and the Y sampling points of each frame of the vibration signal represent the spatial relationship of the vibration signals. The number of frames of the collected vibration signals is set according to actual needs.
[0133] Convert the collected vibration signals into frequencies and extract the local frequency domain cumulative values to form vibration data.
[0134] A data storage module 2, which is used to store the vibration data collected in the data sampling module 1;
[0135] A data calculation module 3, which is used to calculate the root mean square value of the vibration data, and compare the root mean square value with a preset effective threshold to screen the vibration data whose root mean square value is greater than the preset effective threshold;
[0136] Specifically, the data calculation module 3 calculates according to the X×Y recognition matrix constructed from the vibration data; where the X rows of the recognition matrix correspond to X frames of the vibration signals, and the Y data in each row represent the vibration data at Y position points within the time interval of one frame of the vibration signal; the Y columns of the recognition matrix correspond to Y position points, and the X data in each column represent the vibration data at the corresponding position points over the time of X frames of the vibration signals; the data calculation module 3 calculates the difference between the maximum and minimum values of each column of the recognition matrix to obtain a difference array Rms_pk, and calculates the average value Rms_pk_mean of all the data in the difference array Rms_pk;
[0137] The data calculation module 3 calculates the root mean square value of each column of the recognition matrix to obtain a root mean square value array, and calculates the average value Rms_x of the root mean square value array of the recognition matrix;
[0138] The data calculation module 3 calculates the root mean square value of the vibration data: Root mean square value = Rms_pk_mean / Rms_x.
[0139] The root mean square value calculated by the data calculation module 3 can well reflect the noise level of the vibration data.
[0140] An image transformation module 4, which is used to construct a vibration recognition image according to the vibration data screened by the data calculation module 3;
[0141] Specifically, the image transformation module 4 takes the X frames of the vibration data as the horizontal axis, the Y sampling points as the vertical axis, and maps the vibration data into RGB data to construct a heat map as the vibration recognition image. Taking the X frames as the horizontal axis and the Y sampling points as the vertical axis, the constructed vibration recognition image can well reflect the spatio-temporal relationship of the vibration data, and can facilitate and intuitively analyze the vibration recognition image to identify the type of external break event.
[0142] A feature extraction module 5, which is used to extract the feature vector of the vibration recognition image;
[0143] Specifically, the feature extraction module 5 converts the vibration recognition image into a grayscale image and integrates the grayscale image to obtain the integral image SAT of the grayscale image;
[0144] Since an image is composed of a series of discrete pixel points, the integration of the image is actually the summation of all pixel points. The value of each point in the integral image is the sum of all pixel values in the upper left corner of that point in the original image.
[0145] The corresponding formula is expressed as:
[0146]
[0147] In the formula, SAT(x, y) represents the pixel of the integral image SAT at the coordinate (x, y), and I(x i , y i ) represents the pixel of the grayscale image at the coordinate (x i , y i );
[0148] It can be seen from the above formula that the integral image SAT can be calculated in an incremental manner:
[0149] SAT(x,y) = SAT(x,y - 1) + SAT(x - 1,y) - SAT(x - 1,y - 1) + I(x,y)
[0150] In the formula, SAT(x,y) represents the pixel of the integral image SAT at the coordinate (x,y), and I(x,y) represents the pixel of the grayscale image at the coordinate (x,y);
[0151] Then, the feature extraction module 5 convolves the integral image SAT through box filters of different sizes to obtain the positions of feature points;
[0152] Specifically, the feature extraction module 5 first convolves the integral image SAT through a number of box filters with gradually increasing sizes in sequence to obtain the approximate Hessian matrix of each pixel; More specifically, in order to obtain a number of box filters with gradually increasing sizes, it is necessary to first determine a box filter with the smallest size, and then enlarge the size based on this box filter with the smallest size according to a certain rule;
[0153] The approximate Hessian matrix is expressed as follows:
[0154]
[0155] The determinant of the approximate Hessian matrix is expressed as:
[0156] det(H) = D xx *D yy -(ω * D xy ) 2
[0157] In the above formula, H represents the approximate Hessian matrix, det(H) represents the determinant value of the approximate Hessian matrix, D xx represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximately the convolution of the second-order Gaussian differential and the image function I(x,y); D yy represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximately the convolution of the second-order Gaussian differential and the image function I(x,y); D xy represents the convolution of the box filter and the image function I(x,y) of the grayscale image, which is approximately the convolution of the second-order Gaussian differential and the image function I(x,y); ω represents the weighting coefficient using the box filter, which can be set to 0.95 in this embodiment; g(σ) represents the Gaussian function of the grayscale image;
[0158]
[0159] σ represents the scale factor of the second-order Gaussian filter;
[0160] After obtaining the value of the determinant of the approximate Hessian matrix, it is possible to traverse all pixel points in the image according to the value of the determinant of the approximate Hessian matrix, and then it is possible to obtain the response image corresponding to the box filter;
[0161] Thus, the response image corresponding to the smallest n×n-sized box filter of this embodiment can be obtained and used as the initial size space layer; then the size of the n×n-sized box filter is expanded and enlarged, and then the response images corresponding to the corresponding sizes are obtained respectively, and the response images are sequentially set according to the scale values to form a size space;
[0162] Among them, due to the discretization of the integral image, the minimum scale change amount between two scale space layers is determined by the response length l0 of the Gaussian second-order differential filter in the differential direction for positive and negative spots under the same size. The response length l0 is one-third of the size of the box filter. For the n×n-sized box filter, its response length And the response length l0 of the next scale space layer should be increased by at least 2 pixels on the basis of the current scale space layer to ensure one pixel on each side, that is, the response length of the next scale space layer So the size of the corresponding box filter should be set to And so on, the size of the n×n-sized box filter is expanded and enlarged.
[0163] Then in the scale space, each pixel point in each response image is compared with m 3 -1 pixel points within its m×m×m three-dimensional neighborhood to determine the maximum value points, and then the three-dimensional quadratic fitting method is used to determine the feature point positions. Preferably, in this embodiment, the value of m can be set to 3.
[0164] Next, the feature extraction module 5 takes the feature point positions as the center to determine a division region and divides the division region into several sub-regions;
[0165] Specifically, the feature extraction module 5 takes the feature point positions as the center and determines the division region according to the size of the box filter; the division region is divided into several square sub-regions of the same size.
[0166] In this embodiment, the divided region is a square region with a side length of 20s, where s = 1.2*L / 9 and L is the size of the corresponding box filter; then the divided region is divided into q×q square sub-regions, and for each sub-region, it contains pixels of w*s×w*s, where q×w = 20.
[0167] Finally, the feature extraction module 5 calculates the Haar wavelet response of each sub-region, sums up the Haar wavelet responses of each sub-region, and obtains the feature vector.
[0168] Specifically, the feature extraction module 5 uses a Haar wavelet with a size of 2s to calculate the response value of each sub-window, performs 25 samplings in total, and respectively obtains the Haar wavelet response dx in the horizontal direction and the Haar wavelet response dy in the vertical direction; in order to increase the robustness to geometric deformation and positioning error, centered on the feature point, Gaussian weighting calculation is performed on the responses dx and dy, the Gaussian kernel parameter is set to 1.3s, and then the responses dx and dy of each sub-region are summed up to obtain the descriptor vector of each sub-region;
[0169] At the same time, in order to introduce information about the polarity of intensity change, in this embodiment, the sums ∑|dx| and ∑|dy| of the absolute values of the responses dx and dy are also respectively extracted. Therefore, each sub-region has a four-dimensional descriptor vector v for its basic intensity structure, v = (∑dx, ∑dy, ∑|dx|, ∑|dy|). Since each divided region has a total of q×q sub-blocks, the feature dimension of each divided region is q×q×q.
[0170] Then all the descriptor vectors are aggregated, and histogram statistics are performed on them to obtain the feature vector of the vibration recognition image; the dimension of the feature vector is e dimensions.
[0171] Exemplarily, the minimum size of the box filter can be set to 9×9, and then the box filter is successively expanded and enlarged to sizes of 15×15, 21×21, and 27×27; during the process of dividing the divided region with a side length of 20s, the divided region can be divided into 4×4 square sub-regions, and then each sub-region contains pixels of 5s×5s, and the feature dimension of each corresponding divided region is 4×4×4 = 64.
[0172] Feature marking module 6, the feature marking module 6 is used to mark the feature vector extracted by the feature extraction module 5 according to different external break event types, and construct a training set according to the marked feature vector;
[0173] The model training module 7 is used to train the external break recognition model according to the training set to obtain a trained external break recognition model; preferably, the external break recognition model is constructed based on SVM (Support Vector Machine).
[0174] The model analysis module 8 is used to obtain the trained external break recognition model of the model training module and identify the type of external break event through the trained external break recognition model.
[0175] Obviously, the above-mentioned embodiments of the present invention are merely examples for clearly illustrating the technical solutions of the present invention, rather than limitations on the specific implementation manners of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the claims of the present invention shall be included within the protection scope of the claims of the present invention.
Claims
1. A method for visually identifying external force damage events based on optical cables, characterized in that, The method includes: Collect vibration data in the optical fiber line; Calculate the root mean square (RMS) value of the vibration data; Compare the calculated RMS value with a preset effective threshold; If the RMS value is greater than the preset effective threshold, construct a vibration recognition image based on the vibration data; Extract the feature vector of the vibration recognition image; Continuously collect vibration data in the optical fiber line and obtain the corresponding feature vectors; Mark the feature vectors of the vibration recognition image according to different types of external damage events; Construct a training set based on the marked feature vectors, and input the training set into an external damage recognition model for model training to obtain a trained external damage recognition model; Identify the type of external damage event through the trained external damage recognition model.
2. The method for visually identifying external force damage events based on optical cables according to claim 1, wherein The collection of vibration data in the optical fiber line specifically includes: Sample the X-frame vibration signals in the optical fiber line, where each frame of the vibration signal contains Y sampling points, and both X and Y are greater than 0; Convert the collected vibration signals into frequencies and extract the local frequency domain cumulative values to form vibration data.
3. The method for visual identification of external force damage events based on optical cables according to claim 2, wherein, The calculation of the root mean square (RMS) value of the vibration data specifically includes: Construct an X×Y recognition matrix based on the vibration data; Where the X rows of the recognition matrix correspond to the X frames of the vibration signals, and the Y data in each row represent the vibration data at Y position points within the time interval of one frame of the vibration signal; the Y columns of the recognition matrix correspond to the Y position points, and the X data in each column represent the vibration data at the corresponding position point over time in the X frames of the vibration signals; Calculate the difference between the maximum and minimum values of each column of the recognition matrix to obtain a difference array Rms_pk; Calculate the average value Rms_pk_mean of all the data in the difference array Rms_pk; Calculate the root mean square value of each column of the recognition matrix to obtain a root mean square array; Calculate the average value Rms_x of the root mean square array of the recognition matrix; Calculate the root mean square (RMS) value of the vibration data: RMS value = Rms_pk_mean / Rms_x.
4. The visual recognition method for external force damage events based on optical cables according to claim 2, wherein, The construction of the vibration recognition image based on the vibration data specifically includes: Take the X frames of the vibration data as the horizontal axis, the Y sampling points as the vertical axis, and map the vibration data to RGB data to construct a heat map as the vibration recognition image.
5. The method for visual recognition of external force damage events based on optical cables according to claim 1, characterized in that The extraction of the feature vector of the vibration recognition image specifically includes: Convert the vibration recognition image into a grayscale image and perform integration on the grayscale image to obtain the integrated image SAT of the grayscale image; Perform convolution on the integrated image SAT through box filters of different sizes to obtain the positions of feature points; Taking the positions of the feature points as the center, determine the divided regions, and divide the divided regions into several sub-regions; Calculate the Haar wavelet response of each sub-region, and sum the Haar wavelet responses of each sub-region to obtain the feature vector.
6. The visualization recognition method for external force damage events based on optical cables according to claim 5, characterized in that The performance of convolution on the integrated image SAT through box filters of different sizes to obtain the positions of feature points specifically includes: Convolve the integral image SAT successively through a number of box filters with gradually increasing sizes to obtain an approximate Hessian matrix for each pixel; the approximate Hessian matrix is expressed as follows: The determinant of the approximate Hessian matrix is expressed as: det(H) = D xx *D yy -(ω * D xy ) 2 In the above formula, H represents the approximate Hessian matrix, det(H) represents the determinant value of the approximate Hessian matrix, and D xx represents the convolution of the box filter and the image function I(x, y) of the grayscale image; D yy represents the convolution of the box filter and the image function I(x, y) of the grayscale image,; D xy represents the convolution of the box filter and the image function I(x, y) of the grayscale image,; ω represents the weighting coefficient using the box filter; g(σ) represents the Gaussian function, and σ represents the Gaussian kernel parameter; According to the determinant value of the approximate Hessian matrix, obtain the corresponding response images of the box filters of each size; Construct a scale space based on the response images corresponding to the box filters of each size; In the scale space, compare each pixel point in each response image with m pixel points in its three-dimensional neighborhood to determine the maximum value points, and then use the three-dimensional quadratic fitting method to determine the feature point positions.
7. A method for visual identification of external force damage events based on optical cables according to claim 6, characterized in that, Centered on the feature point position, determine a division region, and divide the division region into several sub-regions, specifically including: Centered on the feature point position, and determine the division region according to the size of the box filter; divide the division region into several square sub-regions of the same size.
8. A method for visual identification of external force damage events based on optical cables according to claim 7, characterized in that, Calculate the Haar wavelet response of each sub-region, sum up the Haar wavelet responses of each sub-region to obtain the feature vector, specifically including: Calculate the response values of the images of each sub-region through the Haar wavelet, and respectively obtain the response dx in the horizontal direction and the response dy in the vertical direction; Sum up the response dx and response dy of each sub-region to obtain the descriptor vector of the sub-region; Aggregate all the descriptor vectors and perform histogram statistics to obtain the feature vector of the vibration recognition image.
9. A visual recognition system for external force damage events based on optical cables, characterized in that, The system includes: A data sampling module, which is used to collect vibration data in the optical fiber line; A data storage module, which is used to store the vibration data collected by the data sampling module; A data calculation module, which is used to calculate the root mean square (RMS) effective value of the vibration data, and compare the RMS effective value with a preset effective threshold to screen out the vibration data whose RMS effective value is greater than the preset effective threshold; An image transformation module, which is used to construct a vibration recognition image according to the vibration data screened out by the data calculation module; A feature extraction module, which is used to extract the feature vector of the vibration recognition image; A feature marking module, which is used to mark the feature vector extracted by the feature extraction module according to different types of external damage events, and construct a training set according to the marked feature vector; A model training module, which is used to train an external damage recognition model according to the training set to obtain a trained external damage recognition model; A model analysis module, which is used to obtain the trained external damage recognition model of the model training module, and identify the type of external damage event through the trained external damage recognition model.
10. The visual recognition system for external force damage events based on optical cables according to claim 9, wherein The data calculation module is used to calculate the RMS effective value of the vibration data, specifically including: The data calculation module constructs an X×Y recognition matrix according to the vibration data; The X rows of the recognition matrix correspond to the X frames of the vibration signals collected by the data sampling module, and the Y data in each row represent the vibration data at Y position points within the time interval of one frame of the vibration signal; the Y columns of the recognition matrix correspond to Y position points, and the X data in each column represent the vibration data at the corresponding position point over time for X frames of the vibration signal; The data calculation module calculates the difference between the maximum value and the minimum value of each column of the recognition matrix to obtain a difference array Rms_pk; The data calculation module calculates the average value Rms_pk_mean of all the data in the difference array Rms_pk; The data calculation module calculates the root mean square value of each column of the recognition matrix to obtain a root mean square value array; The data calculation module calculates the average value Rms_x of the root mean square value array of the recognition matrix; The data calculation module calculates the Rms effective value of the vibration data: Rms effective value = Rms_pk_mean / Rms_x.