A federated learning method and related device for charging pile fault detection based on DNN

Through the federated learning method, local model training and parameter updates are carried out on charging piles, the problem of data sharing of charging piles of different brands is solved, efficient fault detection and data privacy protection is achieved, and the accuracy and timeliness of charging pile fault detection are improved.

CN118734937BActive Publication Date: 2025-08-19ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410800974.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-08-19
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

The existing charging pile fault detection based on deep neural network algorithm has data privacy problems, and data sharing of charging piles of different brands cannot be realized, affecting the actual landing effect.

Method used

Using the federated learning method, local model training is carried out on each charging pile and model parameters are uploaded and updated, and the central server aggregates to form a global model to realize the sharing of model learning results of different brands of charging piles.

Benefits of technology

On the premise of protecting data privacy, the accuracy and timeliness of fault detection are improved, and the practical application scenarios of charging piles of different brands are adapted to the strength of data privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734937B_ABST
    Figure CN118734937B_ABST
Patent Text Reader

Abstract

The present invention provides a DNN-based federated learning method and related device for charging pile fault detection, comprising initializing a global model; distributing the global model to each charging pile participating in the federated learning in one round of federated learning, so that each charging pile trains a local model based on local historical fault parameter data; continuously collecting trained local models from each charging pile for aggregation; after the collection is complete, averaging and aggregating the collected local models to obtain a new global model; and executing all rounds of federated learning to obtain a final DNN-based global model for charging pile fault detection. In the present invention, charging piles of different brands can share model learning results through the federated learning framework without directly exchanging data, solving the problem that existing deep neural network-based algorithms cannot achieve data sharing between charging piles of different brands.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of charging pile fault detection, and specifically relates to a federated learning method and related devices for charging pile fault detection based on DNN. Background Art

[0002] With the rapid rise of the electric vehicle (EV) market, charging piles, as crucial infrastructure for energy supply, are crucial for the healthy development of the entire EV ecosystem. However, in actual operation, charging piles can malfunction due to various reasons, such as hardware aging, software errors, communication failures, and human error. These failures not only affect the user's charging experience but can also damage the EV and charging piles themselves, and even pose safety risks. Fault detection for charging piles improves operational efficiency and allows for targeted repairs. Maintenance personnel can also analyze the frequency and causes of different faults, reducing maintenance costs. Timely repairs can also reduce user wait times, improve the charging experience, and prevent future failures by leveraging historical fault data.

[0003] At present, there have been some research results in charging pile fault detection, and some researchers have proposed different detection algorithms. Charging pile fault diagnosis based on convolutional support vector machines requires the input of fault waveform images as training content and has a large amount of calculation, and the convergence speed is within 20 rounds. DC charging pile fault detection based on deep neural network (DNN: Deep Neural Network) algorithm can solve the gradient explosion problem and improve model accuracy, but it ignores the fact that charging piles are deployed by different brands in real scenarios and have data privacy. Charging piles of different brands cannot share data, which affects the actual implementation effect. The method of using principal component analysis (PCA: Principal Component Analysis) to extract important features and use the LightGBM classification model for training and fine-tuning, and selecting the model trained with the optimal parameters as the fault diagnosis model has good noise resistance and real-time performance, but also lacks a data privacy protection mechanism. Summary of the Invention

[0004] In view of this, the present invention aims to provide a federated learning method and related devices for charging pile fault detection based on DNN to solve the shortcomings of the above-mentioned charging pile fault detection based on deep neural network algorithm.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] In a first aspect, the present invention provides a federated learning method for charging pile fault detection based on DNN, comprising the following steps:

[0007] Initialize the global model;

[0008] In one round of federated learning, the global model is distributed to each charging station participating in the federated learning, so that each charging station can train its local model based on local historical fault parameter data.

[0009] Continuously collect local models trained at each charging station and wait for aggregation;

[0010] After the collection is completed, the collected local models are averaged and aggregated to obtain a new global model;

[0011] All rounds of federated learning are performed to obtain the final global model of DNN-based charging pile fault detection.

[0012] Furthermore, in one round of federated learning, the global model is distributed to each charging station participating in the federated learning, including:

[0013] In the first round, the initialized global model is distributed to each charging station participating in federated learning;

[0014] In each subsequent round, the global model aggregated in the previous round is distributed to each charging station participating in federated learning.

[0015] Furthermore, the global model is aggregated as follows:

[0016]

[0017] Where W l and W l-1 are the global models obtained by the 1st and 1-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

[0018] Furthermore, the parameters uploaded to the central server include weight parameters and biases.

[0019] Furthermore, the local model is a deep neural network model obtained based on DNN training. The neural network layer of the local model includes an input layer, a hidden layer, and an output layer. The output of the pth neuron in the lth layer of the local model is as follows:

[0020]

[0021] Where sigmoid() is the neuron activation function, m is the number of neurons in the l-1 layer, is the weight corresponding to the nth parameter of the pth neuron in the lth layer, is the nth output of the l-1th layer, is the bias term corresponding to the p-th neuron in the l-th layer.

[0022] Furthermore, in the back propagation phase of local model training, the cross entropy loss function is used for reverse calculation. The cross entropy loss function is as follows:

[0023] J(W,b,a,y)=-[ylna+(1-y)ln(1-a)]

[0024] Where W represents the weight, b represents the bias term, y represents the true label, and a represents the probability distribution of the predicted label.

[0025] In a second aspect, the present invention provides a federated learning system for charging pile fault detection based on DNN, comprising:

[0026] Central server and charging piles;

[0027] The central server is used to initialize the global model and distribute the global model to each charging station participating in the federated learning in one round of federated learning.

[0028] The charging pile is used to train the local model based on local historical fault parameter data;

[0029] The central server is also used to continuously collect the trained local models of each charging pile and wait for aggregation; after the collection is completed, the collected local models are averaged and aggregated to obtain a new global model.

[0030] Furthermore, the central server updates the global model according to the following formula:

[0031]

[0032] Where W l and W l-1 are the global models obtained by the lth and l-1th rounds of aggregation, η is the aggregation ratio, W l i Parameters uploaded to the central server by charging pile i.

[0033] Accordingly, the present invention further provides a computer device, comprising a processor and a memory:

[0034] The memory is used to store computer programs and send instructions of the computer programs to the processor;

[0035] The processor executes a federated learning method for charging pile fault detection based on DNN as described in the first aspect according to the instructions of the computer program.

[0036] Accordingly, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the federated learning method for charging pile fault detection based on DNN as in the first aspect is implemented.

[0037] In summary, the present invention provides a federated learning method and related devices for charging pile fault detection based on DNN, including initializing a global model; in one round of federated learning, distributing the global model to each charging pile participating in the federated learning, so that each charging pile trains a local model based on local historical fault parameter data; continuously collecting the trained local models of each charging pile and waiting for aggregation; after the collection is completed, averaging and aggregating the collected local models to obtain a new global model; executing all rounds of federated learning to obtain the final global model for charging pile fault detection based on DNN. In the present invention, charging piles of different brands can share model learning results without directly exchanging data through the federated learning framework. The DNN-based model can handle complex data features, and combined with the federated learning mechanism, it can more comprehensively reflect various situations of charging piles in actual applications, thereby improving the accuracy and timeliness of fault detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 Flowchart of the federated learning method for charging pile fault detection based on DNN provided in an embodiment of the present invention;

[0040] Figure 2 A comparison chart of DNN charging pile fault detection accuracy under federated learning and centralized methods provided by an embodiment of the present invention;

[0041] Figure 3 A comparison chart of DNN charging pile fault detection losses under federated learning and centralized methods provided by an embodiment of the present invention;

[0042] Figure 4 A model diagram of a federated learning system for DNN-based charging pile fault detection provided by an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purposes, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0045] This embodiment provides a federated learning method for charging pile fault detection based on DNN, including the following steps:

[0046] S1: Initialize the global model.

[0047] It's important to note that before starting federated learning, an initial global model must be created on the server. This model can be based on a DNN (deep neural network) architecture designed for charging pile fault detection. It can be randomly initialized or a pre-trained model based on a small amount of existing data.

[0048] S2: In one round of federated learning, the global model is distributed to each charging pile participating in the federated learning, so that each charging pile can train the local model based on the local historical fault parameter data.

