Power grid foreign body detection method, device, electronic equipment and storage medium

By using the grid foreign matter detection method based on the YOLOV8 model in the grid foreign matter detection, combined with the sample set of grid foreign matter and ice-covered data, the problem of insufficient detection capabilities of the existing technology under special climatic conditions is solved, and higher detection accuracy and reliability are achieved.

CN119784996AInactive Publication Date: 2025-04-08GUO WANG ZHE JIANG SHENG DIAN LI YOU XIAN GONG SI HANG ZHOU SHI XIAO SHAN QU GONG DIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411788755.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing power grid foreign object detection methods have weak detection capabilities in handling special climate conditions such as ice covering, rain and snow, resulting in false alarms or missed alarms and low accuracy.

Method used

A method for detecting foreign matter in the grid is proposed, and the detection results are generated by obtaining the target grid image and inputting it into a preset grid foreign matter detection model based on the YOLOV8 model. This model provides rich context information to improve detection accuracy by training a sample set that contains grid foreign matter data sets and ice-covered data sets.

Benefits of technology

By constructing a sample set containing data from foreign objects and ice covering in the power grid, the model can better identify foreign objects and ice covering in the power grid, improve detection accuracy and reliability, and realize real-time detection in resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784996A_ABST
    Figure CN119784996A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for detecting foreign objects in a power grid. The scheme provides a model with rich context information by constructing a power grid image sample set including a target power grid foreign object data set and a target power grid icing data set, so that the model can better learn and identify various foreign objects and icing phenomena that may appear in an actual power environment, thereby improving detection accuracy and reliability; in addition, by replacing its backbone network with MobileNetv4, the lightweight and easy-to-deploy characteristics of the model are further improved, and a large number of images can be processed in a very short time, foreign objects in the power grid can be identified and an alarm can be issued, which provides great convenience for power companies and enables them to discover and handle problems in a timely manner, thereby reducing power outage time and improving the safety and reliability of the power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power grid technology, and in particular to a method, device, electronic device and storage medium for detecting foreign matter in a power grid. Background Art

[0002] As the pace of power grid construction accelerates, overhead transmission lines are easily entangled by foreign objects, such as garbage, birds, etc. Foreign objects hanging on overhead transmission lines can easily cause tripping accidents such as single-phase grounding of the ground wire and phase-to-phase short circuit, which seriously affects the safe and stable operation of the power grid.

[0003] In the related art, when detecting foreign objects in power grids, existing identification schemes usually use traditional machine learning methods, such as support vector machines, decision trees, etc. These methods identify potential foreign objects by photographing the environment around power grid equipment, extracting image features, and classifying them.

[0004] However, the above-mentioned power grid foreign object detection method has weak detection capabilities under special climatic conditions such as icing, rain and snow, which often leads to false alarms or missed alarms. Therefore, the existing power grid foreign object detection method has the problem of low accuracy. Summary of the invention

[0005] The present application aims to at least solve the technical problems existing in the prior art. To this end, the first aspect of the present application proposes a method for detecting foreign objects in a power grid, the method comprising:

[0006] Acquire target power grid image;

[0007] The target power grid image is input into the preset power grid foreign object detection model for calculation to generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is trained based on the power grid image sample set, the power grid image sample set includes the target power grid foreign object data set and the target power grid icing data set, the target power grid foreign object data set includes multiple power grid foreign object image samples and label information, the target power grid icing data set includes multiple power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is the target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is the MobilNet V4 convolutional neural network.

[0008] In a possible implementation, the process of building a preset power grid foreign object detection model includes:

[0009] Acquire a power grid image sample set; wherein the power grid image sample set includes a power grid image training set, a power grid image verification set, and a power grid image test set;

[0010] The power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model; wherein the initial power grid foreign object detection model is an initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is a MobilNet V4 convolutional neural network;

[0011] The intermediate power grid foreign object detection model is verified through the power grid image verification set to generate a preset power grid foreign object detection model.

[0012] In a possible implementation manner, the process of generating the target power grid icing dataset includes:

[0013] Obtaining first initial grid icing data, second initial grid icing data, and third initial grid icing data; wherein the first initial grid icing data is collected through the Internet, the second initial grid icing data is generated by artificial intelligence, and the third initial grid icing data is extracted from preset video materials;

[0014] Based on the first initial power grid icing data, the second initial power grid icing data and the third initial power grid icing data, an initial power grid icing data set is constructed;

[0015] The initial power grid icing dataset is labeled and preprocessed to generate a target power grid icing dataset; the data preprocessing includes data cleaning and data enhancement.

[0016] In a possible implementation, the initial power grid foreign object detection model further includes an initial feature aggregation module and an initial task detection head, and the power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model, including:

[0017] The power grid image training set is input into the initial power grid foreign object detection model, and features of the power grid image training set are extracted through the initial backbone network module in the initial power grid foreign object detection model to generate multi-scale feature data;

[0018] The multi-scale feature data is fused through the initial feature aggregation module to generate multiple fused features;

[0019] Generate predicted detection results based on the fused features corresponding to the initial task detection head;

[0020] Based on the predicted detection results and label information, the parameters of the initial power grid foreign object detection model are adjusted to generate an intermediate power grid foreign object detection model.

[0021] In a possible implementation, the intermediate power grid foreign object detection model is verified by using a power grid image verification set to generate a preset power grid foreign object detection model, including:

[0022] Input the power grid image verification set into the intermediate power grid foreign object detection model for verification, and calculate the current model evaluation parameters and the current loss function value;

[0023] If the current model evaluation parameters and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model;

[0024] If the current model evaluation parameters and / or the current loss function values ​​do not meet the preset conditions, the step of inputting the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model is repeated until the new current model evaluation parameters and the new current loss function values ​​meet the preset conditions, thereby generating a preset power grid foreign object detection model.

