Urban power transmission line fault diagnosis method and system based on generative artificial intelligence

Through the combination of generative artificial intelligence and Vi-Transformer model, the problem of unbalanced sample and insufficient data volume in transmission line fault diagnosis is solved, the fault recognition rate and model adaptability are improved, and efficient faults in complex environments are achieved diagnosis.

CN119313955AActive Publication Date: 2025-01-14HEFEI UNIV OF TECH

Patent Information

Application Number
CN202411359677.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

In the fault diagnosis of transmission line, there are problems such as uneven sample, insufficient data volume, poor generalization of model, low multimodal data fusion application, poor task execution flexibility and high model update cost in the transmission line fault diagnosis, resulting in low fault recognition rate and The model performs poorly in complex environments.

Method used

Using a generative artificial intelligence method, more image samples are obtained through the GAN generator, feature extraction is performed by combining the Vi-Transformer model, and using prompt information to optimize the generative AI model to improve the balance of small sample data and the credibility of the model. Sex and practicality.

Benefits of technology

Improve the credibility and practicality of fault diagnosis in complex environments, can detect fault targets and types that do not occur in the data set, reduce the cost of data processing and model optimization, enhance the flexibility and adaptability of the model, and apply Multi-task learning in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313955A_ABST
    Figure CN119313955A_ABST
Patent Text Reader

Abstract

The invention provides an urban power transmission line fault diagnosis method and system based on generative artificial intelligence, and relates to the technical field of fault diagnosis. A GAN generator is used for obtaining more image samples, meanwhile, the balance of a data set is improved, in a complex environment and under the condition that the number of samples of all fault types is small, a GAN algorithm is used for generating more fault samples of different fault types, and the feasibility of training optimization by a subsequent feature extractor according to the samples is guaranteed; according to the method, a Vi-Transform model is used for carrying out feature extraction on an image, image features serve as a part of prompt, more context information is provided for the generative AI, the illusion problem of the generative AI is further avoided, and the thought that the generative AI participates in power transmission line fault inspection is broadened; in combination with a GAN, a Vi-Transform model and a prompt information modification method, the credibility and practicability of model optimization based on small sample image data in a complex environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a method and system for urban power transmission line fault diagnosis based on generative artificial intelligence. Background Art

[0002] Transmission lines are the hub of power transmission, and it is crucial to ensure the reliability and safety of transmission line operation. However, due to the particularity of the transmission and distribution system, it is usually built in complex terrain areas such as forests and mountains. It is not only affected by the complex and changeable external environment, but also by its own structural design, external force damage and other factors, which are prone to many faults. Therefore, safety inspections of transmission lines have become an important task for the safe operation of transmission lines.

[0003] However, for hidden or minor faults, as well as work in harsh environments, transmission line inspections have blind spots and safety hazards. With the continuous development of intelligent technology, the use of intelligent inspections has gradually become the dominant method.

[0004] Smart inspection is an improvement over traditional manual inspection. It simulates human perception, learning and adaptation capabilities to perform tasks more efficiently and accurately. Common smart inspection equipment includes tower cameras, inspection drones, inspection robots and manned helicopters. These devices are equipped with high-resolution cameras and other sensors to capture images and data of line equipment, and analyze data through computers for target recognition and defect detection.

[0005] At present, a large number of fault identification technologies are applied in intelligent inspection of power transmission lines. Patent CN202311279674.5 uses convolutional neural network to perform risk analysis on inspection image data. Patent: CN202211186043.4 uses Weather GAN model based on attention mechanism to obtain spatial attention map of power transmission line, and uses YOLOv5 model to identify targets of power transmission line images. Patent CN202311604723.8 establishes power transmission line fault detection data set based on drone inspection images, and invents a YOLOv8n power transmission line fault detection method based on C2f-Faster. Patent CN202410392839.8 uses Vi-Transformer network to separate power transmission line images, fuses single feature maps of multiple categories into multi-scale information feature maps, and then uses the power transmission line inspection image defect recognition model for recognition.

