Cloud edge-end cooperative fault detection method and device based on federated learning

By reducing the dimensionality of the residual network and dynamically calibrating the channel attention mechanism (SE) module, and combining multi-key homomorphic encryption and sparsity strategies, a cloud-edge-device collaborative fault detection method based on federated learning was constructed. This method solves the problems of poor dynamic adaptability of algorithm models, inability to guarantee data security and privacy, and real-time bottlenecks in device fault detection, and achieves efficient fault detection and privacy protection.

CN120915701APending Publication Date: 2025-11-07TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511059327.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, equipment fault detection suffers from poor dynamic adaptability of algorithm models, inability to effectively guarantee data security and privacy, and bottlenecks in real-time performance. In particular, it is vulnerable to attacks and has limited computing resources in cross-WAN communication between edge nodes and the cloud.

Method used

A federated learning-based approach is adopted to reduce the dimensionality of the preset residual network residual block structure and integrate the channel attention mechanism (SE) module for dynamic calibration. At the same time, multi-key homomorphic encryption and sparsity strategies are used to construct a side-side device fault detection classifier to achieve adaptive learning and privacy protection of the model.

Benefits of technology

It significantly improves feature discrimination and model generalization ability, reduces computational overhead, enhances data security and response speed, solves the data silo problem, and strengthens the model's dynamic adaptability and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915701A_ABST
    Figure CN120915701A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equipment fault detection, in particular to a cloud edge-end cooperative fault detection method and device based on federated learning, and the method comprises the steps: carrying out the dimension reduction processing of a convolution operation in a preset residual network residual block structure, and obtaining a one-dimensional convolution layer residual block; integrating a channel attention mechanism SE module in the one-dimensional convolutional layer residual block; performing hierarchical stacking on the new residual block structure and reconstructing a residual network dimension to obtain a side equipment fault detection classifier; and performing sparse processing on preset federated learning model parameters and performing multi-key homomorphic encryption to obtain a federated learning detection model, training the side equipment fault detection classifier, constructing a side equipment fault detection classification model, and outputting a cloud side-end cooperative fault detection result of the equipment. Therefore, the problems that the dynamic adaptability of an algorithm model is poor, the data security and privacy cannot be effectively guaranteed, and the real-time performance is bottleneck in fault detection in the related technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of equipment fault detection, and in particular relates to a cloud-edge-end collaborative fault detection method and device based on federated learning. BACKGROUND

[0002] With the gradual application of various high-speed high-precision and intelligent digital equipment, the equipment fault detection technology matched therewith also faces the demand for development towards refinement and intelligence.

[0003] In the related art, a traditional cloud centralized detection technology is generally used, sensor data is uploaded to the cloud through 5G / industrial internet, and a powerful computing power of a cloud server is used to run a complex fault diagnosis model, for example, the cloud centralized detection technology is used in the Siemens MindSphere platform and the cloud predictive maintenance of GE Predix.

[0004] However, in the related art, the communication between the edge node and the cloud across the wide area network has the risk of eavesdropping and tampering, especially in real-time warning scenarios, the edge node is deployed in an open environment such as a workshop or a park, and is vulnerable to physical damage and illegal access attacks, and the limited computing capacity of the edge device is difficult to support traditional encryption algorithms. Since the traditional cloud centralized processing cannot meet the demand for millisecond-level response of key equipment such as rotating machinery, and the limited computing resources of the edge node lead to difficulties in deploying deep learning models, the real-time performance of fault detection still has bottlenecks; variables such as equipment aging and environmental interference cause fault feature drift, and static models need to be frequently retrained, and the dynamic adaptability of the algorithm model is poor; the communication between the edge node and the cloud across the wide area network has the risk of eavesdropping and tampering, especially in real-time warning scenarios, the edge node is deployed in an open environment such as a workshop or a park, and is vulnerable to physical damage and illegal access attacks, and the limited computing capacity of the edge device is difficult to support traditional encryption algorithms, and data security and privacy cannot be guaranteed, which needs to be improved. SUMMARY

[0005] The present application provides a cloud-edge-end collaborative fault detection method and device based on federated learning to solve the problems of poor dynamic adaptability of algorithm model, ineffective guarantee of data security and privacy, and bottlenecks in real-time performance in the related art.

[0006] The first aspect embodiment of the application provides a cloud-edge-end cooperative fault detection method based on federated learning, including the following steps: performing dimension reduction processing on convolution operations in a preset residual network residual block structure to obtain a one-dimensional convolution layer residual block; constructing a channel attention mechanism SE module to dynamically calibrate feature channels, and integrating the channel attention mechanism SE module in the one-dimensional convolution layer residual block to generate a new residual block structure; performing hierarchical stacking on the new residual block structure, and reconstructing the preset residual network dimension to obtain an edge-side device fault detection classifier; performing sparse processing on preset federated learning model parameters, and performing multi-key homomorphic encryption on the preset federated learning model to obtain a federated learning detection model based on multi-key homomorphic encryption; training the edge-side device fault detection classifier using the federated learning detection model, constructing an edge-side device fault detection classification model, and outputting a cloud-edge-end cooperative fault detection result of the device using the edge-side device fault detection classification model.

[0007] Through the above technical solution, the embodiment of the application can first perform dimension reduction processing on convolution operations in a preset residual network residual block structure, integrate a channel attention mechanism SE module to dynamically calibrate feature channels, and then construct an edge-side device fault classifier, so that the classifier can reduce the calculation amount while adaptively learning the importance of different channel features. Further, based on the classifier, the preset federated architecture is used, and homomorphic encryption prevention and sparse strategy are adopted, so as to protect privacy and reduce the number of encryptions and communication transmission amount, and improve response speed.