[0025] In a possible implementation, the method further includes:

[0026] Get the current operating environment of the target edge device;

[0027] According to the current operating environment, the preset power grid foreign object detection model is converted and optimized to obtain an optimized preset power grid foreign object detection model;

[0028] The optimized preset power grid foreign object detection model is deployed on the target edge device.

[0029] In a possible implementation, the method further includes:

[0030] Obtaining a current operation instruction of a user on a preset user interface; wherein the current operation instruction includes a start operation instruction or a pause operation instruction;

[0031] When the current operation instruction is a start operation instruction, a target power grid image is acquired.

[0032] The second aspect of the present application provides a power grid foreign body detection device, the device comprising:

[0033] An acquisition module, used for acquiring a target power grid image;

[0034] A generation module is used to input the target power grid image into a preset power grid foreign object detection model for calculation, and generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, and the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, and the target power grid foreign object data set includes a plurality of power grid foreign object image samples and label information, and the target power grid icing data set includes a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network.

[0035] In a possible implementation manner, the above-mentioned power grid foreign object detection device is further used for:

[0036] Acquire a power grid image sample set; wherein the power grid image sample set includes a power grid image training set, a power grid image verification set, and a power grid image test set;

[0037] The power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model; wherein the initial power grid foreign object detection model is an initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is a MobilNet V4 convolutional neural network;

[0038] The intermediate power grid foreign object detection model is verified through the power grid image verification set to generate a preset power grid foreign object detection model.

[0039] In a possible implementation manner, the above-mentioned power grid foreign object detection device is further used for:

[0040] Obtaining first initial grid icing data, second initial grid icing data, and third initial grid icing data; wherein the first initial grid icing data is collected through the Internet, the second initial grid icing data is generated by artificial intelligence, and the third initial grid icing data is extracted from preset video materials;

[0041] Based on the first initial power grid icing data, the second initial power grid icing data and the third initial power grid icing data, an initial power grid icing data set is constructed;

[0042] The initial power grid icing dataset is labeled and preprocessed to generate a target power grid icing dataset; the data preprocessing includes data cleaning and data enhancement.

[0043] In a possible implementation, the initial power grid foreign object detection model further includes an initial feature aggregation module and an initial task detection head, and the power grid foreign object detection device is further used for:

[0044] The power grid image training set is input into the initial power grid foreign object detection model, and features of the power grid image training set are extracted through the initial backbone network module in the initial power grid foreign object detection model to generate multi-scale feature data;

[0045] The multi-scale feature data is fused through the initial feature aggregation module to generate multiple fused features;

[0046] Generate predicted detection results based on the fused features corresponding to the initial task detection head;

[0047] Based on the predicted detection results and label information, the parameters of the initial power grid foreign object detection model are adjusted to generate an intermediate power grid foreign object detection model.

[0048] In a possible implementation manner, the above-mentioned power grid foreign object detection device is further used for:

[0049] Input the power grid image verification set into the intermediate power grid foreign object detection model for verification, and calculate the current model evaluation parameters and the current loss function value;

[0050] If the current model evaluation parameters and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model;

[0051] If the current model evaluation parameters and / or the current loss function values ​​do not meet the preset conditions, the step of inputting the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model is repeated until the new current model evaluation parameters and the new current loss function values ​​meet the preset conditions, thereby generating a preset power grid foreign object detection model.

[0052] In a possible implementation manner, the above-mentioned power grid foreign object detection device is further used for:

[0053] Get the current operating environment of the target edge device;

[0054] According to the current operating environment, the preset power grid foreign object detection model is converted and optimized to obtain an optimized preset power grid foreign object detection model;

[0055] The optimized preset power grid foreign object detection model is deployed on the target edge device.

[0056] In a possible implementation manner, the above-mentioned power grid foreign object detection device is further used for:

[0057] Obtaining a current operation instruction of a user on a preset user interface; wherein the current operation instruction includes a start operation instruction or a pause operation instruction;

[0058] When the current operation instruction is a start operation instruction, a target power grid image is acquired.

[0059] The third aspect of the present application proposes an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the power grid foreign object detection method as described in the first aspect.

[0060] In a fourth aspect, the present application proposes a computer-readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the power grid foreign object detection method as described in the first aspect.

[0061] The embodiments of the present application have the following beneficial effects:

[0062] The embodiments of the present application provide a method, device, electronic device and storage medium for detecting foreign objects in a power grid. The method comprises: obtaining a target power grid image, inputting the target power grid image into a preset power grid foreign object detection model for calculation, and generating a detection result corresponding to the target power grid image, wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, the power grid image sample set comprises a target power grid foreign object data set and a target power grid icing data set, the target power grid foreign object data set comprises a plurality of power grid foreign object image samples and label information, the target power grid icing data set comprises a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions, the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network. This solution provides rich contextual information for the model by constructing a power grid image sample set including the target power grid foreign object dataset and the target power grid icing dataset, so that it can better learn and identify various foreign objects and icing phenomena that may appear in the actual power environment, thereby improving the detection accuracy and reliability; in addition, by replacing its backbone network with MobileNetv4, the lightweight and easy-to-deploy characteristics of the model are further improved, and it can process a large number of images in a very short time, identify power grid foreign objects and issue alarms, which provides great convenience for power companies, enables them to discover and deal with problems in a timely manner, thereby reducing power outage time and improving the safety and reliability of the power system; at the same time, by providing a friendly user interface, developers can easily integrate the power grid foreign object detection method into the existing power monitoring system. This ease of use reduces the technical threshold, allowing power companies to quickly deploy and use the system and improve work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A structural block diagram of a computer device provided in an embodiment of the present application;

[0064] Figure 2 A flowchart of a method for detecting foreign matter in a power grid provided in an embodiment of the present application;

[0065] Figure 3 A flowchart of the steps for obtaining a target power grid image provided in an embodiment of the present application;

[0066] Figure 4 A schematic diagram of an initial interface corresponding to a preset user interface provided in an embodiment of the present application;

[0067] Figure 5 A schematic diagram of a video file loading interface provided in an embodiment of the present application;

[0068] Figure 6 A schematic diagram of an interface for starting detection of a video file provided in an embodiment of the present application;

[0069] Figure 7 A schematic diagram of an interface for performing pause detection on a video file provided in an embodiment of the present application;

[0070] Figure 8 A schematic diagram of a help interface provided for an embodiment of the present application;

[0071] Fig. 9 A flowchart of the steps of constructing a preset power grid foreign object detection model provided in an embodiment of the present application;

[0072] Fig.10 A flowchart of the steps for obtaining a power grid image sample set provided in an embodiment of the present application;

[0073] Fig.11 An image of first initial power grid icing data provided by an embodiment of the present application;

[0074] Fig.12 An image of second initial power grid icing data provided by an embodiment of the present application;

[0075] Fig.13 An image of a third initial power grid icing data provided by an embodiment of the present application;

[0076] Fig.14 A labeled image provided in an embodiment of the present application;

[0077] Fig.15 An image before data enhancement provided in an embodiment of the present application;

[0078] Fig.16A data-enhanced image provided in an embodiment of the present application;

[0079] Fig.17 A flowchart of the steps for generating an intermediate power grid foreign object detection model provided in an embodiment of the present application;

[0080] Fig.18 A flowchart of the steps of deploying a preset power grid foreign object detection model provided in an embodiment of the present application;

[0081] Fig.19 This is a structural block diagram of a power grid foreign object detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection area of ​​the present application.

[0083] At present, when performing foreign object detection in power grids, existing recognition schemes are usually implemented using versions such as YOLOv3 or YOLOv4, which are excellent in accuracy and speed. However, although these methods have been applied in many scenarios, they still have limitations in foreign object detection in specific environments (such as icing). Especially in the high-voltage environment of power grid equipment, small foreign objects and complex weather conditions (such as rain, snow, icing, etc.) put higher requirements on detection capabilities.

[0084] Specifically, the above-mentioned power grid foreign body detection methods rely on fixed data sets for training, but these data sets often cannot cover various complex environmental changes. For example, ice-covered phenomena are more common in practical applications, but relevant data samples are scarce, which directly leads to the reduction of the detection accuracy of the model in such environments. In addition, the existing methods usually rely on manual annotation during data collection, which is inefficient and prone to bias, and cannot fully reflect the diversity in real scenes. In addition, although the existing YOLO version performs well in target detection, its model structure is relatively complex and has high computing resource requirements, especially when running on edge devices, it may face performance bottlenecks. This makes it difficult to perform real-time detection in resource-constrained environments, limiting the wide range of its practical applications. In addition, the traditional power grid foreign body detection algorithm has weak detection capabilities in dealing with special climatic conditions such as ice-covered, rain and snow, often resulting in false alarms or missed alarms. For example, in the case of ice-covered, the ice layer may be similar to the color and texture of the wire itself, making it difficult for the detection algorithm to distinguish, which directly affects the accuracy and reliability of the detection. At the same time, the traditional foreign body detection algorithm fails to achieve sufficient model lightweight, resulting in delay problems when running on edge computing devices, and cannot meet the needs of real-time detection. Especially in critical industries such as power grids, real-time performance is an important factor in ensuring safety, and any delay may lead to potential safety hazards.

[0085] Based on this, the present application proposes a method for detecting foreign objects in a power grid, which includes: obtaining a target power grid image, inputting the target power grid image into a preset power grid foreign object detection model for calculation, and generating a detection result corresponding to the target power grid image, wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, the target power grid foreign object data set includes multiple power grid foreign object image samples and label information, the target power grid icing data set includes multiple power grid icing image samples and label information under different geographical regions and climatic conditions, the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network. This solution provides rich contextual information for the model by constructing a power grid image sample set including a target power grid foreign object dataset and a target power grid icing dataset, so that it can better learn and identify various foreign objects and icing phenomena that may appear in the actual power environment, thereby improving detection accuracy and reliability; in addition, by replacing its backbone network with MobileNetv4, the lightweight and easy-to-deploy characteristics of the model are further improved, and it can process a large number of images in a very short time, identify power grid foreign objects and issue alarms, which provides great convenience for power companies, enables them to discover and deal with problems in a timely manner, thereby reducing power outage time and improving the safety and reliability of the power system; at the same time, by providing a friendly user interface, developers can easily integrate the power grid foreign object detection method into the existing power monitoring system. This ease of use reduces the technical threshold, allowing power companies to quickly deploy and use the system and improve work efficiency.

[0086] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" means two or more. In addition, the use of "based on" or "according to" means openness and inclusiveness, because the process, steps, calculations or other actions "based on" or "according to" one or more of the conditions or values ​​may be based on additional conditions or values ​​beyond the described values ​​in practice.

[0087] The power grid foreign object detection method provided in the present application can be applied to computer equipment (electronic equipment), and the computer equipment can be a server or a terminal, wherein the server can be a single server or a server cluster composed of multiple servers. The embodiments of the present application do not specifically limit this. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices.

[0088] Take the computer device as a server as an example. Figure 1 A block diagram of a server is shown, such as Figure 1 As shown, the server may include a processor and a memory connected via a system bus. The processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a method for detecting foreign objects in a power grid is implemented.

[0089] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. Optionally, the server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0090] It should be noted that the execution subject of the embodiments of the present application may be a computer device or a power grid foreign object detection device. The following method embodiments are described using a computer device as the execution subject.

[0091] Figure 2 The following is a flowchart of a method for detecting foreign objects in a power grid provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0092] Step 202: Acquire a target power grid image.

