Image-based arc fault diagnosis method and related apparatus

By using a camera module to acquire images and train a machine learning model in the power distribution ring main unit, the problems of high cost and insufficient real-time performance of existing arc fault detection methods are solved, and low-cost, high real-time arc fault detection is achieved.

CN120807522BActive Publication Date: 2025-11-25SHENZHEN POWER SUPPLY BUREAU
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511308176.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-11-25
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing arc fault detection technologies are costly and lack real-time performance, making it difficult to capture arc information in the early stages of a fault.

Method used

An image-based arc fault diagnosis method is adopted, which uses m camera modules to collect color images of the distribution ring main unit, performs preprocessing and annotation, trains a machine learning model, and realizes rapid diagnosis of arc faults.

Benefits of technology

It achieves low-cost, high-real-time arc fault detection, reducing detection costs and improving the accuracy and real-time performance of fault detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807522B_ABST
    Figure CN120807522B_ABST
Patent Text Reader

Abstract

The application discloses an image-based arc fault diagnosis method and a related device, which is applied to a controller in an arc fault diagnosis system, the arc fault diagnosis system further comprises m power distribution ring network cabinets and m camera modules, and the method comprises the following steps: acquiring color images of the m power distribution ring network cabinets through the m camera modules to obtain first color image data; performing pretreatment on the first color image data to obtain second color image data; marking a corresponding fault type and spatial coordinates of the fault type for each data in the second color image data to obtain a marked data set; training an initial machine learning model based on the marked data set to obtain a target machine learning model; acquiring a color image to be diagnosed; and inputting the color image to be diagnosed into the target machine learning model to obtain a target diagnosis result. By adopting the embodiment of the application, low-cost and high-real-time arc fault detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of arc fault recognition, and in particular to an arc fault diagnosis method based on images and a related device. BACKGROUND

[0002] In a power system, low-voltage arc, as a common and extremely dangerous electrical fault form, seriously threatens the safety of power facilities and personnel. Low-voltage arc is usually caused by poor contact, conductor aging, insulation damage, foreign matter intrusion, and the like.

[0003] At present, arc faults are generally detected by ultra-high frequency sensors or infrared thermal imagers. However, high-precision sensors are expensive and have high operating costs. Meanwhile, such sensors lack real-time performance and have a response delay when an arc fault occurs, making it difficult to capture arc information in the early stage of the fault. Therefore, how to achieve low-cost and high-real-time arc fault detection has become a problem to be solved. SUMMARY

[0004] The embodiments of the present application provide an arc fault diagnosis method based on images and a related device, which realizes low-cost and high-real-time arc fault detection.

[0005] In a first aspect, the embodiments of the present application provide an arc fault diagnosis method based on images, applied to a controller in an arc fault diagnosis system. The arc fault diagnosis system further includes m power distribution ring network cabinets and m camera modules. One camera module is arranged in each power distribution ring network cabinet. m is a positive integer. The method includes the following steps.

[0006] Color images of the m power distribution ring network cabinets are collected by the m camera modules to obtain first color image data;

[0007] The first color image data is preprocessed to obtain second color image data;

[0008] Each data in the second color image data is labeled with a corresponding fault type and a spatial coordinate of the fault type to obtain a labeled data set;

[0009] An initial machine learning model is trained based on the labeled data set to obtain a target machine learning model;

[0010] A color image to be diagnosed is obtained;

[0011] The color image to be diagnosed is input into the target machine learning model to obtain a target diagnosis result. The target diagnosis result includes a target fault type and a spatial coordinate corresponding to the target fault type. The target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase grounding arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0012] In a second aspect, an embodiment of the present application provides an arc fault diagnosis device based on images, applied to a controller in an arc fault diagnosis system, the arc fault diagnosis system further comprising m power distribution ring network cabinets and m camera modules, one camera module being arranged in each power distribution ring network cabinet, m being a positive integer, the device comprising: an acquisition unit, a model training unit, and a diagnosis unit, wherein:

[0013] The acquisition unit is configured to acquire color images of the m power distribution ring network cabinets through the m camera modules to obtain first color image data.

[0014] The model training unit is configured to pre-process the first color image data to obtain second color image data, label each data in the second color image data with a corresponding fault type and a spatial coordinate of the fault type to obtain a labeled data set, train an initial machine learning model based on the labeled data set to obtain a target machine learning model.

[0015] The acquisition unit is further configured to acquire a color image to be diagnosed.

[0016] The diagnosis unit is configured to input the color image to be diagnosed into the target machine learning model to obtain a target diagnosis result, the target diagnosis result comprising a target fault type and a spatial coordinate corresponding to the target fault type, and the target fault type comprising one of the following: no fault, phase-to-phase arc fault, single-phase ground arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs comprise instructions for performing the steps in the first aspect of the embodiments of the present application.

[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product can be a software installation package.

[0020] The application is implemented, and has the following beneficial effects:

[0021] It can be seen that the image-based arc fault diagnosis method described in the application greatly reduces the detection cost by using m camera modules as core perception devices, which are mature mass-produced devices and have a much lower cost than traditional arc detection-dependent high-precision sensors (for example, very high frequency sensors or infrared thermal imagers). In addition, the target machine learning model is used to diagnose and infer the color image to be diagnosed, so that the detection result can be quickly and accurately obtained, the real-time performance of arc fault detection is improved, and low-cost and high-real-time arc fault detection is realized by the method. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the application or the background art, the drawings needed to be used in the embodiments of the application or the background art will be described below.

[0023] Figure 1 is a structural schematic diagram of an arc fault diagnosis system provided by an embodiment of the application;

[0024] Figure 2 is an application scenario diagram of an image-based arc fault diagnosis method provided by an embodiment of the application;

[0025] Figure 3 is a flowchart of an image-based arc fault diagnosis method provided by an embodiment of the application;

[0026] Figure 4 is a flowchart of an acquisition method of a labeled data set provided by an embodiment of the application;

[0027] Figure 5 is a flowchart of an acquisition method of a target machine learning model provided by an embodiment of the application;

[0028] Figure 6 is a flowchart of an acquisition method of an initial machine learning model provided by an embodiment of the application;

[0029] Figure 7 is a functional unit composition block diagram of an image-based arc fault diagnosis apparatus provided by an embodiment of the application;

[0030] Figure 8 is a structural schematic diagram of an electronic device provided by an embodiment of the application. DETAILED DESCRIPTION

[0031] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application, so that those skilled in the art can better understand the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0032] The terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or device.

[0033] It should be understood that the term "and / or" herein only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper represents that the front and rear associated objects are a "or" relationship. "Multiple" in the embodiments of the present application means two or more.

[0034] The "at least one" or similar expressions in the embodiments of the present application means any combination of these items, including any combination of single item or multiple items, means one or more, and multiple means two or more. For example, at least one of a, b or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b and c. Wherein, each of a, b and c can be an element or a set containing one or more elements.

[0035] The "connection" appearing in the embodiments of the present application means direct connection or indirect connection and various connection modes to realize communication between devices, which is not limited in the embodiments of the present application.

[0036] In this paper, "embodiment" means that the specific features, structures or characteristics described in conjunction with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0037] The electronic device described in the embodiments of the present application can include a smart phone (such as an Android phone, an iOS phone, a Windows Phone phone, etc.), a tablet computer, a palm computer, a notebook computer, a video matrix, a monitoring platform, a mobile internet device (MID), or a wearable device, etc. The above are only examples and are not exhaustive, including but not limited to the above devices.

[0038] Of course, the above electronic device can also be an arc fault diagnosis system.

[0039] The related content, concepts, meanings, technical problems, technical solutions, and beneficial effects involved in the embodiments of the present application are described below.

[0040] First, some professional terms involved in the present application are explained:

[0041] Arc fault: refers to a gas discharge phenomenon caused by current passing through air or other non-conductive media due to poor contact, conductor aging, insulation damage, foreign matter intrusion, etc. in electrical equipment (such as power distribution ring network cabinet, switch cabinet). Arc fault occurs with high temperature (up to thousands of degrees Celsius), strong light and electromagnetic radiation, which may cause equipment burning, fire and even personal injury, with the characteristics of suddenness, concealment and destructiveness.

[0042] Machine learning model: refers to an algorithm model that learns rules through training data to achieve automatic decision-making for specific tasks (such as arc fault type identification).

[0043] RGB color channel: refers to the three basic channels used to represent colors in a color image, corresponding to red (R), green (G), and blue (B). Most colors in nature can be generated by mixing these three primary colors in different proportions. Each pixel point of an image is described by the brightness values (usually integers from 0 to 255) of the R, G, and B channels.

[0044] Computing power requirement of the model: refers to the computing power required by the machine learning model during training or inference, usually measured by floating point operations per second (FLOPS) or operations per second (OPS). The computing power requirement is directly related to the complexity of the model. The computing power requirement of a simple model (such as a support vector machine) is low, suitable for edge devices; the computing power requirement of a complex model (such as a deep convolutional neural network) is high, and needs to be deployed on a server or a high-performance computing platform.

[0045] Inference latency: refers to the total time taken by the machine learning model to process the input data (e.g. color images to be diagnosed) and output the result (e.g. fault type, spatial coordinates), usually measured in milliseconds. Inference latency is a key indicator of the real-time performance of the model, and the lower the latency, the faster the model responds to faults. In this application, the inference latency needs to be controlled within the range allowed by practical applications to achieve immediate diagnosis and rapid response to arc faults, avoiding the spread of faults due to delay.

[0046] Please refer to Figure 1 , Figure 1 is a structural diagram of an arc fault diagnosis system provided by an embodiment of the present application; it can be seen that the arc fault diagnosis system (hereinafter referred to as the system) comprises a controller, m power distribution ring network cabinets, m camera modules, etc., which are not limited here; wherein:

[0047] The controller is the core processing unit of the system, responsible for the reception, processing, model inference and output of the diagnosis result of the image data, and is the core carrier for realizing automatic identification and decision of arc faults.

[0048] The m power distribution ring network cabinets are the monitored objects, which are the possible places where arc faults occur, and the system realizes fault monitoring by image acquisition of the internal state thereof.

[0049] It needs to be explained that the power distribution ring network cabinet is a key equipment in the urban power distribution network, used to realize ring network power supply of cable lines, and contains components such as switches, busbars and cable joints inside, which are prone to arc faults due to poor contact, insulation aging, etc.

[0050] The m camera modules, as image acquisition devices, are responsible for real-time shooting of color images inside the corresponding power distribution ring network cabinet, providing original visual data for fault diagnosis. It is necessary to continuously capture the dynamic changes inside the ring network cabinet, especially the light intensity, color and spatial distribution characteristics when arc faults occur.

[0051] It needs to be explained that the camera module can be an industrial-grade color camera with a resolution greater than or equal to 1080P to ensure that the fine features of the arc (such as the light spot of the sharp discharge and the local bright spot of the poor contact) can be clearly captured; the frame rate is greater than or equal to 30fps to ensure continuous capture of dynamic arcs (such as arc drawing and transient arc) and avoid motion blur; the protection level of the camera module needs to be IP65 or above to resist dust and moisture (such as condensate water) inside the ring network cabinet, and has the ability to resist electromagnetic interference (through electromagnetic shielding design or filtering circuit to adapt to the strong electromagnetic environment inside the cabinet).

[0052] Please refer to Figure 2 , Figure 2is an application scenario of an image-based arc fault diagnosis method provided by an embodiment of the present application. It can be known that m can be equal to 3, the m power distribution ring network cabinets can include: a first power distribution ring network cabinet, a second power distribution ring network cabinet, and a third power distribution ring network cabinet, and the m camera modules can include: a first camera module, a second camera module, and a third camera module, and the like, which are not limited here; by Figure 2 It can be known that one camera module is arranged in each power distribution ring network cabinet, each camera module is used to collect color images inside the corresponding power distribution ring network cabinet in real time, and capture visual features (such as strong light, color mutation, and the like) of possible arc faults; the controller can communicate and / or be physically connected with each camera model in the m camera modules, the controller can receive data collected by the m camera modules and issue instructions; when arc fault diagnosis is needed, the controller can execute the image-based arc fault diagnosis method provided by an embodiment of the present application, and the specific steps are as follows:

[0053] Color images of the m power distribution ring network cabinets are collected by the m camera modules to obtain first color image data;

[0054] The first color image data is preprocessed to obtain second color image data;

[0055] Each data in the second color image data is labeled with a corresponding fault type and a spatial coordinate of the fault type to obtain a labeled data set;

[0056] An initial machine learning model is trained based on the labeled data set to obtain a target machine learning model;

[0057] A color image to be diagnosed is obtained;

[0058] The color image to be diagnosed is input into the target machine learning model to obtain a target diagnosis result; the target diagnosis result includes a target fault type and a spatial coordinate corresponding to the target fault type; the target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase grounding arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0059] It needs to be explained that the controller can also execute part or all steps of the image-based arc fault diagnosis method provided by an embodiment of the present application.

[0060] Please refer to Figure 3 , Figure 3 is a flowchart of an image-based arc fault diagnosis method provided by an embodiment of the present application; the method is applied to a controller in an arc fault diagnosis system, the arc fault diagnosis system further includes m power distribution ring network cabinets and m camera modules, one camera module is arranged in each power distribution ring network cabinet, m is a positive integer, and the method can include the following steps:

[0061] S301, acquire color images of the m power distribution ring network cabinets by the m camera modules to obtain first color image data.

[0062] In the embodiments of the present application, in each power distribution ring network cabinet, the corresponding camera module is fixed near the key fault point (for example, switch contact point, conductor joint, busbar connection, etc.), and is installed by a support or magnetic attraction method, so as to ensure that the lens of the camera module is directly opposite the high-fault area, for example, the switch opening and closing action and the joint contact are completely in the center of the field of view by adjusting the angle; the camera module can be powered by a direct current power supply in the power distribution ring network cabinet, or the power supply mode of Ethernet is adopted to simplify the wiring; in addition, the camera module can be connected to the edge computing device (or transmission module) through the Ethernet interface, and the collected image data is uploaded to the edge computing device (or transmission module) in real time, and then the image data is transmitted to the controller by the edge computing device (or transmission module).