[0008] Optionally, in an embodiment of the application, the channel attention mechanism SE module is constructed to dynamically calibrate feature channels, including: performing squeezing processing on the features of each channel to compress the spatial dimension of a one-dimensional feature map into a channel description vector; constructing a gating mechanism through two-level fully connected layers, taking the channel description vector as an input vector of the fully connected layer, and obtaining the importance weight of each channel based on the gating mechanism; multiplying the learned importance weight of each channel with the original feature map channel by channel to enhance and suppress key channels and non-key channels respectively, and constructing the channel attention mechanism SE module.

[0009] Through the above technical solution, the embodiment of the application can dynamically calibrate feature channels based on the constructed attention mechanism SE module, and then can adaptively enhance useful features and suppress redundant features by learning the dependency relationship between channels, so as to realize the enhancement of key channels and the suppression of non-key channels, significantly improve the feature discrimination and model generalization ability, reduce the calculation overhead, and improve the easy integration characteristics.

[0010] Optionally, in an embodiment of the present application, the sparse processing of the preset federated learning model parameter comprises: setting a compression operator of gradient information; compressing the gradient vector using the compression operator to obtain at least one gradient vector component after sparse processing; when the gradient vector is compressed using the compression operator, an error accumulation memory is introduced to record the gradient residual that is not transmitted.

[0011] Through the above sparse processing, the embodiments of the present application can reduce the order of magnitude of the communication and encryption and decryption calculation of the gradient, and the error compensation mechanism can ensure that the model convergence rate is consistent with the random gradient descent without using the sparse method.

[0012] Optionally, in an embodiment of the present application, the calculation formula of the channel description vector is:

[0013]

[0014] wherein, X i,c represents the input channel feature, L is the sequence length, and C is the number of channels;

[0015] The importance weight calculation formula of the channel is:

[0016] s = σ (W2δ (W1z)),

[0017] wherein, W1 and W2 are learnable parameters, σ represents the ReLU activation function, δ is the Sigmoid function, and z represents the channel description vector.

[0018] Through the above technical solution, the embodiments of the present application can obtain the channel description vector based on the above channel description vector calculation model, and then obtain the importance weight of each channel through the importance weight calculation formula, which provides favorable data support for realizing the enhancement of key channels and the suppression of non-key channels.

[0019] The second aspect embodiment of the application provides a cloud-edge-end cooperative fault detection device based on federated learning, comprising: a dimension reduction module, configured to perform dimension reduction processing on convolution operations in a preset residual network residual block structure to obtain a one-dimensional convolution layer residual block; a first construction module, configured to construct a channel attention mechanism SE module to dynamically calibrate feature channels, and integrate the channel attention mechanism SE module in the one-dimensional convolution layer residual block to generate a new residual block structure; a second construction module, configured to perform hierarchical stacking on the new residual block structure, and reconstruct the preset residual network dimension to obtain an edge-side device fault detection classifier; a processing module, configured to perform sparse processing on preset federated learning model parameters, and perform multi-key homomorphic encryption on the preset federated learning model to obtain a federated learning detection model based on multi-key homomorphic encryption; and a detection module, configured to train the edge-side device fault detection classifier by using the federated learning detection model, construct an edge-side device fault detection classification model, and output a cloud-edge-end cooperative fault detection result of a device by using the edge-side device fault detection classification model.

[0020] Through the above technical solution, the embodiment of the application can first perform dimension reduction processing on convolution operations in a preset residual network residual block structure, integrate a channel attention mechanism SE module to dynamically calibrate feature channels, and then construct an edge-side device fault classifier, so that the classifier can reduce the calculation amount while adaptively learning the importance of different channel features; and further based on the classifier, the homomorphic encryption prevention and sparse strategy are adopted based on a preset federated architecture, so as to protect privacy and reduce the number of encryptions and communication transmission, and improve the response speed.

[0021] Optionally, in an embodiment of the application, the first construction module comprises: a squeezing unit, configured to perform squeezing processing on features of each channel to compress the spatial dimension of a one-dimensional feature map into a channel description vector; an excitation unit, configured to construct a gating mechanism through two-level fully connected layers, take the channel description vector as an input vector of the fully connected layers, and obtain the importance weight of each channel based on the gating mechanism; and a scaling unit, configured to multiply the learned importance weight of each channel with an original feature map channel by channel to enhance and suppress key channels and non-key channels respectively, and construct the channel attention mechanism SE module.

[0022] Through the above technical solution, the embodiment of the application can dynamically calibrate feature channels based on the constructed attention mechanism SE module, and then can adaptively enhance useful features and suppress redundant features by learning the dependency relationship between channels, so as to realize the enhancement of key channels and the suppression of non-key channels, significantly improve the feature discrimination and model generalization ability, reduce the calculation overhead, and improve the easy integration characteristics.

[0023] Optionally, in an embodiment of the present application, the processing module comprises: a setting unit configured to set a compression operator of gradient information; a compression unit configured to compress the gradient vector using the compression operator to obtain at least one gradient vector component after the sparsification processing; and a recording unit configured to introduce an error accumulation memory to record gradient residuals that are not transmitted when the gradient vector is compressed using the compression operator.

[0024] Through the above sparsification processing, the embodiments of the present application can reduce the order of magnitude of communication and encryption and decryption calculation of the gradient, and the error compensation mechanism can ensure that the model convergence rate is consistent with that of the stochastic gradient descent without using the sparsification method.

[0025] Optionally, in an embodiment of the present application, the calculation formula of the channel description vector is:

[0026]

[0027] wherein X i,c represents the input channel feature, L is the sequence length, and C is the number of channels.

[0028] The importance weight calculation formula of the channel is:

[0029] s = σ (W2δ (W1z) ),

[0030] wherein W1 and W2 are learnable parameters, σ represents the ReLU activation function, δ is the Sigmoid function, and z represents the channel description vector.

[0031] Through the above technical solution, the embodiments of the present application can obtain the channel description vector based on the above channel description vector calculation model, and then obtain the importance weight of each channel through the importance weight calculation formula, thereby providing favorable data support for realizing the enhancement of key channels and the suppression of non-key channels.

[0032] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the cloud edge end collaborative fault detection method based on federated learning as described in the above embodiments.

[0033] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the cloud edge end collaborative fault detection method based on federated learning as described above.

[0034] The fifth aspect embodiment of the present application provides a computer program product, the computer program product stores a computer program, and the program is executed by a processor to realize the cloud edge-end collaborative fault detection method based on federated learning.

[0035] Additional aspects and advantages of the present application will be made apparent by the following description and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0036] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the accompanying drawings, wherein:

[0037] Figure 1 A flowchart of a cloud edge-end collaborative fault detection method based on federated learning according to an embodiment of the present application;

[0038] Figure 2 A residual block base structure diagram for one specific embodiment of the present application;

[0039] Figure 3 An SE-Res1DBlock structure diagram formed after integrating an SE block in a one-dimensional convolution layer residual block for one specific embodiment of the present application;

[0040] Figure 4 A side device fault detection classifier structure diagram for one specific embodiment of the present application;

[0041] Figure 5 A federated learning framework diagram for one specific embodiment of the present application;

[0042] Figure 6 A structure diagram of a cloud edge-end collaborative fault detection device based on federated learning according to an embodiment of the present application;

[0043] Figure 7 A structure diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0045] A cloud-edge-end collaborative fault detection method and device based on federated learning are described below with reference to the accompanying drawings. In view of the problems of poor dynamic adaptability of algorithm models, ineffective guarantee of data security and privacy, and bottlenecks in real-time performance in the related art mentioned above, the present application provides a cloud-edge-end collaborative fault detection method based on federated learning. In this method, the convolution operation in the preset residual network residual block structure can be first reduced in dimension, and a channel attention mechanism SE module can be integrated to dynamically calibrate the feature channels, thereby constructing an edge-side device fault classifier. This classifier can reduce the computational load while adaptively learning the importance of different channel features. Further, based on the preset federated architecture, homomorphic encryption and sparsification strategies are used to protect privacy and reduce the amount of encryption and communication transmission, thereby improving response speed. Thus, the problems of poor dynamic adaptability of algorithm models, ineffective guarantee of data security and privacy, and bottlenecks in real-time performance in the related art are solved.

[0046] Specifically, Figure 1 A flowchart of a cloud-edge-end collaborative fault detection method based on federated learning is provided in the present application.

[0047] As Figure 1 shown, the cloud-edge-end collaborative fault detection method based on federated learning includes the following steps:

[0048] In step S101, the convolution operation in the preset residual network residual block structure is reduced in dimension to obtain a one-dimensional convolution layer residual block.

[0049] The preset residual network includes but is not limited to a frequency domain residual network, a multi-scale residual network, a time-varying residual network, etc.

[0050] Specifically, the traditional residual network (ResNet) alleviates the gradient vanishing problem of deep networks through a skip connection, but its fixed convolution kernel weight distribution mechanism cannot adaptively capture key features. Therefore, the present application improves the ResNet18 architecture.

[0051] As Figure 2 shown, the convolution operation in the original ResNet18 residual block structure can be first reduced to one dimension to construct a residual block base composed of two one-dimensional convolution layers with a kernel size of 3 and a step size of 1, a batch normalization layer (BatchNorm), and a ReLU activation function.

[0052] The convolution operation in the preset residual network residual block structure is reduced to one dimension, which can not only retain the core advantages of gradient flow and feature multiplexing of the residual network, but also significantly reduce the calculation amount and the number of parameters, thereby reducing the calculation overhead and saving the memory, and laying a good foundation for improving the millisecond response of key equipment such as rotating machinery.

[0053] In step S102, the channel attention mechanism SE module dynamically calibrates the feature channels, and integrates the channel attention mechanism SE module in the one-dimensional convolution layer residual block to generate a new residual block structure.

[0054] In the embodiment of the application, after reducing the dimension of the convolution operation in the original ResNet18 residual block structure, a channel attention mechanism squeeze-excitation (SE) module can be further constructed, and based on the channel attention mechanism SE module, dynamic calibration of the feature channels is realized through three steps of squeezing, exciting and scaling; finally, the SE block is integrated in the one-dimensional convolution layer residual block to form an improved residual block structure SE-Res1D Block, and the structure is as shown in Figure 3

[0055] The embodiment of the application can form a new improved residual block structure by constructing a channel attention mechanism SE module and integrating the channel attention mechanism SE module in the one-dimensional convolution layer residual block, which can realize focusing on key malicious behavior features and noise suppression through a dynamic feature channel weight distribution mechanism, and the residual connection in the new improved residual block structure SE-Res1D Block can avoid gradient vanishing of the deep network, and the attention mechanism can improve the backpropagation efficiency through gating adjustment.

[0056] In step S103, the new residual block structure is hierarchically stacked, and the preset residual network dimension is reconstructed to obtain a side device fault detection classifier.

[0057] Based on the completion of the SE-Res1D Block core structure design, the embodiment of the application can take ResNet18 as the backbone network, improve the improved residual block through hierarchical stacking, and reconstruct the network dimension to construct a ResNet-SE1D classifier for side device fault detection classification, and the overall architecture is as shown in Figure 4 ​As shown, the input layer is composed of one-dimensional convolution with a kernel size of 7 and a step size of 2, and the number of output channels is 64. The Bottleneck structure in ResNet18 is replaced with SE-Res1D Block, which contains 4 stages (Stages) in total, and each stage is composed of 2 improved residual blocks. The channel number of the SE-Res1D Block in Stage 1 is 64, and at the starting position of Stages 2 to 4, the channel number of the skip connection is adjusted by one-dimensional convolution with a step size of 2, so that the channel numbers are 128, 256, and 512, respectively. Meanwhile, a global average pooling is used at the end of the network to map the multi-dimensional feature sequence into a fixed-dimensional vector, effectively suppressing the overfitting phenomenon. Finally, a fully connected layer with Sigmoid activation is used to output the malicious probability value, and the loss function is defined as:

[0058]

[0059] where p i is the predicted probability of the sample, y i ∈{0,1} represents the true label, and N is the sample size.

[0060] The above classifier can further optimize the channel attention mechanism and one-dimensional convolution operation while retaining the original residual network deep feature extraction capability, thereby realizing efficient modeling of high-dimensional feature space.

[0061] In step S104, the pre-set federated learning model parameters are sparsified, and the pre-set federated learning model is homomorphically encrypted with multiple keys to obtain a federated learning detection model based on multiple-key homomorphic encryption.

[0062] The centralized training method based on the ResNet-SE1D model has significant performance advantages in edge-side device fault detection classification. However, this method relies on data aggregation to the cloud server for joint training, which faces two major problems. First, during the data cross-domain transmission process, third-party data collectors may steal sensitive information such as running data and device fingerprints, thereby causing privacy leakage risks. Second, device owners tend to keep private data in local storage, resulting in fragmented distribution characteristics of data in physical space, forming an insurmountable "data island". The above contradictions seriously restrict the practical application of the centralized training mode in the device fault scenario.

[0063] Federated learning can allow multiple edge intelligent devices to jointly build a global detection model under the premise of local data sharing through the collaborative training paradigm of "data not moving model". However, existing researches are mostly based on single-key homomorphic encryption schemes, which are difficult to prevent collusion attacks between clients and servers. In addition, the computing and communication resources of training devices are limited, and the computational overhead brought by homomorphic encryption may exceed the carrying capacity of terminal devices.

[0064] In summary, the application embodiment proposes a federated learning detection model based on multi-key homomorphic encryption. In terms of cloud-edge information transmission, homomorphic encryption is used to directly perform model aggregation operations in the ciphertext state, while protecting model parameters and realizing multi-party collaborative model training. The model architecture is as shown in Figure 5 Each client independently trains the model based on local data, performs gradient sparsification processing after generating gradient parameters, and uses compression operators to filter and retain important gradient values to reduce encryption and decryption calculations and communication transmission consumption. Then, the client uses multi-key homomorphic encryption technology to encrypt the processed model gradient using an aggregation public key. After uploading the encrypted data to the server, the server performs model aggregation operations in the ciphertext space without decrypting the data of individual clients using FedAVG. The aggregated global model parameters are decrypted by aggregating the private keys of each client and distributed to each client to complete model updating, where the encryption and decryption use RLWE difficult problems to ensure transmission security.

[0065] In this embodiment, the xMK-CKKS algorithm can be used as a multi-key homomorphic encryption method used in the federated learning framework, as follows:

[0066] (1) Parameter setting

[0067] In the xMK-CKKS homomorphic encryption method based on the RLWE (Ring-Learning With Errors) assumption, each parameter required is initialized and set. First, define the weight precision parameter w to ensure the numerical stability of the floating-point weight in the quantization process by retaining w decimal places. The upper limit of the integer domain of the quantized weight max_weight_value is 10 w; based on the total dimension of the model weight model_weights, the RLWE polynomial ring dimension n is determined based on the following formula, by forcing the power of 2 to adapt to the optimization requirement of the polynomial operation based on the fast Fourier transform in the RLWE algorithm; the number of clients num_clients defines the size of the federal learning participants, and the next prime number that satisfies t>2×num_clients×max_weight_value is selected as the plaintext modulus, which can ensure the sufficiency of the arithmetic space of the multi-client weighted aggregation, and can also avoid the decoupling risk of the congruence equation through the prime number property; the ciphertext modulus q uses the next prime number which is 1000 times larger than t, and the multiple considers the growth of the client encryption noise and the decryption stage noise and reserves a safety margin.

[0068]

[0069] (2) Multi-key generation

[0070] The multi-key generation protocol is based on the RLWE difficult problem, and can generate key pairs for multiple clients in federal learning which are independent of each other and can be decrypted cooperatively. The specific process is as follows: first, the server initializes the public polynomial Where R q = q [X] / (X n +1) is a polynomial ring, Indicates uniform distribution; then, each client i independently generates a private key s i ←χ, satisfies s i ∈R q and the coefficients follow the truncated Gaussian distribution with a standard deviation σ, and generates an error polynomial e i ←ψ as a noise term, whose coefficients are sampled from a Gaussian distribution with the same parameters but independent of s i ; At the same time, the public key component b i is calculated by the following formula, and b i is uploaded to the server;

[0071] b i =-s i ·a+e i (modq)

[0072] Where mod is the modulus calculation, and q is the ciphertext modulus.

