Fault diagnosis method and device based on simulated annealing dynamic polynomial network

Through the fault diagnosis method based on simulated annealing dynamic polynomial network, the traditional multidimensional Taylor network has solved the problem of long calculation time and complex hyperparameter determination in high nonlinear problems, achieving faster calculation time and wider application range, and achieving optimal results in different scenarios.

CN119598310APending Publication Date: 2025-03-11NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411457747.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

When traditional multidimensional Taylor networks face high nonlinear problems, the model becomes very complex, the calculation time is too long, and the hyperparameter determination process is complicated and lacks systematicity, making it difficult to ensure that the optimal effect can be obtained in different data sets and application scenarios.

Method used

The fault diagnosis method based on simulated annealing dynamic polynomial network is adopted. By obtaining the state data set, a network structure including mononomial and order selection layer, polynomial layer, full connection layer, Softmax layer and output layer is constructed. The simulated annealing algorithm, BP algorithm and Adam algorithm are used for iterative training to obtain a simulated annealing dynamic polynomial network with the state data set as the input and the fault diagnosis data set as the output.

Benefits of technology

It reduces calculation time, expands the scope of application, can achieve the most effective results in different scenarios, and can predict, troubleshoot, and avoid safety hazards for a variety of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598310A_ABST
    Figure CN119598310A_ABST
Patent Text Reader

Abstract

The invention relates to a fault diagnosis method and device based on a simulated annealing dynamic polynomial network, computer equipment and a storage medium. The method comprises the following steps: acquiring a preset number of state data sets of an object to be subjected to fault diagnosis; constructing a to-be-trained network structure which sequentially comprises an input layer, a monomial and order selection layer, a polynomial layer, a full connection layer, a Softmax layer and an output layer in the direction from input to output; a specified loss function is adopted to obtain a loss value of the to-be-trained network structure, iterative training is carried out on the to-be-trained network structure according to the loss value in combination with a BP algorithm, an Adam algorithm and a simulated annealing algorithm, and a simulated annealing dynamic polynomial network with the state data set as input and the fault diagnosis data set as output is obtained; and inputting the state data set into the simulated annealing dynamic polynomial network to obtain a fault diagnosis data set of the object to be subjected to fault diagnosis. By adopting the method, the diagnosis or prediction result of the object to be subjected to fault diagnosis can be obtained, the calculation time is short, and the application range is wide.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, and in particular to a fault diagnosis method, apparatus, computer equipment and storage medium based on simulated annealing dynamic polynomial network. Background Art

[0002] In the field of machine learning, Multi-dimensional Taylor Network (MTN) is an effective tool for approximating nonlinear functions. Traditional multi-dimensional Taylor Networks have high accuracy, but they also have some limitations. On the one hand, when facing highly nonlinear problems, MTN often needs to use very high-order polynomials in order to achieve high accuracy, which makes the model very complex, greatly increases the amount of calculation, and leads to long calculation time. On the other hand, the highest order of the expansion term of MTN is a hyperparameter, which is usually determined based on experiments. The determination process is complex and lacks systematicity, and it is difficult to ensure that the best results can be obtained in different data sets and application scenarios. Summary of the invention

[0003] Based on this, it is necessary to provide a fault diagnosis method, device, computer equipment and storage medium based on simulated annealing dynamic polynomial network that can reduce calculation time and expand the scope of application to address the above technical problems.

[0004] In a first aspect, the present application provides a fault diagnosis method based on a simulated annealing dynamic polynomial network, comprising:

[0005] Acquire a state data set including a preset number of state data of the object to be diagnosed;

[0006] Construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in the direction from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; adopt a specified loss function to obtain the loss value of the network structure to be trained, and iteratively train the network structure to be trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output;

[0007] The state data set is input into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be diagnosed.

[0008] In one embodiment, a network structure to be trained is constructed, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer, and an output layer in sequence from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm including:

[0009] Build an input layer for receiving and transmitting state datasets;

[0010] The simulated annealing algorithm is used to construct a monomial and order selection layer with a monomial set as output, and the initial temperature, the initial monomial set and the activation state of the initial monomial set are determined according to the state data set;

[0011] Based on the monomials and corresponding coefficients in the monomial set, a polynomial layer is constructed with the monomial set as input and the polynomial vector as output;

[0012] According to the polynomial vector and the weight matrix, a fully connected layer is constructed with the polynomial vector as input and the polynomial matrix as output;

[0013] The Softmax layer with polynomial matrix as input and polynomial probability distribution as output is constructed through the probability conversion formula;

[0014] Construct an output layer that takes the multinomial probability distribution as input and the fault diagnosis dataset as output.

[0015] In one embodiment, the input of the monomial and order selection layer includes the original features in the state data set, the intermediate feature representation and context information generated in the simulated annealing dynamic polynomial network, and the output of the monomial and order selection layer also includes the Taylor expansion order value and the probability distribution of the monomials required for each Taylor expansion order.