[0063] It should be explained that, unless otherwise specified, the images mentioned in the embodiments of the present application are all color images.

[0064] In specific embodiments, when the power distribution ring network cabinet is normally running (without fault simulation), the m camera modules are controlled to collect images once at a fixed period (such as every 5 minutes), or collect images in a triggered manner (such as when current / voltage fluctuation is detected), accumulate image samples of "normal working conditions", obtain normal image data, in addition, the m power distribution ring network cabinets can be controlled to simulate faults, and the m camera modules are controlled to collect images during the simulation process to obtain fault image data. Specifically, a typical arc fault (for example, an arc fault, a single-phase grounding arc fault, a virtual contact arc fault, a switch breakdown arc fault, etc.) can be artificially created, each type of arc fault can be simulated multiple times, and in each simulation, the camera module is continuously collected at a high frame rate, for example, the camera module is continuously collected at 30fps for 5 seconds to cover the whole process from the generation to the development and final extinction of the arc, an image sequence containing fault dynamic characteristics is obtained, and fault image data is obtained; the normal image data and the fault image data constitute the first color image data.

[0065] S302, pre-process the first color image data to obtain second color image data.

[0066] In the embodiments of the present application, the pre-processing can include at least one of the following: Gaussian filtering, median filtering, bilateral filtering, histogram equalization, brightness normalization, size adjustment, etc., which are not limited herein.

[0067] In specific embodiments, the preprocessing can include bilateral filtering, histogram equalization, size adjustment and the like, and specifically, the first color image data can be processed by using a bilateral filtering method, which considers both spatial distance and pixel value similarity, and preserves the arc edge texture while smoothing the noise. Then, the first color image data can be processed by using adaptive histogram equalization, which enhances the contrast in blocks and avoids overexposure caused by global equalization (such as the arc region being too bright and losing details). Then, the image formats in the first color image data can be unified to ensure that the sizes and color channels of all preprocessed images are consistent, which facilitates batch processing by the model. In this way, the second color image data can be obtained.

[0068] S303, label the corresponding fault type and the spatial coordinates of the fault type for each data in the second color image data to obtain a labeled data set.

[0069] In embodiments of the present application, for each data in the second color image data, the corresponding fault type and the spatial coordinates of the fault type can be labeled, thereby obtaining a labeled data set.

[0070] Optionally, the second color image data includes a color images, and a is an integer greater than or equal to m; please refer to Figure 4 , Figure 4 is a flowchart of a method for obtaining a labeled data set provided by embodiments of the present application, and it can be known that, in step S303, the second color image data is labeled to obtain a labeled data set, which can include the steps as shown in Figure 4

[0071] S31, extract statistical feature data of each color image in the a color images in the RGB color channel to obtain a statistical feature data; each statistical feature data includes at least one of the following: mean, variance, pixel distribution information, and brightness mutation information;

[0072] S32, according to a preset labeling rule, label the corresponding fault type and the spatial coordinates of the fault type for each data in the a statistical feature data to obtain a fault type and a spatial coordinates;

[0073] S33, according to the a labeled type, the a spatial coordinates and the a color images, determine the labeled data set.

[0074] In embodiments of the present application, the preset labeling rule can be preset or default.

[0075] ​In specific embodiments, statistical feature data of each color image in a color image can be extracted first, obtaining a statistical feature data, specifically, for each color image, after separating the RGB channel, the mean value (reflecting the overall brightness) and the variance (reflecting the dispersion degree of pixel distribution, such as the high brightness area of the arc will increase the variance) of each channel are calculated, then the pixel distribution information of each channel of RGB (such as the R channel histogram of the arc will have obvious peak value in the high brightness interval) can be calculated through histogram statistics, in addition, if the above a color images are image sequences, that is, continuous frames taken during the arc occurrence process, then the a color images can be arranged in the order of before and after the shooting time, and the brightness mutation (obvious brightness jump will occur when the arc is generated) is calculated through inter-frame difference, if the a color images are not continuous frames but are taken separately, then the brightness mutation information can be obtained by comparing the a color images with the preset color image (i.e. the color image under normal circumstances), in this way, the a statistical feature data can be obtained.

[0076] Then, according to the preset labeling rule, the corresponding fault type and the spatial coordinates of the fault type of each data of the a statistical feature data can be labeled, obtaining a fault type and a spatial coordinates, for example, the preset labeling rule can be as shown in Table 1:

[0077] Table 1

[0078]

[0079] Of course, the a statistical feature data can also be manually labeled to obtain a fault type and a spatial coordinates; finally, the a labeled type, the a spatial coordinates and the a color image can be associated one by one to obtain a labeled data set.

[0080] The preset labeling rule is formulated in combination with the RGB feature rule of the arc fault (such as different fault types correspond to different channel mean value ranges and variance threshold values), and the statistical feature data is labeled by using the preset labeling rule, which can realize a certain degree of automation, greatly reducing the workload of manual labeling, especially when the sample quantity is large, which can significantly improve the labeling efficiency.

[0081] In addition, by directly associating the statistical feature data with the visual essence of the fault type, the labeled data set can enable the machine learning model to more efficiently learn the mapping relationship between the features and the fault types, and the model does not need to re-extract the underlying features from the original image, but can directly train based on these high-dimensional and targeted statistical features, accelerating the model convergence speed and improving the training efficiency.

[0082] S304, training an initial machine learning model based on the labeled data set to obtain a target machine learning model.

[0083] Optionally, refer to Figure 5 , Figure 5 is a flowchart of a method for obtaining a target machine learning model provided by the embodiments of the present application, it can be known that step S304, training an initial machine learning model based on the labeled data set to obtain a target machine learning model, can include Figure 5 the steps shown in the figure:

[0084] A1, dividing the data in the labeled data set into a training data set and a test data set;

[0085] A2, training the initial machine learning model using the training data set to obtain a first machine learning model;

[0086] A3, testing the first machine learning model using the test data set to obtain a test result; determining a first accuracy rate corresponding to the test result;

[0087] A4, when the first accuracy rate is greater than a preset accuracy rate, determining the target machine learning model according to the first machine learning model;

[0088] A5, when the first accuracy rate is not greater than the preset accuracy rate, obtaining new training data, training the first machine learning model through the new training data, until the accuracy rate corresponding to the first machine learning model is greater than the preset accuracy rate, and determining the target machine learning model according to the first machine learning model.

[0089] In the embodiments of the present application, the preset accuracy rate can be preset or defaulted in advance.

[0090] In specific embodiments, the data in the labeled data set can be divided into a training data set and a test data set first, for example, all the data in the labeled data set can be sorted by time (such as by collection time from early to late), then a division point (such as taking 80% of the total data amount as a boundary) is set, the first 80% data is taken as the training data set, and the last 20% data is taken as the test data set.

[0091] Then, the training data set can be used to train the initial machine learning model to obtain a first machine learning model; then, the test data set can be used to test the first machine learning model to obtain a test result; the first accuracy rate corresponding to the test result is determined, specifically, the test data set can be input into the first machine learning model to obtain the test result, the number of test results that are correct is found out to obtain a first number, then the total number of test results can be determined, the first number is divided by the total number to obtain the first accuracy rate; when the first accuracy rate is greater than the preset accuracy rate, it means that the first machine learning model is qualified, and the first machine learning model can be directly taken as the target machine learning model.

[0092] When the first accuracy is not greater than the preset accuracy, new training data can be obtained, the first machine learning model is trained through the new training data until the accuracy corresponding to the first machine learning model is greater than the preset accuracy, and then the first machine learning model can be used as the target machine learning model.

[0093] In this way, the initial machine learning model is trained through the training data set, so that the initial machine learning model can learn the visual rule of arc fault (for example, the association between the RGB channel mean value and the fault type).

[0094] Optionally, the training data set includes b color images, b is a positive integer less than a, step A2, and the training of the initial machine learning model by using the training data set to obtain the first machine learning model can include the following steps:

[0095] B1, statistical feature data and color space position feature data of each color image in the b color images in the RGB color channel are extracted, and b statistical feature data and b color space position feature data are obtained;

[0096] B2, b feature vectors corresponding to the b statistical feature data and the b color space position feature data are determined; each feature vector corresponds to a statistical feature data and a color space position feature data;

[0097] B3, the b feature vectors are divided into a training subset and a validation subset;

[0098] B4, the initial model parameters of the initial machine learning model are initialized;

[0099] B5, the initial machine learning model is fitted and trained by using the training subset;

[0100] B6, the initial machine learning model is verified by using the validation subset, and a verification result is obtained;

[0101] B7, whether the initial machine learning model meets a preset condition is determined according to the verification result;

[0102] B8, when the initial machine learning model meets the preset condition, the first machine learning model is determined according to the initial machine learning model;

[0103] B9. When the initial machine learning model does not satisfy the preset condition, the initial model parameter is optimized based on a preset search method to obtain a first model parameter; the model parameter of the initial machine learning model is adjusted to the first model parameter to obtain a second machine learning model; a new training subset and a new verification subset are obtained, and the second machine learning model is trained through the new training subset and the new verification subset until the second machine learning model satisfies the preset condition, and the first machine learning model is determined according to the second machine learning model.

[0104] In the embodiments of the present application, the preset condition and the preset search method can be preset or defaulted in advance; the color space position feature data can include at least one of the following: spatial coordinates of a key color region (for example, the coordinates of the bounding box of a highlight color region), spatial distribution of a color gradient, multi-channel color space correlation (for example, the ratio between the average value of the R channel and the average value of the B channel at the same position), and the like, which are not limited herein; the model parameter can include at least one of the following: a weight parameter, a bias parameter, a hyperparameter, and the like, which are not limited herein.

[0105] In specific embodiments, statistical feature data and color space position feature data of each color image in b color images in the RGB color channel are extracted to obtain b statistical feature data and b color space position feature data. Specifically, the method for obtaining b statistical feature data can be the same as the method for obtaining a statistical feature data. Then, for each color image in the b color images, the image can be first divided into regular grid regions or color-based clustering regions, and each region is labeled to provide a basis for subsequent feature association with spatial positions. For example, the image (assuming the image size is HxW) is uniformly divided into NxM sub-regions (such as 16x16, the sub-region size is hxw, h=H / 16, w=W / 16), and each sub-region is labeled with the coordinates of its center position. For another example, the RGB values of the image pixels can be K-means clustered (K=5-10), and pixels with similar colors are clustered into the same region, and the contour detection is used to obtain the bounding box coordinates of each clustering region. Then, for each divided region, the statistical features of the RGB channel can be calculated and bound with the spatial coordinates of the region, so that the color space position feature data is obtained. For example, the color space position feature data can include the spatial coordinates of a key color region. Then, the region meeting the arc feature (for example, a high luminance region with R channel average value >200 and G channel average value >150) is screened out through a preset color threshold, and its spatial coordinates are extracted to obtain the color space position feature data. In this way, b color space position feature data can be obtained.

[0106] Further, b feature vectors corresponding to the b statistical feature data and the b color space position feature data can be determined. Specifically, due to the large difference in dimension between the statistical feature data and the color space position feature data, the b statistical feature data and the b color space position feature data can be standardized first, and then the feature dimensions of the b color space position feature data can be aligned. Specifically, for each color space position feature data, only the feature data corresponding to a preset number of key regions can be retained. For example, assuming that the preset number is equal to 5, if the number of key regions in a certain color space position feature data is less than the preset number, the insufficient part is filled with a zero vector; if it is greater than 5, only the top 5 regions with the largest area are retained to ensure that the coordinate feature dimension is fixed. Then, the standardized and dimension-aligned statistical features and color space position features can be spliced in a fixed order to form a feature vector of a single sample. For example, assuming that the standardized data of a certain statistical feature data is [0.1, 0.3, 0.1], 0.1 corresponds to the mean value of the R channel, 0.3 corresponds to the mean value of the G channel, and 0.1 corresponds to the mean value of the B channel. A certain color space position feature data includes feature data of 7 key regions (due to multiple highlight regions around the arc), and the feature data of each region includes: bounding box coordinates (4 values), centroid coordinates (2 values), and region area (1 value), i.e. each region corresponds to 7 feature values. The areas of the 7 key regions are calculated, and the top 5 (the area is a direct reflection of the arc energy, and the region with a larger area is more likely to be the core fault area) with the largest area are taken, and the remaining 2 regions are discarded and not included in the feature data. The features of the 5 regions are retained, and the total dimension is 35 (which can be a fixed dimension preset in advance). The statistical feature data and the color space position feature data are spliced in the order of “statistical feature-color space position feature”. Before splicing, the statistical feature has 3 dimensions, the color space position feature has 35 dimensions, and the spliced feature vector has 38 dimensions. In this way, b feature vectors can be obtained.

[0107] Next, the b feature vectors can be divided into a training subset and a validation subset. Specifically, 80% of the b feature vectors can be divided into the training subset and the remaining 20% can be divided into the validation subset by random division. The initial model parameters of the initial machine learning model can be initialized. Specifically, the initial model parameters can be initialized by zero initialization or small random number initialization. For example, zero initialization sets the initial model parameters to 0 (simple and direct, suitable for linear models). For another example, small random number initialization randomly samples values from a normal distribution with a mean of 0 and a small variance (for example, (0, 0.01)) and assigns the sampled values to the initial model parameters to avoid extreme initial prediction values caused by excessively large parameters.