[0073] The server aggregates all the public key components of the clients to obtain the global public key The following formula is calculated, so that the private key s i of a single client can be hidden in the aggregated noise ∑e i .

[0074]

[0075] Subsequently, it can be based on the global public key. Encryption is performed, and each client's private key is used simultaneously. i Calculate the decryption shares and aggregate them on the server side for decryption and use.

[0076] (3) Model update encryption

[0077] Receive global public key Subsequently, during the local model training phase, client i calculates the local gradient ΔW using the backpropagation algorithm. i ∈ d Then, first, the gradient sparsity method from the previous section is executed. The gradient terms with the largest absolute values ​​are retained, and the index information I of the non-zero gradients is recorded. Then, the gradient parameters are flattened using weight precision, the floating-point gradients are mapped to the integer domain, and they are converted into polynomials on the ring adapted for RLWE. The calculation formula is as follows:

[0078]

[0079] Where, m i (x)∈R t t is the plaintext modulus, x i This is the vector that needs to be encrypted on client i. Next, client i samples a random key v from a discrete Gaussian distribution χ. i ←χ, and generate two independent error polynomials e0(x), e1(x)←ψ, where ψ is a truncated Gaussian distribution with standard deviation σ. The client constructs the two components to implement gradient encryption using the following formula.

[0080]

[0081] (4) Encryption aggregation and collaborative decryption

[0082] Each client sends its encrypted gradient value and corresponding index information I to the server. The server iterates through the index information of all clients, sums the corresponding encrypted gradient components separately, and performs parameter aggregation.

[0083]

[0084] For the two encrypted gradient components, c agg,0 c agg,1 This is the aggregation result of the accumulated parameters of the two encrypted gradient components mentioned above.

[0085] Next, during the collaborative decryption phase, the server will... agg,1 The broadcast is sent to each client, and client i uses its local private key s i Calculate the partial decryption share pi :

[0086] p i = s i · c agg,1 + e l (mod q)

[0087] where e l ← χ is the added noise polynomial. The server collects all the client decryption shares and computes the global gradient W glo ba lresult:

[0088]

[0089] where m i represents the plaintext, i.e., the decrypted result; is the noise generated by two independent error polynomials e0(x), e1(x).

[0090] The server sends the global gradient plaintext to each client, and the client updates the cumulative gradient by caching the residual error, thereby updating the model parameters for the next round of training.

[0091] The embodiments of the present application can introduce a full homomorphic encryption protocol supporting multiple users under the federated learning framework, and use the edge-side device fault detection classifier model obtained in S103 as the client local classifier, and can also use the gradient sparsification strategy to reduce the amount of encrypted data, which effectively guarantees data security and privacy, and can improve the dynamic adaptability and real-time response of the algorithm model.

[0092] In step S105, the federated learning detection model is used to train the edge-side device fault detection classifier, and an edge-side device fault detection classification model is constructed to output the cloud-edge-end collaborative fault detection result of the device by using the edge-side device fault detection classification model.

[0093] Specifically, after generating the edge-side device detection classifier and completing the construction of the federated learning detection model, the federated learning detection model can be further used to perform distributed model training on the above-mentioned edge-side device detection classifier to output the trained edge-side device fault detection classification model.

[0094] Training the edge-side device fault detection classifier by using the federated learning detection model can make the fault data of each participating device not need to be uploaded to the server, and then share the model parameters or gradients, thereby avoiding data leakage; and can further improve the generalization ability of the classifier to rare faults, and is especially suitable for the scene of small and medium-sized enterprises with insufficient single-point data, and can improve the model performance through cooperation to solve the data island problem; and can make the model robustness enhanced and the calculation and communication efficiency improved.

[0095] Optionally, in an embodiment of the present application, the channel attention mechanism SE module is constructed to dynamically calibrate the feature channels, including: performing squeezing processing on the features of each channel to compress the spatial dimension of the one-dimensional feature map into a channel description vector; constructing a gating mechanism through two fully connected layers, taking the channel description vector as the input vector of the fully connected layer, and obtaining the importance weight of each channel based on the gating mechanism; multiplying the learned importance weight of each channel with the original feature map to respectively enhance and suppress the key channels and non-key channels, thereby constructing the channel attention mechanism SE module.

[0096] In an embodiment of the present application, the channel attention mechanism SE module is constructed to realize dynamic calibration of the feature channels through three steps of squeezing, excitation and scaling, and the specific steps are described as follows:

[0097] Squeezing: global average pooling (Global Average Pooling) is used to aggregate the global information of the input features, and the features of each channel are compressed into a scalar to obtain the global information of the channel. For the input features

[0098] L is the sequence length and C is the number of channels. The global average pooling calculates the average value of each channel along the sequence length, and the calculation formula is:

[0099]

[0100] The spatial dimension of the one-dimensional feature map is compressed into a channel description vector through squeezing The channel description vector is used as the input of the subsequent operation.

[0101] Excitation: a gating mechanism is constructed through two fully connected layers. The number of neurons of the first fully connected layer is C / r, where r is the dimension reduction ratio, which plays a role in dimension reduction. At the same time, the ReLU activation function is used to introduce nonlinearity and enhance the expression ability of the model. The number of neurons of the second fully connected layer is C, which takes the channel description vector as the input vector of the fully connected layer, and uses the Sigmoid activation function to make each element of the output within the interval [0, 1], and these elements are the importance weights of each channel. The calculation formula of the finally obtained weight vector is:

[0102] s=σ(W2δ(W1z))

[0103] where W1∈ C / r×C and W2∈ C×C / r are learnable parameters, σ represents the ReLU activation function, and δ is the Sigmoid function.