[0093] The target power grid image can be acquired by an image acquisition device, which can be a camera. At the same time, the acquired target power grid image can be multiple images, and saved in a video file, so that the target power grid image can be obtained from the video file. In addition, the target power grid image can be an image acquired in real time.

[0094] In some optional embodiments, after the original power grid image is acquired by the image acquisition device, the original power grid image may be preprocessed to obtain the target power grid image. The preprocessing operation may include but is not limited to size conversion processing, pixel value normalization processing, etc., and may also include data cleaning processing, data enhancement processing, etc., which are not specifically limited in the embodiments of the present application.

[0095] In some other optional embodiments, the user can choose to start or pause the detection on the preset user interface as needed, and then obtain the target power grid image after the user chooses to start the detection. In addition, the preset user interface may also include a help interface, which can provide instructions for use and guide the user to take appropriate actions. Figure 3 As shown, Figure 3 A flowchart of steps for obtaining a target power grid image provided in an embodiment of the present application includes:

[0096] Step 302: Obtain the current operation instruction of the user on the preset user interface.

[0097] Step 304: When the current operation instruction is a start operation instruction, obtain a target power grid image.

[0098] The current operation instruction includes a start operation instruction or a pause operation instruction. Figure 4 A schematic diagram of an initial interface corresponding to a preset user interface provided in an embodiment of the present application, the initial interface may include multiple buttons such as select video, start detection, pause detection, help, etc. The area above these buttons can be divided into two parts, the left area can be the area for displaying the target power grid image in the video file, and the right area can be the area for displaying the image corresponding to the detection result. The detected foreign matter can be marked with a rectangular frame. A text prompt message "Please select a video file" can also be given, and below the text prompt message can be a rectangular frame area for displaying the detection result.

[0099] When the current operation instruction is a start operation instruction, the target power grid image is acquired. Figure 5 A schematic diagram of a video file loading interface provided in an embodiment of the present application may also provide a text prompt message of "Video loaded successfully". Figure 6 A schematic diagram of an interface for starting detection of a video file provided in an embodiment of the present application can also provide a text prompt message of "detecting" and display the detection results in real time, such as the detection result: a foreign object - a balloon - is detected. Figure 7 A schematic diagram of an interface for pausing detection of a video file provided in an embodiment of the present application can also provide a text prompt message of "detection pause" and can also display the detection results in real time, such as the detection result: foreign matter - garbage detected. Figure 8 A schematic diagram of a help interface provided for an embodiment of the present application may, for example, provide a text prompt of "select a video file and click to start detection. Users can choose to pause detection or start detection according to their needs."

[0100] Step 204: input the target power grid image into a preset power grid foreign object detection model for calculation to generate a detection result corresponding to the target power grid image.

[0101] Among them, the preset power grid foreign body detection model is obtained by training based on the power grid image sample set, the power grid image sample set includes a target power grid foreign body data set and a target power grid ice data set, the target power grid foreign body data set includes multiple power grid foreign body image samples and label information, and the target power grid ice data set includes multiple power grid ice image samples and label information under different geographical regions and climatic conditions. The preset power grid foreign body detection model is the target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is the MobilNet V4 convolutional neural network. In some optional embodiments, the detection results can also be displayed in real time on a preset user interface, and the detection results may include data such as the location, category and status of the foreign body.

[0102] The above-mentioned preset power grid foreign body detection model needs to be pre-built. In some optional embodiments, such as Fig. 9 As shown, Fig. 9 A flowchart of the steps of constructing a preset power grid foreign object detection model provided in an embodiment of the present application includes:

[0103] Step 902: Acquire a power grid image sample set.

[0104] Among them, the power grid image sample set can be divided into a power grid image training set, a power grid image verification set and a power grid image test set.

[0105] Since the power grid image sample set includes two parts: the target power grid foreign object data set and the target power grid ice cover data set, when obtaining the target power grid foreign object data set in the power grid image sample set, relevant public data can be integrated from multiple sources, and these data cover various examples of power grid foreign objects. In addition, the collected public data can also be cleaned to remove redundant samples and irrelevant data to ensure the uniqueness of each sample in the target power grid foreign object data set. At the same time, when standardizing the power grid images in the target power grid foreign object data set, size unification and format conversion can be included to improve the efficiency and effectiveness of model training.

[0106] When obtaining a target power grid ice dataset from a power grid image sample set, due to the lack of public data on the Internet, this application provides a new method for obtaining a target power grid ice dataset. Fig.10 As shown, Fig.10 A flowchart of the steps of obtaining a power grid image sample set provided in an embodiment of the present application includes:

[0107] Step 1002: Acquire first initial power grid icing data, second initial power grid icing data, and third initial power grid icing data.

[0108] Step 1004: construct an initial power grid icing data set based on the first initial power grid icing data, the second initial power grid icing data, and the third initial power grid icing data.

[0109] Step 1006: perform data labeling and data preprocessing on the initial power grid icing dataset to generate a target power grid icing dataset.

[0110] Among them, the first initial power grid icing data is collected through the Internet, the second initial power grid icing data is generated by artificial intelligence, and the third initial power grid icing data is extracted from preset video materials.

[0111] In some optional embodiments, when collecting the first initial grid icing data, pictures related to icing can be collected from multiple network resources, which can come from weather monitoring websites, social media platforms, and professional meteorological and power industry websites. Optionally, keyword search and image recognition technology can be used to find as many grid icing images as possible in various situations to ensure the diversity and representativeness of the data. Fig.11 As shown, Fig.11 An image of first initial power grid icing data provided in an embodiment of the present application.

[0112] Optionally, ice images in different geographical regions and climate conditions can be collected, including various environments such as urban, rural, and mountainous areas, to reflect the diversity of ice phenomena. In addition, it can also be ensured that the first initial grid ice data contains various conditions from mild to severe ice, so that the model can learn the impact of different degrees of ice on the grid.