[0016] In one embodiment, using a simulated annealing algorithm to construct a monomial and order selection layer with a monomial set as output includes:

[0017] Step S1, generating a candidate monomial set according to the state data set combined with the target method;

[0018] Step S2, using a specified loss function to calculate the energy corresponding to the candidate monomial set;

[0019] Step S3, calculating the energy difference between the current monomial set and the candidate monomial set, calculating the probability of accepting the candidate monomial set according to the energy difference and the current temperature using the Metropolis criterion, and generating a uniformly distributed random number, accepting the candidate monomial set when the probability of accepting the candidate monomial set is greater than the random number, and rejecting the candidate monomial set when the probability of accepting the candidate monomial set is less than the random number, and keeping the current monomial set unchanged;

[0020] Step S4, updating the temperature according to a predetermined cooling plan;

[0021] Step S5, repeating steps S1 to S4 until a termination condition is met, wherein the termination condition includes the temperature dropping below a threshold or reaching a preset number of iterations.

[0022] In one embodiment, the target method in step S1 includes random addition or removal of monomials, neighborhood search, selection based on score or weight, crossover and mutation.

[0023] In one embodiment, iteratively training the network structure to be trained by combining the BP algorithm, the Adam algorithm and the simulated annealing algorithm according to the loss value to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output includes:

[0024] A simulated annealing algorithm is used to iteratively select a monomial set, and the BP algorithm and the Adam algorithm are used to update the parameters of the network structure to be trained. Simulated annealing is performed again to iteratively select a monomial set, and cross-iteration is performed continuously until the network structure to be trained converges, and a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output is obtained. The convergence judgment conditions include whether the value of the specified loss function is stable within the target range or reaches the preset upper limit of the number of iterations.

[0025] In one embodiment, using the BP algorithm and the Adam algorithm to update the parameters of the network structure to be trained includes:

[0026] The BP algorithm is used to calculate the gradient according to the loss value of the specified loss function through the chain rule to update the network structure parameters to be trained, where the network structure parameters to be trained include the monomial coefficients of the polynomial layer and the weight matrix of the fully connected layer;

[0027] The Adam algorithm is used to calculate the gradient, and the first-order moment estimate and the second-order moment estimate as well as the corresponding deviation correction term are updated. The parameters of the network structure to be trained are updated based on the deviation correction term.

[0028] In a second aspect, the present application also provides a fault diagnosis device based on a simulated annealing dynamic polynomial network, comprising:

[0029] A status data set acquisition module, used to acquire a status data set including a preset number of status data sets of the object to be diagnosed;

[0030] The simulated annealing dynamic polynomial network training module is used to construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in order from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; a specified loss function is used to obtain the loss value of the network structure to be trained, and the network structure to be trained is iteratively trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output;

[0031] The fault diagnosis data set acquisition module is used to input the state data set into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be diagnosed.

[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the fault diagnosis method based on simulated annealing dynamic polynomial network are implemented:

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of a fault diagnosis method based on a simulated annealing dynamic polynomial network are implemented.

[0034] The fault diagnosis method, device, computer equipment and storage medium based on simulated annealing dynamic polynomial network obtain a state data set including a preset number of state data sets of the object to be diagnosed; construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in sequence from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; adopt a specified loss function to obtain the loss value of the network structure to be trained, and iteratively train the network structure to be trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with the state data set as input and the fault diagnosis data set as output; input the state data set into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be diagnosed. This method can perform fault diagnosis on a variety of equipment, such as air conditioners, etc., not only with a short calculation time but also with the best effect in different scenarios. At the same time, it can also predict faults of a variety of equipment, troubleshoot faults and avoid safety hazards. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a flow chart of a fault diagnosis method based on a simulated annealing dynamic polynomial network in one embodiment;

[0036] Figure 2 A schematic flow chart of the steps of constructing a monomial and order selection layer with a monomial set as output using a simulated annealing algorithm in one embodiment;

[0037] Figure 3 A schematic diagram of the structure of a dynamic polynomial network based on simulated annealing in one embodiment;

[0038] Figure 4 A schematic diagram of a training process of a dynamic polynomial network based on simulated annealing in one embodiment;

[0039] Figure 5A schematic diagram of a framework for fault diagnosis based on a simulated annealing dynamic polynomial network in one embodiment;

[0040] Figure 6 The module diagram of a fault diagnosis device based on simulated annealing dynamic polynomial network in one embodiment. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0042] In an exemplary embodiment, Figure 1 As shown, a fault diagnosis method based on simulated annealing dynamic polynomial network is provided, comprising:

[0043] Step 101: Obtain a state data set including a preset number of data of an object to be diagnosed for a fault.

[0044] Specifically, the preset number corresponds to the preset attribute of the object to be diagnosed for the fault, and the corresponding number of the state data in the state data set is determined according to the relevant attribute of the object to be diagnosed for the fault.

[0045] Exemplarily, the object to be diagnosed for fault includes an air conditioner, etc., and the status data set includes data on the temperature of the fan, the speed of the fan, the current and voltage in the fan, etc.

[0046] Step 102, constructing a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in sequence from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; using a specified loss function to obtain a loss value of the network structure to be trained, and iteratively training the network structure to be trained according to the loss value in combination with a BP algorithm, an Adam algorithm and a simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output.

[0047] Exemplarily, a simulated annealing dynamic multidimensional Taylor network (SADMTN) is constructed, and the loss function is specified as a cross entropy loss function.

[0048] Step 103: input the state data set into a simulated annealing dynamic polynomial network to obtain a fault diagnosis data set of the object to be diagnosed.

[0049] Exemplarily, by inputting the state data set into the simulated annealing dynamic polynomial network, a fault prediction data set of the object to be fault diagnosed can also be obtained.

[0050] In the above-mentioned fault diagnosis method based on simulated annealing dynamic polynomial network, by constructing a simulated annealing dynamic multidimensional Taylor network based on gradient scoring, that is, a simulated annealing dynamic polynomial network, a state data set including a preset number of state data of the object to be diagnosed is obtained and input into the simulated annealing dynamic multidimensional Taylor network, so that fault diagnosis or result prediction of the object to be diagnosed can be achieved at a faster speed.

[0051] In an exemplary embodiment, a network structure to be trained is constructed, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer, and an output layer in sequence from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm including:

[0052] Construct an input layer for receiving and transmitting the state data set; use the simulated annealing algorithm to construct a monomial and order selection layer with a monomial set as output, and determine the initial temperature, the initial monomial set and the activation state of the initial monomial set according to the state data set; construct a polynomial layer with a monomial set as input and a polynomial vector as output based on the monomials and corresponding coefficients in the monomial set; construct a fully connected layer with a polynomial vector as input and a polynomial matrix as output based on the polynomial vector and weight matrix; construct a Softmax layer with a polynomial matrix as input and a polynomial probability distribution as output through the probability conversion formula; construct an output layer with a polynomial probability distribution as input and a fault diagnosis data set as output.

[0053] Specifically, the input layer receives raw data input and provides a data basis for subsequent network layers. The received data contains raw data features that can reflect data complexity and nonlinear patterns, that is, receives the state data set of the object to be diagnosed.

[0054] Furthermore, the functions of the monomial and order selection layer include setting the initial temperature, setting the initial monomial activation state, defining the energy function, etc., wherein setting the initial temperature is to determine the temperature value at the beginning of the simulated annealing process; setting the initial monomial activation state includes determining the initial activation state of the monomial based on random selection; defining an energy function, using the loss function of the SADMTN network, which is used for classification, so the cross entropy loss function is used. The energy function is used to measure the quality of the current monomial set, and the purpose is to find the monomial set that minimizes the energy function value to minimize the output error. The loss function is shown in formula (1):

[0055]

[0056] Assume that the total number of categories is C, and the model predicts that the probability that a sample belongs to category i is p i , the true category is k (represented by one-hot encoding, that is, only the kth position is 1 and the rest are 0).

[0057] In each iteration, the monomial and order selection layer generates a set of candidate monomials based on the current state by randomly changing the activation state of some monomials. Using the Metropolis criterion, the energy difference and the current temperature are used to decide whether to accept the new monomial, where the energy difference is the difference between the energy function value of the new candidate monomial set and the current monomial set. The acceptance probability calculation formula is shown in formula (2):

[0058] P(accept)=e -ΔE / T (2)

[0059] Where ΔE is the energy difference and T is the current temperature.

[0060] The temperature is gradually lowered according to the predetermined cooling plan, and the process of generating candidate states and acceptance criteria is repeated until the termination condition is met (such as the temperature drops below the threshold or reaches the preset number of iterations). The final set of monomials is the result determined by the monomial and order selection layer, and its corresponding order value and the number of activated monomials of each order are also determined, and the probability output corresponding to each expansion order is obtained at the same time. Let the probability corresponding to the th expansion order be pj, which can be obtained by normalizing the probability distribution obtained by various methods. For example, if the original score (unnormalized probability) of the th expansion order is sj obtained by a certain calculation method, then the normalization formula is shown in formula (3):

[0061]

[0062] The output order value can be determined according to probability distribution or other rules. For example, if the probability of a certain order exceeds a certain threshold, that is, P max >0.5, then select the order as the output order value; or select the order with the highest probability as the output order value

[0063] Furthermore, for the polynomial layer, assuming that the input data is x1, x2, ..., x n After selection, there are m monomials involved in the construction of polynomials. For each monomial, if it is a power form of a single variable, such as represents the kth power of the ith variable; if it is in the form of a cross term, such as represents the product of the k1 power of the ith variable and the k2 power of the jth variable. Let these monomials be M1, M2, ..., M m, the corresponding coefficients are a1, a2, ..., a m , then the output y of the polynomial layer is p It can be expressed as formula (4):

[0064] y p =a1M1+a1M1+...+a m M m (4)

[0065] This formula represents the approximation of a nonlinear function by a polynomial function constructed by the selected monomial and its coefficients, and the output result y p It will serve as the input of the subsequent fully connected layer and continue to propagate in the network to complete the classification task.

[0066] Furthermore, the fully connected layer processes the output of the polynomial layer to match the output dimension requirement. The input of the fully connected layer is the output of the polynomial layer, and the output of the fully connected layer is the feature representation after dimension adjustment, providing a suitable input for the subsequent Softmax layer. The input of the fully connected layer is the output of the polynomial layer, that is, y p . It is a vector of dimension n, namely y p =(y p1 ,y p2 , ..., y pn The weight matrix W of the fully connected layer is an m×n matrix, where m is the dimension of the fully connected layer output, W=(w ij ), i = 1, 2, ..., m, j = 1, 2, ..., n. Therefore, the output y of the fully connected layer f As shown in formula (5):

[0067] y f =W×y p (5)

[0068] That is, the output of the fully connected layer is as follows:

[0069]

[0070] Furthermore, the Softmax layer converts the output of the fully connected layer into a probability distribution form for subsequent classification or prediction tasks. Its input is the output of the fully connected layer, and its output is a result that conforms to the probability distribution, which serves as a pre-processing of the final output. Specifically, the input of the Softmax layer is shown in formula (7):

[0071] y f =(y f1 ,y f2 , ..., y fm ) (7)

[0072] The output of the Softmax layer is shown in formula (8):

[0073] y s =(y s1 ,y s2 , ..., y si , ..., y sm ) (8)

[0074] Each element y si The calculation formula is shown in formula (9):

[0075]

[0076] Formula (9) converts the output of the fully connected layer into a probability distribution form, so that It meets the requirements of probability distribution and is used for subsequent classification or prediction tasks.

[0077] Furthermore, the output layer gives the final fault diagnosis result or prediction value. Its input is the output of the Softmax layer, y s =(y s1 ,y s2 , ..., y sm ), where m is the number of categories, and its output is the result related to the fault diagnosis or prediction task, such as the fault category label or the predicted value. The classification category is k, and the output of the output layer is shown in formula (10):

[0078] y o =(y o1 ,y o2 , ..., y om ) (10)

[0079] where y ok =1, other y oi =0(i≠k). The cross entropy loss function is used during training to measure the difference between the predicted result and the true label. If the true label is y true =(y true1 ,y true2 , ..., y truem ), the cross entropy loss function is shown in formula (11):

[0080]

[0081] This loss function is used to adjust the parameters of the network structure to be trained during the training process to improve the classification accuracy of the model.

[0082] In this embodiment, various network structures in the simulated annealing dynamic polynomial network are further described to ensure that the effects of the simulated annealing dynamic polynomial network in fault diagnosis and prediction can be achieved.

[0083] In an exemplary embodiment, the input of the monomial and order selection layer includes the original features in the state data set, the intermediate feature representation generated in the simulated annealing dynamic polynomial network, and the context information, and the output of the monomial and order selection layer also includes the Taylor expansion order value and the probability distribution of the monomials required for each Taylor expansion order.

[0084] Specifically, the input of the monomial and order selection layer includes original data features, intermediate feature representations, and other contextual information, wherein the original data features directly use the original features of the input data, i.e., the state data set of the object to be diagnosed, and the intermediate feature representations come from the output of the previous layer of the simulated annealing dynamic polynomial network, and other contextual information such as task-related metadata or the Taylor expansion order of the previous layer. The output of the monomial and order selection layer includes an order value and a probability distribution, wherein the order value directly outputs an integer value, indicating the order of the Taylor expansion, and the probability distribution outputs a probability distribution, indicating the percentage of monomials required for each Taylor expansion order.

[0085] In this embodiment, the input of the monomial and order selection layers is clarified and their output is supplemented to ensure the diagnostic prediction effect of the simulated annealing dynamic polynomial network.

[0086] In an exemplary embodiment, the network structure to be trained is iteratively trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output, including:

[0087] A simulated annealing algorithm is used to iteratively select a monomial set, and the BP algorithm and the Adam algorithm are used to update the parameters of the network structure to be trained. Simulated annealing is performed again to iteratively select a monomial set, and cross-iteration is performed continuously until the network structure to be trained converges, and a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output is obtained. The convergence judgment conditions include whether the value of the specified loss function is stable within the target range or reaches the preset upper limit of the number of iterations.

[0088] Exemplarily, the training of SADMTN specifically includes multiple stages. The first is the initialization stage, in which the initial monomial set can be determined based on prior knowledge or random selection to preliminarily determine the model structure; determine the model structure, and construct a simulated annealing dynamic multidimensional Taylor network (SADMTN) model structure including an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer, and an output layer; set the initial temperature and the initial monomial activation state (which can be based on the monomials in the current model). Suppose the initial monomial set is M = {M1, M2, ..., M m}, and its corresponding energy (loss function value) is L. Here, the energy function adopts the loss function of the network, such as the cross entropy loss function.

[0089] Furthermore, the BP and Adam algorithms iteratively train the SADMTN stage, that is, given the initial monomial, the BP+Adam algorithm is used to train the SADMTN, including forward propagation, calculation of loss function, back propagation (BP algorithm), and Adam algorithm. In the forward propagation, the input data enters the model through the input layer. In the polynomial layer, a polynomial function is constructed based on the initial monomial set to calculate the output y p , as shown in formula (4):

[0090] y p =a1M1+a1M1+...+a m M m (4)

[0091] The fully connected layer processes the output of the polynomial layer and outputs y f , as shown in formula (5):

[0092] y f =W×y p (5)

[0093] The Softmax layer converts the output of the fully connected layer into a probability distribution form, as shown in formula (9):

[0094]

[0095] The output layer gives the classification result according to the Softmax layer output.

[0096] Furthermore, the loss function is calculated and the cross entropy loss function L is used to measure the difference between the predicted result and the true label, as shown in formula (11):

[0097]

[0098] Furthermore, the back propagation algorithm (BP algorithm) is used to calculate the gradient according to the loss function and update the model parameters, including the polynomial layer monomial coefficient a i , the fully connected layer weight matrix W. The Adam algorithm further optimizes the parameter update process based on the BP algorithm and maintains the first-order moment estimate m t and the second moment estimate n t , and the corresponding bias correction term and

[0099] Furthermore, the simulated annealing iterative monomial selection stage is entered, including the generation of candidate monomial sets, calculation of the energy of the new set, acceptance criteria, temperature update, and termination condition judgment.

[0100] Further, the cross-iteration process is entered. After completing one simulated annealing iteration to select the monomial, BP+Adam training is performed again to update the model parameters. Then simulated annealing iteration is performed to select the monomial, and cross-iteration is continued until the model converges. Convergence can be determined based on whether the value of the loss function is stable within a small range, or whether it reaches the preset upper limit of the number of iterations. For example, the loss function value at the tth iteration is L t , calculate the average rate of change of the loss function value for several consecutive iterations (for example, n times) As shown in formula (12):

[0101]

[0102] like Where ∈1 is a very small positive number that is pre-set. It is considered that the loss function value is stable within a small range, and the model can be judged to have converged.

[0103] Optionally, the optimization iteration of the simulated annealing dynamic multidimensional Taylor network, i.e., the simulated annealing dynamic polynomial network, includes phased execution and alternating iteration, wherein the phased execution is to execute the simulated annealing and BP algorithm in stages, including a pre-selection stage, an optimization stage, and a re-selection stage; the alternating iteration is to run the simulated annealing and BP algorithm alternately, including setting cycles, updating conditions, and dynamic temperature adjustment.

[0104] In this embodiment, a simulated annealing algorithm is used to iteratively select a monomial set, and a BP algorithm and an Adam algorithm are used to update the parameters of the network structure to be trained; simulated annealing is performed again to iteratively select a monomial set, and cross-iteration is continuously performed until the network structure to be trained converges, thereby ensuring the accuracy of the output results of the simulated annealing dynamic polynomial network.

[0105] In an exemplary embodiment, using the BP algorithm and the Adam algorithm to update the structural parameters of the network to be trained includes: using the BP algorithm to calculate the gradient according to the loss value of the specified loss function through the chain rule, and updating the structural parameters of the network to be trained, wherein the structural parameters of the network to be trained include the monomial coefficients of the polynomial layer and the weight matrix of the fully connected layer; using the Adam algorithm to calculate the gradient, and update the first-order moment estimate and the second-order moment estimate and the corresponding deviation correction term, and updating the structural parameters of the network to be trained based on the deviation correction term.

[0106] Specifically, the gradient is calculated according to the loss function, and the model parameters are updated, including the polynomial layer monomial coefficient a i , the fully connected layer weight matrix W, the BP algorithm calculates the gradient through the chain rule to minimize the loss function. For example, the update formula for the polynomial layer coefficients is shown in formula (13):

[0107]

[0108] Where η is the learning rate. A similar update formula can be used for the fully connected layer weight matrix W to update the parameters by calculating the corresponding partial derivatives.

[0109] Furthermore, the Adam algorithm further optimizes the parameter update process based on the BP algorithm. It maintains the first-order moment estimate m t and the second moment estimate n t , and the corresponding bias correction term and Taking the weight matrix as an example, the update process is as follows:

[0110] First, calculate the gradient. The calculation method is shown in formula (14):

[0111]

[0112] Update the first-order moment estimate, and the calculation method is shown in formula (15):

[0113] m t =β1m t-1 +(1-β1)g t (15)

[0114] Update the second-order moment estimate, and the calculation method is shown in formula (16):

[0115] n t =β2n t-1 +(1-β2)(g t ) 2 (16)

[0116] Calculate the deviation correction term, and the calculation method is shown in formula (17) and formula (18):

[0117]

[0118] Update the weight matrix. The calculation method is shown in formula (19):

[0119]

[0120] Among them, β1 and β2 are hyperparameters, and ∈ is a very small number to prevent division by zero.

[0121] In this embodiment, the method of using the BP algorithm and the Adam algorithm to update the parameters of the network structure to be trained is further clarified.

[0122] In an exemplary embodiment, Figure 2 As shown, the simulated annealing algorithm is used to construct a monomial and order selection layer with a monomial set as output, including:

[0123] Step S1, generating a candidate monomial set according to the state data set in combination with the target method.

[0124] Specifically, a candidate monomial set M is generated by various methods. candidate .

[0125] Exemplarily, the candidate monomial set M is generated by randomly adding or removing monomials. candidate , let the monomial set in the current model be M current , a monomial m is randomly selected in each iteration and add Determines whether to add to or remove from the current model; that is, if Then add it to the current model, if m∈M current , removed from the model. Adding the new monomial set M new =M current ∪{m}, remove M new =M current -{m}. Using this method, monomials with greater impact on the error (i.e., higher scores) are more likely to be selected, thereby guiding the simulated annealing process to search for a set of monomials in a direction that is more conducive to reducing the error.

[0126] Step S2, using a specified loss function to calculate the energy corresponding to the candidate monomial set.

[0127] Specifically, calculate the candidate monomial set M candidate The corresponding energy (loss function value) E candidate , the network loss function L is also used.

[0128] Step S3, calculate the energy difference between the current monomial set and the candidate monomial set, use the Metropolis criterion to calculate the probability of accepting the candidate monomial set according to the energy difference and the current temperature, and generate a uniformly distributed random number. If the probability of accepting the candidate monomial set is greater than the random number, the candidate monomial set is accepted; if the probability of accepting the candidate monomial set is less than the random number, the candidate monomial set is rejected, and the current monomial set is kept unchanged.

[0129] Specifically, using the Metropolis criterion, according to the energy difference ΔE=E candidate -E current (The difference between the energy function values ​​of the new candidate monomial set and the current monomial set) and the current temperature determine whether to accept the new monomial. The acceptance probability formula is formula (2):

[0130] P(accept)=e -ΔE / T (2)

[0131] Then, generate a uniformly distributed random number r in the interval [0, 1]. If P(accept)>r, accept the new monomial set; otherwise, reject the new monomial set and keep the current monomial set unchanged.

[0132] Step S4, updating the temperature according to the predetermined cooling plan.

[0133] Specifically, the temperature is updated according to the predetermined cooling plan, that is, T t+1 =αT t , where α is the temperature reduction coefficient, 0<α<1.

[0134] Step S5, repeating steps S1 to S4 until a termination condition is met, wherein the termination condition includes the temperature dropping below a threshold or reaching a preset number of iterations.

[0135] Specifically, the above iterative process is repeated until the termination condition is met. The termination condition may be that the temperature drops to a threshold value T min The following, namely T t <T min , or reaches a preset number of iterations N, that is, t=N.

[0136] In this embodiment, the method of selecting the monomial stage for annealing iteration is clearly described to further ensure the performance of the simulated annealing dynamic polynomial network.

[0137] In an exemplary embodiment, the target method in step S1 includes random addition or removal of monomials, neighborhood search, selection based on score or weight, crossover and mutation.

[0138] Specifically, randomly adding or removing monomials includes randomly selecting a monomial in each iteration and deciding whether to add it to the current model or remove it from the model. Neighborhood search includes defining a "neighborhood" as a possible set of changes based on the currently selected set of monomials. The neighborhood can be defined based on the relevance or contribution of the monomials, including small changes and large changes, where small changes are to change only one monomial, add or remove, and large changes are to change multiple monomials at the same time, such as exchanging a set of monomials. Score-based or weighted selection includes using the score mechanism of the previous step to guide the selection of monomials, such as the score based on gradient or error, and monomials with higher scores are more likely to be selected, including probability selection and priority selection, where probability selection is that the probability of a monomial being selected is proportional to its score, and priority selection is to directly select the several monomials with the highest scores. Crossover and mutation are inspired by genetic algorithms. Different combinations of current solutions can be "crossed" or "mutated" to generate new sets of monomials. Crossover is to combine the monomial sets of two or more existing models to create a new set. Mutation is to randomly change the state of certain monomials, such as activation or deactivation. The radicalism of the change strategy is adjusted according to the temperature parameter of simulated annealing. The higher the temperature, the greater the change. When the temperature is lowered, the change tends to be subtle and conservative.

[0139] In this embodiment, a variety of methods for generating candidate monomial sets are described, which can be selected according to specific circumstances, thereby expanding the application scope of the fault diagnosis method based on simulated annealing dynamic polynomial network.

[0140] In an exemplary embodiment, Figure 3 As shown, a structure based on simulated annealing dynamic polynomial network is provided, namely, the structure of simulated annealing dynamic polynomial network. Input data x1(t), x2(t), x3(t) enter the model through the input layer, and the coefficients corresponding to x1(t), x2(t), x3(t) are a 11 、a 22 、a 33 , input to the first fully connected layer for processing to match the output dimension requirements; the output result of the first fully connected layer then enters the order selection layer for simulated annealing; the output result of the order selection layer is input to the polynomial layer, and the input of the polynomial layer also includes x1(t), x2(t), x3(t). The polynomial layer performs a third-order expansion calculation on the input data, including 1st order, 2nd order, and 3rd order, and inputs the calculation result to the second fully connected layer; the second fully connected layer processes the output result of the polynomial layer to obtain y corresponding to f1, f2, and f3 f ; Input the output result of the second fully connected layer to the Softmax layer to obtain the corresponding probability distribution p1, p2, p3; p1, p2, p3 are input to the order selection layer for simulated annealing again to iterate the model parameters.

[0141] In an exemplary embodiment, Figure 4 As shown, a training process based on simulated annealing dynamic polynomial network is provided, namely, the training process of simulated annealing dynamic polynomial network. Specifically, the initial data enters the model through the input layer, and after the monomial set is generated by the monomial and order selection layer, it is input into the polynomial layer for third-order calculation and output; the output result of the polynomial layer is input into the fully connected layer for processing to obtain the y corresponding to f1, f2, and f3. f , the output result of the fully connected layer is input to the Softmax layer to obtain the corresponding probability distribution p1, p2, and p3; p1, p2, and p3 are input to the order selection layer for simulated annealing, and then cross-validation is performed. The model parameters are iterated according to the results of cross-validation, and then input to the polynomial layer, fully connected layer, and Softmax layer for simulated annealing and cross-validation. The above steps are repeated to obtain the simulated annealing dynamic polynomial network and output the results.

[0142] In an exemplary embodiment, Figure 5 As shown, a framework for fault diagnosis based on simulated annealing dynamic polynomial network is provided, that is, a flow chart of fault diagnosis based on simulated annealing dynamic polynomial network. Specifically, the fault data of the object to be diagnosed enters the simulated annealing dynamic polynomial network, and after passing through the input layer, the monomial and the order selection layer, the polynomial layer pre-expands the polynomial, performs the first third-order expansion calculation, and simulates annealing the first calculation result to obtain a local optimal solution; the local optimal solution is subjected to a second third-order expansion calculation, and the first polynomial iteration is performed; the result after the first iteration is subjected to simulated annealing to obtain a local optimal solution, and then the local optimal solution is subjected to a third third-order expansion calculation, and the second polynomial iteration is performed, and the result after the second iteration is subjected to simulated annealing to obtain a local optimal solution, and then the local optimal solution is subjected to a fourth third-order expansion calculation, and the diagnosis result is obtained and output. Among them, as the diagnosis deepens, polynomials are continuously discarded, that is, the nodes with darker colors in the figure.

[0143] At least a portion of the steps in the flowcharts involved in the embodiments described above may include multiple steps or multiple stages. These steps or stages may be executed at different times, or may be executed in turn or alternation with other steps or at least a portion of the steps or stages in other steps.

[0144] Based on the same inventive concept, the embodiment of the present application also provides a fault diagnosis device based on a simulated annealing dynamic polynomial network for implementing the fault diagnosis method based on a simulated annealing dynamic polynomial network involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more fault diagnosis devices based on a simulated annealing dynamic polynomial network provided below can refer to the limitations of the fault diagnosis method based on a simulated annealing dynamic polynomial network above, and will not be repeated here.

[0145] In an exemplary embodiment, Figure 6 As shown, a fault diagnosis device based on simulated annealing dynamic polynomial network is provided, comprising:

[0146] A status data set acquisition module 601 is used to acquire a status data set including a preset number of status data sets of an object to be diagnosed;

[0147] The simulated annealing dynamic polynomial network training module 602 is used to construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in order from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; a specified loss function is used to obtain a loss value of the network structure to be trained, and the network structure to be trained is iteratively trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output;

[0148] The fault diagnosis data set acquisition module 603 is used to input the state data set into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be fault diagnosed.

[0149] Each module in the above-mentioned fault diagnosis device based on simulated annealing dynamic polynomial network can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0150] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0152] For those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these modifications and improvements are all within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A fault diagnosis method based on simulated annealing dynamic polynomial network, characterized in that: The method comprises: Acquire a state data set including a preset number of state data of the object to be diagnosed; Construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in the direction from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; adopt a specified loss function to obtain the loss value of the network structure to be trained, and iteratively train the network structure to be trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output; The state data set is input into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be diagnosed.

2. The method according to claim 1, characterized in that The construction of the network structure to be trained from input to output includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in sequence, wherein the monomial and order selection layer adopts a simulated annealing algorithm including: Build an input layer for receiving and transmitting state datasets; The simulated annealing algorithm is used to construct a monomial and order selection layer with a monomial set as output, and the initial temperature, the initial monomial set and the activation state of the initial monomial set are determined according to the state data set; Based on the monomials and corresponding coefficients in the monomial set, a polynomial layer is constructed with the monomial set as input and the polynomial vector as output; According to the polynomial vector and the weight matrix, a fully connected layer is constructed with the polynomial vector as input and the polynomial matrix as output; The Softmax layer with polynomial matrix as input and polynomial probability distribution as output is constructed through the probability conversion formula; Construct an output layer that takes the multinomial probability distribution as input and the fault diagnosis dataset as output.

3. The method according to claim 2, characterized in that The input of the monomial and order selection layer includes the original features in the state data set, the intermediate feature representation and context information generated in the simulated annealing dynamic polynomial network, and the output of the monomial and order selection layer also includes the Taylor expansion order value and the probability distribution of the monomials required for each Taylor expansion order.

4. The method according to claim 2, characterized in that: The method of using a simulated annealing algorithm to construct a monomial and order selection layer with a monomial set as output includes: Step S1, generating a candidate monomial set according to the state data set combined with the target method; Step S2, using a specified loss function to calculate the energy corresponding to the candidate monomial set; Step S3, calculating the energy difference between the current monomial set and the candidate monomial set, calculating the probability of accepting the candidate monomial set according to the energy difference and the current temperature using the Metropolis criterion, and generating a uniformly distributed random number, accepting the candidate monomial set when the probability of accepting the candidate monomial set is greater than the random number, and rejecting the candidate monomial set when the probability of accepting the candidate monomial set is less than the random number, and keeping the current monomial set unchanged; Step S4, updating the temperature according to a predetermined cooling plan; Step S5, repeating steps S1 to S4 until a termination condition is met, wherein the termination condition includes the temperature dropping below a threshold or reaching a preset number of iterations.

5. The method according to claim 4, characterized in that The target methods in step S1 include random addition or removal of monomials, neighborhood search, selection based on score or weight, crossover and mutation.

6. The method according to claim 4, characterized in that The method of iteratively training the network structure to be trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with the state data set as input and the fault diagnosis data set as output includes: A simulated annealing algorithm is used to iteratively select a monomial set, and the BP algorithm and the Adam algorithm are used to update the parameters of the network structure to be trained. Simulated annealing is performed again to iteratively select a monomial set, and cross-iteration is performed continuously until the network structure to be trained converges, and a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output is obtained. The convergence judgment conditions include whether the value of the specified loss function is stable within the target range or reaches the preset upper limit of the number of iterations.

7. The method according to claim 6, characterized in that The method of updating the parameters of the network structure to be trained by using the BP algorithm and the Adam algorithm includes: The BP algorithm is used to calculate the gradient according to the loss value of the specified loss function through the chain rule to update the network structure parameters to be trained, where the network structure parameters to be trained include the monomial coefficients of the polynomial layer and the weight matrix of the fully connected layer; The Adam algorithm is used to calculate the gradient, and the first-order moment estimate and the second-order moment estimate as well as the corresponding deviation correction term are updated. The parameters of the network structure to be trained are updated based on the deviation correction term.

8. A fault diagnosis device based on simulated annealing dynamic polynomial network, characterized in that: The device comprises: A status data set acquisition module, used to acquire a status data set including a preset number of status data sets of the object to be diagnosed; The simulated annealing dynamic polynomial network training module is used to construct a network structure to be trained, which includes an input layer, a monomial and order selection layer, a polynomial layer, a fully connected layer, a Softmax layer and an output layer in order from input to output, wherein the monomial and order selection layer adopts a simulated annealing algorithm; a specified loss function is used to obtain the loss value of the network structure to be trained, and the network structure to be trained is iteratively trained according to the loss value in combination with the BP algorithm, the Adam algorithm and the simulated annealing algorithm to obtain a simulated annealing dynamic polynomial network with a state data set as input and a fault diagnosis data set as output; The fault diagnosis data set acquisition module is used to input the state data set into the simulated annealing dynamic polynomial network to obtain the fault diagnosis data set of the object to be diagnosed.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.