[0104] Scaling: multiplying the learned channel weight s with the original feature map to realize the enhancement of the key channels and the suppression of the non-key channels:

[0105]

[0106] Finally, the SE block is integrated in the one-dimensional convolution layer residual block to form an SE-Res1D Block.

[0107] Through the technical solution, the embodiment of the application can dynamically calibrate the feature channels based on the constructed attention mechanism SE module, can learn the dependency relationship between channels, adaptively enhance useful features and suppress redundant features, and then enhance the key channels and suppress the non-key channels, thereby significantly improving the feature discrimination and model generalization ability, reducing the low computational overhead, and improving the easy integration characteristics.

[0108] Optionally, in an embodiment of the application, the preset federated learning model parameter is subjected to sparse processing, including: setting a compression operator of gradient information; using the compression operator to compress the gradient vector to obtain at least one gradient vector component subjected to sparse processing; when the compression operator is used to compress the gradient vector, an error accumulation memory is introduced to record the gradient residual that is not transmitted.

[0109] As an implementable way, the embodiment of the application can combine the gradient sparse processing method MEM-SGD of the error compensation mechanism to perform sparse processing on the local model gradient.

[0110] Specifically, the embodiment of the application can first set a compression operator 0<k≤d, which satisfies the compression property as follows:

[0111]

[0112] Wherein, d and k are the set compression operators, and E represents the mathematical expectation.

[0113] This property shows that the mean square error between the compressed vector compk(x) and the original vector x is not more than (1-k / d) times of the original vector. Therefore, k has the following property: when k increases close to d, the error decreases and the compression effect weakens; when k decreases, the error increases, but the communication volume is significantly reduced.

[0114] Secondly, the compression operator k can be used to compress the gradient vector g∈ d , and the k components with the largest absolute values are retained, and the rest are set to zero:

[0115]

[0116] Wherein, π is the index arranged in descending order of component absolute value.

[0117] However, simple sparsification can cause loss of gradient information and affect model convergence. Therefore, an error accumulation memory is introduced to record the gradient residual that is not transmitted, and the residual is accumulated in each iteration to ensure the integrity of long-term gradient information.

[0118]

[0119] Through the above sparse processing method, the communication and decryption and encryption calculation order of the gradient of the embodiment of the application is reduced by d / k times, and the error compensation mechanism can ensure that the model convergence rate is consistent with the random gradient descent without using the sparse method.

[0120] Optionally, in an embodiment of the application, the calculation formula of the channel description vector is:

[0121]

[0122] wherein X i,c represents the input channel feature, L is the sequence length, and C is the number of channels.

[0123] The calculation formula of the importance weight of the channel is:

[0124] s = σ (W2δ (W1z) ),

[0125] wherein W1 and W2 are learnable parameters, σ represents the ReLU activation function, δ is the Sigmoid function, and z represents the channel description vector.

[0126] In actual execution, the embodiment of the application can construct the calculation model of the channel description vector and the importance weight of the channel based on the input features, sequence length and other parameters.

[0127] Through the above technical solution, the embodiment of the application can obtain the channel description vector based on the above channel description vector calculation model, and then obtain the importance weight of each channel through the importance weight calculation formula, which provides favorable data support for realizing the enhancement of key channels and the suppression of non-key channels.

[0128] In summary, the embodiment of the application proposes a residual network deep learning model ResNet-SE1D combined with a channel attention mechanism for edge-side device fault detection and classification. The running data of the device is provided by the end-side device, ResNet fuses the input information of each layer in the network with the output of the previous layer through simple addition operation, ensures that the key information is effectively transmitted in the deep network, avoids gradient explosion or gradient disappearance, and simultaneously adds a channel attention mechanism module to adaptively learn the importance of different channel features. Through the model, the classification accuracy can be improved.

[0129] On the basis of fusing ResNet-SE1D, an xMK-CKKS-MEM-SGDFL based on a multi-key federated learning framework is proposed. The model adopts an xMK-CKKS homomorphic encryption scheme, provides privacy protection capability for post-quantum computing, and can prevent collusion attacks to realize secure computing of multi-party data in an encrypted state. At the same time, the MEM-SGD sparse strategy is used to process the model parameters, which greatly reduces the encrypted data volume and communication transmission volume. Compared with traditional encryption methods such as the Paillier homomorphic encryption scheme, the data privacy protection capability and model running efficiency are improved.

[0130] According to the cloud edge-end collaborative fault detection method based on federated learning provided in the embodiments of the present application, the convolution operation in the preset residual network residual block structure can be first processed by dimension reduction, and the channel attention mechanism SE module can be integrated to dynamically calibrate the feature channels, so as to construct an edge-side device fault classifier. The classifier can reduce the calculation amount while adaptively learning the importance of different channel features. Further, based on the preset federated architecture, the homomorphic encryption prevention and the sparse strategy are used to protect privacy and reduce the encryption amount and communication transmission volume, and the response speed is improved. Thus, the problems of poor dynamic adaptability of the algorithm model, the data security and privacy cannot be effectively guaranteed, and the real-time bottleneck in the related art are solved.

[0131] Secondly, refer to the attached Figure 6 The cloud edge-end collaborative fault detection device based on federated learning provided in the embodiments of the present application is described.

[0132] Figure 6 The cloud edge-end collaborative fault detection device based on federated learning provided in the embodiments of the present application is described.

[0133] As Figure 6 shown, the cloud edge-end collaborative fault detection device 10 based on federated learning includes a dimension reduction module 100, a first construction module 200, a second construction module 300, a processing module 400, and a detection module 500.