[0108] Then, the initial machine learning model can be fitted and trained by using the training subset. Specifically, the feature vectors in the training subset can be taken as model inputs, and the corresponding fault types and spatial coordinates can be taken as real labels. The initial machine learning model generates a prediction result based on the initial model parameters, and the prediction result includes a predicted fault type and a predicted spatial coordinate. A loss value of the prediction result and the real labels is calculated by using a preset loss function (for example, a cross-entropy loss function for a classification task, and a mean square error loss function for a positioning task). An optimizer (for example, a gradient descent, Adam, etc.) is used to iteratively adjust the model parameters (i.e., the initial model parameters) according to the gradient direction of the loss value, so as to gradually reduce the loss value. The above process is repeated until the loss value of the training subset tends to be stable or reaches a preset number of iterations (for example, 100 rounds), and the fitting and training are completed.

[0109] Then, the initial machine learning model can be verified by using the validation subset to obtain a verification result. Specifically, the feature vectors in the validation subset can be input into the initial machine learning model to obtain a prediction result of the initial machine learning model for the validation data (without adjusting the parameters, only for evaluation), that is, the verification result. Then, it is determined whether the initial machine learning model meets a preset condition according to the verification result. For example, the preset condition can be that the F1 score of the predicted fault type in the verification result is greater than or equal to 0.9, and the average error of the spatial coordinate positioning is less than 10 pixels. When the initial machine learning model meets the preset condition, the initial machine learning model can be determined as the first machine learning model.

[0110] When the initial machine learning model does not meet the preset condition, the initial model parameters are optimized based on a preset search method to obtain first model parameters. Specifically, the initial model parameters can be searched by using the preset search method to obtain optimal model parameters, that is, the first model parameters. The preset search method can include one of the following: random search, grid search, etc., which are not limited herein. Further, the model parameters of the initial machine learning model can be adjusted to the first model parameters to obtain a second machine learning model.

[0111] Finally, a new training subset and a new validation subset can be obtained. The second machine learning model is trained by using the new training subset and the new validation subset until the second machine learning model meets the preset condition, and the second machine learning model is determined as the first machine learning model.

[0112] Thus, by extracting the RGB statistical features (global color rules such as mean and variance) and color space position features (local space and color association such as highlight area coordinates), and fusing them into a feature vector, the essential properties of arc faults (such as "R channel highlight at the joint") can be more comprehensively captured. Compared with a single feature, the fused feature contains more discriminative information, providing a more accurate learning basis for the model and improving the accuracy of fault recognition and positioning from the source.

[0113] Optionally, refer to Figure 6 , Figure 6 is a flowchart of an initial machine learning model acquisition method provided by the embodiment of the present application, and it can be known that the method can further include Figure 6 the steps shown in the figure:

[0114] C1, acquiring a target recognition requirement parameter;

[0115] C2, selecting a machine learning model from an initial machine learning model library according to the target recognition requirement parameter, to obtain c machine learning models; c is an integer greater than 1;

[0116] C3, determining the computing power requirement corresponding to each machine learning model in the c machine learning models, to obtain c computing power requirements;

[0117] C4, acquiring a target device performance parameter corresponding to the controller;

[0118] C5, determining a target computing power requirement range corresponding to the target device performance parameter;

[0119] C6, determining the computing power requirements in the c computing power requirements that are within the target computing power requirement range, to obtain d computing power requirements; d is a positive integer less than or equal to c;

[0120] C7, determining the initial machine learning model based on the d computing power requirements and the c machine learning models.

[0121] In the embodiment of the present application, the initial machine learning model library includes machine learning models of multiple different types, for example, random forest, support vector machine, convolutional neural network, etc., which are not limited here.

[0122] In specific embodiments, the target identification demand parameter can be obtained. Specifically, a demand investigation table can be designed, and the demand investigation table can be distributed to the user for filling in. The target identification demand parameter can be determined according to the content filled in by the user. For example, the demand investigation table can include questions such as “how much do you hope the fault identification accuracy to be” and the like, which are not limited herein. Alternatively, the target identification demand parameter can be manually input by the user to the controller. For example, if the user requires “accuracy rate of 98% and inference delay of 50 ms”, the target identification demand parameter is that the accuracy rate is greater than or equal to 98% and the inference delay is less than or equal to 50 ms.

[0123] Then, the machine learning model can be selected from the initial machine learning model library according to the target identification demand parameter, and c machine learning models are obtained. For example, assuming that the target identification demand parameter is that the accuracy rate is greater than or equal to 98%, the maximum accuracy rate of each model in the initial machine learning model library can be obtained, and a plurality of maximum accuracy rates are obtained. Then, the maximum accuracy rate greater than 98% is selected from the plurality of maximum accuracy rates, and c maximum accuracy rates are obtained. The c maximum accuracy rates are selected from the corresponding models in the initial machine learning model library, and c machine learning models are obtained.

[0124] Then, the computing power demand corresponding to each machine learning model in the c machine learning models can be determined, and c computing power demands are obtained. Specifically, the mapping relationship between the preset machine learning model and the computing power demand can be pre-stored, and the c computing power demands corresponding to the c machine learning models can be determined based on the mapping relationship. Then, the target device performance parameter corresponding to the controller can be obtained. Specifically, the target device model corresponding to the controller can be obtained first, and the target device performance parameter can be determined according to the target device model. For example, the mapping relationship between the preset device model and the device performance parameter can be pre-stored, and the target device performance parameter corresponding to the target device model can be determined based on the mapping relationship. It should be explained that the target device performance parameter includes at least one of the following: processor model, core number, base frequency, and the like, which are not limited herein.

[0125] Further, the target computing power demand range corresponding to the target device performance parameter can be determined. Specifically, the maximum computing power demand that can be provided by the controller can be determined according to the target device performance parameter, and the target computing power demand range is from zero to the maximum computing power demand. Then, the computing power demand in the c computing power demands that is within the target computing power demand range can be found, and d computing power demands are obtained. Finally, the initial machine learning model can be determined based on the d computing power demands and the c machine learning models.

[0126] Thus, the core performance indicators that the model needs to meet are determined through the target identification demand parameters; c machine learning models are selected based on the target identification demand parameters (for example, a complex model corresponds to a high accuracy demand, and a lightweight model corresponds to a real-time demand), ensuring that the c machine learning models are all based on the premise of “meeting the actual identification demand” and avoiding selecting models that are irrelevant to the demand target.

[0127] Optionally, in step C7, determining the initial machine learning model based on the d computing power demands and the c machine learning models comprises:

[0128] D1, determining d machine learning models corresponding to the d computing power demands in the c machine learning models;

[0129] D2, obtaining historical usage data corresponding to each machine learning model in the d machine learning models, to obtain d historical usage data;

[0130] D3, determining a reference model score corresponding to each historical usage data in the d historical usage data, to obtain d reference model scores;

[0131] D4, determining a fine-tuning factor corresponding to each computing power demand in the d computing power demands, to obtain d fine-tuning factors;

[0132] D5, fine-tuning the corresponding reference model score in the d reference model scores according to the d fine-tuning factors, to obtain d target model scores;

[0133] D6, determining the maximum score in the d target model scores, and determining the machine learning model corresponding to the maximum score in the d machine learning models as the initial machine learning model.