[0113] In some optional embodiments, when collecting the second initial grid icing data, since the grid icing images actually collected may not be sufficient to meet the needs of model training, additional grid icing images can be generated by artificial intelligence to obtain the second initial grid icing data. In this way, various icing degrees and scenes can be generated, and grid icing images under extreme weather conditions can be covered to make up for the shortcomings of the actual data set; in addition, by providing a variety of training samples, the model's adaptability to different icing conditions can be enhanced, thereby improving its performance in practical applications. Fig.12 As shown, Fig.12 An image of second initial power grid icing data provided in an embodiment of the present application.

[0114] In some optional embodiments, when collecting the third initial power grid icing data, key frames can be extracted from documentaries and surveillance videos related to the power grid. These preset video materials provide the dynamic changes of the power grid in different seasons and climate conditions, and can truly reflect the occurrence and development of icing. Optionally, an automated tool can be used to parse the preset video materials, identify and extract key frames containing icing phenomena, and then by extracting frames at different time points, the changing process of the icing phenomenon can be captured, providing continuous data support for the model. In this way, real and dynamic icing data can be provided, ensuring that the model can be exposed to changes in actual scenarios during training. Fig.13 As shown, Fig.13 An image of a third initial power grid icing data provided in an embodiment of the present application.

[0115] Thus, an initial grid ice data set can be constructed based on the first initial grid ice data, the second initial grid ice data and the third initial grid ice data. Then, the initial grid ice data set can be labeled and preprocessed to generate a target grid ice data set.

[0116] Optionally, the foreign object category and location can be annotated for each image in the initial grid icing dataset, wherein this process requires professional knowledge to ensure the accuracy of each annotation. Fig.14 As shown, Fig.14 In the example of the present application, the number "2" in the upper left corner of the rectangular box represents the corresponding foreign body category. Other numbers can also be used to represent other foreign body categories. After the labeling is completed, a quality review can be conducted to ensure the accuracy and consistency of the labeling. Through multiple rounds of review by multiple people, the quality of the data set is further improved.

[0117] In practical applications, for example, a total of 1,700 annotated images can be constructed, including 340 target power grid ice-covered images and 1,360 target power grid foreign object images, which are suitable for various power grid foreign object conditions and detection needs in various environments.

[0118] Optionally, since some of the existing images of foreign body detection in power grids are derived from public data sets on the Internet, their quality cannot be guaranteed. Therefore, some invalid and low-quality data can be eliminated before training to improve the sample quality. Therefore, the labeled images can also be preprocessed, and the data preprocessing can include data cleaning and data enhancement. When performing data enhancement, data diversity can be improved by copying elements, adding new elements, transformation operations (rotation, scaling, translation, etc.), color adjustment, brightness adjustment, and layer synthesis to simulate different weather conditions. Fig.15 and Fig.16 As shown, Fig.15 An image before data enhancement provided in an embodiment of the present application, Fig.16 A data-enhanced image provided in an embodiment of the present application.

[0119] Step 904: input the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model.

[0120] Among them, after obtaining the power grid image sample set, the power grid image sample set can be divided into a power grid image training set, a power grid image verification set and a power grid image test set to evaluate the generalization performance of the model. Optionally, the power grid image training set can account for 70% of the entire power grid image sample set and is used for the training process of the model. The power grid image verification set can account for 10% of the entire power grid image sample set and is used to adjust and optimize model parameters. The power grid image test set can account for 20% of the entire power grid image sample set and is used to evaluate the final performance of the model. This division method ensures the continuous optimization of the model at different stages, so that it can perform well in practical applications.

[0121] After obtaining the power grid image training set, the power grid image training set can be input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model. The initial power grid foreign object detection model is the initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is the MobilNet V4 convolutional neural network. Among them, the YOLOV8 model has significant improvements in small target detection, complex background processing and speed, and can meet the high requirements of power grid foreign object detection.

[0122] During the model training process, a variety of optimization techniques can be used, including data enhancement, learning rate decay, early stopping, etc., to further improve the detection accuracy of the model. In addition, the number of iterations during training can be set to 100, with 64 per batch. The optimizer uses stochastic gradient descent (SGD) and combines the first-order optimization algorithm Adam for weight update to ensure rapid convergence of the model.

[0123] In some optional embodiments, the initial backbone network module of the initial YOLOV8 model can be replaced with a MobilNet V4 convolutional neural network. Among them, MobileNetv4 is an efficient convolutional neural network architecture designed for mobile and embedded devices, with a small model size and low computing requirements, which enables the model to run efficiently in resource-constrained environments. In addition, MobileNetv4 uses technologies such as deep separable convolution to effectively extract image features while significantly reducing the number of parameters and the amount of calculation, thereby improving detection speed and accuracy. Despite the small size of the model, MobileNetv4 performs well on multiple standard data sets and can provide accuracy comparable to that of heavier networks, making it an ideal choice, especially in application scenarios that require fast reasoning. In addition, MobileNetv4 has good scalability and can adjust the width and depth of the network according to different application requirements, thereby finding the best balance between accuracy and speed.

[0124] In some optional embodiments, Fig.17 As shown, Fig.17 A flowchart of the steps of generating an intermediate power grid foreign object detection model provided in an embodiment of the present application includes:

[0125] Step 1702: input the power grid image training set into the initial power grid foreign object detection model, extract features from the power grid image training set through the initial backbone network module in the initial power grid foreign object detection model, and generate multi-scale feature data.

[0126] Step 1704: perform fusion processing on the multi-scale feature data through the initial feature aggregation module to generate multiple fusion features.

[0127] Step 1706: Generate a predicted detection result based on the fusion features corresponding to the initial task detection head.