[0134] The dimension reduction module 100 is configured to perform dimension reduction processing on the convolution operation in the preset residual network residual block structure to obtain a one-dimensional convolution layer residual block.

[0135] The first construction module 200 is configured to construct a channel attention mechanism SE module to dynamically calibrate the feature channels, and integrate the channel attention mechanism SE module in the one-dimensional convolution layer residual block to generate a new residual block structure.

[0136] The second construction module 300 is configured to perform hierarchical stacking on the new residual block structure, and reconstruct the preset residual network dimension to obtain an edge-side device fault detection classifier.

[0137] The processing module 400 is configured to perform sparse processing on preset federated learning model parameters, and perform multi-key homomorphic encryption on the preset federated learning model to obtain a federated learning detection model based on multi-key homomorphic encryption.

[0138] The detection module 500 is configured to train an edge device fault detection classifier by using the federated learning detection model, and construct an edge device fault detection classification model, so as to output a cloud-edge-end collaborative fault detection result of the device by using the edge device fault detection classification model.

[0139] Optionally, in an embodiment of the present application, the first construction module 200 comprises: a squeezing unit, an excitation unit and a scaling unit; the squeezing unit is configured to perform squeezing processing on features of each channel to compress the spatial dimension of a one-dimensional feature map into a channel description vector; the excitation unit is configured to construct a gating mechanism through a two-level fully connected layer, take the channel description vector as an input vector of the fully connected layer, and obtain an importance weight of each channel based on the gating mechanism; and the scaling unit is configured to multiply the learned importance weight of each channel with an original feature map channel by channel to respectively enhance and suppress a key channel and a non-key channel, and construct a channel attention mechanism SE module.

[0140] Optionally, in an embodiment of the present application, the processing module 400 comprises: a setting unit, a compression unit and a recording unit; the setting unit is configured to set a compression operator of gradient information; the compression unit is configured to compress a gradient vector by using the compression operator to obtain at least one gradient vector component after sparse processing; and the recording unit is configured to introduce an error accumulation memory when the gradient vector is compressed by using the compression operator, to record a gradient residual that is not transmitted.

[0141] Optionally, in an embodiment of the present application, a calculation formula of the channel description vector is:

[0142]

[0143] wherein, X i,c represents an input channel feature, L is a sequence length, and C is a channel number;

[0144] A calculation formula of the importance weight of the channel is:

[0145] s = σ (W2δ (W1z) ),

[0146] wherein, W1 and W2 are learnable parameters, σ represents a ReLU activation function, δ is a Sigmoid function, and z represents a channel description vector.

[0147] It should be noted that the foregoing explanation and description of the federated learning-based cloud edge-end collaborative fault detection method embodiment also applies to the federated learning-based cloud edge-end collaborative fault detection device of this embodiment, which will not be described here.

[0148] The federated learning-based cloud edge-end collaborative fault detection device provided by the embodiment of the present application can first perform dimension reduction processing on the convolution operation in the preset residual network residual block structure, integrate a channel attention mechanism SE module to dynamically calibrate the feature channels, thereby constructing an edge-side device fault classifier, so that the classifier can reduce the calculation amount while adaptively learning the importance of different channel features; and further based on the classifier, based on the preset federated architecture, the homomorphic encryption prevention and sparsification strategy are used to protect privacy and reduce the amount of encryption and communication transmission, and improve the response speed. Therefore, the problems of poor dynamic adaptability of algorithm model, data security and privacy cannot be effectively guaranteed, and real-time bottleneck in fault detection in the related art are solved.

[0149] Figure 7 The structure schematic diagram of the electronic device provided by the embodiment of the present application is provided. The electronic device can include:

[0150] The memory 701, the processor 702, and the computer program stored in the memory 701 and executable on the processor 702.

[0151] The processor 702 implements the federated learning-based cloud edge-end collaborative fault detection method provided in the above embodiments when executing the program.

[0152] Further, the electronic device further includes:

[0153] The communication interface 703 is used for communication between the memory 701 and the processor 702.

[0154] The memory 701 is used to store the computer program executable on the processor 702.

[0155] The memory 701 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory.

[0156] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 7 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0157] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can complete communication between each other through an internal interface.

[0158] The processor 702 can be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0159] The embodiments of the present application also provide a computer readable storage medium, having stored thereon a computer program, which is executed by a processor to implement the cloud-edge-end collaborative fault detection method based on federated learning as above.

[0160] The embodiments of the present application also provide a computer program product, having stored thereon a computer program, which is executed by a processor to implement the cloud-edge-end collaborative fault detection method based on federated learning as above.

[0161] In the description of the application, reference to "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that a particular feature, structure, material, or characteristic being described is included in at least one embodiment or example of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment or example. Furthermore, the described specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. In addition, the usage of "N" means at least two, for example, two, three or the like, unless explicitly stated otherwise.

[0162] Furthermore, the terms "first", "second", or the like, are used merely as a designation of certain elements or features, and do not imply or connote relative importance or a specific order of categorization thereof. Accordingly, features described as "first" or "second" can be explicitly or implicitly included in at least one of the features. In the description of the application, the meaning of "N" is at least two, for example, two, three, etc., unless explicitly specified otherwise.

[0163] Any process or method descriptions or blocks in flow charts or otherwise described herein represent embodiments which can be managed as one or more modules, segments, or portions of code which include one or more executable instructions for implementing specific logic functions or steps, and alternate implementations are possible. In some embodiments, the processes and methods described can be executed by one or more apparatuses or devices, either directly or after conversion to another language. Alternatively, the processes and methods described herein can be executed by more than one apparatus or device working in concert.

[0164] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of executable instructions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a product of the manufacturing and / or processing. The computer-readable medium can include, but is not limited to, the following: an electronic connection (an electronic device with one or N wires), a portable computer diskette (a magnetic device), a RAM (random access memory), a ROM (read-only memory), an EPROM (erasable programmable ROM) or a Flash memory, an optical fiber, and a portable CD ROM. In addition, the computer-readable medium can even be paper or other suitable medium upon which the program can be printed, because the program can be electronically captured, via the optically scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in an electronic manner into a computer storage medium, and then stored in the computer storage medium.

[0165] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware and in another embodiment, the hardware can be implemented using any or a combination of the following technologies, which are all well known in the art: a discrete logic circuit having logic gates for implementing logic functions on data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0166] Those of skill in the art would understand that the steps carried out in the above-mentioned embodiments can be implemented by programs instructing relevant hardware to complete all or part of the steps, and the programs can be stored in a computer-readable storage medium. When the programs are executed, the programs include one of the steps of the method embodiments or a combination thereof.

[0167] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each of the units can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0168] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A cloud-edge-end collaborative fault detection method based on federated learning, characterized in that, The method comprises the following steps: dimension reduction processing is performed on convolution operations in a preset residual network residual block structure to obtain a one-dimensional convolution layer residual block; a channel attention mechanism SE module is constructed to dynamically calibrate feature channels, and the channel attention mechanism SE module is integrated in the one-dimensional convolution layer residual block to generate a new residual block structure; the new residual block structure is hierarchically stacked, and the preset residual network dimension is reconstructed to obtain an edge-side device fault detection classifier; preset federated learning model parameters are sparsified, and the preset federated learning model is homomorphically encrypted with multiple keys to obtain a federated learning detection model based on multiple-key homomorphic encryption; the edge-side device fault detection classifier is trained by using the federated learning detection model to construct an edge-side device fault detection classification model, so that the edge-side device fault detection classification model outputs a cloud-edge-end collaborative fault detection result of a device.

2. The method of claim 1, wherein, The channel attention mechanism SE module dynamically calibrates feature channels, which comprises: features of each channel are squeezed to compress the spatial dimension of a one-dimensional feature map into a channel description vector; a two-level fully connected layer is used to construct a gating mechanism, the channel description vector is used as an input vector of the fully connected layer, and the importance weight of each channel is obtained based on the gating mechanism; the learned importance weight of each channel is multiplied with the original feature map channel by channel to enhance and suppress key channels and non-key channels respectively, and the channel attention mechanism SE module is constructed.

3. The method of claim 1, wherein, The preset federated learning model parameters are sparsified, which comprises: a gradient information compression operator is set; the gradient vector is compressed by using the compression operator to obtain at least one gradient vector component after sparsification; when the gradient vector is compressed by using the compression operator, an error accumulation memory is introduced to record the gradient residual that is not transmitted.

4. The method of claim 2, wherein, The calculation formula of the channel description vector is: where X i,c represents the input channel features, L is the sequence length, and C is the number of channels. The calculation formula of the importance weight of each channel is: s=σ(W2δ(W1z)), where W1 and W2 are learnable parameters, σ represents a ReLU activation function, δ is a Sigmoid function, and z represents a channel description vector.

5. A cloud-edge-end collaborative fault detection device based on federated learning, characterized in that, The method comprises the following steps: a dimension reduction module is configured to perform dimension reduction processing on convolution operations in a preset residual network residual block structure to obtain a one-dimensional convolution layer residual block; a first construction module is configured to construct a channel attention mechanism SE module to dynamically calibrate feature channels, and integrate the channel attention mechanism SE module in the one-dimensional convolution layer residual block to generate a new residual block structure; a second construction module is configured to hierarchically stack the new residual block structure, and reconstruct the preset residual network dimension to obtain an edge-side device fault detection classifier; a processing module is configured to sparsify preset federated learning model parameters, and homomorphically encrypt the preset federated learning model with multiple keys to obtain a federated learning detection model based on multiple-key homomorphic encryption; The detection module is configured to train the edge-side device fault detection classifier by using the federated learning detection model, and construct an edge-side device fault detection classification model to output a cloud-edge-end collaborative fault detection result of the device by using the edge-side device fault detection classification model.

6. The apparatus of claim 5, wherein, The first construction module comprises: The extrusion unit is configured to perform extrusion processing on the features of each channel to compress the spatial dimension of the one-dimensional feature map into a channel description vector; The excitation unit is configured to construct a gating mechanism through two fully connected layers, take the channel description vector as an input vector of the fully connected layer, and obtain the importance weight of each channel based on the gating mechanism; The scaling unit is configured to multiply the learned importance weight of the channel with the original feature map channel by channel to enhance and suppress the key channel and the non-key channel respectively, and construct the channel attention mechanism SE module.

7. The apparatus of claim 5, wherein, The processing module comprises: The setting unit is configured to set a compression operator of gradient information; The compression unit is configured to compress the gradient vector by using the compression operator to obtain at least one gradient vector component after sparse processing; The recording unit is configured to introduce an error accumulation memory when the gradient vector is compressed by using the compression operator, to record the gradient residual that is not transmitted.

8. An electronic device, comprising: comprise: A memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the federated learning-based cloud-edge-end collaborative fault detection method according to any one of claims 1-4.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the federated learning-based cloud-edge-end collaborative fault detection method according to any one of claims 1-4.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed to implement the federated learning-based cloud-edge-end collaborative fault detection method according to any one of claims 1-4.