[0134] In the embodiments of the present application, d machine learning models corresponding to the d computing power demands can be found in the c machine learning models; then, historical usage data corresponding to each machine learning model in the d machine learning models can be obtained, to obtain d historical usage data. Specifically, usage records of each machine learning model in the d machine learning models can be queried from a preset database, and the extracted usage records can be grouped according to model unique identifiers (for example, model IDs), to ensure that the data of each model is independently grouped, and finally d usage records, i.e., d historical usage data, are obtained. For example, the historical data of model A includes “model training duration of 30 days, accuracy rate of 96% in XX ring network cabinet in January 2024, false alarm rate of 2%, and average delay of 80 ms”; the historical data of model B includes “model training duration of 10 days, accuracy rate of 94% in YY ring network cabinet in June 2024, and precision decrease of 5% in electromagnetic interference test”.

[0135] Then, a reference model score corresponding to each of the d historical usage data can be determined, obtaining d reference model scores; then, a fine-tuning factor corresponding to each of the d computing power requirements can be determined, obtaining d fine-tuning factors, for example, a mapping relationship between a preset computing power requirement and a fine-tuning factor can be pre-stored, and the d fine-tuning factors corresponding to the d computing power requirements can be determined based on the mapping relationship, and the value range of each fine-tuning factor is -0.15~0.15; further, the corresponding reference model score in the d reference model scores can be fine-tuned according to the d fine-tuning factors, obtaining d target model scores, which are specifically as follows:

[0136] The first target model score = the first reference model score x (1+the first fine-tuning factor);

[0137] The first reference model score is any reference model score in the d reference model scores; the first fine-tuning factor is the fine-tuning factor corresponding to the first reference model score in the d fine-tuning factors; the first target model score is the target model score corresponding to the first reference model score in the d target model scores; the d target model scores can be obtained by calculating d times according to the above formula; then, the d target model scores can be compared two by two to find the maximum score, and the machine learning model corresponding to the maximum score in the d machine learning models is determined as the initial machine learning model.

[0138] In this way, by scoring according to the d historical usage data, d reference model scores are obtained, and the past actual performance of the model (for example, accuracy, false positive rate, and anti-interference ability in the same type of ring network cabinet) is quantified as a score. Compared with only relying on theoretical performance (such as the accuracy upper limit of model design), historical usage data can better reflect the stability of the model in real scenarios (such as whether the accuracy drops sharply in a high-temperature environment), making the evaluation closer to actual application requirements and reducing the probability of selecting a model that is excellent in theory but collapses in practice.

[0139] Optionally, each historical usage data includes: training duration, accuracy, and inference delay; and the determination of the reference model score corresponding to each of the d historical usage data to obtain d reference model scores includes:

[0140] E1, obtaining first historical usage data; the first historical usage data is any historical usage data in the d historical usage data; the first historical usage data includes: first training duration, first accuracy, and first inference delay;

[0141] E2, determining a reference accuracy and a reference inference delay corresponding to the target identification requirement parameter;

[0142] E3, determine a difference value between the first accuracy rate and the reference accuracy rate, to obtain a target accuracy rate difference value;

[0143] E4, determine a first model score corresponding to the target accuracy rate difference value;

[0144] E5, determine a difference value between the first inference delay and the reference inference delay, to obtain a target inference delay difference value;

[0145] E6, determine a second model score corresponding to the target inference delay difference value;

[0146] E7, determine a third model score according to the first model score and the second model score;

[0147] E8, determine a target score influence factor corresponding to the first training duration;

[0148] E9, adjust the third model score according to the target score influence factor, to obtain a reference model score corresponding to the first historical use data.

[0149] In the embodiments of the present application, the first historical use data can be obtained first; then, the reference accuracy rate and the reference inference delay corresponding to the target recognition requirement parameter can be determined, for example, assuming that the target recognition requirement parameter is: the accuracy rate is greater than or equal to 98% and the inference delay is less than or equal to 50ms, then the lowest requirement corresponding to the target recognition requirement parameter can be taken as the reference accuracy rate and the reference inference delay, that is, the reference accuracy rate is equal to 98% and the reference inference delay is equal to 50ms; then, the first accuracy rate is subtracted from the reference accuracy rate to obtain the target accuracy rate difference value; then, the first model score corresponding to the target accuracy rate difference value can be determined, specifically, the mapping relationship between the preset accuracy rate difference value and the model score can be stored in advance, and the first model score corresponding to the target accuracy rate difference value is determined based on the mapping relationship;

[0150] Then, the first inference delay can be subtracted from the reference inference delay to obtain a target inference delay difference value. Then, a second model score corresponding to the target inference delay difference value can be determined. For example, a mapping relationship between preset inference delay difference values and model scores can be pre-stored, and the second model score corresponding to the target inference delay difference value can be determined based on the mapping relationship. Further, a third model score can be determined according to the first model score and the second model score. Specifically, the third model score can be obtained by directly adding the first model score and the second model score, or the first model score can be multiplied by a first weight (for example, 0.7) and the second model score can be multiplied by a second weight (for example, 0.3) to obtain a weighted sum of the first model score and the second model score, and the third model score can be obtained by adding the weighted sum and 1.

[0151] Then, a target score influence factor corresponding to the first training duration can be determined. Specifically, a mapping relationship between preset training durations and score influence factors can be pre-stored, and the target score influence factor corresponding to the first training duration can be determined based on the mapping relationship. The value range of the target score influence factor can be -0.2 to 0.2. Finally, the third model score can be adjusted according to the target score influence factor. Specifically, the fourth model score can be determined according to the following formula:

[0152] Fourth model score = third model score x (1 + target score influence factor).

[0153] According to the above formula, the fourth model score, that is, the reference model score corresponding to the first historical use data, can be obtained.

[0154] In this way, the third model score is determined according to the first model score and the second model score, the accuracy and the inference delay performance are integrated into a comprehensive score, the comprehensive score balances the evaluation of “accuracy” and “real-time”, and can comprehensively reflect the adaptability of the model in the actual scene.

[0155] S305, obtaining a color image to be diagnosed.

[0156] In the embodiments of the present application, m color images of m power distribution ring network cabinets can be collected by m camera modules to obtain a plurality of color images, and a controller selects one color image from the plurality of color images as a color image to be diagnosed, or a user can manually input the color image to be diagnosed to the controller.

[0157] S306, input the color image to be diagnosed into the target machine learning model to obtain a target diagnosis result; the target diagnosis result includes a target fault type and a spatial coordinate corresponding to the target fault type; the target fault type includes one of the following: no fault, inter-phase arc fault, single-phase ground arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0158] In the embodiments of the present application, the color image to be diagnosed can be input into the target machine learning model, and the target machine learning model can infer and predict according to the color image to be diagnosed to obtain the target fault type and the spatial coordinate corresponding to the target fault type, i.e., the target diagnosis result.

[0159] In summary, the image-based arc fault diagnosis method described in the present application uses m camera modules as core perception devices. The camera modules are mature mass-produced devices, and the cost of a single device is much lower than that of a high-precision sensor (such as a very high frequency sensor or an infrared thermal imager) relied on by traditional arc detection. Therefore, the detection cost is greatly reduced. In addition, the target machine learning model can diagnose and infer the color image to be diagnosed, which can quickly and accurately obtain the detection result, improve the real-time performance of arc fault detection, and realize low-cost and high-real-time arc fault detection through the method.

[0160] Please refer to Figure 7 , Figure 7 is a functional unit composition block diagram of an image-based arc fault diagnosis apparatus 700 provided by the embodiments of the present application. The image-based arc fault diagnosis apparatus 700 is applied to a controller in an arc fault diagnosis system, and the arc fault diagnosis system further includes m power distribution ring network cabinets and m camera modules. One camera module is arranged in each power distribution ring network cabinet, m is a positive integer, and the image-based arc fault diagnosis apparatus 700 includes an acquisition unit 701, a model training unit 702, and a diagnosis unit 703.

[0161] The acquisition unit 701 is configured to acquire color images of the m power distribution ring network cabinets through the m camera modules to obtain first color image data.

[0162] The model training unit 702 is configured to pre-process the first color image data to obtain second color image data, label each data in the second color image data with a corresponding fault type and a spatial coordinate of the fault type to obtain a labeled data set, train an initial machine learning model based on the labeled data set, and obtain a target machine learning model.

[0163] The acquisition unit 701 is further configured to acquire a color image to be diagnosed.

[0164] The diagnostic unit 703 is configured to input the color image to be diagnosed into the target machine learning model to obtain a target diagnosis result; the target diagnosis result includes a target fault type and spatial coordinates corresponding to the target fault type; the target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase ground arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0165] In specific implementations, the image-based arc fault diagnosis apparatus 700 described in the embodiments of the present application can also perform other implementations described in the image-based arc fault diagnosis method provided by the embodiments of the present application, which will not be described here.

[0166] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device can include a processor, a memory, a communication interface, and one or more programs. The processor, the memory, and the communication interface can be connected to each other through a bus. The one or more programs are stored in the memory and are configured to be executed by the processor. In the embodiment of the present application, the electronic device is applied to a controller in an arc fault diagnosis system. The arc fault diagnosis system further includes m power distribution ring network cabinets and m camera modules. Each power distribution ring network cabinet is provided with one camera module. m is a positive integer. The program includes instructions for performing the following steps:

[0167] acquiring color images of the m power distribution ring network cabinets through the m camera modules to obtain first color image data;

[0168] preprocessing the first color image data to obtain second color image data;

[0169] labeling each data in the second color image data with a corresponding fault type and spatial coordinates of the fault type to obtain a labeled data set;

[0170] training an initial machine learning model based on the labeled data set to obtain a target machine learning model;

[0171] acquiring a color image to be diagnosed;

[0172] inputting the color image to be diagnosed into the target machine learning model to obtain a target diagnosis result; the target diagnosis result includes a target fault type and spatial coordinates corresponding to the target fault type; the target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase ground arc fault, virtual contact arc fault, and switch breakdown arc fault.

[0173] It should be explained that the electronic device can also perform part or all of the steps of any of the above method embodiments.

[0174] The embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all of the steps of any method described in the above method embodiments, and the computer includes an electronic device.

[0175] The embodiment of the application further provides a computer program product, which includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method described in the above method embodiments. The computer program product can be a software installation package, and the computer includes an electronic device.

[0176] It should be noted that, for the above method embodiments, in order to simply describe, each is described as a combination of a series of actions, but those skilled in the art should know that the application is not limited to the order of the actions described, because according to the application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the application.

[0177] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0178] In several embodiments provided in the application, it should be understood that the disclosed device can be implemented by other means. For example, the device embodiments described above are only schematic, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical or other forms.

[0179] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be implemented by a computer program instructing relevant hardware, and the program can be stored in a computer readable storage medium, and the program can include the processes of the above method embodiments when executed. The storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various program code storage media.

[0180] The steps of methods or algorithms described in the embodiments of the present application can be implemented in hardware, or be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically EPROM (EEPROM), register, hard disk, mobile hard disk, compact disc read-only memory (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium, and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in the terminal device or the management device. Of course, the processor and the storage medium can also exist as discrete components in the terminal device or the management device.

[0181] Those skilled in the art should be aware that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product entirely or partially. The computer program product includes one or more computer instructions. When loaded and executed on a computer, the computer program instructions entirely or partially generate the processes or functions described in the embodiments of the present application.

[0182] The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transferred from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer, or a data storage device such as a server, data center, etc. integrated with one or more available media.

[0183] Among them, the available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0184] The various modules / units included in the various devices and products described in the above embodiments can be software modules / units or hardware modules / units, or partially software modules / units and partially hardware modules / units. For example, for the various devices and products applied to or integrated into a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various devices and products applied to or integrated into a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various devices and products applied to or integrated into a terminal device, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the terminal device, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the terminal device, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry.

[0185] The above detailed description of the specific implementation is further detailed to explain the purposes, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above description is only a specific implementation of the embodiments of the present application and is not intended to limit the protection scope of the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. An image-based method for diagnosing electric arc faults, characterized in that, A controller is applied in an arc fault diagnosis system, the arc fault diagnosis system further comprising m distribution ring network cabinets and m camera modules, each distribution ring network cabinet being equipped with one camera module, where m is a positive integer, the method comprising: Color images of the m power distribution ring network cabinets are acquired by the m camera modules to obtain the first color image data; The first color image data is preprocessed to obtain the second color image data; Each data point in the second color image data is labeled with its corresponding fault type and the spatial coordinates of that fault type to obtain a labeled dataset. An initial machine learning model is trained based on the labeled dataset to obtain the target machine learning model; Acquire the color image to be diagnosed; The color image to be diagnosed is input into the target machine learning model to obtain the target diagnosis result; the target diagnosis result includes the target fault type and the spatial coordinates corresponding to the target fault type; the target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase grounding arc fault, virtual contact arc fault, switch breakdown arc fault; The method further includes: Obtain the target recognition requirements parameters; Based on the target recognition requirement parameters, machine learning models are selected from the initial machine learning model library to obtain c machine learning models; c is an integer greater than 1. Determine the computing power requirement for each of the c machine learning models to obtain c computing power requirements; Obtain the target device performance parameters corresponding to the controller; Determine the target computing power requirement range corresponding to the performance parameters of the target device; Determine the computing power requirements that fall within the target computing power requirement range from the c computing power requirements to obtain d computing power requirements; d is a positive integer less than or equal to c. The initial machine learning model is determined based on the d computing power requirements and the c machine learning models; The step of determining the initial machine learning model based on the d computing power requirements and the c machine learning models includes: Determine the d machine learning models corresponding to the d computing power requirements among the c machine learning models; Obtain the historical usage data corresponding to each of the d machine learning models to obtain d historical usage data; Determine the reference model score corresponding to each of the d historical usage data to obtain d reference model scores; Determine the fine-tuning factor corresponding to each of the d computing power requirements to obtain d fine-tuning factors; Based on the d fine-tuning factors, the corresponding reference model scores in the d reference model scores are fine-tuned to obtain d target model scores; Determine the maximum score among the d target model scores, and determine the machine learning model corresponding to the maximum score among the d machine learning models as the initial machine learning model; Each historical usage data point includes: training duration, accuracy, and inference latency; the determination of the reference model score corresponding to each of the d historical usage data points yields d reference model scores, including: Obtain first historical usage data; the first historical usage data is any one of the d historical usage data; the first historical usage data includes: first training duration, first accuracy, and first inference latency; Determine the reference accuracy and reference inference delay corresponding to the target recognition requirement parameters; The difference between the first accuracy rate and the reference accuracy rate is determined to obtain the target accuracy rate difference. Determine the first model score corresponding to the target accuracy difference; The difference between the first inference delay and the reference inference delay is determined to obtain the target inference delay difference; Determine the second model score corresponding to the target inference delay difference; The third model score is determined based on the first model score and the second model score; Determine the target score influencing factor corresponding to the first training duration; The third model score is adjusted based on the target score influence factor to obtain the reference model score corresponding to the first historical usage data.