[0049] It should be noted that after entering the federated learning cycle, the server will distribute the current global model to all charging stations participating in the federated learning. These charging stations are located in different locations and belong to different brands or operators. Each charging station uses its own accumulated local historical fault parameter data (such as charging current, voltage fluctuations, temperature changes, and corresponding fault labels) to perform model training locally. This process ensures that the data does not leave the charging station, protecting user privacy and data security.

[0050] S3: Continue to collect the trained local models of each charging station and wait for aggregation.

[0051] It should be noted that after each charging station completes local model training, it does not directly share the original data. Instead, it uploads the trained model parameters or updates (i.e., fine-tuning changes to the model weights) to the server. The server will continue to collect this local model information from different charging stations in preparation for the next step of aggregation.

[0052] S4: After the collection is completed, the collected local models are averaged and aggregated to obtain a new global model.

[0053] It's important to note that once model updates from all participating nodes are collected, the server performs an average aggregation operation on the model parameters. This means that the model updates from each charging station are comprehensively considered, and a new, more comprehensive global model is generated by calculating weighted averages and other methods. This process embodies the core of federated learning—allowing the model to learn from data from different sources without having to directly access that data.

[0054] S5: Execute all rounds of federated learning to obtain the final DNN-based global model for charging pile fault detection.

[0055] It should be noted that steps S2 through S4 above constitute one round of federated learning. This process is repeated multiple times to further improve the model's accuracy and generalization. After each round, the new global model is redistributed to each charging station for the next round of local training and updates. This iteration continues until the model converges or reaches a preset stopping condition, ultimately resulting in a high-performance DNN model suitable for multi-brand charging station fault detection.

[0056] This embodiment provides a DNN-based federated learning method for charging pile fault detection. This solution leverages the core characteristic of federated learning: data remains local. Instead of uploading raw data to a central server, each charging pile trains model parameters based on local data and then uploads only encrypted or differentially private model parameter updates. This allows sensitive information, such as user charging behavior data and charging pile operation data, to be retained on their respective devices, significantly enhancing data privacy protection and complying with data protection regulations such as GDPR.

[0057] Using a federated learning framework, charging piles from different brands can share model learning results without directly exchanging data. This effectively establishes a cross-brand data collaboration mechanism, allowing all participants to benefit from a wider range of data diversity and improve the generalization capabilities of fault detection models. Even if the data formats and collection standards of each charging pile are not completely consistent, personalized adjustments can be made through local training to adapt, ultimately consolidating them into a global model.

[0058] DNN-based models can handle complex data features. Combined with federated learning mechanisms, the model can learn from fault instances across different charging piles and capture a wider range of failure modes. Compared to training with data from a single brand or single point, federated learning methods can more comprehensively reflect the various situations in which charging piles are used in real-world applications, thereby improving the accuracy and timeliness of fault detection.

[0059] In some embodiments, the central server sends the global model W l-1 To the i-th charging station. Note the global model W l- 1Wl-1 It is obtained by aggregating the local models in the first round. In addition, in the first round, the central server initializes the global model W based on DNN. g This example describes a distributed machine learning process, specifically for fault detection or optimization of charging pile systems, in which a central server plays a key coordination role. This example utilizes a federated learning strategy coordinated by a central server to effectively utilize the heterogeneous data resources of distributed charging piles. While ensuring data privacy, it also enables continuous optimization and upgrading of the global model, thereby improving the overall performance and fault response capabilities of the charging pile system.

[0060] In some embodiments, after m local iterations of the local model of the charging pile, the weight parameter ω' x ,ω' h and bias b' will be packaged as And upload to the central server to wait for aggregation.

[0061] In some embodiments, when all local models are collected, the global model is updated as follows:

[0062]

[0063] Among them, W l-1 is the global model obtained by aggregation at the end of round l-1, and η is the aggregation ratio between (0, 1). Once the central server aggregates a new global model, the new global model will replace the old one and be distributed to each charging station to await the next round of local training.