[0128] Step 1708: Adjust the parameters of the initial power grid foreign object detection model based on the predicted detection results and the label information to generate an intermediate power grid foreign object detection model.

[0129] Among them, the initial power grid foreign object detection model can include an initial backbone network module, an initial feature aggregation module and an initial task detection head. After obtaining the power grid image training set, the power grid image training set can be input into the initial power grid foreign object detection model, and the features of the power grid image training set can be extracted through the initial backbone network module in the initial power grid foreign object detection model to generate multi-scale feature data.

[0130] Next, the multi-scale feature data can be fused through the initial feature aggregation module to generate multiple fused features, and then the predicted detection results can be generated based on the fused features corresponding to the initial task detection head. Finally, the parameters of the initial power grid foreign object detection model can be adjusted based on the predicted detection results and label information to generate an intermediate power grid foreign object detection model.

[0131] In some optional embodiments, the intermediate power grid foreign object detection model may also be tested using a power grid image test set. Table 1 is a test result provided in this embodiment.

[0132] Table 1

[0133] Foreign matter category Number of instances Accuracy Bird's Nest 126 97.6% Kite 43 97.7% balloon 31 100% Rubbish 98 97.9% Ice Cover 42 90.5%

[0134] Among them, according to Table 1, it can be concluded that in the task of detecting foreign objects in the power grid, the model performs well, especially in the recognition of different types of foreign objects, with outstanding accuracy. When identifying foreign objects such as bird nests, kites, balloons, and garbage, the model accuracy can reach more than 97%. This series of excellent detection results proves the efficiency and reliability of the model. In the icing environment, the model also performs well, with an accuracy rate of 90%, which shows that even under complex climatic conditions, the model can effectively identify such phenomena and achieve accurate monitoring. This result further highlights the important value of the carefully constructed target power grid icing dataset in improving model performance.

[0135] Step 906: Verify the intermediate power grid foreign object detection model using the power grid image verification set to generate a preset power grid foreign object detection model.

[0136] Among them, after the intermediate power grid foreign object detection model is obtained through training, the intermediate power grid foreign object detection model can be verified by the power grid image verification set to generate a preset power grid foreign object detection model. Optionally, the power grid image verification set can be input into the intermediate power grid foreign object detection model for verification, and the current model evaluation parameters and the current loss function value are calculated. If the current model evaluation parameters and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model. If the current model evaluation parameters and / or the current loss function value do not meet the preset conditions, the steps of inputting the power grid image training set into the initial power grid foreign object detection model for training and generating the intermediate power grid foreign object detection model are repeated until the new current model evaluation parameters and the new current loss function value meet the preset conditions, and the preset power grid foreign object detection model is generated.

[0137] The preset condition may be that the current model evaluation parameter reaches the preset value, and the current loss function value decreases and tends to stabilize. If the preset condition is met, it means that the model has converged, and after the training is completed, the intermediate power grid foreign object detection model can be used as the preset power grid foreign object detection model. If the preset condition is not met, the training process needs to be repeated.

[0138] In some optional embodiments, the trained model can also be installed on the edge computing device to achieve real-time foreign object detection. This stage ensures that the model can run efficiently and stably in the actual environment. Fig.18 As shown, Fig.18 A flowchart of the steps of deploying a preset power grid foreign object detection model provided in an embodiment of the present application includes:

[0139] Step 1802: Obtain the current operating environment of the target edge device.

[0140] Step 1804: perform model conversion and optimization processing on the preset power grid foreign object detection model according to the current operating environment to obtain an optimized preset power grid foreign object detection model.

[0141] Step 1806: deploy the optimized preset power grid foreign object detection model on the target edge device.

[0142] Among them, optionally, the target edge device can choose Atlas 200IDK A2, which is a developer kit product for AI algorithm verification and application development. Including the following advantages: It has powerful computing power and can efficiently process complex AI models to meet the needs of real-time data processing. Quickly process local data to improve response speed. It can maintain low power consumption while providing high performance, which is suitable for long-term application scenarios. It supports the deployment of various AI frameworks and models, and can flexibly adjust and expand functions according to needs, which is suitable for a variety of application scenarios. Reduce the frequency of data transmission to the cloud and protect sensitive information.

[0143] According to the current operating environment of the target edge device, the preset power grid foreign object detection model can be converted and optimized to obtain an optimized preset power grid foreign object detection model to adapt to the current operating environment of the target edge device. The model conversion and optimization process may include quantizing model parameters and pruning redundant parts to reduce the model size and improve the inference speed.

[0144] Finally, the optimized preset power grid foreign object detection model can be deployed on the target edge device. The target edge device processes the target power grid image from the camera in real time. The system analyzes the target power grid image in real time, identifies possible power grid foreign objects, and outputs the results to the preset user interface.

[0145] In this embodiment, by deploying the model on the edge computing device Atlas 200IDK A2, efficient real-time processing is achieved, and edge computing can transfer data processing tasks from the cloud to a location closer to the data source, which not only reduces latency but also reduces the burden of data transmission. At the same time, in the actual application of the power grid, the edge device can analyze monitoring video and sensor data in real time and respond quickly. This deployment method ensures the efficiency and flexibility of the detection process and can quickly adapt to changing conditions in the power grid environment.

[0146] The power grid foreign object detection method provided in the embodiment of the present application includes: obtaining a target power grid image, inputting the target power grid image into a preset power grid foreign object detection model for calculation, and generating a detection result corresponding to the target power grid image, wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, the target power grid foreign object data set includes a plurality of power grid foreign object image samples and label information, the target power grid icing data set includes a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions, the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network. This solution provides rich contextual information for the model by constructing a power grid image sample set including the target power grid foreign object dataset and the target power grid icing dataset, so that it can better learn and identify various foreign objects and icing phenomena that may appear in the actual power environment, thereby improving the detection accuracy and reliability; in addition, by replacing its backbone network with MobileNetv4, the lightweight and easy-to-deploy characteristics of the model are further improved, and it can process a large number of images in a very short time, identify power grid foreign objects and issue alarms, which provides great convenience for power companies, enables them to discover and deal with problems in a timely manner, thereby reducing power outage time and improving the safety and reliability of the power system; at the same time, by providing a friendly user interface, developers can easily integrate the power grid foreign object detection method into the existing power monitoring system. This ease of use reduces the technical threshold, allowing power companies to quickly deploy and use the system and improve work efficiency.

