A method and apparatus for detecting a draw arc, and an electronic device

By performing feature transformation on the DC-side current data of the photovoltaic system and applying a residual network model, the problems of hysteresis and accuracy in arc detection in the photovoltaic system were solved, achieving higher detection accuracy and generalization ability.

CN122241459APending Publication Date: 2026-06-19HOYMILES POWER ELECTRONICS INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HOYMILES POWER ELECTRONICS INC
Filing Date
2026-05-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing arcing detection methods in photovoltaic systems suffer from lag and low accuracy, especially since models trained on small-scale samples have insufficient generalization ability in real-world scenarios.

Method used

Feature transformation is performed by acquiring the DC current data of the photovoltaic system, and arc detection is performed using a residual network model. Feature transformation includes Fourier transform, amplitude calculation, logarithmic compression and normalization. Multi-round iteration and comprehensive evaluation value conditions are used to improve the generalization ability of the model during training.

Benefits of technology

It improves the accuracy and generalization ability of arc detection, enabling timely prediction of whether arcing will occur in the photovoltaic system and protection through the shutdown device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241459A_ABST
    Figure CN122241459A_ABST
Patent Text Reader

Abstract

This disclosure provides an arcing detection method, apparatus, and electronic device. The method includes: acquiring current data from the DC side of a photovoltaic system; performing feature transformation on the current data to obtain target features of the current data; inputting the target features into a residual network model; performing arcing detection based on the target features; and determining the arcing detection result of the photovoltaic system. This improves the generalization ability of the residual network model and enhances the accuracy of arcing detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of photovoltaic technology, and in particular to an arc detection method, apparatus and electronic equipment. Background Technology

[0002] String photovoltaic (PV) systems are widely used in photovoltaic power generation due to their high efficiency and low cost. However, issues such as aging lines and poor contact can lead to DC arcing. Related technologies typically equip each PV module with a module-level fast shutdown device. In the event of a fire or other emergency, the system assesses the electrical and physical characteristics of the arc, such as arc light, heat, noise, and electromagnetic radiation, and then cuts off the PV module's output using a shutdown device. However, the appearance of these electrical or physical characteristics is often delayed, making timely detection and intervention difficult, resulting in low safety. Another approach is to use current or voltage characteristics for detection. This typically involves training a model based on small-scale current or voltage samples, followed by real-world scenario testing. However, real-world scenarios are diverse, and models trained on small samples have low generalization ability, reducing detection accuracy. Summary of the Invention

[0003] This disclosure provides a method, apparatus, and electronic device for arc detection.

[0004] In a first aspect, this disclosure provides an arcing detection method, which includes: acquiring current data on the DC side of a photovoltaic system; performing feature transformation on the current data to obtain target features of the current data; inputting the target features into a residual network model, performing arcing detection based on the target features, and determining the arcing detection result of the photovoltaic system; wherein the residual network model is obtained after training with a training data sample set and a validation data sample set, and the iteration termination condition for training the residual network model includes: the current comprehensive evaluation value corresponding to the current round during multiple rounds of training is not greater than the comprehensive evaluation value obtained in the previous round; the current comprehensive evaluation value is obtained by: determining the harmonic mean F1 value of the precision and recall corresponding to the training data sample set and the validation data sample set respectively, and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set respectively, to determine the current comprehensive evaluation value of the current round.

[0005] Secondly, this disclosure provides an arcing detection device, which includes: an acquisition module for acquiring current data on the DC side of a photovoltaic system; a feature conversion module for performing feature conversion on the current data to obtain target features of the current data; and a determination module for inputting the target features into a residual network model, performing arcing detection based on the target features, and determining the arcing detection result of the photovoltaic system; wherein the residual network model is obtained after training with a training data sample set and a validation data sample set, and the iteration termination condition for training the residual network model includes: the current comprehensive evaluation value corresponding to the current round during multiple rounds of training is not greater than the comprehensive evaluation value obtained in the previous round; the current comprehensive evaluation value is obtained by: determining the harmonic mean F1 value of the precision and recall corresponding to the training data sample set and the validation data sample set respectively, and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set respectively, to determine the current comprehensive evaluation value of the current round.

[0006] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described arc detection method.

[0007] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described arc detection method.

[0008] Fifthly, this disclosure provides a computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device performs the arc detection method described above.

[0009] The embodiments provided in this disclosure can determine whether arcing has occurred in the photovoltaic system in a timely manner by performing feature analysis on the current data of the DC side of the photovoltaic system. This allows for prediction, and after feature transformation of the current data, the target features are input into the residual network model for arcing detection, instead of directly inputting the current data. By performing feature transformation on the current data, the feature diversity and expressive power of the model input can be improved, and the generalization ability of the residual network model can be enhanced. Therefore, arcing detection based on the target features using the residual network model can improve the accuracy of arcing detection.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of detailed exemplary embodiments with reference to the accompanying drawings.

[0012] Figure 1 This is a flowchart of an arc detection method provided in an embodiment of the present disclosure.