[0006] These methods require complex feature engineering processing of a large amount of inspection image data before inputting them into the core detection model, and the data set needs to have enough fault samples and non-fault samples. Since transmission lines usually operate normally, the small number of fault samples and the imbalance of samples will greatly limit the performance of the algorithm model. Specifically, there are the following defects:

[0007] It is difficult to obtain balanced sample data. The performance improvement of machine learning algorithm models depends on iterative training of a large amount of sample data. Problems such as lack of sample size and sample imbalance will lead to problems such as underfitting of the model and poor classifier performance. Transmission lines have more normal states and fewer fault states, and the fault targets and types are different. Therefore, it is difficult to obtain a balanced sample with a large amount of data, sufficient fault types, and sufficient fault sample size.

[0008] The data set limits the generalization ability of the model. The model is fitted on the data set of a specific environment. The better the fit on the current data set, the worse the generalization of the model on other environmental data sets may be. Transmission lines usually cover a wide area and the natural environment is complex. It is difficult to obtain a set of data sets and train a model for each natural environment, especially in complex environments.

[0009] The fault type recognition rate is not high. Sample imbalance and insufficient data will lead to insufficient model training, and the model's classification of specific transmission line faults is not effective. At the same time, due to the limitation of the sample size of each fault type, the model's fitting effect and generalization performance are affected, and the model is difficult to identify new fault types outside the sample. Therefore, in the case of new faults, it is still necessary to manually distinguish the fault conditions.

[0010] The application level of multimodal data fusion is not high. Faced with various multi-source heterogeneous data generated during the operation and maintenance of transmission lines, existing models are difficult to fully utilize. In the process of data type conversion, complex data processing and feature engineering processes are also required, and the comprehensive utilization rate is low.

[0011] Poor flexibility in task execution. Existing machine learning models for transmission line fault identification can often only perform pre-set tasks and identify targets that have appeared in the sample set. They have poor recognition capabilities for targets that have not appeared in the sample set, and are even more difficult to meet personalized task requirements in different scenarios, showing the vulnerability of the established model in responding to external demands.

[0012] The cost of model update is high. When faced with new fault targets that have not appeared in the previous training samples, the optimization and upgrade of existing machine learning requires a new round of data collection, data processing, modification of model input and output structures, model training, evaluation, optimization, deployment, and database updates, which consumes time, manpower costs, and computer resources. Summary of the invention

[0013] In view of the shortcomings of the prior art, the present invention provides a method and system for urban power transmission line fault diagnosis based on generative artificial intelligence, which solves the problems of poor credibility and practicality of transmission line fault diagnosis under unbalanced small sample conditions.

[0014] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0015] A method for diagnosing urban power transmission line faults based on generative artificial intelligence, the method comprising the following steps:

[0016] S1. Input the inspection picture to be detected into the optimal image feature extractor to extract the corresponding image feature vector;

[0017] S2, filling the image feature vector of the inspection picture to be detected and its corresponding geographical location information into the prompt information template;

[0018] S3. Use the function of the OpenAI interface to input the inspection picture to be detected and the corresponding prompt information template into the generative AI model to generate the transmission line fault diagnosis result as an output response;

[0019] S4, storing the output response of each image in a response list;

[0020] The optimal image feature extractor and the prompt information template are both obtained through prompt optimization of transmission line diagnosis.

[0021] Preferably, the inspection image to be detected is converted into Base64 format before input.

[0022] Preferably, the prompt optimization of the power transmission line diagnosis comprises the following steps:

[0023] S1, randomly divide the image dataset into training set and test set;

[0024] S2, input the training set and the test set into the pre-trained Vi-Transformer model, and further optimize the model according to the model training and model parameter update steps;

[0025] S3, using the optimized Vi-Transformer model as an image feature extractor;