[0147] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0148] Fig.19 This is a structural block diagram of a power grid foreign object detection device provided in an embodiment of the present application.

[0149] like Fig.19 As shown, the power grid foreign object detection device 1900 includes:

[0150] The acquisition module 1902 is used to acquire the target power grid image.

[0151] The generation module 1904 is used to input the target power grid image into the preset power grid foreign object detection model for calculation, and generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is obtained by training based on the power grid image sample set, and the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, and the target power grid foreign object data set includes a plurality of power grid foreign object image samples and label information, and the target power grid icing data set includes a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network.

[0152] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be described in detail here. Each module in the above power grid foreign body detection device can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations of each of the above modules.

[0153] In one embodiment of the present application, a computer device is provided, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0154] Acquire target power grid image;

[0155] The target power grid image is input into the preset power grid foreign object detection model for calculation to generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is trained based on the power grid image sample set, the power grid image sample set includes the target power grid foreign object data set and the target power grid icing data set, the target power grid foreign object data set includes multiple power grid foreign object image samples and label information, the target power grid icing data set includes multiple power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is the target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is the MobilNet V4 convolutional neural network.

[0156] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0157] Acquire a power grid image sample set; wherein the power grid image sample set includes a power grid image training set, a power grid image verification set, and a power grid image test set;

[0158] The power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model; wherein the initial power grid foreign object detection model is an initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is a MobilNet V4 convolutional neural network;

[0159] The intermediate power grid foreign object detection model is verified through the power grid image verification set to generate a preset power grid foreign object detection model.

[0160] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0161] Obtaining first initial grid icing data, second initial grid icing data, and third initial grid icing data; wherein the first initial grid icing data is collected through the Internet, the second initial grid icing data is generated by artificial intelligence, and the third initial grid icing data is extracted from preset video materials;

[0162] Based on the first initial power grid icing data, the second initial power grid icing data and the third initial power grid icing data, an initial power grid icing data set is constructed;

[0163] The initial power grid icing dataset is labeled and preprocessed to generate a target power grid icing dataset; the data preprocessing includes data cleaning and data enhancement.

[0164] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0165] The power grid image training set is input into the initial power grid foreign object detection model, and features of the power grid image training set are extracted through the initial backbone network module in the initial power grid foreign object detection model to generate multi-scale feature data;

[0166] The multi-scale feature data is fused through the initial feature aggregation module to generate multiple fused features;

[0167] Generate predicted detection results based on the fused features corresponding to the initial task detection head;

[0168] Based on the predicted detection results and label information, the parameters of the initial power grid foreign object detection model are adjusted to generate an intermediate power grid foreign object detection model.

[0169] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0170] Input the power grid image verification set into the intermediate power grid foreign object detection model for verification, and calculate the current model evaluation parameters and the current loss function value;

[0171] If the current model evaluation parameters and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model;

[0172] If the current model evaluation parameters and / or the current loss function values ​​do not meet the preset conditions, the step of inputting the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model is repeated until the new current model evaluation parameters and the new current loss function values ​​meet the preset conditions, thereby generating a preset power grid foreign object detection model.

[0173] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0174] Get the current operating environment of the target edge device;

[0175] According to the current operating environment, the preset power grid foreign object detection model is converted and optimized to obtain an optimized preset power grid foreign object detection model;

[0176] The optimized preset power grid foreign object detection model is deployed on the target edge device.

[0177] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0178] Obtaining a current operation instruction of a user on a preset user interface; wherein the current operation instruction includes a start operation instruction or a pause operation instruction;

[0179] When the current operation instruction is a start operation instruction, a target power grid image is acquired.

[0180] The implementation principle and technical effect of the computer device provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.

[0181] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0182] Acquire target power grid image;

[0183] The target power grid image is input into the preset power grid foreign object detection model for calculation to generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is trained based on the power grid image sample set, the power grid image sample set includes the target power grid foreign object data set and the target power grid icing data set, the target power grid foreign object data set includes multiple power grid foreign object image samples and label information, the target power grid icing data set includes multiple power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is the target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is the MobilNet V4 convolutional neural network.

[0184] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0185] Acquire a power grid image sample set; wherein the power grid image sample set includes a power grid image training set, a power grid image verification set, and a power grid image test set;

[0186] The power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model; wherein the initial power grid foreign object detection model is an initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is a MobilNet V4 convolutional neural network;

[0187] The intermediate power grid foreign object detection model is verified through the power grid image verification set to generate a preset power grid foreign object detection model.

[0188] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0189] Obtaining first initial grid icing data, second initial grid icing data, and third initial grid icing data; wherein the first initial grid icing data is collected through the Internet, the second initial grid icing data is generated by artificial intelligence, and the third initial grid icing data is extracted from preset video materials;

[0190] Based on the first initial power grid icing data, the second initial power grid icing data and the third initial power grid icing data, an initial power grid icing data set is constructed;

[0191] The initial power grid icing dataset is labeled and preprocessed to generate a target power grid icing dataset; the data preprocessing includes data cleaning and data enhancement.

[0192] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0193] The power grid image training set is input into the initial power grid foreign object detection model, and features of the power grid image training set are extracted through the initial backbone network module in the initial power grid foreign object detection model to generate multi-scale feature data;