[0013] Figure 2 This is a schematic diagram of the network structure of the residual network model in the embodiments of this disclosure.

[0014] Figure 3 This is a schematic diagram of the training process of the residual network model in the embodiments of this disclosure.

[0015] Figure 4 This is a schematic diagram of the experimental circuit and arc generator used to acquire sample current data in an embodiment of this disclosure.

[0016] Figure 5 This is a schematic diagram illustrating the training process of the residual network model in this embodiment of the present disclosure.

[0017] Figure 6 This is an overall flowchart of the arc detection method in the embodiments of this disclosure.

[0018] Figure 7 This is a block diagram of an arc detection device provided in an embodiment of the present disclosure.

[0019] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0022] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0023] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0024] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0025] For arcing detection in photovoltaic systems, current or voltage features can be used for detection. However, in practical applications, the large number of samples required for training, such as gradient descent, consumes a lot of memory. Therefore, models are usually trained based on small-scale samples of current or voltage, and then the models are used for detection in real-world scenarios. However, real-world scenarios are diverse, and small-scale samples cannot cover all real-world situations. This results in models trained based on small-scale samples having low generalization ability in real-world scenarios, thus reducing detection accuracy.

[0026] According to the arc detection method of this disclosure, current data on the DC side of a photovoltaic system is acquired, feature transformation is performed on the current data to obtain target features, and then the target features are input into a residual network model to determine the arc detection result of the photovoltaic system. In this way, by performing feature transformation on the current data, the model input is adjusted to improve diversity and feature expression ability. Furthermore, by using a residual network model for arc detection, the generalization ability of the algorithm for arc detection in real complex scenarios is improved, thereby enhancing the accuracy of arc detection.

[0027] The arc detection method according to embodiments of this disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be an in-vehicle device, user equipment (UE), mobile device, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in memory. Alternatively, the method can be executed by a server.

[0028] Figure 1 A flowchart illustrating an arc detection method provided in this embodiment of the disclosure. (Refer to...) Figure 1 The method includes the following steps.

[0029] Step S110: Obtain the current data on the DC side of the photovoltaic system.

[0030] Step S120: Perform feature transformation on the current data to obtain the target features of the current data.

[0031] Step S130: Input the target features into the residual network model, perform arc detection based on the target features, and determine the arc detection result of the photovoltaic system.

[0032] In this embodiment of the disclosure, a residual network model can be pre-trained. This residual network model is used to identify arcing in current data. The residual network model can be obtained by training based on sample current data after feature transformation, so as to improve the generalization ability of the residual network model. The trained residual network model is converted into the target format, and the software provided by the embedded platform is used to convert the residual network model into C code format and compress the size of the residual network model, thereby deploying the residual network model to the embedded platform.

[0033] In one possible embodiment, the acquired current data includes current data corresponding to multiple consecutive time windows. For example, current data is collected multiple times in a continuous time period. Each collection can collect current data according to a preset number of sampling points. Then, the current data of multiple consecutive time windows can be feature-transformed and input into the residual network model for arc detection. Specifically, for the above step S130, this disclosure provides a possible implementation method: input the target features corresponding to each time window into the residual network model, perform arc detection according to the target features, and obtain multiple arc probability values; average the multiple arc probability values ​​to obtain an average arc probability value, and determine the arc detection result of the photovoltaic system according to the average arc probability value.

[0034] For example, a threshold can be set. If the average arcing probability value is greater than or equal to the threshold, the arcing detection result is determined to be arcing, and if the average arcing probability value is less than the threshold, the arcing detection result is determined to be normal (i.e., no arcing occurred).

[0035] Furthermore, in this embodiment of the present disclosure, when an arcing event is determined to occur, an alarm can be triggered, and a shutdown device can be activated to cut off and protect the equipment.

[0036] Thus, in this embodiment of the present disclosure, arc detection is performed using current data from multiple consecutive time windows, and the final arc detection result is obtained through averaging. This reduces the possibility of model misjudgment due to data acquisition fluctuations and weak initial features, thereby improving the accuracy of arc detection.

[0037] In one possible embodiment, this disclosure also provides possible implementation methods for the above-described feature transformation, which includes: performing a Fourier transform on the current data or sample current data to obtain Fourier transform data, and calculating the amplitude based on the complex spectrum of the Fourier transform data; performing logarithmic compression and normalization processing on the amplitude.

[0038] For example, the current data is Performing a Fourier transform yields Fourier transform data that can be represented as follows: ,in, It is the first The complex amplitude of each frequency component, It is the imaginary unit. This is the signal length of the current data. Thus, by performing a Fourier transform on the current data, the real data can be converted into complex data.

[0039] The data after Fourier transform has absolute symmetry in magnitude. If all parts are saved, it will increase the complexity of the model and affect the training process. Therefore, only the positive frequency part or the negative frequency part of the Fourier transform data can be taken for subsequent processing, which can avoid redundant features increasing the computational burden of the model.