[0026] S4, input each image in the image data set into the image feature extractor to obtain the corresponding image feature vector;

[0027] S5, marking each inspection picture with information on whether it is faulty, fault target classification and fault type, and saving it as a real marking list;

[0028] S6, constructing the output format of the inspection picture and its corresponding image feature vector, geographic location information and transmission line fault diagnosis result as a prompt;

[0029] S7. According to the format of the output response result, a corresponding Python class is constructed, and the attributes in the class correspond to the keys of the output JSON object to realize the construction of the output template;

[0030] S8, inputting the prompt corresponding to each image in the image dataset into the generative AI model;

[0031] S9, storing the output response of each image in a list, which is a response list;

[0032] S10. Compare the response list with the real mark list to see if there is a fault and the fault type, and calculate the recognition accuracy of the generative AI model; when there are still errors in the response list of the generative AI model and the recognition accuracy is lower than the set threshold, continue to fine-tune the image feature extractor until the recognition accuracy is higher than the threshold; store the prompts corresponding to all output responses whose results are accurate and meet the requirements as templates to obtain a prompt information template; save the image feature extractor optimized to a recognition accuracy higher than the threshold as the optimal image feature extractor.

[0033] Preferably, the image data set is obtained by image data enhancement, and the image data enhancement comprises the following steps:

[0034] S1. Process each image in the original transmission line fault image dataset into the same format and mark whether it is a fault.

[0035] S2. Randomly divide the original image dataset into an original training set and an original test set.

[0036] S3, setting model hyperparameters in GAN, training and optimizing the GAN model based on the original training set and the original test set, and saving the model parameters of the optimal GAN ​​model;

[0037] S4, loading the optimized GAN generator according to the model parameters of the optimal GAN ​​model, and obtaining the generated image data through the optimized GAN generator;

[0038] S5. Merge the image data generated by GAN and the original image data to construct an image dataset.

[0039] Preferably, each picture in the image data set is pre-converted into Base64 format.

[0040] Preferably, the training set and the test set are randomly divided in a ratio of 8:2; the original training set and the original test set are randomly divided in a ratio of 8:2.

[0041] Preferably, the pre-trained Vi-Transformer model is a ViT-B / 16 model pre-trained on ImageNet and JFT-300M datasets.

[0042] Preferably, the transmission line fault diagnosis result meets the following format requirements:

[0043] Determine whether there is a power transmission line fault in the picture, and indicate the name of the fault picture and the geographical location of the power transmission line fault;

[0044] Determine and output the type of faulty hardware, the model of the faulty hardware, and a description of the fault status;

[0045] There is no fault picture and no information is output;

[0046] Format the response result of each fault image into a JSON object with "image name" as the key.

[0047] A fault diagnosis system for urban power transmission lines based on generative artificial intelligence, the diagnosis system comprising: an image feature extraction module, a prompt template filling module, a generative AI response module and an output response storage module;

[0048] The image feature extraction module is used to input the inspection picture to be detected into the optimal image feature extractor to extract the corresponding image feature vector;

[0049] The prompt template filling module is used to fill the image feature vector of the inspection picture to be detected and its corresponding geographical location information into the prompt information template;

[0050] The generative AI response module is used to input the inspection picture to be detected and the corresponding prompt information template into the generative AI model to generate a transmission line fault diagnosis result as an output response;

[0051] The output response storage module is used to store the output response of each picture in a response list.

[0052] The present invention provides a method and system for diagnosing urban power transmission line faults based on generative artificial intelligence. Compared with the prior art, it has the following beneficial effects:

[0053] In the present invention, a GAN generator is used to obtain more image samples and improve the balance of the data set. In the case of a small number of samples of each fault type in a complex environment, a GAN algorithm is used to generate more fault samples of different fault types to ensure the feasibility of subsequent feature extractor training and optimization based on samples; a Vi-Transformer model is used to extract features from images, and image features are used as part of prompts to provide more contextual information for generative AI, further avoiding the "hallucination" problem of generative AI and broadening the idea of ​​generative AI participating in power transmission line fault inspection; the GAN, Vi-Transformer models and prompt information modification method are combined to improve the credibility and practicality of model optimization based on small sample image data in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 Flow chart of a method for diagnosing urban power transmission line faults based on generative artificial intelligence in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] The embodiments of the present application solve the problems of poor credibility and practicality of transmission line fault diagnosis in unbalanced small sample conditions by providing a method and system for urban transmission line fault diagnosis based on generative artificial intelligence.

[0058] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0059] Example:

[0060] like Figure 1 As shown, the present invention provides a method for diagnosing urban power transmission line faults based on generative artificial intelligence, and the diagnostic method comprises the following steps:

[0061] S1. Image data enhancement

[0062] Since it is difficult to obtain transmission line fault image datasets, the GAN method is used to solve the problem of small samples.

[0063] The image data enhancement part mainly includes five steps: image formatting preprocessing, data set division, GAN model training and optimization, generation of new image data, and construction of new data sets.

[0064] S1.1. Image formatting preprocessing: Process each image in the original power transmission line fault image dataset into the same format, such as 28*28 pixels; and mark whether it is a fault.

[0065] S1.2. Dataset division: The dataset is randomly divided into training set and test set in a ratio of 8:2.

[0066] S1.3. Training and optimization of GAN models: setting model hyperparameters in GAN, training and optimizing GAN models based on training sets and test sets, and saving model parameters of the optimal GAN ​​model.

[0067] S1.4. Generate new image data: load the optimized GAN generator according to the model parameters of the optimal GAN ​​model, and obtain the generated image data through the optimized GAN generator.

[0068] S1.5. Construction of new data set: Merge the image data generated by GAN with the original image data to construct a new image data set.

[0069] S2. Optimization of prompts for transmission line diagnosis

[0070] In the application of generative artificial intelligence, prompt engineering helps guide the generation of ideal responses, so prompt optimization is a prerequisite for the application of generative artificial intelligence in industry scenarios.

[0071] Prompts provide the context of input information for generative AI models, specify the steps for generating responses, and the form of output results. Generative AI models are able to generate correct responses based on the contextual learning capabilities of a small number of example prompts using the learned patterns and rules. In order to provide more comprehensive contextual information, the present invention extracts image features through the Vi-Transformer model to achieve the purpose of optimizing prompts. The optimization of prompts enables the model to output more accurate responses that meet the requirements, reducing the misjudgment rate in classification tasks based on generative AI models.

[0072] The prompt optimization of transmission line diagnosis mainly includes 12 steps: division of new image datasets, acquisition of pre-trained Vi-Transformer, model fine-tuning, output of the fine-tuned optimized Vi-Transformer model, extraction of image feature vectors, preprocessing of new image data, conversion of image formats, construction of prompts, construction of output templates, response of generative AI, storage of generated answers, evaluation and optimization of prompts.

[0073] S2.1. Division of the new image dataset: The new image dataset is randomly divided into a new training set and a new test set in a ratio of 8:2.

[0074] S2.2. Obtaining pre-trained Vi-Transformer: Load the pre-trained Vi-Transformer model, such as the ViT-B / 16 model pre-trained on the ImageNet and JFT-300M datasets.

[0075] S2.3, model fine-tuning: input the new training set and the new test set into the model, and further optimize the model according to the model training and model parameter update steps, so that the fine-tuned model can better handle the task of identifying transmission line fault images.

[0076] S2.4. Output the fine-tuned and optimized Vi-Transformer model: Output the optimized Vi-Transformer model, and use the hidden state of the last layer as the image feature vector, that is, as the output of the image feature extractor.

[0077] S2.5. Extract image feature vector: Input each image in the new data set into the image feature extractor to obtain the corresponding image feature vector, which can be stored in the variable image_feature to provide more complete information.

