Hidden danger detection method, device, equipment and readable storage medium
By using K-D tree technology, the target environment image of the power equipment is obtained, feature vectors are extracted, and the target node with the highest similarity is selected, which solves the problem that manual inspections are difficult to detect hidden dangers in the power system, and achieves efficient hidden danger detection and prevention.
Patent Information
- Application Number
- CN202311239426.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In the prior art, it is difficult to detect safety hazards of the power system in a timely manner, resulting in the inability to effectively prevent accidents in transmission lines.
The multi-dimensional search tree K-D tree is used to obtain the target environment image of the power equipment, extract the feature vector, and select the target node with the highest similarity to the target environment image in the K-D tree to determine the hidden danger detection results, and use multiple hidden danger categories contained in the K-D tree to avoid missed detection.
It improves the efficiency of identifying safety hazards, promptly detect hidden dangers, avoid missed inspections, and ensures the safe and stable operation of the power grid.
Smart Images

Figure CN117218543B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and more specifically, to a hidden danger detection method, device, equipment and readable storage medium. Background Art
[0002] The demand for electricity across all industries continues to increase. Power outages can cause incalculable losses across these sectors. Consequently, early detection, treatment, and prevention of natural disasters and accidents that threaten power transmission lines, while ensuring a stable power supply, have become a major concern. To address this issue, existing technologies rely on manual power inspections to identify potential safety hazards along power transmission lines.
[0003] However, due to the numerous safety hazards in the power system, manual power inspections are difficult to identify all safety hazards, and the efficiency of manual power inspections is low, resulting in the inability of existing technologies to detect safety hazards in a timely manner. Summary of the Invention
[0004] In view of this, the present application provides a hidden danger detection method, device, equipment and readable storage medium to solve the shortcomings of the existing technology that safety hazards cannot be discovered in a timely manner.
[0005] In order to achieve the above objectives, the following solutions are proposed:
[0006] A hidden danger detection method, comprising:
[0007] Obtaining a target environment image containing power equipment and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category;
[0008] Extracting a feature vector of the target environment image;
[0009] Selecting, from the KD tree, a target node having the highest similarity to the target environment image according to the feature vector;
[0010] Determine a hidden danger detection result of the target environment image according to the target node.
[0011] Optionally, obtain a KD tree, including:
[0012] Acquire typical images of different types, and determine hidden danger data of each typical image, wherein each hidden danger data includes a hidden danger category;
[0013] Extracting a typical feature vector of each of the typical images;
[0014] Summarize the typical feature vectors of typical images of the same hidden danger category to form a vector set;
[0015] A KD tree is constructed according to the hidden danger data of each vector set.
[0016] Optionally, each node contains a corresponding hidden danger hazard level;
[0017] The step of selecting, from the KD tree, a target node having the highest similarity to the target environment image according to the feature vector comprises:
[0018] Sort the nodes in the KD tree according to their hidden danger levels from high to low to form a priority search queue;
[0019] According to the feature vector, a target node having the highest similarity to the target environment image is selected from the priority search queue.
[0020] Optionally, selecting, from the priority search queue according to the feature vector, a target node having the highest similarity to the target environment image includes:
[0021] Selecting the first node in the priority search queue as the first node;
[0022] Calculating the distance between the typical eigenvector of the first node and the eigenvector, and taking the distance as the optimal distance;
[0023] Generate a matching node queue, and add the first node to the matching node queue;
[0024] The next node of the first node in the priority search queue is used as the current node;
[0025] Calculating a target distance between the typical eigenvector of the current node and the eigenvector;
[0026] Determining whether the target distance is less than the optimal distance;
[0027] If so, the target distance is used as the new optimal distance, the matching node queue is cleared, and the current node corresponding to the optimal distance is added to the matching node queue; when the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to execute;
[0028] If the target distance is equal to the optimal distance, the current node is added to the matching node queue; if the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to be executed;
[0029] If the target distance is greater than the optimal distance, then when the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical eigenvector of the current node and the eigenvector is returned to.
[0030] According to the finally obtained matching node queue, a target node having the highest similarity to the target environment image is determined.
[0031] Optionally, determining the target node having the highest similarity to the target environment image according to the finally obtained matching node queue includes:
[0032] Adopting a random sampling consensus algorithm RANSAC algorithm to remove mismatched points in the matching node queue to update the matching node queue;
[0033] A target node having the highest similarity to the target environment image is selected from the updated matching node queue.
[0034] Optionally, determining the hidden danger detection result of the target environment image according to the target node includes:
[0035] Using the hidden danger category corresponding to the target node as the target hidden danger category corresponding to the target environment image;
[0036] A hidden danger detection result of the target environment image is determined according to the feature vector and the target hidden danger category.
[0037] Optionally, determining a hidden danger detection result of the target environment image according to the feature vector and the target hidden danger category includes:
[0038] Determine the probability of occurrence of hidden dangers and the level of hidden danger impact range corresponding to the target environment image according to a preset association model, the target hidden danger category and the feature vector;
[0039] Generate a hidden danger hazard level according to the target hidden danger category, the hidden danger occurrence probability, and the hidden danger impact range level;
[0040] A hidden danger detection result is generated according to the target hidden danger category, the hidden danger occurrence probability, the hidden danger impact range level and the hidden danger danger level.
[0041] A hidden danger detection device, comprising:
[0042] An acquisition module is configured to acquire a target environment image including power equipment, and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category;
[0043] An extraction module, configured to extract a feature vector of the target environment image;
[0044] A selection module is used to select a target node with the highest similarity to the target environment image from the KD tree according to the feature vector;
[0045] A determination module is used to determine the hidden danger detection result of the target environment image according to the target node.
[0046] A hidden danger detection device includes a memory and a processor;
[0047] The memory is used to store programs;
[0048] The processor is used to execute the program to implement each step of the above-mentioned hidden danger detection method.
[0049] A readable storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, each step of the above-mentioned hidden danger detection method is implemented.
[0050] It can be seen from the above technical solutions that the hidden danger detection method provided by the present application can obtain a target environment image containing power equipment, and a multidimensional retrieval tree KD tree, wherein each node in the KD tree corresponds to each preset hidden danger category, and each node contains a typical feature vector of multiple typical images corresponding to the hidden danger category. In this way, the present application can obtain a KD tree containing multiple hidden danger categories; extract the feature vector of the target environment image; and select the target node with the highest similarity to the target environment image from the KD tree based on the feature vector; in this way, the present application can use the typical feature vector of each node in the KD tree and the feature vector of the target environment image to determine the target environment image. The target node with the highest similarity to the environment image is selected, thereby determining the hidden danger category of the target environment image; according to the target node, the hidden danger detection result of the target environment image is determined. In this way, the present application can apply the KD tree to determine the hidden danger detection result; the present application can combine the feature vector of the target environment image and the KD tree corresponding to each node and each preset hidden danger category to generate the hidden danger detection result of the target environment image, without the need for manual inspection, further improving the efficiency of safety hazard identification, and the KD tree contains multiple hidden danger categories to avoid the situation of missed safety hazards; it can be seen that the present application can discover safety hazards in a timely manner, so as to promptly handle or prevent accidents that endanger power transmission lines and maintain the safe and stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0052] Figure 1 A flowchart of a hidden danger detection method disclosed in an embodiment of the present application;
[0053] Figure 2 This is a structural block diagram of a hidden danger detection device disclosed in an embodiment of the present application;
[0054] Figure 3 This is a hardware structure block diagram of a hidden danger detection device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0056] The present invention can be used in a variety of general-purpose or special-purpose computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above.
[0057] Next, combine Figure 1 The hidden danger detection method of this application is introduced in detail, including the following steps:
[0058] Step S1: Acquire a target environment image including power equipment and a KD tree.
[0059] Specifically, environmental images around the power equipment can be collected by drones or video monitoring equipment, and any image can be selected from the various environmental images as the target environmental image.
[0060] Among them, power equipment may include transmission lines, power supply equipment and other equipment related to the power grid system.
[0061] When performing hidden danger detection for the first time, a large number of typical safety hidden danger images can be used to construct a KD tree, and the constructed KD tree can be called when hidden danger detection is needed later.
[0062] The KD tree may include all hidden danger categories existing in the power grid system, and each node of the KD tree corresponds one-to-one to each preset hidden danger category, and each node includes typical feature vectors of multiple typical images corresponding to the hidden danger category.
[0063] Step S2: extracting a feature vector of the target environment image.
[0064] Specifically, a target detection algorithm, such as a Spuer Point algorithm, may be used to extract a region of interest in the target environment image, and to extract a feature vector of the region of interest.
[0065] Among them, the target environment image can be pre-processed by grayscale conversion and image enhancement to form a pre-processed image;
[0066] The shared editor can be used to reduce the size of the preprocessed image to form a reduced image to reduce the amount of network calculation. The shared encoder consists of a convolutional layer, three maximum pooling layers, and a nonlinear activation layer. The three maximum pooling layers can convert the original H×W size image into an H c ×W c ×8 image, H c =H / 8,W c =W / 8;
[0067] The reduced image can be input into the feature point detection network to obtain a feature point feature map. The feature point feature map represents the probability corresponding to each pixel in the reduced image. The probability indicates the possibility that the pixel is a feature point. The feature point detection network is essentially a decoding network that decodes the output of the shared encoder. The feature point detection network is a Magic Point network. The Shi-Tomasi algorithm is used to detect the corners of the reduced image. The probability of each pixel in the reduced image becoming a feature point is output through the sub-pixel convolution operation. After multiple iterative learning, a heat map of the reduced image is formed. The heat map is the feature point feature map of the reduced image.
[0068] The reduced image can be input into the descriptor network to obtain the descriptor feature map of the reduced image. The descriptor network is a UCN network. The descriptor network performs convolution decoding on the reduced image to obtain a semi-dense feature descriptor. Then, the semi-dense feature descriptor is processed by combining the bilinear interpolation algorithm and L2-norm normalization to obtain a feature descriptor of unit length.
[0069] The loss value corresponding to each probability and the loss value corresponding to the descriptor can be calculated;
[0070] Among them, a loss calculation function can be used to calculate the loss value corresponding to each probability and the loss value corresponding to the descriptor.
[0071] The loss calculation function can be shown as follows:
[0072] L(X,X',D,D';Y,Y',S)=L p (X,Y)+L p (X',Y')+λL d (D,D',S)
[0073]
[0074]
[0075]
[0076] l d (d hw ,d'h'w' ; s) = λ d *s*max(0,m p -d T d')+(1-s)*max(0,d T d'-m n )
[0077]
[0078] Where L(X,X',D,D';Y,Y',S) is the loss value; L p (X, Y) is the loss value of the feature point feature map, which adopts the cross entropy loss function of full convolution; L p (X', Y') is the loss value of the feature point feature map after homography transformation, and the fully convolutional cross entropy loss function is adopted, where X is the feature point feature map, Y is the label value in the feature point feature map, X' is the feature point feature map after homography transformation, Y' is the label value in the feature point feature map after homography transformation, D is the descriptor feature map, and D' is the descriptor feature map after homography transformation; L d (D, D', S) is the loss function of the descriptor network; H c To reduce the width of the image; W c To reduce the length of the image; h and w are intermediate state quantities; x hw Indicates that the horizontal coordinate on the reduced image is x hw The characteristic point of y hw Indicates that the vertical coordinate on the reduced image is y hw The characteristic points of p (x hw ;y hw ) is the feature point (x hw ,y hw ) corresponding to the loss value; d hw ,d' h'w' Describes the subunit pair; d hw To reduce the feature points on the image; s hwh'w' is the preset intermediate parameter; d' h'w' is the feature point on the heat map; m p is the set positive coefficient; m n is the set negative coefficient; s is the preset indicator function; p hw is the position of the center pixel in the (h; w) unit; p h ' w ' is the position of the center pixel in the (h'; w') unit; For p hw Isotope coordinate position; d T d' is the cosine similarity between d and d'; x hwkIndicates that the horizontal coordinate on the reduced image is x hw The kth feature point of x; k represents the sequence number of the feature point; hwy Refers to the feature point (x hw ,y hw );H phw For p hw The isotope coordinate position of λ d represents a custom adjustment coefficient; λ represents a custom scaling coefficient.
[0079] Feature points can be extracted based on the loss value corresponding to the probability and the loss value corresponding to the descriptor;
[0080] The feature vector of each feature point can be constructed according to the position and descriptor of each feature point, and the feature vectors of each feature point constitute the feature vector of the target environment image.
[0081] Step S3: Selecting a target node having the highest similarity to the target environment image from the KD tree according to the feature vector.
[0082] Specifically, the feature vector of the target environment image may be matched with the typical feature vector of each node in the KD tree, a matching node may be selected, and a node with the highest similarity to the target environment image may be selected from the matching nodes as the target node.
[0083] Step S4: Determine the hidden danger detection result of the target environment image according to the target node.
[0084] Specifically, the hidden danger detection result of the target environment image can be determined according to the hidden danger category corresponding to the target node.
[0085] It can be seen from the above technical solutions that the hidden danger detection method provided by the present application can obtain a target environment image containing power equipment, and a multidimensional retrieval tree KD tree, wherein each node in the KD tree corresponds to each preset hidden danger category, and each node contains a typical feature vector of multiple typical images corresponding to the hidden danger category. In this way, the present application can obtain a KD tree containing multiple hidden danger categories; extract the feature vector of the target environment image; and select the target node with the highest similarity to the target environment image from the KD tree based on the feature vector; in this way, the present application can use the typical feature vector of each node in the KD tree and the feature vector of the target environment image to determine the target environment image. The target node with the highest similarity to the environment image is selected, thereby determining the hidden danger category of the target environment image; according to the target node, the hidden danger detection result of the target environment image is determined. In this way, the present application can apply the KD tree to determine the hidden danger detection result; the present application can combine the feature vector of the target environment image and the KD tree corresponding to each node and each preset hidden danger category to generate the hidden danger detection result of the target environment image, without the need for manual inspection, further improving the efficiency of safety hazard identification, and the KD tree contains multiple hidden danger categories to avoid the situation of missed safety hazards; it can be seen that the present application can discover safety hazards in a timely manner, so as to promptly handle or prevent accidents that endanger power transmission lines and maintain the safe and stable operation of the power grid.
[0086] In some embodiments of the present application, the process of obtaining the KD tree in step S1 is described in detail, and the steps are as follows:
[0087] S10: Acquire typical images of different types, and determine hidden danger data of each typical image, where each hidden danger data includes a hidden danger category.
[0088] Specifically, two or more typical images corresponding to each hidden danger category may be obtained, and the hidden danger category, hidden danger impact range level, hidden danger hazard level and hidden danger occurrence probability of each typical image may be used as the hidden danger data of the typical image.
[0089] The hazard category can be safety distance, line crossing or spanning.
[0090] The level of hidden danger impact range can be determined according to the size of the hidden danger impact range.
[0091] S11. Extracting a typical feature vector of each typical image.
[0092] Specifically, the feature vector of each typical image may be extracted as the typical feature vector of the typical image.
[0093] S12. Summarize the typical feature vectors of typical images of the same hidden danger category to form a vector set.
[0094] Specifically, typical feature vectors of the same hidden danger category may be aggregated to form a vector set corresponding to the hidden danger category, thereby obtaining a vector set for each hidden danger category.
[0095] The hidden danger data of the same hidden danger category are matched with the vector set of the hidden danger category.
[0096] S13. Construct a KD tree according to the hidden danger data of each vector set.
[0097] Specifically, a KD tree can be constructed based on the hidden danger category, hidden danger impact range level, hidden danger hazard level and hidden danger occurrence probability corresponding to each vector set, where one node of the KD tree corresponds to one vector set.
[0098] It can be seen from the above technical solution that this embodiment provides an optional method for constructing a KD tree. Each node in the KD tree constructed by the above method contains typical feature vectors of multiple typical images, so as to subsequently improve the accuracy of identifying safety hazards.
[0099] In some embodiments of the present application, step S3, the process of selecting the target node with the highest similarity to the target environment image from the KD tree according to the feature vector, is described in detail, and the steps are as follows:
[0100] S30 , sorting the nodes in the KD tree from high to low according to their hidden danger levels, to form a priority search queue.
[0101] Specifically, in addition to the typical feature vector, each node may also include the hidden danger level corresponding to each node. The nodes may be sorted according to the hidden danger level to form a priority search queue to determine the matching priority of each node.
[0102] S31 . Selecting a target node having the highest similarity to the target environment image from the priority search queue according to the feature vector.
[0103] Specifically, the distance between each node and the feature vector can be determined in turn according to the priority of each node in the priority search queue, and the similarity between the node and the feature vector can be calculated based on the distance, and the target node with the highest similarity can be selected from each similarity.
[0104] Among them, the distance calculation function can be used to calculate the distance between the node and the feature vector. The distance calculation function can be shown as follows:
[0105]
[0106] Where, L2(x i,x j ) is the feature vector x in the target environment image i Between the feature vector x in the node j distance; k is the dimension of the feature vector; x i (l) is the eigenvector x i The value of the lth dimension, is the eigenvector x j The value of the lth dimension.
[0107] A similarity calculation function can be used to calculate the similarity between the node and the feature vector;
[0108] The similarity calculation function is as follows:
[0109]
[0110] Q is the similarity between the node and the feature vector.
[0111] It can be seen from the above technical solution that this embodiment provides an optional method for selecting target nodes. Through the above method, nodes with higher hidden danger levels can be matched preferentially according to the hidden danger levels corresponding to each node, which can further improve the efficiency of generating hidden danger detection results in this application.
[0112] In some embodiments of the present application, step S31, the process of selecting the target node with the highest similarity to the target environment image from the priority search queue according to the feature vector, is described in detail as follows:
[0113] S310: Select the first node in the priority search queue as the first node.
[0114] Specifically, the node with the highest priority can be selected from the priority search queue as the first node, so that the node with the highest hidden danger level can be selected as the first node.
[0115] S311 : Calculate the distance between the typical eigenvector of the first node and the eigenvector, and use the distance as the optimal distance.
[0116] Specifically, a distance calculation function may be used to calculate the distance between the first node and the feature vector, and this distance may be used as the optimal distance.
[0117] S312: Generate a matching node queue, and add the first node to the matching node queue.
[0118] Specifically, a queue may be generated as a matching node queue, and the first node may be written into the matching node queue.
[0119] S313: Set the next node of the first node in the priority search queue as the current node.
[0120] Specifically, a node with a second-level priority may be selected as the current node.
[0121] S314: Calculate the target distance between the typical feature vector of the current node and the feature vector.
[0122] Specifically, a distance calculation function may be used to calculate the distance between the typical feature vector and the feature vector of the current node as the target distance.
[0123] S315. Determine whether the target distance is less than the optimal distance. If so, execute step S316; if so, execute step S317; if so, execute step S318.
[0124] Specifically, the target distance and the optimal distance can be compared. When the target distance is less than the optimal distance, it indicates that the current node has a higher matching degree with the target environment image, and step S316 can be executed; when the target distance is equal to the optimal distance, it indicates that the matching degree corresponding to the current node is consistent with the matching degree corresponding to the previous node, and step S317 can be executed; when the target distance is greater than the optimal distance, it indicates that the matching degree corresponding to the current node is low, and the current node can be directly ignored, and step S318 can be executed.
[0125] S316 , taking the target distance as the new optimal distance, clearing the matching node queue, adding the current node corresponding to the optimal distance to the matching node queue, and executing step S318 .
[0126] Specifically, the better target distance may be used as the new optimal distance, and all nodes in the matching node queue may be deleted. The current node may be written into the matching node queue, and step S318 may be directly executed.
[0127] S317: Add the current node to the matching node queue, and execute step S318.
[0128] Specifically, the current node may be written into the matching node queue, and step S318 may be directly executed.
[0129] S318. Determine whether the current node is the last node of the priority search queue. If so, execute step S320; if not, execute step S319.
[0130] Specifically, it can be determined whether there are nodes in the priority search queue that have not been matched with the feature vector. If so, step S319 is directly executed to continue node matching. If not, the current matching node queue already contains all nodes that match the target environment image.
[0131] S319: Set the next node of the current node in the priority search queue as the new current node, and return to step S314.
[0132] Specifically, the next node of the current node in the priority search queue may be used as the new current node, and the process directly returns to step S314.
[0133] S320 : Determine the target node with the highest similarity to the target environment image according to the matching node queue finally obtained.
[0134] Specifically, the similarity calculation function can be combined to calculate the similarity between each node in the matching node queue and the target environment image based on the target distance of each node in the latest matching node queue, and determine the target node with the highest similarity to the target environment image based on each similarity.
[0135] It can be seen from the above technical solution that this embodiment provides an optional method for determining the target node based on the priority search queue. Through the above method, the target node with high similarity to the target environment image can be better selected, thereby improving the detection accuracy of this application.
[0136] In some embodiments of the present application, step S320, the process of determining the target node with the highest similarity to the target environment image based on the finally obtained matching node queue, is described in detail. The steps are as follows:
[0137] S3200 : Using the RANSAC algorithm, remove mismatched points in the matching node queue to update the matching node queue.
[0138] Specifically, the RANSAC algorithm can be used to generate the category space model corresponding to each node in the matching node queue according to the typical feature vector of the node in turn; determine whether the feature vector belongs to the local point of the category space model, and if so, determine that the node is a matching point; if not, determine that the node is a mismatch point, delete the mismatch point from the matching node queue, and obtain an updated matching node queue.
[0139] The RANSAC algorithm is a random sampling consensus algorithm.
[0140] S3201: Select a target node with the highest similarity to the target environment image from the updated matching node queue.
[0141] Specifically, after deleting all incorrectly matched points, the similarity of each matching point in the updated matching node queue may be calculated, and the matching point with the highest similarity may be selected from among the matching points as the target node.
[0142] It can be seen from the above technical solution that this embodiment provides an optional method for determining the target node based on the matching node queue. Through the above method, it is possible to avoid the selected target node being a mismatched point, thereby improving the reliability of this application.
[0143] In some embodiments of the present application, the process of determining the hidden danger detection result of the target environment image according to the target node in step S4 is described in detail, and the steps are as follows:
[0144] S40: Using the hidden danger category corresponding to the target node as the target hidden danger category corresponding to the target environment image.
[0145] Specifically, the hidden danger category corresponding to the target node may be directly used as the target hidden danger category of the target environment image.
[0146] S41 : Determine a hidden danger detection result of the target environment image according to the feature vector and the target hidden danger category.
[0147] Specifically, the eigenvectors may be integrated to determine the probability of occurrence of hidden dangers and the level of the hidden danger impact range corresponding to the target environment image.
[0148] Generate hidden danger detection results based on the target hidden danger category, hidden danger occurrence probability and hidden danger impact range level.
[0149] It can be seen from the above technical solution that this embodiment provides an optional method for determining the hidden danger detection results of the target environment image based on the target node. Through the above method, the hidden danger detection results of the target environment image can be determined based on the hidden danger data of the target node, thereby improving the reliability of the hidden danger detection results determined by this application.
[0150] In some embodiments of the present application, the process of determining the hidden danger detection result of the target environment image according to the feature vector and the target hidden danger category in step S41 is described in detail, and the steps are as follows:
[0151] S410 , determining the probability of occurrence of a hidden danger and the level of the hidden danger impact range corresponding to the target environment image according to a preset association model, the target hidden danger category, and the feature vector.
[0152] Specifically, the association model corresponding to the target hidden danger category can be obtained, and the feature vector can be input into the association model to obtain the hidden danger occurrence probability and the hidden danger impact range level output by the association model.
[0153] According to the probability of hidden danger occurrence and the level of hidden danger impact range, the hidden danger detection result of the target environment image can be determined.
[0154] The process of obtaining the associated model can be:
[0155] Based on the association rule algorithm and the mining algorithm, the typical feature vectors of each typical image corresponding to the target hidden danger category and the hidden danger occurrence situation of each typical image are analyzed to form an association model, in which the hidden danger occurrence situation includes whether a fault occurs and the impact range level after the fault occurs.
[0156] S411. Generate a hidden danger risk level according to the target hidden danger category, the hidden danger occurrence probability, and the hidden danger impact range level.
[0157] Specifically, the hidden danger risk coefficient can be calculated according to the risk level calculation function, and the hidden danger risk level can be determined according to the hidden danger risk coefficient.
[0158] The hazard level calculation function is as follows:
[0159] B=αK+βP+γM
[0160] In the formula, B is the hidden danger risk coefficient; K is the target hidden danger category; P is the probability of hidden danger occurrence; M is the level of hidden danger impact range; α is the weight of hidden danger category in the hidden danger risk coefficient; β is the weight of hidden danger occurrence probability in the hidden danger risk coefficient; γ is the weight of hidden danger impact range level in the hidden danger risk coefficient.
[0161] When B is greater than 0 and less than 0.4, the hidden danger level is determined to be a low-risk level. The target environment image of the low-risk level may indicate safety hazards with little impact, such as excessive animals and plants around the power equipment, billboards, floating objects around the power equipment, etc.
[0162] When B is greater than 0.4 and less than 0.7, the hidden danger level is determined to be a medium risk level. The target environment image of the medium risk level may indicate safety hazards such as construction under the line, distribution lines being too close to trees, and crossings between distribution lines, which are likely to cause personal injury or local equipment failures.
[0163] When B is greater than 0.7 and less than 1, the hidden danger level is determined to be a high-risk level. The target environment image of the high-risk level may indicate that the distribution line is too close to the building, the distribution line crosses the railway, etc., which may easily cause a large number of casualties or large-scale equipment failures causing major economic losses, and are serious safety hazards with a wide range of impact.
[0164] S412: Generate a hidden danger detection result based on the target hidden danger category, the hidden danger occurrence probability, the hidden danger impact range level, and the hidden danger hazard level.
[0165] Specifically, the target hidden danger category, hidden danger occurrence probability, hidden danger impact range level and hidden danger hazard level can be summarized to form the hidden danger detection result.
[0166] It can be seen from the above technical solution that this embodiment provides an optional method for determining the hidden danger detection result of the target environment image based on the feature vector and the target hidden danger category. The above method can further improve the accuracy of the hidden danger detection result of this application.
[0167] Next, we will combine Figure 2 The hidden danger detection device provided in this application is introduced in detail. The hidden danger detection device provided below can be compared with the hidden danger detection method provided above.
[0168] See also Figure 2 It can be found that the hidden danger detection device may include:
[0169] An acquisition module 10 is configured to acquire a target environment image including power equipment, and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category;
[0170] An extraction module 20, configured to extract a feature vector of the target environment image;
[0171] A selection module 30 is configured to select a target node having the highest similarity to the target environment image from the KD tree according to the feature vector;
[0172] The determination module 40 is configured to determine a hidden danger detection result of the target environment image according to the target node.
[0173] Furthermore, the acquisition module may include:
[0174] a typical image acquisition unit, configured to acquire typical images of different types and determine hidden danger data of each typical image, wherein each hidden danger data includes a hidden danger category;
[0175] a typical feature vector extraction unit, configured to extract a typical feature vector of each of the typical images;
[0176] A typical feature vector summarizing unit is used to summarize the typical feature vectors of typical images of the same hidden danger category to form a vector set;
[0177] The KD tree construction unit is used to construct a KD tree according to the hidden danger data of each vector set.
[0178] Furthermore, the selection module may include:
[0179] a priority search queue forming unit, configured to sort the nodes in the KD tree according to their hidden danger levels from high to low, to form a priority search queue;
[0180] The target node selection unit is used to select the target node with the highest similarity to the target environment image from the priority search queue according to the feature vector.
[0181] Furthermore, the target node selection unit may include:
[0182] A first node selection subunit, configured to select the first node in the priority search queue as the first node;
[0183] an optimal distance calculation subunit, configured to calculate the distance between the typical eigenvector of the first node and the eigenvector, and use the distance as the optimal distance;
[0184] A matching node queue generating subunit, configured to generate a matching node queue and add the first node to the matching node queue;
[0185] a current node selection subunit, configured to select the next node of the first node in the priority search queue as the current node;
[0186] a target distance calculation subunit, configured to calculate a target distance between the typical feature vector of the current node and the feature vector;
[0187] The distance comparison subunit is used to determine whether the target distance is less than the optimal distance. If so, the matching node queue clearing subunit is called. If equal, the node adding subunit is called. If the target distance is greater than the optimal distance, the current node updating subunit is called.
[0188] a matching node queue clearing subunit, configured to use the target distance as a new optimal distance, clear the matching node queue, and add the current node corresponding to the optimal distance to the matching node queue; and, when the current node is not the last node in the priority search queue, call the current node updating subunit;
[0189] A node adding subunit, configured to add the current node to the matching node queue; and calling the current node updating subunit when the current node is not the last node in the priority search queue;
[0190] a current node updating subunit, configured to set the next node of the current node in the priority search queue as a new current node, and return to call the target distance calculation subunit;
[0191] The similarity comparison subunit is used to determine the target node with the highest similarity to the target environment image based on the matching node queue finally obtained.
[0192] Furthermore, the similarity comparison subunit may include:
[0193] A first similarity comparison subunit is configured to remove mismatched points in the matching node queue by using a random sampling consensus algorithm (RANSAC) to update the matching node queue;
[0194] The second similarity comparison subunit is configured to select a target node having the highest similarity with the target environment image from the updated matching node queue.
[0195] Furthermore, the determination module may include:
[0196] a target hidden danger category determining unit, configured to use the hidden danger category corresponding to the target node as the target hidden danger category corresponding to the target environment image;
[0197] The target hidden danger category utilizing unit is configured to determine a hidden danger detection result of the target environment image according to the feature vector and the target hidden danger category.
[0198] Furthermore, the target hidden danger category utilization unit may include:
[0199] A first target hidden danger category utilizing subunit is configured to determine a hidden danger occurrence probability and a hidden danger impact range level corresponding to the target environment image based on a preset association model, the target hidden danger category, and the feature vector;
[0200] A second target hidden danger category utilizing subunit is configured to generate a hidden danger risk level according to the target hidden danger category, the hidden danger occurrence probability, and the hidden danger impact range level;
[0201] The third target hidden danger category utilizing subunit is configured to generate a hidden danger detection result according to the target hidden danger category, the hidden danger occurrence probability, the hidden danger impact range level, and the hidden danger danger level.
[0202] The hidden danger detection device provided in the embodiment of the present application can be applied to hidden danger detection equipment, such as PC terminals, cloud platforms, servers and server clusters. Figure 3 The hardware structure diagram of the hidden danger detection equipment is shown. Figure 3,The hardware structure of the hidden danger detection device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0203] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0204] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;
[0205] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0206] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0207] Obtaining a target environment image containing power equipment and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category;
[0208] Extracting a feature vector of the target environment image;
[0209] Selecting, from the KD tree, a target node having the highest similarity to the target environment image according to the feature vector;
[0210] Determine a hidden danger detection result of the target environment image according to the target node.
[0211] Optionally, the refined functions and extended functions of the program may refer to the above description.
[0212] The present application also provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0213] Obtaining a target environment image containing power equipment and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category;
[0214] Extracting a feature vector of the target environment image;
[0215] Selecting, from the KD tree, a target node having the highest similarity to the target environment image according to the feature vector;
[0216] Determine a hidden danger detection result of the target environment image according to the target node.
[0217] Optionally, the refined functions and extended functions of the program may refer to the above description.
[0218] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0219] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0220] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. The various embodiments of the present application may be combined with each other. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A hidden danger detection method, characterized in that: include: Obtaining a target environment image containing power equipment and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category; Extracting a feature vector of the target environment image; Sort the nodes in the KD tree according to their hidden danger levels from high to low to form a priority search queue; Selecting the first node in the priority search queue as the first node; Calculating the distance between the typical eigenvector of the first node and the eigenvector, and taking the distance as the optimal distance; Generate a matching node queue, and add the first node to the matching node queue; The next node of the first node in the priority search queue is used as the current node; Calculating a target distance between the typical eigenvector of the current node and the eigenvector; Determining whether the target distance is less than the optimal distance; If so, the target distance is used as the new optimal distance, the matching node queue is cleared, and the current node corresponding to the optimal distance is added to the matching node queue; when the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to execute; If the target distance is equal to the optimal distance, the current node is added to the matching node queue; if the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to be executed; If the target distance is greater than the optimal distance, then when the current node is not the last node in the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical eigenvector of the current node and the eigenvector is returned to. Determine the target node with the highest similarity to the target environment image based on the matching node queue finally obtained; Determine a hidden danger detection result of the target environment image according to the target node.
2. The hidden danger detection method according to claim 1, characterized in that: Get the KD tree, including: Acquire typical images of different types, and determine hidden danger data of each typical image, wherein each hidden danger data includes a hidden danger category; Extracting a typical feature vector of each of the typical images; Summarize the typical feature vectors of typical images of the same hidden danger category to form a vector set; A KD tree is constructed according to the hidden danger data of each vector set.
3. The hidden danger detection method according to claim 1, characterized in that: The step of determining the target node having the highest similarity to the target environment image according to the finally obtained matching node queue includes: Adopting a random sampling consensus algorithm RANSAC algorithm to remove mismatched points in the matching node queue to update the matching node queue; A target node having the highest similarity to the target environment image is selected from the updated matching node queue.
4. The hidden danger detection method according to claim 1, characterized in that: The step of determining the hidden danger detection result of the target environment image according to the target node includes: Using the hidden danger category corresponding to the target node as the target hidden danger category corresponding to the target environment image; A hidden danger detection result of the target environment image is determined according to the feature vector and the target hidden danger category.
5. The hidden danger detection method according to claim 4, characterized in that: The determining, based on the feature vector and the target hidden danger category, a hidden danger detection result of the target environment image includes: Determine the probability of occurrence of hidden dangers and the level of hidden danger impact range corresponding to the target environment image according to a preset association model, the target hidden danger category and the feature vector; Generate a hidden danger hazard level according to the target hidden danger category, the hidden danger occurrence probability, and the hidden danger impact range level; A hidden danger detection result is generated according to the target hidden danger category, the hidden danger occurrence probability, the hidden danger impact range level and the hidden danger danger level.
6. A hidden danger detection device, characterized in that: include: An acquisition module is configured to acquire a target environment image including power equipment, and a multidimensional search tree (KD tree), wherein each node in the KD tree corresponds one-to-one to each preset hidden danger category, and each node contains typical feature vectors of multiple typical images corresponding to the hidden danger category; An extraction module, configured to extract a feature vector of the target environment image; A selection module is used to sort the nodes in the KD tree according to their hidden danger levels from high to low to form a priority search queue; select the node ranked first in the priority search queue as the first node; calculate the distance between the typical feature vector of the first node and the feature vector, and use the distance as the optimal distance; generate a matching node queue, add the first node to the matching node queue; and use the next node of the first node in the priority search queue as the current node; Calculate the target distance between the typical feature vector of the current node and the feature vector; determine whether the target distance is less than the optimal distance; if so, use the target distance as the new optimal distance, clear the matching node queue, and add the current node corresponding to the optimal distance to the matching node queue; when the current node is not the last node of the priority search queue, use the next node of the current node in the priority search queue as the new current node, and return to the step of calculating the target distance between the typical feature vector of the current node and the feature vector; if the target distance is equal to the optimal distance, add the current node to the matching node queue; When the current node is not the last node of the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to execute; if the target distance is greater than the optimal distance, when the current node is not the last node of the priority search queue, the next node of the current node in the priority search queue is used as the new current node, and the step of calculating the target distance between the typical feature vector of the current node and the feature vector is returned to execute; according to the matching node queue finally obtained, the target node with the highest similarity to the target environment image is determined; A determination module is used to determine the hidden danger detection result of the target environment image according to the target node.
7. A hidden danger detection device, characterized in that: including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the hidden danger detection method according to any one of claims 1 to 5.
8. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the hidden danger detection method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Power transmission line potential safety hazard classification identification method and system
CN112419680A
Indexing method, retrieval method, and storage medium thereof
JP2012063959A