[0194] The multi-scale feature data is fused through the initial feature aggregation module to generate multiple fused features;

[0195] Generate predicted detection results based on the fused features corresponding to the initial task detection head;

[0196] Based on the predicted detection results and label information, the parameters of the initial power grid foreign object detection model are adjusted to generate an intermediate power grid foreign object detection model.

[0197] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0198] Input the power grid image verification set into the intermediate power grid foreign object detection model for verification, and calculate the current model evaluation parameters and the current loss function value;

[0199] If the current model evaluation parameters and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model;

[0200] If the current model evaluation parameters and / or the current loss function values ​​do not meet the preset conditions, the step of inputting the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model is repeated until the new current model evaluation parameters and the new current loss function values ​​meet the preset conditions, thereby generating a preset power grid foreign object detection model.

[0201] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0202] Get the current operating environment of the target edge device;

[0203] According to the current operating environment, the preset power grid foreign object detection model is converted and optimized to obtain an optimized preset power grid foreign object detection model;

[0204] The optimized preset power grid foreign object detection model is deployed on the target edge device.

[0205] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0206] Obtaining a current operation instruction of a user on a preset user interface; wherein the current operation instruction includes a start operation instruction or a pause operation instruction;

[0207] When the current operation instruction is a start operation instruction, a target power grid image is acquired.

[0208] The implementation principle and technical effect of the computer storage medium provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.

[0209] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer execution instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0210] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered as the area recorded in this specification.

[0211] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the patent area of ​​the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection area of ​​the present application. Therefore, the protection area of ​​the present application shall be subject to the attached claims.

Claims

1. A method for detecting foreign objects in a power grid, characterized in that: The method comprises: Acquire target power grid image; The target power grid image is input into a preset power grid foreign object detection model for calculation to generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, the target power grid foreign object data set includes a plurality of power grid foreign object image samples and label information, the target power grid icing data set includes a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network.

2. The method according to claim 1, characterized in that The process of constructing the preset power grid foreign object detection model includes: Acquire the power grid image sample set; wherein the power grid image sample set includes a power grid image training set, a power grid image verification set and a power grid image test set; Input the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model; wherein the initial power grid foreign object detection model is an initial YOLOV8 model, and the initial backbone network module of the initial YOLOV8 model is a MobilNet V4 convolutional neural network; The intermediate power grid foreign object detection model is verified through the power grid image verification set to generate the preset power grid foreign object detection model.

3. The method according to claim 1 or 2, characterized in that: The process of generating the target power grid icing dataset includes: Acquire first initial grid icing data, second initial grid icing data, and third initial grid icing data; wherein the first initial grid icing data is collected through the Internet, the second initial grid icing data is generated by artificial intelligence, and the third initial grid icing data is extracted from preset video materials; Based on the first initial power grid icing data, the second initial power grid icing data and the third initial power grid icing data, construct an initial power grid icing data set; The initial power grid icing data set is subjected to data labeling and data preprocessing to generate the target power grid icing data set; wherein the data preprocessing includes data cleaning and data enhancement.

4. The method according to claim 2, characterized in that: The initial power grid foreign object detection model further includes an initial feature aggregation module and an initial task detection head. The power grid image training set is input into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model, including: Inputting the power grid image training set into the initial power grid foreign object detection model, performing feature extraction on the power grid image training set through the initial backbone network module in the initial power grid foreign object detection model, and generating multi-scale feature data; Performing fusion processing on the multi-scale feature data through the initial feature aggregation module to generate multiple fusion features; generating a predicted detection result based on the fused features corresponding to the initial task detection head; The parameters of the initial power grid foreign object detection model are adjusted based on the predicted detection result and the label information to generate the intermediate power grid foreign object detection model.

5. The method according to claim 2, characterized in that: The step of verifying the intermediate power grid foreign object detection model by using the power grid image verification set to generate the preset power grid foreign object detection model includes: Inputting the power grid image verification set into the intermediate power grid foreign object detection model for verification, and calculating current model evaluation parameters and current loss function values; If the current model evaluation parameter and the current loss function value meet the preset conditions, the intermediate power grid foreign object detection model is used as the preset power grid foreign object detection model; If the current model evaluation parameters and / or the current loss function value do not meet the preset conditions, the step of inputting the power grid image training set into the initial power grid foreign object detection model for training to generate an intermediate power grid foreign object detection model is repeated until the new current model evaluation parameters and the new current loss function value meet the preset conditions, thereby generating the preset power grid foreign object detection model.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: Get the current operating environment of the target edge device; Performing model conversion and optimization processing on the preset power grid foreign object detection model according to the current operating environment to obtain an optimized preset power grid foreign object detection model; The optimized preset power grid foreign object detection model is deployed on the target edge device.

7. The method according to claim 1 or 2, characterized in that: The method further comprises: Acquire the current operation instruction of the user on the preset user interface; wherein the current operation instruction includes a start operation instruction or a pause operation instruction; When the current operation instruction is the start operation instruction, the target power grid image is acquired.

8. A power grid foreign body detection device, characterized in that: The device comprises: An acquisition module, used for acquiring a target power grid image; A generation module is used to input the target power grid image into a preset power grid foreign object detection model for calculation, and generate a detection result corresponding to the target power grid image; wherein the preset power grid foreign object detection model is obtained by training based on a power grid image sample set, the power grid image sample set includes a target power grid foreign object data set and a target power grid icing data set, the target power grid foreign object data set includes a plurality of power grid foreign object image samples and label information, and the target power grid icing data set includes a plurality of power grid icing image samples and label information under different geographical regions and climatic conditions; the preset power grid foreign object detection model is a target YOLOV8 model, and the target backbone network module of the target YOLOV8 model is a MobilNet V4 convolutional neural network.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the steps of the method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the steps of the method described in any one of claims 1 to 7.