[0040] Then, based on the complex spectrum of the Fourier transform data, the amplitude is calculated. The amplitude spectrum is essentially a complex number. The modulus, or amplitude, can be expressed as: ,in, It is the first The amplitude of each frequency component, Represents the complex number Take the modulus, if (where a is the real part and b is the imaginary part), then .

[0041] After obtaining the amplitude, in order to better enhance the identification ability of small amplitude data, logarithmic compression can be performed before normalization. For example, based on the amplitude, logarithmic compression is performed using the log(1+x) function to obtain the logarithmically compressed data Y. Here, there is no restriction on the logarithmic function. However, since the original dynamic range of the amplitude spectrum may be large, direct use will cause the useful frequency components of small amplitudes to be submerged by the components of large amplitudes. Excessive numerical differences will also affect the training stability of the model. Therefore, in this embodiment of the present disclosure, logarithmic compression can transform multiplicative differences into additive differences, enhance the identifiability of small amplitude features, and suppress noise, reducing the interference of noise on the overall features.

[0042] After obtaining the logarithmically compressed data Y, normalization is performed. There are no restrictions on the normalization method; for example, in one possible embodiment, a min-max normalization method can be used. ,in, It is a normalized data vector. min means taking the minimum value in the vector, and max means taking the maximum value in the vector.

[0043] In this embodiment of the disclosure, current data collected according to a preset number of sampling points. Although there are certain differences between normal and arcing current data in terms of time-series change trends, the features are usually not concentrated and may not be obvious under certain operating conditions. Directly using time-domain current data may not meet the requirements. Therefore, in this embodiment of the disclosure, feature transformation preprocessing is performed on the time-domain current data to improve feature expression capability and accuracy. More effective and accurate target features are input into the residual network model, which can also improve the accuracy of arcing detection.

[0044] This disclosure primarily focuses on models trained on small-scale training data sets to improve their arc detection accuracy in real-world applications. In this regard, model selection is crucial. Models used in related technologies, trained on small-scale training data sets, do not generalize well when applied to large-scale real-world data. Therefore, this disclosure addresses this by constructing a small residual network model for arc detection, which is more suitable for training on small-scale samples and applying to complex real-world scenarios, thus improving the generalization ability of the residual network model for arc detection.

[0045] Furthermore, in order to improve generalization ability, this embodiment is not very suitable for more complex network models. Therefore, in one possible embodiment, the number of residual modules in the network structure of the residual network model in this embodiment is greater than or equal to 1 and less than n, where n is an integer greater than 1. For example, n can be 2. n can be set according to actual situation and needs.

[0046] In one possible embodiment, see [reference] Figure 2 As shown, this is a schematic diagram of the network structure of the residual network model in an embodiment of this disclosure. Figure 2 As shown, the network structure of the residual network model includes convolutional layers, at least one residual module, pooling layers, and fully connected layers.

[0047] The convolutional layer is mainly used to perform sliding convolution operations using convolutional kernels to extract local features; the residual module is mainly used during backpropagation, where gradients can be directly propagated back to shallow layers through skip paths, avoiding gradient vanishing due to excessive network depth, realizing feature reuse and fusion, and significantly improving the model's feature learning ability; the pooling layer is mainly used to reduce the dimensionality of the features output by convolution to reduce the amount of data and feature size, while retaining the most significant features; the activation function is mainly used to enable the model to have non-linear expressive ability and to control gradient propagation by scaling the output range; the fully connected layer is mainly used to unfold the multi-dimensional features of the intermediate layers into a one-dimensional vector and fit the final output result.

[0048] The above step S130, which involves inputting the target features into the residual network model and performing arc detection based on the target features to determine the arc detection result of the photovoltaic system, includes: based on the residual network model, using the target features as input, sequentially passing through convolutional layers to extract features from the target features and obtain local features; through the residual module, performing feature extraction and nonlinear transformation on the local features to obtain residual features, and obtaining fused features based on the residual features and local features; through the pooling layer, obtaining pooling features based on the fused features, and through the fully connected layer, obtaining arc probability values ​​based on the pooling features; and determining the arc detection result of the photovoltaic system based on the arc probability values.

[0049] For example, such as Figure 2As shown, taking a residual network model consisting of two residual modules as an example, the 256-dimensional frequency domain target features are converted into a 16×16 two-dimensional input format to serve as the input to the residual network model; based on convolutional layers and rectified linear units (RCLs)... The ReLU activation function is used for initial feature extraction to obtain local features. Then, two residual modules are used for feature extraction. The residual modules combine the target features of the initial input with the local features obtained from the convolutional layers, which can reduce the dilution of shallow features after passing through multiple convolutional networks and avoid model degradation. The residual features and local features obtained from each residual module are fused to obtain fused features. Then, a pooling layer is used for feature extraction. After passing through two residual modules, the feature dimension is reduced. Then, a fully connected layer is used to extract global features to obtain the arcing probability value. Furthermore, in order to avoid overfitting, a random deactivation (Dropout) layer can be added to the fully connected layer, so that the residual network model does not depend on the action of local neurons, improving the model's generalization ability. Finally, the arcing probability value can be output. For example, for a binary classification model that includes normal and arcing, a two-dimensional vector result can be output. In the two-dimensional vector result, the first dimension represents the probability of arcing and the second dimension represents the probability of normal. The sum of the first and second dimension probabilities is 1.