2. The method as described in claim 1, characterized in that, The second color image data includes *a* color images, where *a* is an integer greater than or equal to *m*; the annotation of the second color image data to obtain an annotated dataset includes: Extract statistical feature data of each color image in the RGB color channel from the a color images to obtain a statistical feature data; each statistical feature data includes at least one of the following: mean, variance, pixel distribution information, brightness change information; According to the preset labeling rules, each of the a statistical feature data is labeled with its corresponding fault type and spatial coordinates, so as to obtain a fault types and a spatial coordinates; The labeled dataset is determined based on the a fault types, the a spatial coordinates, and the a color images.

3. The method as described in claim 1 or 2, characterized in that, The process of training an initial machine learning model based on the labeled dataset to obtain a target machine learning model includes: The data in the labeled dataset is divided into a training dataset and a test dataset; The initial machine learning model is trained using the training dataset to obtain the first machine learning model; The first machine learning model is tested using the test dataset to obtain test results; the first accuracy corresponding to the test results is determined. When the first accuracy rate is greater than the preset accuracy rate, the target machine learning model is determined based on the first machine learning model; When the first accuracy is not greater than the preset accuracy, new training data is acquired, and the first machine learning model is trained using the new training data until the accuracy of the first machine learning model is greater than the preset accuracy. The target machine learning model is then determined based on the first machine learning model.

4. The method as described in claim 3, characterized in that, The training dataset includes b color images, where b is a positive integer less than a. The step of training the initial machine learning model using the training dataset to obtain a first machine learning model includes: Extract the statistical feature data and color space position feature data of each color image in the RGB color channel from the b color images to obtain b statistical feature data and b color space position feature data; Determine b feature vectors corresponding to the b statistical feature data and the b color space location feature data; each feature vector corresponds to one statistical feature data and one color space location feature data. The b feature vectors are divided into a training subset and a validation subset; Initialize the initial model parameters of the initial machine learning model; The initial machine learning model is fitted and trained using the training subset; The initial machine learning model is validated using the validation subset to obtain validation results; Based on the verification results, determine whether the initial machine learning model meets the preset conditions; When the initial machine learning model satisfies the preset conditions, the first machine learning model is determined based on the initial machine learning model; When the initial machine learning model does not meet the preset conditions, the parameters of the initial model are optimized based on a preset search method to obtain the first model parameters; the model parameters of the initial machine learning model are adjusted to the first model parameters to obtain the second machine learning model; a new training subset and a new validation subset are obtained, and the second machine learning model is trained using the new training subset and the new validation subset until the second machine learning model meets the preset conditions; the first machine learning model is determined based on the second machine learning model.

5. An image-based arc fault diagnosis device, characterized in that, A controller is used in an arc fault diagnosis system, which further includes m distribution ring network cabinets and m camera modules, with one camera module installed in each distribution ring network cabinet, where m is a positive integer. The device includes: a data acquisition unit, a model training unit, and a diagnosis unit, wherein: The acquisition unit is used to acquire color images of the m power distribution ring network cabinets through the m camera modules to obtain first color image data; The model training unit is used to preprocess the first color image data to obtain the second color image data; to label each data point in the second color image data with its corresponding fault type and the spatial coordinates of the fault type to obtain a labeled dataset; and to train an initial machine learning model based on the labeled dataset to obtain a target machine learning model. The acquisition unit is also used to acquire the color image to be diagnosed; The diagnostic unit is used to input the color image to be diagnosed into the target machine learning model to obtain the target diagnostic result; the target diagnostic result includes the target fault type and the spatial coordinates corresponding to the target fault type; the target fault type includes one of the following: no fault, phase-to-phase arc fault, single-phase grounding arc fault, virtual contact arc fault, switch breakdown arc fault; The device is also specifically used for: Obtain the target recognition requirements parameters; Based on the target recognition requirement parameters, machine learning models are selected from the initial machine learning model library to obtain c machine learning models; c is an integer greater than 1. Determine the computing power requirement for each of the c machine learning models to obtain c computing power requirements; Obtain the target device performance parameters corresponding to the controller; Determine the target computing power requirement range corresponding to the performance parameters of the target device; Determine the computing power requirements that fall within the target computing power requirement range from the c computing power requirements to obtain d computing power requirements; d is a positive integer less than or equal to c. The initial machine learning model is determined based on the d computing power requirements and the c machine learning models; Specifically, in determining the initial machine learning model based on the d computing power requirements and the c machine learning models, the apparatus is used for: Determine the d machine learning models corresponding to the d computing power requirements among the c machine learning models; Obtain the historical usage data corresponding to each of the d machine learning models to obtain d historical usage data; Determine the reference model score corresponding to each of the d historical usage data to obtain d reference model scores; Determine the fine-tuning factor corresponding to each of the d computing power requirements to obtain d fine-tuning factors; Based on the d fine-tuning factors, the corresponding reference model scores in the d reference model scores are fine-tuned to obtain d target model scores; Determine the maximum score among the d target model scores, and determine the machine learning model corresponding to the maximum score among the d machine learning models as the initial machine learning model; Each historical usage data point includes: training duration, accuracy, and inference latency; in determining the reference model score corresponding to each of the d historical usage data points to obtain d reference model scores, the device is specifically used for: Obtain first historical usage data; the first historical usage data is any one of the d historical usage data; the first historical usage data includes: first training duration, first accuracy, and first inference latency; Determine the reference accuracy and reference inference delay corresponding to the target recognition requirement parameters; The difference between the first accuracy rate and the reference accuracy rate is determined to obtain the target accuracy rate difference. Determine the first model score corresponding to the target accuracy difference; The difference between the first inference delay and the reference inference delay is determined to obtain the target inference delay difference; Determine the second model score corresponding to the target inference delay difference; The third model score is determined based on the first model score and the second model score; Determine the target score influencing factor corresponding to the first training duration; The third model score is adjusted based on the target score influence factor to obtain the reference model score corresponding to the first historical usage data.

6. An electronic device, characterized in that, include: Processor, memory, communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to perform the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Transformer photoelectric joint judgment arc alarm device and alarm criterion method

    CN116908613A