[0064] In some embodiments, after the global model is issued, the i-th charging pile uses the global model W l-1 Train your own local model, and the local training includes m iterations. Assume is the local model of charging station i at the jth local iteration in round l, where j∈[1,m]. In each iteration, charging station i is trained using a DNN. DNNs are classified into three categories based on the location of different layers: input layer, hidden layer, and output layer. The first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers.

[0065] DNN is built on the basis of the perceptron model. The perceptron model is a multi-input, single-output model that first learns a linear relationship between the output and input to obtain the intermediate output result:

[0066]

[0067] Among them, ω is the linear relationship coefficient of each x, b is the bias, xq is the qth input, w q is the weight coefficient corresponding to the qth input, a is the intermediate output result, and k is x q The number of neurons in the input layer.

[0068] Pass z through a neuron activation function, assuming it is sigmoid(z), then:

[0069]

[0070] The output result is obtained. DNN adds a hidden layer on this basis, and the hidden layer can be multi-layer, which increases the expressive power of the model. The output neurons can be more than a single one and can be used for classification and regression.

[0071] For the output of the second layer have:

[0072]

[0073] For the output of the third layer have:

[0074]

[0075] To generalize the above example, assume that the DNN has L layers (including input layer and output layer), and the l-1 layer has m neurons. Then the output of the p-th neuron in the l-th layer is It can be calculated that:

[0076]

[0077] Where sigmoid() is the neuron activation function, m is the number of neurons in the l-1 layer, is the weight corresponding to the nth parameter of the pth neuron in the lth layer, is the nth output of the l-1th layer, is the bias term corresponding to the p-th neuron in the l-th layer.

[0078] Starting from the input layer, the output of each subsequent layer is calculated, and the model's output is obtained until the final layer is reached. This is the forward propagation process of a DNN, which is used to calculate the network's predicted value for a given input. It passes through each layer of the network, starting from the input layer, passing through the hidden layers, and finally to the output layer, calculating and transmitting the activation values of the neurons. This process does not involve any parameter updates (such as weights and biases); it simply calculates the network's output based on the network's current parameters and input data.

[0079] In some embodiments, during the backpropagation phase, the loss function is calculated backwards to calculate the gradient of the loss function with respect to the model parameters, thereby guiding the update of the model parameters to minimize the loss function and optimize the model's performance. Here, we choose the cross-entropy loss function instead of the commonly used mean square error loss function. In the binary classification task, the cross-entropy loss function has the following form:

[0080] J(W,b,a,y)=-[ylna+)1-y)ln(1-a)](5)

[0081] Here, W represents the weight, b represents the bias term, y represents the true label, ln(·) is the natural logarithm, and a represents the probability distribution of the predicted label. At this time, the partial derivative of the loss function with respect to the weight is:

[0082]

[0083] Among them, z is the intermediate output result of each layer of the neural network, x is the input item, and at the same time,

[0084] sigmoid′(z)=sigmoid(z)*[1-sigmoid(z)] (7)

[0085] The derivation process of formula (7) is as follows:

[0086] sigmoid(x)=(1+e -x ) -1 (8)

[0087] sigmoid'(x)=e -x (1+e -x ) -2 (9)

[0088]

[0089] The above is the back propagation process of updating weights through the binary cross entropy loss function.

[0090] In practice, forward propagation begins at the input layer, calculating from left to right, layer by layer, until the output layer produces a result. If the result differs from the target value, backpropagation proceeds from right to left, calculating the error at each node layer by layer and adjusting all weights for each node. After reaching the input layer, the forward propagation is restarted, and the above steps are repeated iteratively until all weight parameters converge to a reasonable value. Because computer programs differ from mathematical methods in solving equation parameters, they generally randomly select parameters first and then continuously adjust them to reduce the error until they approach the correct value.

[0091] The present invention is further described in detail below with reference to an example, but the implementation of the present invention is not limited thereto. This example simulates a fault detection federated learning method between charging piles of different brands based on DNN, using PyCharm as the simulation platform and Python 3.9 as the interpreter.

[0092] In this example, 5 charging stations are selected, the local iteration rounds are 10 rounds, the global communication rounds are 50 rounds, the learning rate is 0.0001, and the hidden layer is 256 layers. The input is 6-dimensional data (number of features) and the output is 2-dimensional data (number of categories). The specific data set structure is as follows:

[0093]

[0094] THDV-M represents the total harmonic distortion of voltage, THDI-M represents the total harmonic distortion of current, and a label of 1 indicates a fault, while 0 indicates a normal condition. The Adam optimizer is used for local training in federated learning, and the data loading batch size is 64.

[0095] Figure 2 A comparison chart comparing the fault detection accuracy of DNN charging piles using federated learning and centralized methods is shown. The chart shows that the accuracy of DNN charging pile fault detection using federated learning reaches approximately 88%, while the accuracy of centralized DNN charging pile fault detection is only around 85%. This demonstrates that distributed deep neural network data learning is more effective than centralized deep neural network data learning.

[0096] Figure 3 A comparison of DNN charging pile fault detection loss using federated learning and centralized approaches is shown. The figure shows that the DNN loss drop under federated learning is less volatile and more stable, while the DNN loss drop under centralized learning fluctuates more. While the centralized model ultimately fits the actual fault data better (as measured by the loss value at convergence), it exhibits instability. In contrast, the distributed federated learning model, while not as good at fitting the fault data as the centralized model, is more robust.

[0097] Using distributed federated learning to detect charging pile faults is an effective means of protecting the privacy of various companies. This paper proposes a charging pile fault detection method based on a deep neural network to address the flow of private data on key parameters of charging piles from different brands. The method also uses a deep neural network to learn the parameter change characteristics during faults, thereby enabling detection of the health status of the charging piles. Simulation experiments show that compared to the convergence speed and accuracy of traditional centralized data, the deep neural network with a federated learning mechanism proposed in this paper can effectively improve model performance while protecting local data privacy.

[0098] Based on the same inventive concept, the present application also provides a DNN-based federated learning system for charging pile fault detection, which is used to implement the aforementioned DNN-based federated learning method for charging pile fault detection. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of the DNN-based federated learning system for charging pile fault detection provided below can be found in the above-mentioned limitations of the DNN-based federated learning method for charging pile fault detection, and will not be repeated here.

[0099] See also Figure 4 This embodiment provides a federated learning system for charging pile fault detection based on DNN, including:

[0100] Central server and charging piles;

[0101] The central server is used to initialize the global model and distribute the global model to each charging station participating in the federated learning in one round of federated learning.

[0102] The charging pile is used to train the local model based on local historical fault parameter data;

[0103] The central server is also used to continuously collect the trained local models of each charging pile and wait for aggregation; after the collection is completed, the collected local models are averaged and aggregated to obtain a new global model.

[0104] Furthermore, the central server updates the global model according to the following formula:

[0105]

[0106] Where W l and W l-1 are the global models obtained by the 1st and 1-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

[0107] like Figure 4 As shown, each charging pile uses a deep neural network as a local model, and the central server serves as the aggregation center of the local model. Each charging pile has a large amount of private data on parameters (including key parameters for fault detection). The charging pile, as an edge device, uses local data for local training. The charging pile set is defined as M = {1,…,M}, and the index of the charging pile is represented as i∈M. The present invention analyzes the historical fault parameter data of each charging pile, and each charging pile performs fault detection on charging piles with unknown health conditions based on local historical data.

[0108] Considering the number of rounds of federated learning communication as E, in round l(l∈[1,E]), the i-th charging pile undergoes the following steps:

[0109] Step 1: The central server initializes the global model, including loading the pre-trained global model;

[0110] Step 2: The central server issues a command to send the global model to each charging pile. The charging pile receives the global model from the central server;

[0111] Step 3: Each charging pile trains a local model based on local historical fault parameter data;

[0112] Step 4: After training is completed, each charging station uploads the updated local model to the central server and waits for aggregation;

[0113] Step 5: The central server continuously collects local models from each charging station and averages and aggregates the collected local models to obtain a new global model.

[0114] Step 6: The central server returns to execute step 2. The above process is called a round.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0116] Reference Figure 5 An embodiment of the present invention further provides a computer device 3, comprising: a memory 302 and a processor 301 and a computer program 303 stored on the memory 302. When the computer program 303 is executed on the processor 301, a federated learning method for charging pile fault detection based on DNN as described in any one of the above methods is implemented.

[0117] The computer device 3 may be a desktop computer, a notebook computer, a PDA, a cloud server or other computing devices. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that Figure 5 This is merely an example of the computer device 3 and does not constitute a limitation on the computer device 3 . The computer device 3 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 3 may also include input and output devices, network access devices, etc.

[0118] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0119] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device 3. Furthermore, the memory 302 may include both an internal storage unit of the computer device 3 and an external storage device. The memory 302 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 302 may also be used to temporarily store data that has been output or is about to be output.

[0120] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the federated learning method for charging pile fault detection based on DNN as described in any one of the above methods is implemented.

[0121] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process of the above-mentioned method embodiment by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can at least include: any entity or device capable of carrying computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, mobile hard drive, magnetic disk, or optical disk. In some jurisdictions, based on legislation and patent practice, computer-readable media cannot be electric carrier signals or telecommunication signals.

[0122] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0123] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0124] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0125] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A federated learning method for charging pile fault detection based on DNN, characterized by: The steps include: Initialize the global model; In one round of federated learning, the global model is distributed to each charging pile participating in the federated learning, so that each charging pile trains a local model based on local historical fault parameter data; Continuously collect the local models trained by each charging pile and wait for aggregation; After the collection is completed, the collected local models are averaged and aggregated to obtain a new global model; All rounds of federated learning are performed to obtain the final global model of DNN-based charging pile fault detection.

2. The federated learning method for charging pile fault detection based on DNN according to claim 1 is characterized in that: In one round of federated learning, the global model is distributed to each charging station participating in the federated learning, including: In the first round, the initialized global model is distributed to each charging station participating in the federated learning; In each subsequent round, the global model obtained by aggregation in the previous round is distributed to each charging station participating in federated learning.

3. The federated learning method for charging pile fault detection based on DNN according to claim 1, characterized in that: Aggregating the global model is performed as follows: Where W l and W l-1 are the global models obtained by the 1st and 1-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

4. The federated learning method for charging pile fault detection based on DNN according to claim 3 is characterized in that: The parameters uploaded to the central server include weight parameters and bias.

5. The federated learning method for charging pile fault detection based on DNN according to claim 1, characterized in that: The local model is a deep neural network model obtained through DNN training. The neural network layer of the local model includes an input layer, a hidden layer, and an output layer. The output of the pth neuron in the first layer of the local model is as follows: Where sigmoid() is the neuron activation function, m is the number of neurons in the l-1 layer, is the weight corresponding to the nth parameter of the pth neuron in the lth layer, is the nth output of the l-1th layer, is the bias term corresponding to the p-th neuron in the l-th layer.

6. The federated learning method for charging pile fault detection based on DNN according to claim 5 is characterized in that: In the back propagation phase of the local model training, the cross entropy loss function is used for reverse calculation. The cross entropy loss function is as follows: J(W,b,a,y)=-[y ln a+(1-y)ln(1-a)] Where W represents the weight, b represents the bias term, y represents the true label, and a represents the probability distribution of the predicted label.

7. A federated learning system for charging pile fault detection based on DNN, characterized by: include: Central server and charging piles; The central server is used to initialize the global model; And in one round of federated learning, the global model is distributed to each charging station participating in the federated learning The charging pile is used to train a local model based on local historical fault parameter data; The central server is also used to continuously collect the local models trained by each charging pile and wait for aggregation; after the collection is completed, the collected local models are averaged and aggregated to obtain a new global model.

8. The federated learning system for charging pile fault detection based on DNN according to claim 7, characterized in that: The central server updates the global model according to the following formula: Where W l and W l-1 are the global models obtained by the 1st and 1-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

9. A computer device, characterized in that: The device includes a processor and a memory: The memory is used to store the computer program and send instructions of the computer program to the processor; The processor executes a federated learning method for charging pile fault detection based on DNN according to any one of claims 1 to 6 according to the instructions of the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the federated learning method for charging pile fault detection based on DNN according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Federal learning-based model training method and device, and federal learning system

    CN112862011A

  • Federal learning-based power distribution network fault prediction method and system

    CN116663729A