[0050] The training process of the residual network model in the arc detection method of this disclosure embodiment will be described below.

[0051] In one possible embodiment, see [reference] Figure 3 The diagram shown illustrates the training process of the residual network model in this embodiment of the present disclosure. Figure 3 As shown, the training method for residual network models can include the following steps.

[0052] Step S310: Obtain the training data sample set, which includes training current data samples and the corresponding true categories representing normal or arcing.

[0053] Step S320: Train current data samples based on the training data sample set, perform arc detection on the training current data samples through the residual network model to obtain the predicted category, and train the residual network model based on the predicted category and the corresponding true category until the iteration termination condition is met to obtain the trained residual network model.

[0054] Specifically, obtaining the training data sample set in step S310 may include: acquiring sample current data of the experimental circuit under different operating conditions, including normal sample current data and arcing sample current data; performing feature transformation on the sample current data, and obtaining a data sample set based on the feature-transformed sample current data; and dividing the data sample set according to the target ratio to obtain the divided training data sample set, verification data sample set, and test data sample set.

[0055] See Figure 4 The diagram shown is a schematic of the experimental circuit and arc generator used to acquire sample current data in an embodiment of this disclosure.

[0056] In this embodiment of the disclosure, such as Figure 4 As shown, the experimental circuit may include a DC power supply, a decoupling network, a linear impedance network, an arc generator, and the device under test (e.g., a photovoltaic inverter integrated product). The experimental circuit collects continuous current data of the photovoltaic system under different operating conditions and during arcing at a fixed sampling frequency. At least three data points are collected for each operating condition. The operating condition may include the operating current and voltage of the experimental circuit, the arcing spacing and speed of the arc generator, etc. Any change in any of these conditions constitutes a different operating condition. For example, ... Figure 4 The schematic diagram of the arc generator shows that different operating conditions can be set by changing the rate at which the fixed electrode and the moving electrode separate. The separation of the two contacts indicates that the circuit is broken, that is, an arcing phenomenon has occurred. The lateral adjuster can be used to adjust the arcing spacing and rate to simulate different operating conditions in actual scenarios.

[0057] It should be noted that, Figure 4 The electric arc generator and experimental circuit are merely one possible example and should not be construed as limiting the embodiments disclosed herein.

[0058] In this embodiment, the photovoltaic inverter product based on the experimental circuit is powered on, and the host computer software is used to fix the sampling frequency and the number of sampling points to collect normal sample current data. An arc generator is used to generate an arc by adjusting different rates and arc spacing, and arc sample current data (i.e., arc sample current data) is collected. The current data collected by the host computer is converted from analog to digital and captured through a central window. The normal sample current data and the arc sample current data are saved according to the operating conditions. Since data jitter may occur, the central window is used to capture the normal and arc sample current data, which can further improve data stability and reliability.

[0059] In this embodiment, the current data size is usually different when arcing occurs under different operating conditions. By using sample current data under different operating conditions and deep learning methods, the residual network model is trained to improve the diversity of sample current data, which can improve the generalization performance of the model to a certain extent. In this embodiment, the sample current data can be further transformed to obtain a data sample set. The feature transformation method is the same as the current data transformation in the above embodiments, and will not be described again here. After feature transformation, the feature representation ability of the sample current data can be further improved, the accuracy of model training can be improved, and the generalization ability and detection accuracy of the model can be enhanced.

[0060] Therefore, in this embodiment, the sample current data after feature transformation is randomly mixed and then allocated according to a certain target ratio to form a training data sample set, a validation data sample set, and a test data sample set. The residual network model can be trained based on the training data sample set. After multiple training rounds, the trained residual network model is tested based on the test data sample set. If the evaluation index obtained based on the test data sample set does not meet the requirements, the sample set division may be inaccurate. In this case, sample current data can be re-collected, feature transformed, and then randomly divided. In this way, after multiple iterations and tests, the trained residual network model can be obtained.

[0061] In one possible embodiment, the residual network model is obtained by training a training data sample set and a validation data sample set. The iteration termination condition for training the residual network model includes: the current comprehensive evaluation value corresponding to the current round is not greater than the comprehensive evaluation value obtained in the previous round during multiple rounds of training.

[0062] The current comprehensive evaluation value is calculated and determined based on arc detection of the training sample set and the validation data sample set, respectively. This current comprehensive evaluation value can be used to evaluate the training effect of the current model.

[0063] Specifically, in one possible embodiment, regarding the determination of the iteration termination condition in step S320 above, this disclosure also provides possible implementation methods.

[0064] Step S1: In the current round, based on the predicted category and the true category corresponding to the training data sample set and the validation data sample set, determine the evaluation index values ​​corresponding to the training data sample set and the validation data sample set respectively. The predicted category is obtained in the current round based on the arc detection using the residual network model.