[0078] S2.6. Preprocessing of new image data: Each inspection image is marked with information such as whether it is faulty, fault target classification, fault type, etc., and saved as a real mark list for later evaluation and optimization of model prompts.

[0079] S2.7, image format conversion: Based on the preprocessed drone inspection image dataset, convert each image in the image dataset into Base64 format, construct an image dataset in Base64 format, and retain the name of each image.

[0080] S2.8. Construction of prompts: The content of prompts mainly includes providing contextual information, information processing requirements, the form of result output, etc. The content provides the geographical location information image_location of the corresponding inspection picture, the feature vector image_feature corresponding to the image, and mainly text information. The definition of prompts covers three main elements: tasks, instructions, and roles to ensure that the model generates text that meets user needs. For example: "You are an expert in transmission line fault diagnosis. Please diagnose transmission line faults based on the pictures, image feature vectors and geographical location information I provide. The geographical information and image feature vectors are separated by three pairs of single quotes. The diagnosis results you provide must meet the following 4 format requirements:

[0081] 1. Determine whether there is a power transmission line fault in the picture, and state the name of the fault picture and the geographical location of the power transmission line fault.

[0082] 2. Determine and output the type of faulty hardware, the model of the faulty hardware, and a description of the fault status, where the description of the fault status is less than 50 words.

[0083] 3. If there is no fault picture, no information will be output.

[0084] 4. Format the response result of each fault image into a JSON object with "image name" as the key.

[0085] The geographic information of the image is: "'{image_location}"', and the feature vector of the image is: "'{image_feature}"'".

[0086] S2.9. Construction of output template: According to the format of the output response result, construct the corresponding Python class, and the attributes in the class correspond to the keys of the output JSON object.

[0087] S2.10, Generative AI response: Encapsulate the function of the OpenAI interface, set the model type, the format of the returned result, that is, the Python class of the output template, set the role and content of the model interaction. Input each image data and the corresponding prompt in the Base64 format image dataset into the generative AI model.

[0088] S2.11. Storage of generated answers: Store the output response of each image in a list, which is the response list.

[0089] S2.12. Evaluation and optimization of prompts: Compare the response list with the true label list, mainly comparing whether there is a fault and the type of fault, and calculate the recognition accuracy of the generative AI model. When there are still errors in the response list of the generative AI model and the accuracy is lower than the set threshold, such as 0.96, continue to fine-tune the image feature extractor. For the text description of the fault, a simple manual evaluation of several samples can be performed according to the task, and the text description and structure of the prompt can be modified until the generated response result meets the requirements. When the generated response result is accurate enough and meets the requirements, use the prompt as a template, save the optimal image feature extractor, and output the prompt information template.

[0090] S3. Application of diagnostic methods for transmission lines

[0091] The third part mainly includes five steps: format conversion of the inspection pictures to be tested, image feature extraction, filling in the prompt template, generative AI response, and storage of the generated answers.

[0092] S3.1. Format conversion of inspection images to be detected: Convert the inspection images of the drones to be detected into Base64 format.

[0093] S3.2, Image feature extraction: Input the inspection picture to be detected into the optimal image feature extractor to obtain the corresponding image feature vector.

[0094] S3.3. Filling in the prompt template: filling the geographical location information and image feature vector corresponding to the image into the prompt information template output by the diagnostic prompt optimization part of the transmission line.

[0095] S3.4, Generative AI response: Use the function of the OpenAI interface, the default transmission line diagnostic prompt optimization part sets the model type, the format of the returned results, and the prompt information template filled with image feature vectors and geographic location information. Input the Base64 format image data and the corresponding prompt information template into the generative AI model.

[0096] S3.5. Storage of generated answers: The output response of each image is stored in a list, which is a response list, so as to export the fault information list and other usage requirements.

[0097] A system for diagnosing urban power transmission line faults based on generative artificial intelligence, the system comprising: an image feature extraction module, a prompt template filling module, a generative AI response module, and an output response storage module;

