Federal learning method for fault detection of charging pile based on DNN and related device

By performing local training on charging piles and aggregating model parameters, the federated learning method solves the problems of data privacy and data sharing in charging pile fault detection, achieves more efficient fault detection and wider data diversity, and improves the efficiency of charging pile fault detection. Accuracy and timeliness of fault detection.

CN118734937AActive Publication Date: 2024-10-01ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing charging pile fault detection methods have data privacy issues and cannot achieve data sharing between charging piles of different brands, affecting the actual implementation effect.

Method used

The federated learning method based on DNN is used to initialize the global model and perform local training on each charging pile, aggregating model parameters to form a new global model, and enabling different brands of charging piles to share model learning results without directly exchanging data.

Benefits of technology

It improves the accuracy and timeliness of charging pile fault detection, protects data privacy, complies with data protection regulations, and is suitable for fault detection of multiple brands of charging piles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734937A_ABST
    Figure CN118734937A_ABST
Patent Text Reader

Abstract

The invention provides a federated learning method for fault detection of a charging pile based on DNN and a related device. The method comprises the following steps: initializing a global model; in one round of federated learning, distributing the global model to each charging pile participating in federated learning, so that each charging pile performs local model training based on local historical fault parameter data; continuously collecting the trained local model of each charging pile to wait for aggregation; carrying out average aggregation on the collected local models after the collection is finished to obtain a new global model; and executing all rounds of federated learning to obtain a final DNN-based charging pile fault detection global model. According to the invention, the charging piles of different brands can share the model learning result under the condition of not directly exchanging data through the federal learning framework, and the problem that the data sharing of the charging piles of different brands cannot be realized based on a deep neural network algorithm in the prior art is solved.
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 device for charging pile fault detection based on DNN. Background Art

[0002] With the rapid rise of the electric vehicle (EV) market, charging piles are important infrastructure for energy replenishment. Their stability, safety and reliability are crucial to the healthy development of the entire EV ecosystem. However, in actual operation, charging piles may fail for various reasons, such as hardware aging, software errors, communication failures, human operation errors, etc. These failures not only affect the user's charging experience, but may also cause damage to the electric vehicle and the charging pile itself, and even cause safety hazards. Fault detection for charging pile failures can, on the one hand, improve operation and maintenance efficiency, take targeted repair measures for unreliable faults, and at the same time, maintenance personnel can analyze the frequency and causes of different faults, etc., to reduce maintenance costs; on the other hand, timely repair of faults can reduce user waiting time, improve user charging experience, and prevent the occurrence of faults through historical fault data.

[0003] At present, there have been some research results on charging pile fault detection, and some researchers have proposed different detection algorithms. Charging pile fault diagnosis based on convolutional support vector machine 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 the 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 extracting important features using principal component analysis (PCA: Principal Component Analysis) and training and fine-tuning with the LightGBM classification model, 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, so as 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 technical solutions provided by the present invention are as follows:

[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 pile participating in the federated learning, so that each charging pile can train the local model based on the local historical fault parameter data;

[0009] Continue to 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 lth and l-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] In the formula, 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 stage 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 stations;