[0065] In this embodiment of the disclosure, the evaluation metrics may include accuracy, precision, and recall.

[0066] For this step S1, specific implementation methods are provided in this disclosure.

[0067] 1) For the training data sample set or validation data sample set, determine the first number of correctly predicted categories based on the current corresponding predicted category and the true category, and determine the accuracy based on the first number and the first total number of predictions.

[0068] For example, accuracy can be calculated as follows: .

[0069] Wherein, TP represents the number of correctly predicted classes and the number of classes where both the predicted and actual classes are normal; TN represents the number of correctly predicted classes and the number of classes where both the predicted and actual classes are negative; FP represents the number of incorrectly predicted classes where the predicted class is normal and the actual class is negative; and FN represents the number of incorrectly predicted classes where the predicted class is negative and the actual class is normal.

[0070] The first number of correctly predicted predictions can be represented as TP+TN, and the first total number of predictions can be represented as TP+FP+TN+FN. The ratio of the first number of predictions to the first total number of predictions yields the accuracy, which reflects the overall prediction accuracy of the residual network model.

[0071] 2) Determine a second number of cases where both the predicted and actual categories are normal, and a third number of cases where the predicted category is normal but the actual category is "extra". Based on the second and third numbers, determine the precision.

[0072] For example, the accuracy rate can be calculated as follows: .

[0073] The second quantity is TP, and the third quantity is FP. The accuracy reflects the reliability of the correct prediction results of the residual network model and can reduce the false alarm rate.

[0074] 3) Determine the fourth number of predicted categories that are arcing but the actual category is normal. Based on the second and fourth numbers, determine the recall rate.

[0075] For example, recall rate can be calculated as follows: .

[0076] The fourth quantity is FN, which, based on recall, reflects the completeness of the residual network model in capturing correct results and can reduce false negatives.

[0077] Step S2: Determine the current comprehensive evaluation value for the current round based on the evaluation index values ​​corresponding to the training data sample set and the validation data sample set, respectively.

[0078] In one possible embodiment, performing step S2 may specifically include: determining the harmonic mean F1 value of precision and recall corresponding to the training data sample set and the validation data sample set, respectively; and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set, respectively, to determine the current comprehensive evaluation value for the current round.

[0079] For example, accuracy and recall rate Calculate the F1 score. The F1 score can be calculated as follows: In this way, the performance of the residual network model can be comprehensively measured based on the F1 score, avoiding the one-sidedness of a single indicator.

[0080] Then, based on the F1 score and accuracy corresponding to the training data sample set and the validation data sample set, the current comprehensive evaluation value is determined.

[0081] For example, the current comprehensive evaluation value can be calculated as follows: ,in, , These are the weighted coefficients of the evaluation metrics for the training data sample set and the validation data sample set, respectively, satisfying... AC1 and For the accuracy and F1 score corresponding to the training data sample set, AC2 and To verify the accuracy and F1 score of the data sample set.

[0082] In this embodiment of the disclosure, the weighting coefficients of the evaluation metrics corresponding to the training data sample set and the validation data sample set can be set according to specific training requirements. For example, the weighting coefficients of the training data sample set... A larger value indicates a greater focus on the accuracy and fit of the trained model, but too large a value may lead to overfitting; the weighting coefficients corresponding to the validation data sample set. A larger value indicates a greater emphasis on the model's generalization effect, resulting in better performance on "unseen" data. However, a value that is too large may lead to underfitting. Therefore, in this embodiment of the disclosure, the weighting coefficients corresponding to the training data sample set and the validation data sample set can be determined by comprehensive analysis based on training requirements.

[0083] Step S3: If the current comprehensive evaluation value is not greater than the comprehensive evaluation value obtained in the previous round, then the iteration termination condition is met.

[0084] In the embodiments of the present disclosure, the evaluation index values of the training data sample set and the validation data sample set can be comprehensively considered, and a training early stopping mechanism based on the comprehensive evaluation value is provided, which can reduce overfitting and underfitting caused by model training. In the test of small-scale sample data, the model obtained by the iteration end training mechanism of the comprehensive evaluation value has better performance than the model obtained by only considering a single index training method, and can improve the performance of the model.

[0085] Of course, the iteration end condition is not limited to the above embodiments, and can also be that the loss function value of the iterative training converges, or reaches a preset number of iterations or iteration time, etc.

[0086] In a possible example, refer to Figure 5 As shown, it is a specific schematic diagram of the training process of the residual network model in the embodiments of the present disclosure. As Figure 5 shown, this process includes the following steps.

[0087] Step S501: Divide the data sample set.

[0088] That is, obtain the divided training data sample set, validation data sample set, and test data sample set.

[0089] Step S502: Batch input the training current data samples into the residual network model.

[0090] Step S503: Calculate the loss function value.

[0091] For example, in the embodiments of the present disclosure, the cross-entropy loss function can be adopted. The residual network model performs arc detection on the training current data samples to obtain the predicted category. For example, for a binary classification model of arc and normal, the output result of the residual network model can be expressed as , where represents the score belonging to the arc category, represents the score belonging to the normal category.

[0092] Furthermore, through the calculation of the softmax function, T is converted into two probability values whose sum is 1, that is, the probability distribution vector of arc detection is obtained: , where represents the arc probability value, represents the normal probability value.

[0093] Thus, according to the predicted category and the true category, the cross-entropy loss value is calculated, that is, for the probability corresponding to the true category of each training current data sample, its negative logarithm probability is calculated. For example, the cross-entropy loss value is: , where represents that the probability that the true category of the sample is arc is 1 or 0, This indicates that the probability of the sample's true class being normal is 1 or 0. For example, if the true class is arc, if... , ,but At this point, the closer the model's prediction probability of arcing is to 1, the smaller the loss. Therefore, the average value of the cross-entropy loss of the batch samples can be used as the final loss function value.

[0094] Step S504: Parameter iterative optimization.

[0095] In this embodiment of the disclosure, the cross-entropy loss value can be calculated by training with current data samples in each round, and then the Adam optimization method is used based on the backpropagation principle to iteratively optimize the parameters of the residual network model until the iteration termination condition is met.

[0096] Step S505: Calculate the evaluation index values ​​corresponding to the training data sample set and the validation data sample set, respectively.

[0097] Step S506: Calculate the comprehensive evaluation value.

[0098] Step S507: Determine whether the iteration termination condition is met. If yes, proceed to step S508; otherwise, return to continue executing step S502.

[0099] Step S508: Save the residual network model.

[0100] In this embodiment of the disclosure, an arc generator and experimental circuit can be used to collect small-scale sample current data, and the sample current data can be transformed to obtain the target features in the frequency domain of the sample current data, so as to improve feature diversity and performance. Then, according to the target ratio, the data is divided into training data sample set, validation data sample set and test data sample set. The residual network model is trained based on the training data sample set to obtain a residual network model for arc detection.

[0101] Furthermore, the residual network model can be tested on a test data sample set. For example, in this embodiment of the present disclosure, after testing on a small-scale test data sample set, the evaluation metrics of the residual network model are obtained, such as accuracy, precision, recall, F1 score, etc., without limitation. By analyzing these evaluation metrics, it is known that the residual network model trained in this embodiment of the present disclosure performs well in terms of evaluation metrics on a small-scale test data sample set.

[0102] Furthermore, the trained residual network model can be applied to large-scale data samples in real-world scenarios for testing. It is found that the feature transformation method and the trained residual network model in this embodiment of the present disclosure have better generalization performance in large-scale data sample testing in more scenarios. Thus, in this embodiment of the present disclosure, feature transformation is performed on the current data to adjust the input of the model, and the residual network model is used to determine the iteration termination condition with the comprehensive evaluation value after weighted processing of multiple evaluation index values. The residual network model is trained based on the iteration termination condition, which improves the generalization ability of the residual network model in arc detection in real-world complex scenarios and improves the accuracy of arc detection.

[0103] Based on the above embodiments, see Figure 6 The diagram shown is an overall flowchart of the arc detection method in this embodiment of the present disclosure. Figure 6 As shown, the overall process in this embodiment may include: data acquisition and preprocessing, model training, real-time detection and early warning protection, specifically including the following steps.

[0104] Step S601: Obtain sample current data under different operating conditions.

[0105] The sample current data includes normal sample current data and arcing sample current data.

[0106] Step S602: Perform feature transformation on the sample current data to obtain a data sample set.

[0107] In this embodiment of the disclosure, feature transformation may include preprocessing operations such as Fourier transform, amplitude calculation, logarithmic compression, and normalization, and then obtain a data sample set based on the feature-transformed sample current data.

[0108] Step S603: Divide the data sample set to obtain the training data sample set, the validation data sample set, and the test data sample set.

[0109] For example, randomly shuffle normal sample current data and arcing current data, and allocate them according to a certain target ratio.

[0110] Step S604: Train the residual network model.

[0111] Step S605: Determine the current comprehensive evaluation value based on the training data sample set and the validation data sample set to determine whether the iteration termination condition is met.

[0112] In this embodiment of the disclosure, a residual network model can be trained based on a preset loss function and a training early stopping mechanism based on a comprehensive evaluation value. After training, the trained residual network model can be applied to the arc detection of photovoltaic systems in real-world scenarios.

[0113] Step S606: Deploy the residual network model to the embedded platform.

[0114] Step S607: Obtain current data corresponding to multiple consecutive time windows of the photovoltaic system, and perform feature transformation to obtain the target features of the current data.

[0115] Step S608: Input the target features corresponding to each time window into the residual network model to obtain multiple arcing probability values, and average the multiple arcing probability values ​​to obtain the average arcing probability value.

[0116] Step S609: Determine if an arc is drawn. If yes, proceed to step S610. If no, return to continue with step S607.

[0117] For example, if the average arcing probability value is greater than or equal to a threshold, an arc is determined to have occurred; if the average arcing probability value is less than a threshold, an arc is determined not to have occurred.