[0098] The image feature extraction module is used to input the inspection picture to be detected into the optimal image feature extractor to extract the corresponding image feature vector;

[0099] The prompt template filling module is used to fill the image feature vector of the inspection picture to be detected and its corresponding geographical location information into the prompt information template;

[0100] The generative AI response module is used to input the inspection picture to be detected and the corresponding prompt information template into the generative AI model to generate a transmission line fault diagnosis result as an output response;

[0101] The output response storage module is used to store the output response of each picture in a response list.

[0102] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0103] 1. In the embodiment of the present invention, a GAN generator is used to obtain more image samples and improve the balance of the data set. In a complex environment with a small number of samples of each fault type, a GAN algorithm is used to generate more fault samples of different fault types to ensure the feasibility of subsequent feature extractor optimization based on sample training.

[0104] 2. In the embodiment of the present invention, based on the powerful learning ability of generative AI, the model can detect fault targets and types that do not appear in the data set, without the need to re-perform a large amount of data processing and model optimization work; this unsupervised learning capability can also be used to label transmission line data sets, laying the foundation for the realization of supervised learning tasks.

[0105] 3. In the embodiment of the present invention, the power transmission line fault diagnosis method based on generative AI can optimize the instructions related to the power transmission line fault diagnosis of the generative AI through a small amount of inspection image data, so as to achieve the purpose of optimizing the model response; compared with other supervised machine learning methods based on fitting of a large number of image data sets, the method based on generative AI is more suitable for achieving model optimization based on small samples in complex environments and improving the fault recognition rate.

[0106] 4. In the embodiments of the present invention, for the transmission line fault diagnosis in complex scenarios, the introduction of generative AI can make full use of contextual information, integrate multimodal information such as images, texts, and numerical values ​​to complete multi-task learning, and quickly complete a series of complex fault detection tasks such as small target recognition, fault judgment, and model judgment, thereby reducing the material input and personnel workload of inspections.

[0107] 5. In the embodiment of the present invention, when the topographic environment where the transmission line is located undergoes significant changes, or when new personalized requirements arise in the task, the original prompt information template can be maintained, or fine-tuned based on a small amount of image data, so that the model can be optimized and upgraded to complete the optimization of the response results. This easy portability greatly shortens the time spent on model development and application when the scene changes in a complex natural environment or when the demand changes, and is more flexible and intelligent.

[0108] 6. In the embodiment of the present invention, the Vi-Transformer model is used to extract features from the image, and the image features are used as part of the prompt to provide more contextual information for the generative AI, further avoiding the "hallucination" problem of the generative AI and broadening the idea of ​​generative AI participating in power transmission line fault inspection.

[0109] 7. In the embodiment of the present invention, the GAN, Vi-Transformer model and the prompt information modification method are combined to improve the credibility and practicality of the model optimization based on small sample image data in complex environments.

[0110] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for urban power transmission line fault diagnosis based on generative artificial intelligence, characterized in that: The diagnostic method comprises the following steps: S1. Input the inspection picture to be detected into the optimal image feature extractor to extract the corresponding image feature vector; S2, filling the image feature vector of the inspection picture to be detected and its corresponding geographical location information into the prompt information template; S3. Use the function of the OpenAI interface to input the inspection picture to be detected and the corresponding prompt information template into the generative AI model to generate the transmission line fault diagnosis result as an output response; S4, storing the output response of each image in a response list; The optimal image feature extractor and the prompt information template are both obtained through prompt optimization of transmission line diagnosis.

2. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 1, characterized in that: The inspection image to be detected is converted into Base64 format before input.

3. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 1, characterized in that: The prompt optimization of the transmission line diagnosis includes the following steps: S1, randomly divide the image dataset into training set and test set; S2, input the training set and the test set into the pre-trained Vi-Transformer model, and further optimize the model according to the model training and model parameter update steps; S3, using the optimized Vi-Transformer model as an image feature extractor; S4, input each image in the image data set into the image feature extractor to obtain the corresponding image feature vector; S5, marking each inspection picture with information on whether it is faulty, fault target classification and fault type, and saving it as a real marking list; S6, constructing the output format of the inspection picture and its corresponding image feature vector, geographic location information and transmission line fault diagnosis result as a prompt; S7. According to the format of the output response result, a corresponding Python class is constructed, and the attributes in the class correspond to the keys of the output JSON object to realize the construction of the output template; S8, inputting the prompt corresponding to each image in the image dataset into the generative AI model; S9, storing the output response of each image in a list, which is a response list; S10. Compare the response list with the real mark list to see if there is a fault and the fault type, and calculate the recognition accuracy of the generative AI model; when there are still errors in the response list of the generative AI model and the recognition accuracy is lower than the set threshold, continue to fine-tune the image feature extractor until the recognition accuracy is higher than the threshold; store the prompts corresponding to all output responses whose results are accurate and meet the requirements as templates to obtain a prompt information template; save the image feature extractor optimized to a recognition accuracy higher than the threshold as the optimal image feature extractor.

4. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 3 is characterized in that: The image data set is obtained by image data enhancement, and the image data enhancement comprises the following steps: S1. Process each image in the original transmission line fault image dataset into the same format and mark whether it is a fault. S2. Randomly divide the original image dataset into an original training set and an original test set. S3, setting model hyperparameters in GAN, training and optimizing the GAN model based on the original training set and the original test set, and saving the model parameters of the optimal GAN ​​model; S4, loading the optimized GAN generator according to the model parameters of the optimal GAN ​​model, and obtaining the generated image data through the optimized GAN generator; S5. Merge the image data generated by GAN and the original image data to construct an image dataset.

5. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 3, characterized in that: Each image in the image dataset is converted into Base64 format in advance.

6. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 4, characterized in that: The training set and the test set are randomly divided in a ratio of 8:2; the original training set and the original test set are randomly divided in a ratio of 8:

2.

7. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 3, characterized in that: The pre-trained Vi-Transformer model is a ViT-B / 16 model pre-trained on the ImageNet and JFT-300M datasets.

8. The urban power transmission line fault diagnosis method based on generative artificial intelligence according to claim 3, characterized in that: The transmission line fault diagnosis result meets the following format requirements: Determine whether there is a power transmission line fault in the picture, and indicate the name of the fault picture and the geographical location of the power transmission line fault; Determine and output the type of faulty hardware, the model of the faulty hardware, and a description of the fault status; There is no fault picture and no information is output; Format the response result of each fault image into a JSON object with "image name" as the key.

9. A system for urban power transmission line fault diagnosis based on generative artificial intelligence, characterized in that: The diagnostic system includes: an image feature extraction module, a prompt template filling module, a generative AI response module and an output response storage module; The image feature extraction module is used to input the inspection picture to be detected into the optimal image feature extractor to extract the corresponding image feature vector; The prompt template filling module is used to fill the image feature vector of the inspection picture to be detected and its corresponding geographical location information into the prompt information template; The generative AI response module is used to input the inspection picture to be detected and the corresponding prompt information template into the generative AI model to generate a transmission line fault diagnosis result as an output response; The output response storage module is used to store the output response of each picture in a response list.

Citation Information

Patent Citations

  • Small target identification method and system for complex scene of power transmission line

    CN115294483A

  • Power transmission line intelligent inspection optimization method and system

    CN117575115A

  • C2f-Faster-based YOLOv8n power transmission line fault detection method

    CN117636125A

  • Power transmission line defect identification method and system combining Vi-Transform and multi-scale information fusion

    CN118196066A

  • Line diagnosis method based on unmanned aerial vehicle inspection, electronic device and storage medium

    CN110580475A

Cited By

  • Quick recognition method for rare birds

    CN120783119A