Power grid hidden danger self-classification identification method and system
By using hidden danger text to identify hidden dangers in power grids to build self-categorized labels and convolutional neural network models, the problems of large workload and fixed classification in the existing technology are solved, and adaptive classification recognition and refinement analysis of hidden dangers in power grids are realized.
Patent Information
- Application Number
- CN202410017987.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-03-28
AI Technical Summary
The existing technology relies on a large number of manual labeling in the identification of hidden dangers of power grids, resulting in fixed classification and lack of flexibility, making it difficult to achieve detailed analysis and coordinated rectification.
Self-classification tags are constructed through hidden danger text, combined with convolutional neural network model, adaptive classification and recognition of hidden danger images are realized, and manual labeling is reduced.
Adaptive classification and recognition of hidden danger images is realized, the degree of refinement and rectification efficiency of hidden danger analysis is improved, and the distribution characteristics of actual hidden dangers can be better reflected.
Smart Images

Figure CN119723141A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hidden danger identification, and in particular to a method and system for self-classification identification of hidden dangers in power grids. Background Art
[0002] At present, there are two main ways to detect hidden dangers in power grid systems: manual inspection and drone inspection. During the inspection, inspectors or drones will take a large number of photos. When hidden dangers are found, they are reported by describing the hidden danger problems and combining them with corresponding photos. However, a large amount of hidden danger image data requires manual judgment, and the judgment range is a fixed category based on the operating status of the equipment. The quality of hidden danger analysis depends on manual experience. Therefore, manual review and labeling is still the main means of hidden danger analysis. Its characteristics are fixed classification and an imbalance in the number of different classifications.
[0003] Patent CN112101181A discloses an automated hidden danger scene recognition method and system based on deep learning, which obtains a certain number of hidden danger scene pictures as training samples; annotates and saves the hidden danger objects and hidden danger types in the training samples; establishes a deep learning model, and uses the annotated samples to train the deep learning model; obtains the scene pictures to be recognized with timestamps and location information through a mobile terminal, and recognizes the scene pictures to be recognized through the deep learning model to identify the hidden danger objects and hidden danger types. However, this solution requires a large number of manually annotated data sets for training, resulting in a large workload for hidden danger classification and annotation, fixed classification, and lack of flexibility in hidden danger classification. Summary of the invention
[0004] The technical problem to be solved by the present invention is: in view of the technical problems existing in the prior art, the present invention provides a method and system for self-classification and identification of power grid hidden dangers, which constructs hidden danger self-classification labels through hidden danger texts to realize adaptive classification and identification of hidden danger images.
[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0006] A method for self-classification and identification of power grid hidden dangers comprises the following steps:
[0007] S101) obtaining a hidden danger image sample and a hidden danger description text sample, wherein the hidden danger description text sample is a hidden danger description text corresponding to the hidden danger image sample, and preprocessing the hidden danger image sample to obtain image data;
[0008] S102) performing word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set, converting all the word segmentations in the word segmentation set into corresponding word vectors, clustering all the word vectors, and then selecting the cluster center as the hidden danger image label of the corresponding hidden danger image sample;
[0009] S103) Using the image data corresponding to the hidden danger image samples and the hidden danger image labels to train the specified convolutional neural network model, obtaining the real-time photos and inputting them into the trained convolutional neural network model after preprocessing, to obtain the hidden danger identification and classification results of the real-time photos.
[0010] Furthermore, when obtaining the hidden danger image sample and the hidden danger description text sample in step S101, it includes:
[0011] S201) obtaining hidden danger images and corresponding hidden danger description texts within a specified time range in a database;
[0012] S202) Perform data cleaning to screen out valid hidden danger images and corresponding hidden danger description texts as hidden danger image samples and hidden danger description text samples, wherein the valid hidden danger images and corresponding hidden danger description texts specifically refer to hidden danger images whose hidden danger image mapping is not empty, whose validity flag is valid, and whose hidden danger description text length is greater than a specified value and hidden danger images and corresponding hidden danger description texts.
[0013] Furthermore, in step S101, preprocessing the hidden danger image sample to obtain image data specifically includes:
[0014] S301) adjusting the sizes of all hidden danger image samples to the same size;
[0015] S302) Converting the resized hidden danger image sample into a grayscale image, wherein the grayscale value of each pixel in the grayscale image is the average brightness of the three primary colors of red, green and blue of the corresponding pixel in the hidden danger image sample.
[0016] Furthermore, in step S102, when the hidden danger description text sample is subjected to word segmentation preprocessing to obtain a corresponding word segmentation set, it includes:
[0017] S401) matching the modal particles and pause words in the first dictionary with the hidden danger description text sample, and deleting the matching results in the hidden danger description text sample;
[0018] S402) Using a specified word segmentation algorithm, select words from the hidden danger description text sample to match the second dictionary, and if there is a matching result, add the matching result to the corresponding word segmentation set.
[0019] Furthermore, the specified word segmentation algorithm includes any one of a forward maximum matching method, a reverse maximum matching method, a minimum segmentation method, a bidirectional maximum matching method, and a complex maximum matching method.
[0020] Furthermore, when all the segmentations in the segmentation set are converted into corresponding word vectors in step S102, it includes: taking each segmentation in the segmentation set and the segmentation in its context as training instances, and iteratively training the segmentation embedding model with the training instances, so that the trained segmentation embedding model outputs the embedding vector corresponding to the segmentation as the word vector.
[0021] Furthermore, the maximization objective of the word segmentation embedding model is:
[0022]
[0023] Among them, P(w i+j |w i ) is the co-occurrence probability of the word and the context, expressed as follows:
[0024]
[0025] Among them, w i+j Yes i The context of w i is the i-th word in a sequence of K words, c is the word skipping window value, which represents the context of a word in natural language. The context of w(t) is from w(tc) to w(t+c), which is reflected in the equipment hazard description text. NS is the node w i The negative sampling set, σ symbol represents σ(x) = 1 / (1+exp(-x)), u is the output vector of the central word, and v is the original input vector of the context.
[0026] Furthermore, when clustering all word vectors of the hidden danger description text sample in step S102, it includes: calculating the similarity between every two word vectors respectively, dividing all word vectors into at least one cluster according to the similarity, and the similarity between any two word vectors in each cluster is greater than a preset threshold.
[0027] Furthermore, when all word vectors are divided into at least one cluster according to the similarity, it specifically includes: calculating the availability matrix A and the responsibility matrix R of all word vectors according to the similarity, the responsibility matrix value r(i, k) of the responsibility matrix R represents the feasibility of selecting word segmentation wk as the cluster center of word segmentation wi, and the availability matrix value a(i, k) of the availability matrix A represents the feasibility of selecting word segmentation wi as the cluster center of word segmentation wk, setting the damping coefficient λ to control the cluster propagation efficiency, and iteratively updating the availability matrix A and the responsibility matrix R until the maximum number of iterations is reached or the cluster center remains unchanged.
[0028] The present invention also provides a self-classification and identification system for power grid hidden dangers, comprising:
[0029] A data acquisition module, used to acquire hidden danger image samples and hidden danger description text samples, wherein the hidden danger description text samples are hidden danger description texts corresponding to the hidden danger image samples;
[0030] An image data preprocessing module is used to preprocess hidden danger image samples to obtain image data;
[0031] A text preprocessing module is used to perform word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set;
[0032] The label generation module is used to convert all the words in the word set into corresponding word vectors through word embedding, and is also used to cluster all the word vectors through clustering analysis, and then select the cluster center as the hidden danger image label of the corresponding hidden danger image sample;
[0033] A model training module is used to train a specified convolutional neural network model using image data corresponding to hidden danger image samples and hidden danger image labels;
[0034] The classification and recognition module is used to obtain real-time photos and input them into the trained convolutional neural network model after preprocessing to obtain the hidden danger identification and classification results of the real-time photos.
[0035] Compared with the prior art, the advantages of the present invention are:
[0036] The present invention automatically generates hidden danger image label classification based on hidden danger description text, avoiding a large amount of manual labeling work, and the labeling quality is more stable. Compared with the manual labeling method of the existing recognition model, the adaptive hidden danger classification extracted from the hidden danger text data can better reflect the actual hidden danger distribution characteristics than the artificial fixed classification.
[0037] The present invention can achieve more detailed hidden danger analysis and precise management for frequent hidden dangers through hidden danger self-classification. For various types of hidden dangers, higher-dimensional hidden danger aggregation can be achieved, providing target targeting for the coordinated rectification of hidden dangers and improving the efficiency of hidden danger rectification. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0040] S Power Supply Company uses its internal mobile application "Snap a Picture and Fix It Now" to investigate and manage safety hazards in power grid equipment, such as trees and bamboo touching power lines, conflicts between houses and power lines, crossing fish ponds, offline construction, and equipment defects. When users discover hidden dangers in daily production activities, they report them by describing the hidden danger problems and taking photos. However, in the specific implementation process, there is a large amount of hidden danger image data that requires manual judgment, and the judgment range is a fixed category based on the operating status of the equipment. The quality of hidden danger analysis depends on manual experience. There is an urgent need for a hidden danger image processing method to automatically classify and identify the hidden danger types.
[0041] In order to solve the problems of large workload of manual labeling and identification of hidden dangers in power grid equipment, fixed classification, lack of flexibility in hidden danger classification, which leads to difficulty in detailed analysis of frequent hidden dangers and difficulty in coordinated rectification of most hidden dangers, this embodiment proposes a self-classification and identification method for power grid hidden dangers, which constructs hidden danger self-classification labels through hidden danger texts, realizes adaptive classification and identification of hidden danger equipment, provides target targeting for detailed analysis of frequent hidden dangers and coordinated rectification of hidden dangers, and improves the efficiency of hidden danger rectification. Figure 1 As shown, the following steps are included:
[0042] S101) obtaining a hidden danger image sample and a hidden danger description text sample, wherein the hidden danger description text sample is a hidden danger description text corresponding to the hidden danger image sample, and preprocessing the hidden danger image sample to obtain image data;
[0043] S102) performing word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set, converting all the word segmentations in the word segmentation set into corresponding word vectors, clustering all the word vectors, and then selecting the cluster center as the hidden danger image label of the corresponding hidden danger image sample;
[0044] S103) Using the image data corresponding to the hidden danger image samples and the hidden danger image labels to train the specified convolutional neural network model, obtaining the real-time photos and inputting them into the trained convolutional neural network model after preprocessing, to obtain the hidden danger identification and classification results of the real-time photos.
[0045] Each step is described in detail below.
[0046] In step S101, when obtaining hidden danger image samples and hidden danger description text samples, the hidden danger image samples and hidden danger description text samples are sample data of effective hidden danger photos and text description data cleaned and screened out in the database. The hidden danger images and corresponding hidden danger description texts reported by users to the database will carry a reporting timestamp. Therefore, when obtaining hidden danger image samples and hidden danger description text samples in step S101, it includes:
[0047] S201) Acquiring hidden danger images and corresponding hidden danger description texts within a specified time range in the database, usually hidden danger images and corresponding hidden danger description texts from January to December of a certain year;
[0048] S202) Perform data cleaning to screen out valid hidden danger images and corresponding hidden danger description texts as hidden danger image samples and hidden danger description text samples. The valid hidden danger images and corresponding hidden danger description texts specifically refer to hidden danger images whose hidden danger image mapping is not empty, whose validity flag is valid, and whose hidden danger description text length is greater than a specified value. In this embodiment, the specified value is 5.
[0049] In step S101, the preprocessing measures for the hidden danger image samples include converting the photos uploaded by the user to the same size, converting the same size pictures into grayscale images, visually increasing the contrast, and highlighting the target area. After the preprocessing is completed, the image data is formed. Specifically, when the hidden danger image samples are preprocessed to obtain the image data in step S101, it specifically includes:
[0050] S301) adjusting the sizes of all hidden danger image samples to the same size. In this embodiment, batch normalization of image sizes is achieved by using the resize function in the Python image processing Pillow library;
[0051] S302) Convert the resized hidden danger image sample into a grayscale image to increase the contrast visually and highlight the target area. The grayscale value of each pixel in the grayscale image is the average brightness of the red, green and blue primary colors of the corresponding pixel in the hidden danger image sample, and the expression is as follows:
[0052] Gray(i,j)={R(i,j)+G(i,j)+B(i,j)} / 3
[0053] Among them, Gray(i,j) represents the gray value of the pixel with coordinates (i,j) in the grayscale image, and R(i,j), G(i,j) and B(i,j) respectively represent the brightness values of the red, green and blue primary colors of the pixel with coordinates (i,j) in the hidden danger image sample before grayscale image conversion.
[0054] In step S102 of this embodiment, firstly, the natural language text in the hidden danger description text sample is preprocessed by word segmentation. The preprocessing measures include using a semantic dictionary to filter and delete modal particles and pause words, and using a word segmentation tool to divide a text into multiple semantic phrases and form a set. Specifically, when the hidden danger description text sample is preprocessed by word segmentation in step S102 to obtain the corresponding word segmentation set, it includes:
[0055] S401) matching modal particles and pause words in a semantic dictionary (referred to as a first dictionary in this embodiment for distinction) with a hidden danger description text sample, and deleting matching results in the hidden danger description text sample;
[0056] S402) Using the specified word segmentation algorithm, select a word matching dictionary (referred to as the second dictionary in this embodiment for distinction) from the hidden danger description text sample, and if there is a matching result, add the matching result to the corresponding word segmentation set.
[0057] In this embodiment, using the specified word segmentation algorithm specifically refers to running the maximum matching algorithm and its improved solutions through the word segmentation tool, including any one of the forward maximum matching method, the reverse maximum matching method, the minimum segmentation method, the bidirectional maximum matching method, and the complex maximum matching method. The idea of the maximum matching method is to first establish a longest word number, for example 6, and then take the first 6 words of the sentence of the field to be segmented to check the dictionary. If no word is found, remove the last word and continue to search until a word is found.
[0058] In step S102 of this embodiment, after obtaining the word segmentation set, the set needs to be converted into a word that best reflects the semantics of the original text, which includes two parts, one part is the word segmentation embedding, and the other part is the clustering analysis.
[0059] Word embedding refers to converting a word into a vector in encoded form using a word embedding model. Multiple phrases will generate multiple vectors, and multiple vectors of the same text constitute a vector set.
[0060] Cluster analysis refers to cluster analysis of vector sets. The location of the cluster center point is the semantic vector that best reflects the meaning of the text. For a text describing equipment hazards, the location of the cluster center point is the high-dimensional self-classification label that best summarizes the equipment hazards.
[0061] In this embodiment, clustering analysis can only be performed after all texts have completed word segmentation and embedding. This is because only after the word segmentation and embedding of all texts are completed can the phrase vector space be sufficiently saturated, thereby ensuring that a semantic vector exists at the center point of each cluster or its near point.
[0062] Step S102 of this embodiment adopts a new text classification method that combines a dynamic semantic representation model and a deep neural network classification. The dynamic semantic representation model quantifies the text, and the model includes a word segmentation embedding model and a clustering analysis algorithm to select the core semantic words of the hidden danger text.
[0063] In the word segmentation embedding model, we can get the corpus dictionary D after word segmentation. The corpus dictionary D is composed of the word segmentation set T of all the hidden danger description texts in the data set. Specifically, for the jth text, it is the word segmentation set T of the description text of the jth hidden danger. j , the word embedding model is to learn the co-occurrence characteristics of words in the word segmentation set. More formally speaking, given a sequence T containing K words j , which can be expressed as w1-w K , the maximization objective of word segmentation embedding model learning is:
[0064]
[0065] w(t) is a word at the current position t in the text, t is greater than 1 and less than K. The feature extraction process of a single word w(t) is to train the word segmentation embedding model for the word segmentation set. c is the skip-word window value, which represents the context of a word in natural language. The context of w(t) is from w(tc) to w(t+c), which is reflected in the equipment hazard description text. Taking "clearing branches and touching the wire risk" as an example, the word segmentation set is {"cleaning", "branches", "touching the wire", "risk"}, w(2) is "branch", when c is 1, its context is w(1) "cleaning", w(3) "touching the wire", and the model training process is to maximize the co-occurrence probability P(w i+j |w i ), that is, w(2) “branch” is input into the word segmentation model, and the output should be as close to its context as possible, that is, w(1) “cleaning” and w(3) “touching the line”. This is also the main idea of the word segmentation embedding model.
[0066] In the process of model training, in order to speed up the training, P(w i+j |w i ), so that it becomes:
[0067]
[0068] Where NS is the negative sampling set of node wi, σ symbol means σ(x) = 1 / (1+exp(-x)), u is the output vector of the central word, and v is the original input vector of the context, which is generally a onehot vector representation. After the model training is completed, inputting a word node will get its context node.
[0069] A more important goal of the word segmentation embedding model is to obtain the embedding representation of each word, and words with the same context will obtain similar hidden vectors. This feature is reflected in the processing of equipment hidden dangers, that is, when describing hidden dangers, words that frequently appear in the same position in the detailed hidden danger description text share the same context and obtain similar embedding representations. For example, the context of "vine man" is usually "cleaning" or "touching the line", so "vine man" and "branch" will obtain similar embedding vectors.
[0070] After the word segmentation embedding model is trained, the embedding vector v(w) and feature matrix T of each word in the hidden danger description can be obtained. i , where each column of the feature matrix represents the embedding vector v of each word.
[0071] The feature matrix can be used to perform cluster analysis on text words, and words with similar semantics when describing hidden dangers can be placed in the same category, such as "vines" and "tree branches".
[0072] In order to reflect the regional characteristics in self-classification, the time and location attributes of the label are added with reference to the time and longitude and latitude of the hidden danger uploaded by the user. That is, in each clustering process, the optimal cluster center is extracted as the cluster center of the current hidden danger description text word set. If the cohesion degree of multiple cluster centers is the same, the cluster center with time and longitude information close to the hidden danger description text word set is selected first.
[0073] In this embodiment, the cluster center selection is not limited to the word set where the word vector is located, but is selected from the word vectors generated by all word sets. During the clustering process, for the similarity matrix T, when the similarity between word wi and word wj is equal to the similarity between wj and word wi, T(i,j)=T(j,i), and the matrix is a symmetric matrix. On the contrary, when the similarity between word wi and word wj is greater than the similarity between wj and word wi, T(i,j)>T(j,i). Based on the similarity matrix, its availability matrix A and responsibility matrix R can be calculated. The responsibility matrix value r(i,k) indicates the feasibility of selecting wk as the cluster center of wi, and the availability matrix value a(i,k) indicates the feasibility of selecting wi as the cluster center of wk. The damping coefficient λ is set to control the clustering propagation efficiency. Finally, the responsibility matrix r(i,k) and the availability matrix a(i,k) are iteratively updated by the following formula until the maximum number of iterations is reached or the cluster center remains unchanged, thereby completing the clustering algorithm training.
[0074] R t+1 (i,k)=(1-λ)R t+1 (i,k)+λR t (i,,k)
[0075] A t+1 (i,k)=(1-λ)A t+1 (i,k)+λA t (i,k)
[0076] Therefore, in step S102, when converting all the segmentations in the segmentation set into corresponding word vectors, it includes: taking each segmentation in the segmentation set and the segmentation in its context as training instances, and iteratively training the segmentation embedding model with the training instances, so that the trained segmentation embedding model outputs the embedding vector corresponding to the segmentation as the word vector.
[0077] Furthermore, when clustering all word vectors of the hidden danger description text sample in step S102, it includes: calculating the similarity between every two word vectors respectively, dividing all word vectors into at least one cluster according to the similarity, and the similarity between any two word vectors in each cluster is greater than a preset threshold.
[0078] In step S103 of this embodiment, the convolutional neural network model is iteratively trained according to the hidden danger image data and the high-dimensional self-classification labels; after the training, the convolutional neural network model can perform high-dimensional self-classification recognition on the unclassified photos in the test data. In this embodiment, the convolutional neural network model is a DenseNet network model. In the structure of the DenseNet network model, [X0, X1, ..., X l-1 ] represents the output feature map of layer 0 to l-1. The combination function includes three related operations: nonlinear transformation + normalization + convolution operation, using ReLU, BN, and 3*3Conv. The pooling layer includes: normalization, 1*1 convolution, pooling, using BN, 1*1Conv, and 2*2Avg Pooling. In order to further promote the information flow between different layers, DenseNet splices the outputs of all previous layers into the mapping of this layer. For the l-th mapping function H(·), its input is the splicing of all previous feature maps, and the calculation method is as follows
[0079] x l =H l ([x0,x1,...,x l-1 ])
[0080] The final output layer is a k-dimensional fully connected layer f and a softmax function to obtain k classification results. The calculation method is as follows:
[0081]
[0082] After the DenseNet network model is trained, upload unrecognized photos to it and get the self-classification results of the uploaded photos.
[0083] Embodiment 2
[0084] This embodiment proposes a self-classification and identification system for power grid hidden dangers based on the method of the first embodiment, including:
[0085] A data acquisition module, used to acquire hidden danger image samples and hidden danger description text samples, wherein the hidden danger description text samples are hidden danger description texts corresponding to the hidden danger image samples;
[0086] An image data preprocessing module is used to preprocess hidden danger image samples to obtain image data;
[0087] A text preprocessing module is used to perform word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set;
[0088] The label generation module is used to convert all the words in the word set into corresponding word vectors through word embedding, and is also used to cluster all the word vectors through clustering analysis, and then select the cluster center as the hidden danger image label of the corresponding hidden danger image sample;
[0089] A model training module is used to train a specified convolutional neural network model using image data corresponding to hidden danger image samples and hidden danger image labels;
[0090] The classification and recognition module is used to obtain real-time photos and input them into the trained convolutional neural network model after preprocessing to obtain the hidden danger identification and classification results of the real-time photos.
[0091] In this embodiment, the data acquisition module extracts valid data from the database for training, directly extracts hidden danger text data and image data mapping, determines the validity of the hidden danger data, removes data items without images and data items with hidden danger text length less than 5 words, and then forms a sample data set.
[0092] In this embodiment, the image data preprocessing module preprocesses the hidden danger photos uploaded by the user. During the preprocessing process, the photos uploaded by the user are first converted to the same size, and the conversion method is the resize function in the pillow package to achieve batch normalization of the photo size. Then the same size pictures are converted into grayscale images to increase the visual contrast and highlight the target area. During the processing, the maximum value of the three-component brightness R, G, B in the color image is used as the grayscale value of the grayscale image through the average value method.
[0093] In this embodiment, the text preprocessing module performs word segmentation preprocessing on the natural language text describing the hidden dangers. The preprocessing measures include using a semantic dictionary to screen and delete modal particles and pause words. The word segmentation is performed through the maximum matching method. First, a longest word number is established, and then a corresponding number of words are selected from the text sentence according to the longest word number to search the dictionary. If no word is found, the last word is removed and the search continues until a word is found.
[0094] In this embodiment, the label generation module adopts a new text classification method that combines a dynamic semantic representation model and a deep neural network classification. The dynamic semantic representation model quantifies the text, and the model includes a word segmentation embedding model and a clustering analysis algorithm to select the core semantic words of the hidden danger text.
[0095] In this embodiment, the model training module constructs a self-classification recognition model, which adopts a DenseNet network structure and uses self-classification labels and image data to train the classification recognition model.
[0096] In this embodiment, the classification recognition module implements self-classification identification for the photos uploaded by the user through the self-classification recognition model. The identification is echoed as a field in the mobile application and is stored in the database after the user confirms it.
[0097] In summary, when constructing an image recognition training model, the present invention automatically generates hidden danger image label classifications based on hidden danger text, avoiding a large amount of manual labeling work, and the labeling quality is more stable. Compared with the manual labeling method of the existing recognition model, the adaptive hidden danger classification extracted from the hidden danger text data can better reflect the distribution characteristics of the actual hidden dangers than the artificial fixed classification.
[0098] Through the self-classification of hidden dangers, more detailed hidden danger analysis and precise management can be achieved for frequently occurring hidden dangers. For various types of hidden dangers, higher-dimensional hidden danger aggregation can be achieved, providing target targeting for the coordinated rectification of hidden dangers and improving the efficiency of hidden danger rectification.
[0099] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for self-classification and identification of power grid hidden dangers, characterized in that: The following steps are involved: S101) obtaining a hidden danger image sample and a hidden danger description text sample, wherein the hidden danger description text sample is a hidden danger description text corresponding to the hidden danger image sample, and preprocessing the hidden danger image sample to obtain image data; S102) performing word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set, converting all the word segmentations in the word segmentation set into corresponding word vectors, clustering all the word vectors, and then selecting the cluster center as the hidden danger image label of the corresponding hidden danger image sample; S103) Using the image data corresponding to the hidden danger image samples and the hidden danger image labels to train the specified convolutional neural network model, obtaining the real-time photos and inputting them into the trained convolutional neural network model after preprocessing, to obtain the hidden danger identification and classification results of the real-time photos.
2. The method for self-classification and identification of power grid hidden dangers according to claim 1, characterized in that: When obtaining hidden danger image samples and hidden danger description text samples in step S101, it includes: S201) obtaining hidden danger images and corresponding hidden danger description texts within a specified time range in a database; S202) Perform data cleaning to screen out valid hidden danger images and corresponding hidden danger description texts as hidden danger image samples and hidden danger description text samples, wherein the valid hidden danger images and corresponding hidden danger description texts specifically refer to hidden danger images whose hidden danger image mapping is not empty, whose validity flag is valid, and whose hidden danger description text length is greater than a specified value and hidden danger images and corresponding hidden danger description texts.
3. The method for self-classification and identification of power grid hidden dangers according to claim 1, characterized in that: When the hidden danger image sample is preprocessed to obtain image data in step S101, it specifically includes: S301) adjusting the sizes of all hidden danger image samples to the same size; S302) Converting the resized hidden danger image sample into a grayscale image, wherein the grayscale value of each pixel in the grayscale image is the average brightness of the three primary colors of red, green and blue of the corresponding pixel in the hidden danger image sample.
4. The method for self-classification and identification of power grid hidden dangers according to claim 1, characterized in that: In step S102, when the hidden danger description text sample is preprocessed by word segmentation to obtain a corresponding word segmentation set, it includes: S401) matching the modal particles and pause words in the first dictionary with the hidden danger description text sample, and deleting the matching results in the hidden danger description text sample; S402) Using a specified word segmentation algorithm, select words from the hidden danger description text sample to match the second dictionary, and if there is a matching result, add the matching result to the corresponding word segmentation set.
5. The method for self-classification and identification of power grid hidden dangers according to claim 4 is characterized in that: The specified word segmentation algorithm includes any one of a forward maximum matching method, a reverse maximum matching method, a minimum segmentation method, a bidirectional maximum matching method, and a complex maximum matching method.
6. The method for self-classification and identification of power grid hidden dangers according to claim 1, characterized in that: When all the segmentations in the segmentation set are converted into corresponding word vectors in step S102, it includes: taking each segmentation in the segmentation set and the segmentation in its context as training instances, and iteratively training the segmentation embedding model with the training instances, so that the trained segmentation embedding model outputs the embedding vector corresponding to the segmentation as the word vector.
7. The method for self-classification and identification of power grid hidden dangers according to claim 6, characterized in that: The maximization objective of the word segmentation embedding model is: Among them, P(w i+j |w i ) is the co-occurrence probability of the word and the context, expressed as follows: Among them, w i+j Yes i The context of w i is the i-th word in a sequence of K words, c is the word skipping window value, which represents the context of a word in natural language. The context of w(t) is from w(tc) to w(t+c), which is reflected in the equipment hazard description text. NS is the node w i The negative sampling set, σ symbol represents σ(x) = 1 / (1+exp(-x)), u is the output vector of the central word, and v is the original input vector of the context.
8. The method for self-classification and identification of power grid hidden dangers according to claim 1, characterized in that: When clustering all word vectors of the hidden danger description text sample in step S102, it includes: calculating the similarity between every two word vectors respectively, dividing all word vectors into at least one cluster according to the similarity, and the similarity between any two word vectors in each cluster is greater than a preset threshold.
9. The method for self-classification and identification of power grid hidden dangers according to claim 8, characterized in that: When all word vectors are divided into at least one cluster according to the similarity, it specifically includes: calculating the availability matrix A and the responsibility matrix R of all word vectors according to the similarity, the responsibility matrix value r(i, k) of the responsibility matrix R represents the feasibility of selecting word segmentation wk as the cluster center of word segmentation wi, the availability matrix value a(i, k) of the availability matrix A represents the feasibility of selecting word segmentation wi as the cluster center of word segmentation wk, setting the damping coefficient λ to control the cluster propagation efficiency, and iteratively updating the availability matrix A and the responsibility matrix R until the maximum number of iterations is reached or the cluster center remains unchanged.
10. A self-classification and identification system for power grid hidden dangers, characterized in that: include: A data acquisition module, used to acquire hidden danger image samples and hidden danger description text samples, wherein the hidden danger description text samples are hidden danger description texts corresponding to the hidden danger image samples; An image data preprocessing module is used to preprocess hidden danger image samples to obtain image data; A text preprocessing module is used to perform word segmentation preprocessing on the hidden danger description text sample to obtain a corresponding word segmentation set; The label generation module is used to convert all the words in the word set into corresponding word vectors through word embedding, and is also used to cluster all the word vectors through clustering analysis, and then select the cluster center as the hidden danger image label of the corresponding hidden danger image sample; A model training module is used to train a specified convolutional neural network model using image data corresponding to hidden danger image samples and hidden danger image labels; The classification and recognition module is used to obtain real-time photos and input them into the trained convolutional neural network model after preprocessing to obtain the hidden danger identification and classification results of the real-time photos.
Citation Information
Patent Citations
Automatic hidden danger scene recognition method and system based on deep learning
CN112101181A
Training method and device for word embedding model
CN109190126A
Semantic similarity analysis method based on text clustering
CN110825877A
Power transmission and transformation line hidden danger automatic safety identification system based on deep residual network
CN113378723A
Accident reason analysis method and system based on hidden danger knowledge graph
CN115374174A