[0118] Step S610: Implement preset protection measures.

[0119] For example, protective measures may include issuing warnings, controlling the flashing of fault lights, and activating the shutdown device of the photovoltaic system, etc., which are not limited in this embodiment.

[0120] In this embodiment, feature transformation is performed on the collected small-scale sample current data to obtain a training data sample set, a validation data sample set, and a test data sample set. The residual network model is trained based on the training data sample set. The combined weighted value based on the training data sample set and the validation data sample set is used as the criterion for determining the end of the training iteration to obtain the trained residual network model. Then, the arc detection of the photovoltaic system can be performed based on the trained residual network model. The arc detection method in this embodiment shows better generalization ability of the residual network model and higher accuracy for arc detection.

[0121] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0122] In addition, this disclosure also provides an arc detection device, electronic equipment, computer-readable storage medium, and computer program product, all of which can be used to implement any of the arc detection methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding descriptions in the method section and will not be repeated here.

[0123] Figure 7This is a block diagram of an arc detection device provided in an embodiment of the present disclosure.

[0124] Reference Figure 7 This disclosure provides an arcing detection device, comprising: an acquisition module 71 for acquiring current data on the DC side of a photovoltaic system; a feature conversion module 72 for performing feature conversion on the current data to obtain target features of the current data; and a determination module 73 for inputting the target features into a residual network model, performing arcing detection based on the target features, and determining the arcing detection result of the photovoltaic system. The residual network model is obtained after training with a training data sample set and a validation data sample set. The iteration termination condition for training the residual network model includes: the current comprehensive evaluation value corresponding to the current round during multiple training rounds is not greater than the comprehensive evaluation value obtained in the previous round. The current comprehensive evaluation value is obtained by: determining the harmonic mean F1 value of the precision and recall corresponding to the training data sample set and the validation data sample set, respectively, and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set, respectively, to determine the current comprehensive evaluation value of the current round.

[0125] In one possible embodiment, the current data includes current data corresponding to multiple consecutive time windows. When inputting the target features into the residual network model and performing arc detection based on the target features to determine the arc detection result of the photovoltaic system, the determining module 73 is configured to: input the target features corresponding to each time window into the residual network model respectively, perform arc detection based on the target features to obtain multiple arc probability values; average the multiple arc probability values ​​to obtain an average arc probability value, and determine the arc detection result of the photovoltaic system based on the average arc probability value.

[0126] In one possible embodiment, the network structure of the residual network model includes a convolutional layer, at least one residual module, a pooling layer, and a fully connected layer;

[0127] When inputting the target features into the residual network model, performing arc detection based on the target features, and determining the arc detection result of the photovoltaic system, the determining module 73 is used to: based on the residual network model, using the target features as input, sequentially pass through the convolutional layer to extract features from the target features to obtain local features; through the residual module, perform feature extraction and nonlinear transformation on the local features to obtain residual features, and obtain fused features based on the residual features and the local features; through the pooling layer, obtain pooling features based on the fused features, and through the fully connected layer, obtain arc probability values ​​based on the pooling features; and determine the arc detection result of the photovoltaic system based on the arc probability values.

[0128] In one possible embodiment, a training module 74 is further included, which is used to: obtain a training data sample set, the training data sample set including training current data samples and corresponding true categories representing normal or arcing; perform arcing detection on the training current data samples according to the training data sample set, obtain a predicted category through a residual network model, and train the residual network model according to the predicted category and the corresponding true category until the iteration termination condition is met, thereby obtaining the trained residual network model.

[0129] In one possible embodiment, when obtaining the training data sample set, the training module 74 is used to: acquire sample current data of the experimental circuit under different operating conditions, the sample current data including normal sample current data and arcing sample current data; perform feature transformation on the sample current data, and obtain a data sample set based on the feature-transformed sample current data; and divide the data sample set according to the target ratio to obtain the divided training data sample set, verification data sample set, and test data sample set.

[0130] In one possible embodiment, for the feature transformation, the training module 74 is configured to: perform a Fourier transform on the current data or the sample current data to obtain Fourier transform data, and calculate the amplitude based on the complex spectrum of the Fourier transform data; and perform logarithmic compression and normalization processing on the amplitude.

[0131] In one possible embodiment, when the iteration termination condition is met, the training module 74 is configured to: in the current round, determine the evaluation index values ​​corresponding to the training data sample set and the validation data sample set respectively, based on the predicted category and the true category corresponding to the current training data sample set and the validation data sample set, wherein the predicted category is obtained in the current round based on the arc detection of the residual network model, and the evaluation index values ​​include accuracy, precision, and recall; determine the current comprehensive evaluation value of the current round based on the evaluation index values ​​corresponding to the training data sample set and the validation data sample set respectively; and determine that the iteration termination condition is met if the current comprehensive evaluation value is not greater than the comprehensive evaluation value obtained in the previous round.

[0132] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0133] Reference Figure 8This disclosure provides an electronic device, which includes: at least one processor 801; at least one memory 802; and one or more I / O interfaces 803; wherein the memory 802 stores one or more computer programs that can be executed by at least one processor 801, and the one or more computer programs are executed by at least one processor 801 to enable at least one processor 801 to perform the above-described arc detection method.

[0134] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the arc detection method described above. The computer-readable storage medium may be volatile or non-volatile.

[0135] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-described arc detection method.

[0136] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0137] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0138] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0139] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0140] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0141] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0142] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0143] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0145] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for detecting arcing, characterized in that, include: Acquire current data on the DC side of the photovoltaic system; The current data is subjected to feature transformation to obtain the target features of the current data; The target features are input into the residual network model, and arc detection is performed based on the target features to determine the arc detection result of the photovoltaic system. The residual network model is obtained by training the training data sample set and the validation data sample set. The iteration termination condition for the training of the residual network model includes: the current comprehensive evaluation value corresponding to the current round is not greater than the comprehensive evaluation value obtained in the previous round during multiple rounds of training. The current comprehensive evaluation value is obtained by: determining the harmonic mean F1 value of the precision and recall corresponding to the training data sample set and the validation data sample set, respectively, and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set, respectively, to determine the current comprehensive evaluation value of the current round.

2. The method according to claim 1, characterized in that, The current data includes current data corresponding to multiple consecutive time windows. The step of inputting the target features into the residual network model, performing arc detection based on the target features, and determining the arc detection result of the photovoltaic system includes: The target features corresponding to each time window are input into the residual network model, and arc detection is performed based on the target features to obtain multiple arc probability values. The multiple arcing probability values ​​are averaged to obtain an average arcing probability value, and the arcing detection result of the photovoltaic system is determined based on the average arcing probability value.

3. The method according to claim 1, characterized in that, The network structure of the residual network model includes a convolutional layer, at least one residual module, a pooling layer, and a fully connected layer. The step of inputting the target features into the residual network model, performing arc detection based on the target features, and determining the arc detection result of the photovoltaic system includes: Based on the residual network model, the target features are taken as input and sequentially passed through the convolutional layers to extract local features. The residual module performs feature extraction and nonlinear transformation on the local features to obtain residual features, and obtains fused features based on the residual features and the local features. Through the pooling layer, a pooling feature is obtained based on the fusion feature, and through the fully connected layer, an arcing probability value is obtained based on the pooling feature; The arcing detection result of the photovoltaic system is determined based on the arcing probability value.

4. The method according to claim 1, characterized in that, The method further includes: Obtain a training data sample set, which includes training current data samples and corresponding true categories representing normal or arcing. Based on the training data sample set, current data samples are trained, and arc detection is performed on the training current data samples through the residual network model to obtain the predicted category. Based on the predicted category and the corresponding true category, the residual network model is trained until the iteration termination condition is met, and the trained residual network model is obtained.

5. The method according to claim 4, characterized in that, The obtained training data sample set includes: Acquire sample current data of the experimental circuit under different operating conditions, including normal sample current data and arcing sample current data. The sample current data is subjected to feature transformation, and a data sample set is obtained based on the feature-transformed sample current data; The data sample set is divided according to the target ratio to obtain the divided training data sample set, validation data sample set and test data sample set.

6. The method according to claim 5, characterized in that, The feature transformation includes: Perform a Fourier transform on the current data or the sample current data to obtain Fourier transform data, and calculate the amplitude based on the complex spectrum of the Fourier transform data. The amplitude is subjected to logarithmic compression and normalization.

7. The method according to claim 5, characterized in that, The determination of whether the iteration termination condition is met includes: In the current round, based on the predicted category and the true category corresponding to the training data sample set and the validation data sample set, the evaluation index values ​​corresponding to the training data sample set and the validation data sample set are determined respectively. The predicted category is obtained in the current round based on the arc detection of the residual network model. The evaluation index values ​​include accuracy, precision and recall. Based on the evaluation index values ​​corresponding to the training data sample set and the validation data sample set, the current comprehensive evaluation value for the current round is determined. If the current comprehensive evaluation value is not greater than the comprehensive evaluation value obtained in the previous round, the iteration termination condition is determined to be met.

8. An arc detection device, characterized in that, include: The acquisition module is used to acquire current data on the DC side of the photovoltaic system; A feature conversion module is used to perform feature conversion on the current data to obtain the target features of the current data; The determination module is used to input the target features into the residual network model, perform arc detection based on the target features, and determine the arc detection result of the photovoltaic system. The residual network model is obtained by training the training data sample set and the validation data sample set. The iteration termination condition for the training of the residual network model includes: the current comprehensive evaluation value corresponding to the current round is not greater than the comprehensive evaluation value obtained in the previous round during multiple rounds of training. The current comprehensive evaluation value is obtained by: determining the harmonic mean F1 value of the precision and recall corresponding to the training data sample set and the validation data sample set, respectively, and performing a weighted sum based on the F1 value and precision corresponding to the training data sample set and the validation data sample set, respectively, to determine the current comprehensive evaluation value of the current round.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the arc detection method as described in any one of claims 1-7.