[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 the 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 also provides a computer device, the device comprising a processor and a memory:

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

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

[0036] Correspondingly, the present invention also provides a computer-readable storage medium, on which a computer program is stored. 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 can train 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 a 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A flow chart of a 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 learning provided by an embodiment of the present invention;

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

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

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

[0044] In order to make the purpose, 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 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 should be noted that before starting the federated learning process, an initial global model needs to be created on the server side. This model can be based on a DNN (deep neural network) architecture designed for charging pile fault detection tasks. It can be randomly initialized or a basic model pre-trained 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 piles participating in the federated learning. These charging piles are located in different locations and belong to different brands or operators. Each charging pile uses its own accumulated local historical fault parameter data (such as charging current, voltage fluctuations, temperature changes and other characteristics and corresponding fault labels) to perform model training locally. This process ensures that the data does not leave the charging pile, 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, they will not directly share the original data, but upload the trained model parameters or updates (i.e., fine-tuning changes in model weights) to the server. The server will continue to collect local model information from different charging stations to prepare 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 should be noted that once the model updates of all participating nodes are collected, the server performs an average aggregation operation of the model parameters. This means that the model updates of each charging station will be comprehensively considered, and a new, more comprehensive global model will be generated by calculating the weighted average, etc. This process reflects the core of federated learning - allowing the model to learn from data from different sources without directly accessing the data.

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

[0055] It should be noted that the above steps S2 to S4 constitute a round of federated learning. In order to further improve the accuracy and generalization ability of the model, this process will be repeated for multiple rounds. After each round, the new global model will be distributed to each charging pile again for the next round of local training and updating. This iteration will continue until the model converges or reaches the preset stop condition, and finally a high-performance DNN model suitable for multi-brand charging pile fault detection is obtained.

[0056] This embodiment provides a federated learning method for charging pile fault detection based on DNN. The scheme utilizes the core feature of federated learning, that is, the data does not leave the local. Each charging pile does not need to upload the original data to the central server, but trains the model parameters based on local data, and then only uploads the encrypted or differentially private processed model parameter updates. In this way, sensitive information such as the user's charging behavior data and charging pile operation data can be retained on their respective devices, which greatly enhances the privacy protection of the data and complies with the requirements of data protection regulations such as GDPR.

[0057] Charging piles of different brands can share model learning results without directly exchanging data through the federated learning framework. This is equivalent to building a cross-brand data cooperation mechanism, allowing all participants to benefit from a wider range of data diversity and improve the generalization ability of fault detection models. Even if the data format and collection standards of each charging pile are not completely consistent, they can adapt through personalized adjustments of local training and eventually aggregate to form a global model.

[0058] The DNN-based model can handle complex data features. Combined with the federated learning mechanism, the model can learn from fault instances of different charging piles and capture more diverse fault modes. Compared with single-brand or single-point data training, the federated learning method can more comprehensively reflect the various situations of charging piles in actual 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 And sent to each charging pile. This embodiment describes a distributed machine learning process, especially for fault detection or optimization of the charging pile system, in which the central server plays a key coordination role. This embodiment effectively utilizes the heterogeneous data resources of distributed charging piles through the federated learning strategy coordinated by the central server, while ensuring data privacy, and realizes the continuous optimization and upgrading of the global model to improve the overall performance and fault response capability 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 global model and be sent to each charging station to wait for 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 the jth local iteration of charging pile i in round l, where j∈[1,m]. In each iteration, charging pile i uses DNN for training. DNN is divided into three categories according to the position of different layers: input layer, hidden layer and output layer. Among them, the first layer is the input layer, the last layer is the output layer, and the layers in the middle 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. First, a linear relationship between the output and input is learned to obtain the intermediate output result:

[0066]

[0067] Among them, ω is the linear relationship coefficient of each x, b is the bias, and 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, and the output neurons can be more than one, which 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-1th layer has m neurons. Then the output of the pth neuron in the lth layer is It can be calculated that:

[0076]

[0077] In the formula, 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 the next layer is calculated in sequence, and the output of the model is obtained when the last layer is reached. The above is the forward propagation process of DNN, which is used to calculate the predicted value of the network for a given input. It passes through each layer of the network, starting from the input layer, passing through the hidden layer, and finally to the output layer, calculating and transmitting the activation value of the neuron. This process does not involve the update of any parameters (such as weights and biases), but simply calculates the output of the network based on the current parameters of the network and the input data.

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

[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 loss function is partial derivative with respect to the weight, and we have:

[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 proof is complete. The above is the back propagation process of updating weights through the binary cross entropy loss function.

[0090] In fact, forward propagation starts from the input layer, calculates from left to right, and moves forward layer by layer until the output layer produces a result. If there is a gap between the result value and the target value, it is then back-propagated from right to left, calculating the error of each node layer by layer, and adjusting all the weights of each node. After reaching the input layer in reverse, it is calculated forward again, and the above steps are repeated iteratively until all weight parameters converge to a reasonable value. Because the computer program solves the equation parameters differently from the mathematical method, it generally randomly selects the parameters first, and then continuously adjusts the parameters to reduce the error until it approaches the correct value.

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

[0092] In this example, 5 charging piles 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. 6-dimensional data (number of features) is input and 2-dimensional data (number of categories) is output. The specific data set structure is as follows:

[0093]

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

[0095] Figure 2 A comparison chart of the fault detection accuracy of DNN charging piles under federated learning and centralized learning is shown. As can be seen from the figure, the fault detection accuracy of DNN charging piles under federated learning reaches about 88%, while the fault detection accuracy of DNN charging piles under centralized learning can only reach about 85%. From this, it can be seen that distributed deep neural network data learning is more effective than centralized neural deep network.

[0096] Figure 3 The comparison of DNN charging pile fault detection loss under federated learning and centralized methods is shown. As can be seen from the figure, the fluctuation of DNN loss decrease under federated learning is smaller and more stable, while the fluctuation of DNN loss decrease under centralized methods is larger. Although the centralized model fits the actual fault data better (the loss value at convergence), it is unstable. In contrast, although the distributed model of federated learning does not fit the fault data as well as the centralized model, it is more robust.

[0097] Using distributed federated learning to detect faults in charging piles is an effective means to protect the privacy of each company. The present invention proposes a charging pile fault detection method based on a deep neural network to solve the problem of the flow of privacy data of key parameters of charging piles of different brands, and uses a deep neural network to learn the parameter change characteristics during a fault, thereby realizing the detection of the health status of the charging pile. Simulation experiments show that compared with the convergence speed and accuracy of traditional centralized data, the deep neural network with a federated learning mechanism proposed in the present invention can effectively improve the model performance while protecting the privacy of local data.

[0098] Based on the same inventive concept, the embodiment of the present application also provides a DNN-based charging pile fault detection federated learning system for implementing the DNN-based charging pile fault detection federated learning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the DNN-based charging pile fault detection federated learning system embodiment provided below can refer to the limitations of the DNN-based charging pile fault detection federated learning method above, 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 stations;

[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 the 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 lth and l-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 an aggregation center for the local model. Each charging pile has a large amount of parameter (including key parameters for fault detection) privacy data, and the charging pile uses local data as an edge device 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 of unknown health status based on local historical data.

[0108] Considering that the number of rounds of federated learning communication is E, in the lth round (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 pile, and when the collection is completed, 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 simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be 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 in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in 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, which will not be repeated here.

[0116] Reference Figure 5 The 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 in 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 computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 5 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it 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, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[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 memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 3. Further, the memory 302 may also 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, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0120] An embodiment of the present invention further 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 in the form of 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 processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code 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 that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

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

[0123] Those of ordinary skill 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 to be 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 only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, 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 the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A federated learning method for charging pile fault detection based on DNN, It is characterized in that 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. According to claim 1, the federated learning method for charging pile fault detection based on DNN, It 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 aggregated in the previous round is distributed to each charging pile participating in the federated learning.

3. According to claim 1, the federated learning method for charging pile fault detection based on DNN, It is 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 lth and l-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

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

5. According to claim 1, the federated learning method for charging pile fault detection based on DNN, It is characterized in that 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 first layer of the local model is as follows: In the formula, 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, It is characterized in that In the back propagation stage of the local model training, the cross entropy loss function is used for reverse calculation, and 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, It is characterized in that include: Central server and charging stations; The central server is used to initialize the global model; In a 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 according to 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, It is 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 lth and l-1th rounds of aggregation, η is the aggregation ratio, Parameters uploaded to the central server by charging pile i.

9. A computer device, It is characterized in that The device comprises a processor and a memory: The memory is used to store a 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 as described in any one of claims 1-6 according to the instructions of the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and 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 claims 1 to 6 is implemented.

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

  • Vehicle networking abnormal flow detection method based on adaptive federated learning

    CN117807496A

  • Federated learning defense method, apparatus, electronic device, and storage medium

    WO2021208721A1

  • Method and apparatus for training traffic flow prediction model, electronic device, and storage medium

    WO2022116424A1