CN116521493B - Fault detection method, device and storage medium - Google Patents

Fault detection method, device and storage medium Download PDF

Info

Publication number
CN116521493B
CN116521493B CN202211543376.8A CN202211543376A CN116521493B CN 116521493 B CN116521493 B CN 116521493B CN 202211543376 A CN202211543376 A CN 202211543376A CN 116521493 B CN116521493 B CN 116521493B
Authority
CN
China
Prior art keywords
local
terminal
sample
sample distribution
global
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211543376.8A
Other languages
Chinese (zh)
Other versions
CN116521493A (en
Inventor
戴夫
徐振炀
吕昊远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211543376.8A priority Critical patent/CN116521493B/en
Publication of CN116521493A publication Critical patent/CN116521493A/en
Application granted granted Critical
Publication of CN116521493B publication Critical patent/CN116521493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
    • Y04S10/52Outage or fault management, e.g. fault detection or location

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Complex Calculations (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a fault detection method, a fault detection device and a storage medium. The method comprises the following steps: obtaining a sample to be detected; acquiring global model parameters from a server, and updating a local model in the terminal based on the global model parameters; performing fault detection on the sample to be detected based on the updated local model; the global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by a terminal. By adopting the method disclosed by the invention, the technical problems of sample independence and identical distribution of each terminal and the technical problem of local interruption data abnormality can be solved, and the sample distribution information of each terminal is not exposed, so that a prediction model conforming to global data characteristics is obtained, and the privacy of a user is protected on the basis of ensuring the prediction precision.

Description

Fault detection method, device and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a fault detection method, a fault detection device and a storage medium.
Background
In the related art, a pre-trained detection model can be adopted to detect and classify faults of the product, and the detection model can be obtained through training according to historical fault data of the product. In an industrial scenario, due to data privacy and security considerations between different enterprises/factories, data in respective terminals cannot freely circulate, and data islands are formed. Meanwhile, the data in each enterprise/factory terminal has mutually complementary characteristics, so that more sample data can be provided for applications such as fault detection classification and the like, and the detection accuracy of a detection model is improved. Thus, a horizontal federal learning model can be employed to solve this problem by "data-immobilized modeling".
The method of horizontal federal learning common direct mean aggregation requires that the data in each terminal is subject to independent and same distribution. However, the data in the terminals of different enterprises/plant equipment are affected by working conditions, production conditions and the like, often are non-independent and distributed in the same way, and the conventional method does not solve the problem well.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a fault detection method, apparatus, and storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a fault detection method, including:
obtaining a sample to be detected;
acquiring global model parameters from a server, and updating a local model in the terminal based on the global model parameters;
performing fault detection on the sample to be detected based on the updated local model;
the global model parameters are determined by the global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by the terminal.
In one embodiment, the local approximate sample distribution sent by the terminal is obtained in the following way:
acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types;
Determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples;
and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
In one embodiment, the global model is trained as follows:
in response to being selected by the server, training a local model in the terminal to obtain local updating parameters;
the local updating parameters are sent to a server, so that the server aggregates the received local updating parameters to obtain a global model;
wherein the probability of the terminal being selected by the server is determined by the local approximate sample distribution and the number of samples.
According to a second aspect of the embodiments of the present disclosure, there is provided a fault detection method, including:
receiving local approximate sample distribution and sample number sent by a terminal, and training to obtain a global model based on the local approximate sample distribution and the sample number;
and sending the global model parameters to the terminal so that the terminal updates the local model in the terminal according to the received global model parameters, and performing fault detection on the sample to be detected according to the updated local model.
In one embodiment, the local approximate sample distribution sent by the terminal is obtained by terminal-to-terminal local sample distribution approximation processing.
In one embodiment, the training to obtain a global model based on the local approximate sample distribution and the sample number includes:
determining a global approximate sample distribution based on the local approximate sample distribution and the number of samples;
determining the similarity between the local approximate sample distribution and the global approximate sample distribution of each terminal, and dividing the terminals into G groups according to the ordering of the similarity, wherein G is a positive integer;
g 'group terminals are selected from G groups based on preset probability, and G' is a positive integer less than or equal to G;
receiving local update model parameters obtained by training local models of all terminals in the G' group of terminals, and aggregating the local update model parameters to obtain the global model parameters;
repeating the steps of selecting the G' group terminal and receiving the local update model parameters until the iteration times reach a preset threshold;
and determining the global model based on global model parameters obtained when the iteration times reach a preset threshold.
In one embodiment, the determining the similarity of the local approximation sample distribution and the global approximation sample distribution for each terminal includes:
And determining the similarity between the local sample distribution of each terminal and the global approximate sample distribution according to the relative entropy operation.
In one embodiment, the preset probability is determined according to a local sample approximation distribution, a global approximation sample distribution, and a temperature coefficient τ, which decreases with increasing number of iterations.
In one embodiment, the aggregating the locally updated model parameters to obtain the global model parameters includes:
the received local update model parameters sent by the same group of terminals are aggregated based on weighted average to obtain the global model parameters;
and aggregating the received local update model parameters sent by the different groups of terminals based on dirichlet allocation to obtain the global model parameters.
According to a third aspect of the embodiments of the present disclosure, there is provided a fault detection device, including:
the acquisition module is configured to acquire a sample to be detected and acquire global model parameters from a server;
an updating module configured to update a local model in the terminal based on the global model parameters;
the detection classification module is configured to perform fault detection on the sample to be detected based on the local model;
The global model parameters are determined by the global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by the terminal.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a fault detection device, including:
the training module is configured to receive local approximate sample distribution and sample number sent by the terminal, and acquire a global model based on the local approximate sample distribution and sample number training;
and the receiving and transmitting module is configured to send the global model parameters to the terminal so that the terminal updates the local model in the terminal according to the received global model parameters and performs fault detection on the sample to be detected according to the updated local model.
According to a fifth aspect of embodiments of the present disclosure, there is provided a fault detection device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the fault detection method as defined in any one of the first and second aspects is performed.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions stored therein, which when executed by a processor of a terminal, enable the terminal to perform the fault detection method according to any one of the first and second aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects: the global model is obtained through the local approximate sample distribution and sample number training sent by the terminal, the local model in the terminal is updated based on the global model, and fault detection is carried out according to the updated local model, so that the technical problem that samples of all terminals are not independent and distributed at the same time can be solved, the sample distribution information of all terminals is not exposed, and user privacy is protected on the basis of ensuring prediction precision.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a fault detection method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of determining a local approximation sample distribution for a terminal, according to an example embodiment.
FIG. 3 is a flowchart illustrating a method of training to obtain a global model based on a local approximation sample distribution and sample numbers sent by a terminal, according to an example embodiment.
FIG. 4 is a flow chart illustrating another method of fault detection according to an exemplary embodiment.
FIG. 5 is a flowchart illustrating a global model training method according to an exemplary embodiment.
FIG. 6 is a flowchart illustrating a method of aggregating locally updated model parameters, according to an example embodiment.
Fig. 7 is a schematic diagram illustrating an application scenario of a fault detection method according to an exemplary embodiment.
Fig. 8 is an interaction diagram illustrating a fault detection method according to an example embodiment.
Fig. 9 is a block diagram illustrating a fault detection device according to an exemplary embodiment.
Fig. 10 is a block diagram of another fault detection device, according to an example embodiment.
Fig. 11 is a block diagram of an apparatus according to an example embodiment.
Fig. 12 is a block diagram of an apparatus according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure.
In the foregoing, terminal data of different enterprise devices are affected by working conditions, production conditions and the like, often are non-independent and distributed at the same time, and cannot meet the condition that each terminal data required in conventional model aggregation is independent and distributed at the same time. Federal learning may include lateral federal learning and longitudinal lateral federal learning. The transverse federal learning means that each terminal has similar data (consistent feature dimension), and model training is performed on each local processing device or terminal device respectively; aggregation of model parameters (e.g., additive aggregation, etc.) is performed by a parameter server; and finally, the terminal downloads the aggregation result to update the model locally, and the steps are repeated until the model converges or a preset stopping condition is reached, so that data immobility (the local area of each terminal is reserved) and model dynamic (the global model is updated iteratively) are realized.
The problems faced by lateral federal learning include: 1. the number of terminals such as local processing equipment or edge equipment of joint training is large, the performance and the data volume of each equipment are quite different, and the time for global updating is quite long and the efficiency is low. 2. The data of different terminals have the problem of non-independent and same distribution, and the server can not obtain the optimal global model parameters by aggregation under the condition that the data distribution of the terminals can not be known. 3. The server aggregates all local models of the terminal in a sample number weighted average mode, and the mode is also unfavorable for solving the problem of independent same distribution. 4. Because the terminal equipment works, the abnormal working conditions can bring low-quality error data, and the quality of a final model can be influenced when the terminal equipment is doped in model training.
In view of this, an embodiment of the present disclosure provides a fault detection method, where a server obtains local approximate sample distribution and sample numbers sent by a terminal, coordinates the terminal to perform global aggregation training by the server, obtains a global model, and issues global model parameters to the terminal to update a local model of the terminal. After training, the terminal can update the local model of each terminal by using the latest global model parameters acquired from the server, and perform fault detection of a new sample based on the local model locally. By adopting the technical scheme of the embodiment of the disclosure, the global model is obtained by training based on training sample data of a plurality of terminals, so that the model has higher accuracy, recall rate, and better indexes such as AUC (Area Under the working characteristic Curve (Receiver Operationg Characteristic Curve, ROC) and the like, and Under the condition of protecting the data privacy of each terminal, the technical problems of sample dependent identical distribution and sample low-quality data of the terminals are solved, and the aim of multi-terminal collaborative training prediction is fulfilled.
Fig. 1 is a flowchart illustrating a fault detection method applied to a terminal according to an exemplary embodiment, and the method includes the following steps as shown in fig. 1.
In step S11, a sample to be detected is acquired.
In step S12, global model parameters are acquired from the server, and the local model in the terminal is updated based on the global model parameters.
In step S13, fault detection is performed on the sample to be detected based on the updated local model.
The global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by the terminal.
In the embodiment of the disclosure, the fault detection method can be applied to product fault detection classification, such as predictive maintenance of PCB (printed Circuit Board) separating equipment, and can also be used for detecting and classifying faults of other industrial scenes, and is not limited herein. For convenience of explanation and description, the detection of product failure will be described below as an example.
In the embodiment of the disclosure, the fault detection method is applied to a terminal, and the terminal can be personal user equipment such as a personal computer, a mobile phone, a palm computer (Personal Digital Assistant, PDA), vehicle-mounted equipment and the like, or can be various edge equipment. There may be multiple terminals, one for each product set or sets.
In the embodiment of the disclosure, acquiring a sample to be detected refers to acquiring data corresponding to a product in a product set. And taking the product as a motor of the PCB dividing machine, and if the fault is the operation fault of the motor, the sample to be detected can be a vibration signal of the product, namely the motor of the PCB dividing machine. Each terminal obtains a sample to be detected of the terminal so as to detect the products in the product set corresponding to the terminal.
In the embodiment of the disclosure, the global model may be a lateral federal learning global model, which is typically deployed in a server, and accordingly, the local model may be a lateral federal learning local model, which is typically deployed in a terminal or an edge device. In one example, the global model and the local model may be decision tree models, logistic regression models, or other machine learning classification models.
In the embodiment of the disclosure, each terminal also needs to acquire global model parameters from the server, update the local model in the terminal based on the global model parameters, and further perform fault detection on the sample to be detected based on the local model. Before the terminal deployed with the local model detects the local model of the terminal, the global model parameters are required to be downloaded from the server, the local model parameters of the terminal are updated based on the global model parameters, and then the fault detection is carried out on the sample to be detected according to the updated local model, so that the local model of the terminal has better detection precision.
In the embodiment of the disclosure, the global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by a terminal. In an example, the terminal may send the local approximate sample distribution and the number of samples of the terminal to the server, and the server determines the global approximate sample distribution according to the received local approximate sample distribution and the number of samples sent by each terminal, and further selects an appropriate terminal to perform iterative training according to the local approximate sample distribution and the global approximate sample distribution of each terminal until the number of model iterations reaches a preset threshold, where the preset threshold may be set according to actual needs, and the method is not limited herein.
By adopting the technical scheme of the embodiment of the disclosure, the global model is obtained through the local approximate sample distribution and sample number training sent by the terminal, the local model in the terminal is updated based on the global model, and the fault detection is carried out on the new sample on the terminal according to the updated local model, so that the technical problem of the sample non-independent identical distribution of each terminal can be solved, the abnormal low-quality data can be overcome, and the sample distribution information of each terminal is not exposed, thereby protecting the privacy of a user on the basis of ensuring the prediction precision.
Fig. 2 is a flow chart illustrating a method of determining a local approximate sample distribution of a terminal, according to an exemplary embodiment, the method including the following steps, as shown in fig. 2.
In step S21, an initialized global model parameter is obtained from the server, and a label of each sample in the samples to be detected of the terminal is determined according to the initialized global model parameter.
Wherein the tag comprises one or more tag types.
In step S22, the local sample distribution of the terminal is determined based on the labels of the samples.
Wherein the local sample distribution characterizes a distribution of the number of samples corresponding to each type of tag over the total number of samples.
In step S23, an approximation process is performed for each type of label, and the local sample distribution corresponding to each label is approximated to a local approximation sample distribution.
In the embodiment of the disclosure, the terminal first needs to acquire an initialized global model parameter from the server, so as to determine the label of each sample in the samples to be detected of the terminal according to the initialized 5 global model parameter. Still with the above-mentioned PCB dividing machine
The motor failure is exemplified by motor failure, and it is assumed that 100 vibration signal samples to be detected are concentrated in the product corresponding to the terminal a, that is, 100 signals to be predicted are concentrated in the product corresponding to the terminal a. The terminal A acquires the initialized global model parameters from the server, updates the local model parameters of the terminal A based on the initialized global model to obtain an updated local model, and is beneficial to
And performing fault detection on the 100 vibration signals by using the updated local model, and determining a sample 0 label of the vibration signals so as to determine the working state of the split plate motor. Wherein the historical samples accumulated by each PCB board separator are different.
In one example, the PCB board sample label for factory A may be { a, c, d }, the PCB board sample label for factory B may be { B, c }, and so on. Wherein a, b, c, d each represent a different tag type, which characterizes a different fault.
And counting the labels of the PCB separator samples of each factory to obtain the local sample distribution of the terminal. Assuming that the vibration signal sample of the factory 5 a is counted up, the obtained result is that 17 signals correspond to the first kind of faults, namely the label a,
The 58 vibration signals correspond to the second type of faults, namely the label b, the 29 vibration signals correspond to the third type of faults, namely the label c, the 33 vibration signals correspond to the fourth type of faults, namely the label d, and the local sample distribution of the terminal can be obtained according to the labels of all the samples, as shown in table 1.
TABLE 1
Label type Label a Label b Label c Label d
Sample distribution 17% 58% 29% 33%
At this time, if the local sample distribution and the sample number are directly sent to the server, so that the server determines the global sample distribution according to the local sample distribution, and selects an appropriate terminal training model according to the similarity between the local sample distribution and the global sample distribution of each terminal, the server can still obtain the sample number corresponding to each tag in the terminal according to the received local sample distribution and sample number of the terminal, thereby obtaining privacy data such as certain types of fault distribution which may not be revealed by the terminal user.
To solve this technical problem, the present disclosure implements approximation processing of the local sample distribution described above. In one example, the approximation process may be a binning process. The labels of each type in the terminal can be binned, and local sample distribution corresponding to each label is approximately processed into the binned local approximate sample distribution. In one example, 10 bins [0,0.1], [0.1,0.2], [0.2,0.3], [0.3,0.4], [0.4,0.5], [0.5,0.6], [0.6,0.7], [0.7,0.8], [0.8,0.9], [0.9,1] can be initialized for each class label, and the sample distribution corresponding to the labels a-d in the above table 1 can be represented by bins [0.1,0.2], [0.5,0.6], [0.2,0.3] and [0.3,0.4], respectively. The sub-boxes [0.1,0.2], [0.5,0.6], [0.2,0.3] and [0.3,0.4] are respectively used as local approximate sample distribution of the labels a-d, and are sent to the server instead of accurate local sample distribution in the table 1, so that the situation that the server knows terminal sample distribution according to sample distribution and sample number can be avoided, and the technical problem of user privacy guarantee is solved.
FIG. 3 is a flowchart illustrating a method of training to obtain a global model based on a local approximate sample distribution and sample numbers sent by a terminal, according to an exemplary embodiment, the method including the following steps, as shown in FIG. 3.
In step S31, the local model in the terminal is trained in response to being selected by the server, and local update parameters are obtained.
In step S32, the local update parameters are sent to the server, so that the server aggregates the received local update parameters to obtain the global model.
Wherein the probability of the terminal being selected by the server is determined by the local approximate sample distribution and the number of samples.
In the embodiment of the disclosure, after receiving the local approximate sample distribution and the sample number sent by the terminal, the server may first calculate to obtain global approximate sample distribution, then select an appropriate terminal for iterative training based on the similarity between the global approximate sample distribution and the local approximate sample distribution of each terminal, and receive the local update parameters obtained by each round of training of the terminal until the model converges or the iteration number reaches a preset threshold, and at this time, aggregate each local model to obtain the global model. The specific model training method is referred to the following description of the server-side embodiment, and will not be repeated here.
Fig. 4 is a flowchart illustrating another fault detection method applied to a server, as shown in fig. 4, according to an exemplary embodiment, the method including the following steps.
In step S41, the local approximate sample distribution and the number of samples transmitted by the receiving terminal are trained to obtain a global model based on the local approximate sample distribution and the number of samples.
In step S42, global model parameters are sent to the terminal, so that the terminal updates the local model in the terminal according to the received global model parameters, and performs fault detection on the sample to be detected according to the updated local model.
In the embodiment of the disclosure, a server receives local approximate sample distribution and sample numbers sent by a terminal, and trains to obtain a global model, wherein the local approximate sample distribution sent by the terminal is obtained by terminal to local sample distribution approximate processing in the terminal. After the global model training is completed, the server sends global model parameters to the terminal, so that the terminal updates the local model in the terminal according to the received global model parameters, and fault detection is carried out on the sample to be detected according to the updated local model. The complete detection process is similar to the fault detection method applied to the terminal, and is not repeated here.
FIG. 5 is a flowchart illustrating a global model training method, as shown in FIG. 5, according to an exemplary embodiment, including the following steps.
In step S51, a global approximate sample distribution is determined based on the local approximate sample distribution and the number of samples transmitted by the terminal.
In step S52, the similarity between the local and global approximate sample distributions of each terminal is determined, and the terminals are classified into G groups according to the order of the similarity.
Wherein G is a positive integer.
In step S53, a G' group terminal is selected from the G groups based on the preset probability.
Wherein G' is a positive integer less than or equal to G.
In step S54, local update model parameters obtained by training the local model in the G' group terminal are received, and the local update model parameters are aggregated to obtain global model parameters.
In step S55, the steps of selecting the G' group terminal and receiving the locally updated model parameters are repeated until the iteration number reaches a preset threshold.
In step S56, the global model is determined based on the global model parameters obtained when the number of iterations reaches a preset threshold.
In the embodiment of the disclosure, after obtaining the local approximate sample distribution and the sample number sent by each terminal, the server may determine the global approximate sample distribution. In an example, the server may first receive all tag types and sample numbers of the own terminal sent by the terminal before receiving the local approximate sample distribution, and construct a y×n two-dimensional matrix M according to all tag types and total sample numbers of the received terminals label Wherein Y is the label type, and N is the number of terminals. The server being based on matrix M label And the number of samples received from each terminal can be calculated and summarized to obtain global approximate sample distribution.
After the global approximation sample distribution is obtained, the similarity between the local approximation sample distribution and the global approximation sample distribution of each terminal can be calculated. In one example, the similarity may be calculated by a relative entropy operation. The similarity calculation formula may be as follows:
similarity=D KL (V global ,V local )+D KL (V local ,V global )
wherein similarity is the similarity, D KL For relative entropy operation, V global For local approximation of sample distribution of terminal, V global Is a globally approximate sample distribution for the server.
Further, the calculation formula of the relative entropy operation may be as follows:
wherein D is KL (V global ,V local ) Distribution V for globally approximated samples global With local approximation of sample distribution V global Relative entropy between D KL (V local ,V global ) For local approximation sample distribution Vglobal and global approximation sample distribution V global The relative entropy between the terminals, x is a selected terminal used for calculating the similarity between the local approximate sample distribution and the global approximate sample distribution, and χ is a set formed by all terminals. In this way, the similarity of the local approximation sample distribution and the global approximation sample distribution in each terminal can be determined.
After the similarity is determined, the terminals may be divided into G groups according to the ordering of the similarity, where G is a positive integer. In one example, terminals may be grouped into G groups according to a big-to-small ordering of similarities, and in another example, terminals may be grouped into G groups according to a small-to-big ordering of similarities. And the server selects G 'group terminals from the G groups based on the preset probability, wherein G' is a positive integer less than or equal to G. The preset probability can be determined according to local sample approximate distribution, global approximate sample distribution and a temperature coefficient tau, wherein the temperature coefficient tau decreases along with the increase of iteration times, and the larger tau is, the closer probability that each terminal group is selected to participate in model training is.
The calculation formula of the preset probability can be shown as follows:
wherein prob is a preset probability, N is the number of terminals in the selected G' group terminal, N is a positive integer, N is less than or equal to x, and τ is a temperature coefficient. Further, the temperature coefficient τ is a global parameter received from the server, and τ can be a larger value at the initial stage of iteration, so that each terminal group has probability of being selected to participate in the model iteration, and gradually decreases along with the progress of iteration, so that the probability of the terminal group, which is inconsistent with the global approximate distribution, being selected to participate in the model iteration gradually decreases, and the purpose of preventing the terminal group containing abnormal data from frequently participating in the global model iteration and affecting the result of the global model is achieved.
By adopting the technical scheme of the embodiment of the disclosure, the terminals are grouped and then model training is carried out, the approximate sample distribution of each terminal in each group has higher similarity, the probability of the group with high similarity participating in training is continuously improved, the probability of the group with low similarity participating in training is reduced, the samples of each terminal participating in training can maximally meet independent same distribution, and the accuracy of the model obtained by training is improved.
FIG. 6 is a flowchart illustrating a method of aggregating locally updated model parameters, as shown in FIG. 6, including the following steps, according to an exemplary embodiment.
In step S61, the received locally updated model parameters sent by the same group of terminals are aggregated based on weighted average, so as to obtain global model parameters.
In step S62, the received locally updated model parameters sent by the different groups of terminals are aggregated based on dirichlet allocation, so as to obtain global model parameters.
In the embodiment of the disclosure, a server trains a G' group of terminals each time, receives local update model parameters obtained by training respective local models of the terminals, and aggregates the local update model parameters to obtain global model parameters of each round of iteration. When the related technology is used for polymerizing the locally updated model parameters, the method is usually realized by adopting a direct averaging mode, and at the moment, the influence of a small amount of abnormal low-quality data can cause the effect of a final polymerized model; in addition, in order to ensure that the aggregated global model has better overall generalization performance, the model needs to be processed according to the similarity of local sample distribution and global sample distribution during iteration.
In order to solve the technical problem, when the local update model parameters are aggregated, the local update model parameters of G' terminals in the same group can be directly aggregated in a weighted average mode in consideration of high similarity of sample distribution in the group so as to reduce the calculation complexity; meanwhile, as the similarity of sample distribution among groups is low, the weight during local update model aggregation of the rest G-G' terminals among groups can be sampled based on dirichlet distribution. It can be understood that the remaining G-G' terminals between the groups are not involved in the model training in this iteration, so that the local update model parameters thereof are the local update model parameters obtained by the terminals participating in the model training last time.
In the embodiment of the disclosure, aggregation is performed based on dirichlet allocation to obtain the global model parameter, which may be implemented in the following manner:
according to the formulaCalculating global model parameters, wherein omega is the global model parameters and gamma is calculated i Weight of local update model parameters of ith terminal group obtained according to dirichlet distribution, D i And i is the number of samples of each terminal group and is each terminal in the G-G' group. Further, the method comprises the steps of,
Wherein ρ (γ) represents dirichlet distribution, α is a dirichlet distribution parameter, α >0,S =g-G', γ - ρ (γ) represents the weight of each γ in ρ (γ), B (α) is a multivariate beta (beta) function for normalization, and pi is a product operation.
According to the technical scheme of the embodiment of the disclosure, the model parameters of local update of each terminal in the group participating in the group training and each terminal among groups not participating in the group training in each iteration are respectively aggregated in different modes, so that adverse effects of terminals with large sample distribution differences on model precision can be reduced, and model training precision is improved.
Fig. 7 is a schematic view of an application scenario of a fault detection method according to an exemplary embodiment, where, as shown in fig. 7, in the fault detection method provided by the embodiment of the present disclosure, in an initialization stage, a server performs model parameter initialization and issues a terminal, and obtains a sample approximate distribution of a client by using approximate processing operations such as category binning and the like; in the training process, the interrupt grouping is dynamically adjusted by using the approximate sample distribution, and the selected terminal is used for training; and after each round of training is received, the model parameters are aggregated by using weighted average and dirichlet allocation until the model converges or the iteration number reaches a preset threshold.
FIG. 8 is an interaction diagram of a fault detection method according to an exemplary embodiment, as shown in FIG. 8, each server (i.e., server) may interact with multiple clients (i.e., terminals), the server first initializing and issuing global model parameters to the clients; the client determines the local sample label type number according to the received global model parameters, and sends the sample label type number and the sample number of the client to the server, wherein the sent sample number is the total sample number in each client; meanwhile, each client compares the proportion of each type of sample to fall into a box dividing number, and the obtained box dividing number is sent to the server; the server side normalizes the obtained sample approximate proportion of each client side, and divides the clients into G groups according to the approximation degree of sample distribution, namely normalized global approximate sample distribution and local approximate sample distribution of each client side; then, the server selects G' client groups to participate in iteration according to the sample distribution similarity and the threshold value; model iteration and weight updating are carried out in the selected G' client groups, and updating results are sent to the server; the server performs gradient descent iteration on the received client updating results in the group, obtains grouping model parameters in the group according to the sample size weighted average value, and fits the received client updating results among the groups according to Dirichlet distribution to model parameters of different groups to obtain updated global model parameters; after the iteration times reach a preset threshold, the server side transmits the obtained global model parameters to each client side so that each client side updates own local model parameters, an updated local model is obtained, and fault type prediction is performed on a new sample signal based on the updated local model.
Based on the same conception, the embodiment of the disclosure also provides a fault detection device.
It will be appreciated that, in order to implement the above-described functions, the fault detection apparatus provided in the embodiments of the present disclosure includes corresponding hardware structures and/or software modules that perform the respective functions. The disclosed embodiments may be implemented in hardware or a combination of hardware and computer software, in combination with the various example elements and algorithm steps disclosed in the embodiments of the disclosure. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present disclosure.
Fig. 9 is a block diagram illustrating a fault detection device according to an exemplary embodiment. Referring to fig. 9, the apparatus 900 includes an acquisition module 901, an update module 902, and a detection module 903.
The acquisition module 901 is configured to acquire samples to be detected and global model parameters from a server. .
The updating module 902 is configured to update the local model in the terminal based on the global model parameters.
The detection module 903 is configured to perform fault detection on the sample to be detected based on the local model.
The global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by a terminal.
In the embodiment of the disclosure, the local approximate sample distribution sent by the terminal is obtained by adopting the following way: acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types; determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples; and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
In the embodiment of the disclosure, the global model is obtained by training in the following manner: in response to being selected by the server, training a local model in the terminal to obtain local updating parameters; the local updating parameters are sent to a server, so that the server aggregates the received local updating parameters to obtain a global model; wherein the probability of the terminal being selected by the server is determined by the local approximate sample distribution and the number of samples.
By adopting the technical scheme of the embodiment of the disclosure, the global model is obtained through the local approximate sample distribution and sample number training sent by the terminal, the local model in the terminal is updated based on the global model, and the fault detection is carried out on the new sample on the terminal according to the updated local model, so that the technical problem of the sample non-independent identical distribution of each terminal can be solved, the abnormal low-quality data can be overcome, and the sample distribution information of each terminal is not exposed, thereby protecting the privacy of a user on the basis of ensuring the prediction precision.
Fig. 10 is a block diagram of another fault detection device, according to an example embodiment. Referring to fig. 10, the apparatus 1000 includes a training module 1001 and a transceiving module 1002.
The training module 1001 is configured to receive the local approximate sample distribution and the number of samples transmitted by the terminal, and train to obtain a global model based on the local approximate sample distribution and the number of samples.
The transceiver module 1002 is configured to send global model parameters to the terminal, so that the terminal updates a local model in the terminal according to the received global model parameters, and performs fault detection on a sample to be detected according to the updated local model.
In the embodiment of the disclosure, the local approximate sample distribution sent by the terminal is obtained by terminal-to-terminal local sample distribution approximate processing.
In an embodiment of the present disclosure, the training to obtain a global model based on the local approximate sample distribution and the sample number includes: determining a global approximate sample distribution based on the local approximate sample distribution and the number of samples; determining the similarity between the local approximate sample distribution and the global approximate sample distribution of each terminal, and dividing the terminals into G groups according to the ordering of the similarity, wherein G is a positive integer; g 'group terminals are selected from G groups based on preset probability, and G' is a positive integer less than or equal to G; receiving local update model parameters obtained by training local models of all terminals in the G' group of terminals, and aggregating the local update model parameters to obtain the global model parameters; repeating the steps of selecting the G' group terminal and receiving the local update model parameters until the iteration times reach a preset threshold; and determining the global model based on global model parameters obtained when the iteration times reach a preset threshold.
In an embodiment of the present disclosure, the determining the similarity between the local approximate sample distribution and the global approximate sample distribution of each terminal includes: and determining the similarity between the local sample distribution of each terminal and the global approximate sample distribution according to the relative entropy operation.
In the embodiment of the disclosure, the preset probability is determined according to a local sample approximation distribution, a global approximation sample distribution, and a temperature coefficient τ, where τ decreases with an increase in the number of iterations.
In an embodiment of the present disclosure, the aggregating the locally updated model parameters to obtain the global model parameters includes: the received local update model parameters sent by the same group of terminals are aggregated based on weighted average to obtain the global model parameters; and aggregating the received local update model parameters sent by the different groups of terminals based on dirichlet allocation to obtain the global model parameters.
By adopting the technical scheme of the embodiment of the disclosure, the global model is obtained through the local approximate sample distribution and sample number training sent by the terminal, the local model in the terminal is updated based on the global model, and the fault detection is carried out on the new sample on the terminal according to the updated local model, so that the technical problem of the sample non-independent identical distribution of each terminal can be solved, the abnormal low-quality data can be overcome, and the sample distribution information of each terminal is not exposed, thereby protecting the privacy of a user on the basis of ensuring the prediction precision.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 11 is a block diagram illustrating an apparatus 1100 for fault detection according to an example embodiment. For example, apparatus 1100 may be a personal computer, cell phone, PDA, edge device, or the like.
Referring to fig. 11, apparatus 1100 may include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input/output (I/O) interface 1112, a sensor component 1114, and a communication component 1116.
The processing component 1102 generally controls overall operation of the apparatus 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1102 can include one or more modules that facilitate interactions between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
Memory 1104 is configured to store various types of data to support operations at apparatus 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1104 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 1106 provides power to the various components of the device 1100. The power components 1106 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 1100.
Multimedia component 1108 includes a screen between the device 1100 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, multimedia component 1108 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1100 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 1110 is configured to output and/or input an audio signal. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the device 1100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 further comprises a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 1114 includes one or more sensors for providing status assessment of various aspects of the apparatus 1100. For example, the sensor assembly 1114 may detect the on/off state of the device 1100, the relative positioning of the components, such as the display and keypad of the device 1100, the sensor assembly 1114 may also detect a change in position of the device 1100 or a component of the device 1100, the presence or absence of user contact with the device 1100, the orientation or acceleration/deceleration of the device 1100, and a change in temperature of the device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate communication between the apparatus 1100 and other devices in a wired or wireless manner. The device 1100 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 1116 further includes a Near Field Communication (NFC) module to facilitate short range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 1104 including instructions executable by the processor 1120 of the apparatus 1100 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 12 is a block diagram illustrating an apparatus 1200 for fault detection according to an example embodiment. For example, apparatus 1200 may be provided as a server. Referring to fig. 12, apparatus 1200 includes a processing component 1222 that further includes one or more processors, and memory resources represented by memory 1232 for storing instructions, such as applications, executable by processing component 1222. The application programs stored in memory 1232 may include one or more modules each corresponding to a set of instructions. Further, the processing component 1222 is configured to execute instructions to perform the above-described methods.
The apparatus 1200 may also include a power component 1226 configured to perform power management of the apparatus 1200, a wired or wireless network interface 1250 configured to connect the apparatus 1200 to a network, and an input output (I/O) interface 1258. The apparatus 1200 may operate based on an operating system stored in the memory 1232, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
It is understood that the term "plurality" in this disclosure means two or more, and other adjectives are similar thereto. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It is further understood that the terms "first," "second," and the like are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the expressions "first", "second", etc. may be used entirely interchangeably. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that "connected" includes both direct connection where no other member is present and indirect connection where other element is present, unless specifically stated otherwise.
It will be further understood that although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims (11)

1. A fault detection method applied to a terminal, comprising:
obtaining a sample to be detected, wherein the sample to be detected is data corresponding to a product in a product set, and the terminal corresponds to one or more sample sets;
acquiring global model parameters from a server, and updating a local model in the terminal based on the global model parameters;
performing fault detection on the sample to be detected based on the updated local model;
the global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by a terminal;
the local approximate sample distribution sent by the terminal is obtained by adopting the following modes:
acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types, and different label types represent different faults;
Determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples;
and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
2. The method of claim 1, wherein the global model is trained by:
in response to being selected by the server, training a local model in the terminal to obtain local updating parameters;
the local updating parameters are sent to a server, so that the server aggregates the received local updating parameters to obtain a global model;
wherein the probability of the terminal being selected by the server is determined by the local approximate sample distribution and the number of samples.
3. A fault detection method applied to a server, comprising:
receiving local approximate sample distribution and sample number sent by a terminal, and training to obtain a global model based on the local approximate sample distribution and the sample number;
transmitting global model parameters to a terminal so that the terminal updates a local model in the terminal according to the received global model parameters, and performs fault detection on a sample to be detected according to the updated local model, wherein the sample to be detected is data corresponding to a product in a product set, and the terminal corresponds to one or more sample sets;
The local approximate sample distribution sent by the terminal is obtained by terminal to local sample distribution approximate processing in the terminal;
the local approximate sample distribution sent by the terminal is obtained by the terminal in the following way:
acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types, and different label types represent different faults;
determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples;
and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
4. A method according to claim 3, wherein said training to obtain a global model based on said local approximate sample distribution and sample number comprises:
determining a global approximate sample distribution based on the local approximate sample distribution and the number of samples;
determining the similarity between the local approximate sample distribution and the global approximate sample distribution of each terminal, and dividing the terminals into G groups according to the ordering of the similarity, wherein G is a positive integer;
G 'group terminals are selected from G groups based on preset probability, and G' is a positive integer less than or equal to G;
receiving local update model parameters obtained by training local models of all terminals in the G' group of terminals, and aggregating the local update model parameters to obtain the global model parameters;
repeating the steps of selecting the G' group terminal and receiving the local update model parameters until the iteration times reach a preset threshold;
and determining the global model based on global model parameters obtained when the iteration times reach a preset threshold.
5. The method of claim 4, wherein said determining the similarity of the local approximate sample distribution for each terminal to the global approximate sample distribution comprises:
and determining the similarity between the local sample distribution of each terminal and the global approximate sample distribution according to the relative entropy operation.
6. The method of claim 4, wherein the predetermined probability is determined based on a local sample approximation distribution, a global approximation sample distribution, and a temperature coefficient τ, the temperature coefficient τ decreasing with increasing iteration number.
7. The method of claim 4, wherein aggregating the locally updated model parameters to obtain the global model parameters comprises:
The received local update model parameters sent by the same group of terminals are aggregated based on weighted average to obtain the global model parameters;
and aggregating the received local update model parameters sent by the different groups of terminals based on dirichlet allocation to obtain the global model parameters.
8. A fault detection device, located at a terminal, comprising:
the acquisition module is configured to acquire a sample to be detected, global model parameters are acquired from a server, the sample to be detected is data corresponding to a product in a product set, and the terminal corresponds to one or more sample sets;
an updating module configured to update a local model in the terminal based on the global model parameters;
the detection classification module is configured to perform fault detection on the sample to be detected based on the local model;
the global model parameters are determined by a global model, and the global model is obtained by training based on local approximate sample distribution and sample numbers sent by a terminal;
the local approximate sample distribution sent by the terminal is obtained by an acquisition module in the following way:
acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types, and different label types represent different faults;
Determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples;
and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
9. A fault detection device, located at a server, comprising:
the training module is configured to receive local approximate sample distribution and sample number sent by the terminal, and acquire a global model based on the local approximate sample distribution and sample number training;
the receiving and transmitting module is configured to send global model parameters to the terminal so that the terminal updates a local model in the terminal according to the received global model parameters, and performs fault detection on a sample to be detected according to the updated local model, wherein the sample to be detected is data corresponding to a product in a product set, and the terminal corresponds to one or more sample sets;
the local approximate sample distribution sent by the terminal is obtained by terminal to local sample distribution approximate processing in the terminal;
the local approximate sample distribution sent by the terminal is obtained by the terminal in the following way:
Acquiring an initialized global model parameter from a server, and determining labels of all samples in samples to be detected of a terminal according to the initialized global model parameter, wherein the labels comprise one or more label types, and different label types represent different faults;
determining local sample distribution of the terminal based on the labels of the samples, wherein the local sample distribution represents the proportion of the number of samples corresponding to each type of label to the total number of samples;
and performing approximation processing on each type of label, and approximating local sample distribution corresponding to each label into local approximation sample distribution.
10. A fault detection device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the fault detection method according to any one of claims 1-2 or the fault detection method according to any one of claims 3-7.
11. A storage medium having instructions stored therein which, when executed by a processor of a terminal, enable the terminal to perform the fault detection method of any one of claims 1 to 2 or the fault detection method of any one of claims 3 to 7.
CN202211543376.8A 2022-12-02 2022-12-02 Fault detection method, device and storage medium Active CN116521493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211543376.8A CN116521493B (en) 2022-12-02 2022-12-02 Fault detection method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211543376.8A CN116521493B (en) 2022-12-02 2022-12-02 Fault detection method, device and storage medium

Publications (2)

Publication Number Publication Date
CN116521493A CN116521493A (en) 2023-08-01
CN116521493B true CN116521493B (en) 2024-02-13

Family

ID=87396459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211543376.8A Active CN116521493B (en) 2022-12-02 2022-12-02 Fault detection method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116521493B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117877006A (en) * 2024-01-11 2024-04-12 重庆大学 Instrument and meter data anomaly detection method based on data hybrid autonomous sharing

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898765A (en) * 2020-07-29 2020-11-06 深圳前海微众银行股份有限公司 Feature binning method, device, equipment and readable storage medium
CN114429152A (en) * 2021-12-31 2022-05-03 苏州大学 Rolling bearing fault diagnosis method based on dynamic index antagonism self-adaption
CN114710330A (en) * 2022-03-22 2022-07-05 华东师范大学 Anomaly detection method based on heterogeneous hierarchical federated learning
CN114841371A (en) * 2022-04-28 2022-08-02 北京百度网讯科技有限公司 Characteristic-based box separation processing method, device, equipment and medium
CN114970886A (en) * 2022-07-18 2022-08-30 清华大学 Clustering-based adaptive robust collaborative learning method and device
CN115144747A (en) * 2022-07-01 2022-10-04 中南大学 Multi-working-condition motor fault diagnosis method and system based on anti-migration learning
CN115409099A (en) * 2022-08-23 2022-11-29 哈尔滨工业大学 Internet of things flow anomaly detection model establishing method and detection method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898765A (en) * 2020-07-29 2020-11-06 深圳前海微众银行股份有限公司 Feature binning method, device, equipment and readable storage medium
CN114429152A (en) * 2021-12-31 2022-05-03 苏州大学 Rolling bearing fault diagnosis method based on dynamic index antagonism self-adaption
CN114710330A (en) * 2022-03-22 2022-07-05 华东师范大学 Anomaly detection method based on heterogeneous hierarchical federated learning
CN114841371A (en) * 2022-04-28 2022-08-02 北京百度网讯科技有限公司 Characteristic-based box separation processing method, device, equipment and medium
CN115144747A (en) * 2022-07-01 2022-10-04 中南大学 Multi-working-condition motor fault diagnosis method and system based on anti-migration learning
CN114970886A (en) * 2022-07-18 2022-08-30 清华大学 Clustering-based adaptive robust collaborative learning method and device
CN115409099A (en) * 2022-08-23 2022-11-29 哈尔滨工业大学 Internet of things flow anomaly detection model establishing method and detection method

Also Published As

Publication number Publication date
CN116521493A (en) 2023-08-01

Similar Documents

Publication Publication Date Title
US20210326708A1 (en) Neural network training method and apparatus, and image processing method and apparatus
CN111460150B (en) Classification model training method, classification method, device and storage medium
US20210012143A1 (en) Key Point Detection Method and Apparatus, and Storage Medium
CN111368934A (en) Image recognition model training method, image recognition method and related device
CN108010060B (en) Target detection method and device
US11455491B2 (en) Method and device for training image recognition model, and storage medium
CN110443366B (en) Neural network optimization method and device, and target detection method and device
CN111259967B (en) Image classification and neural network training method, device, equipment and storage medium
CN109635920B (en) Neural network optimization method and device, electronic device and storage medium
US20210342632A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN113065591B (en) Target detection method and device, electronic equipment and storage medium
CN116521493B (en) Fault detection method, device and storage medium
CN112926310B (en) Keyword extraction method and device
US20210326649A1 (en) Configuration method and apparatus for detector, storage medium
CN113052870A (en) Target tracking method, target detection method and device
US20170316081A1 (en) Data stream analytics
CN111382064B (en) Test method, test device, test medium and electronic equipment
CN113779257A (en) Method, device, equipment, medium and product for analyzing text classification model
CN110738267B (en) Image classification method, device, electronic equipment and storage medium
CN111859097B (en) Data processing method, device, electronic equipment and storage medium
CN112259122A (en) Audio type identification method and device and storage medium
CN111913850A (en) Data anomaly detection method, device, equipment and storage medium
CN109460458B (en) Prediction method and device for query rewriting intention
CN111047049A (en) Method, apparatus and medium for processing multimedia data based on machine learning model
CN111797746A (en) Face recognition method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant