A rolling bearing compound fault diagnosis method and device based on prototype strategy optimization

By constructing an actor network with a multi-label prototyping mechanism and reinforcement learning algorithm, combined with a proximal policy optimization algorithm, the problem that traditional prototyping networks cannot effectively represent multi-label features in composite fault diagnosis is solved, and high accuracy and high reliability of rolling bearing composite fault diagnosis are achieved under conditions of few samples.

CN122432838APending Publication Date: 2026-07-21HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-04-03
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively capture multi-label features in complex fault diagnosis and lack accuracy under limited sample conditions. In particular, traditional prototype networks cannot effectively characterize multiple fault features in the complex fault diagnosis of rolling bearings.

Method used

A prototype-based policy optimization approach is adopted. By constructing a multi-label prototype computation mechanism and reinforcement learning algorithm, combined with an actor network based on the proximal policy optimization algorithm, sub-label prototype vectors are generated. The reward mechanism of reinforcement learning is used for fault identification, and the decision-making process is optimized through a historical action embedding mechanism.

Benefits of technology

Achieving high accuracy and reliability in multi-label rolling bearing composite fault diagnosis under limited sample conditions improves feature utilization and model generalization ability, thereby enhancing the overall accuracy and logical consistency of fault identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432838A_ABST
    Figure CN122432838A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent manufacturing and equipment health monitoring, and discloses a rolling bearing composite fault diagnosis method and device based on prototype strategy optimization, which introduces a multi-label prototype computer mechanism innovatively from the actual application demand of rolling bearing composite fault diagnosis, allocates the contribution of the composite fault sample to multiple single fault prototypes by decoupling the composite fault sample, expands the prototype network to a multi-label scene, further embeds the prototype network into an actor network in a proximal policy optimization (PPO) algorithm, realizes strategy optimization of the multi-label prototype through a reinforcement learning process, and can automatically make sequence decisions for multi-label faults under the condition of few samples. The application can effectively improve feature utilization and model generalization ability, thereby enhancing the perception and decision-making capabilities of the prototype network, and finally realizes high-accuracy and high-reliability few-sample multi-label rolling bearing composite fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of intelligent manufacturing and equipment health monitoring, and more specifically, relates to a method and device for diagnosing composite faults in rolling bearings based on prototype strategy optimization. Background Technology

[0002] With the development of science and technology and the progress of the times, the manufacturing industry has also developed rapidly. The increased automation and informatization of machinery, along with its increasingly complex structures, has led to higher demands on the production efficiency and stability of mechanical equipment. However, due to the complexity of the mechanical equipment structure, the possibility of equipment failure also increases. In manufacturing, even minor faults often have a significant impact on the normal operation of the entire equipment, leading to damage to other components and even the entire equipment. In particular, when critical components such as rolling bearings suddenly fail during operation, it often causes severe functional impairment or even shutdown of the machinery, resulting in unpredictable economic losses and safety accidents.

[0003] Rolling bearings play a crucial role in modern machinery. As a core component of rotating machinery, they not only support the movement of rotating parts but also effectively reduce the coefficient of friction, ensuring the rotational accuracy of the equipment. The health of rolling bearings directly affects the operational safety and efficiency of industrial equipment. In practical applications, failures caused by premature bearing damage or abnormalities are common, making it essential to obtain fault information and take appropriate measures quickly. Therefore, achieving accurate diagnosis of rolling bearing faults is of great significance for improving the stability and safety of machinery, promoting economic development, and ensuring safe and efficient production.

[0004] In recent years, data-driven methods based on deep learning have been widely applied in the field of rolling bearing fault diagnosis. However, due to the complex working environment of rolling bearings, their signal acquisition process is affected by various external interference factors, posing significant difficulties and challenges to accurately identifying faults and extracting fault signals. Furthermore, during long-term operation, rolling bearings often experience multiple single faults simultaneously or consecutively, which couple to form compound faults. Due to the inherently complex coupling characteristics of compound faults, it is difficult to establish a clear correlation between the characteristics of compound faults and fault categories in rolling bearings, greatly increasing the difficulty of accurate fault diagnosis.

[0005] Furthermore, in complex engineering applications, equipment often operates under various conditions, and acquiring large-scale labeled datasets is extremely expensive and time-consuming, with composite fault samples being particularly scarce. Although prototype networks can achieve efficient classification with limited samples by computing category prototypes, they still have inherent limitations in the field of composite fault diagnosis, as their traditional single-prototype representation cannot capture the relevant features of multiple labels. These shortcomings significantly limit the accuracy of rolling bearing composite fault diagnosis models under conditions with few samples. Summary of the Invention

[0006] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and device for diagnosing composite faults in rolling bearings based on prototype strategy optimization. It aims to solve the inherent limitations of existing prototype networks in the field of composite fault diagnosis, namely, the inability of traditional prototype representations to capture relevant features of multiple labels.

[0007] To achieve the above objectives, according to one aspect of the present invention, a method for diagnosing composite faults in rolling bearings based on prototype strategy optimization is provided, comprising the following steps: (1) Construct an N-way K-shot few-shot task based on the training set, and select corresponding category samples to generate a support set and a query set for the few-shot task; convert the single label of all samples in the query set into multiple sub-labels containing different feature information to represent each sample in the query set. c Find all those that support this sub-tag c For each sample, the embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector and the prototype vector of each sub-label The total prototype vector p is formed by arranging the data according to the label order; where the training set consists of the original vibration signals of different fault characteristics of rolling bearings under various working conditions. (2) Under each few-sample task, samples are sequentially extracted from the query set and fed into the actor network in the near-end policy optimization algorithm to generate corresponding embedding vectors. Then, the distance between the embedding vector and the prototype vector p is calculated, and the distance is converted into the action probability distribution under different sub-labels corresponding to the extracted samples through softmax. The action corresponding to the sub-label with the highest action probability is selected to obtain the corresponding reward, and the selection of the next sub-label is entered. This process is repeated until all sub-labels of the extracted samples are selected. The selected action, reward and the corresponding sample itself are stored in the experience replay pool during each selection process. (3) Each time, a specific batch of data is selected from the experience replay pool and input into the constructed actor network; the loss function contained in the near-end strategy optimization algorithm and the prototype loss function are combined to form a joint loss function to optimize the actor network and perform gradient backpropagation to obtain the actor prototype network; the vibration signal of the rolling bearing to be tested is input into the actor prototype network, and the actor prototype network outputs the action decision sequence to complete the fault diagnosis; wherein, each dimension of the action decision sequence contains different fault information; the prototype loss function is set based on the distance between the sub-label prototype vectors.

[0008] Furthermore, the embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector The corresponding formula is:

[0009] In the formula, Indicates an indicator function; Indicates the first i The first sample c Sub-label values, This indicates that the neural encoder in the feature extraction module of the actor network is for the first... i Sample The embedding vector representation.

[0010] Furthermore, the formula for calculating the probability distribution of actions is:

[0011] In the formula, These represent the learning parameters of the actor network. a This represents the vector of possible actions. Indicates the first e In the round, the _ t The state of the actor's network at a given time step. This represents the embedding representation of the actor network for that state. d This represents the distance function, where p represents each sub-label. c Corresponding sub-label prototype vector The overall prototype vector is composed of the corresponding sub-labels arranged in order.

[0012] Furthermore, the action to be selected is determined from the obtained action probability distribution. And generate corresponding rewards, the formula is:

[0013] In the formula, Indicates the first e In the round, the _ tThe actions taken by the actors' network at a given time step. Indicates the state Next action The corresponding probability value, This is the set of labels that contains all the real sub-labels of the extracted samples.

[0014] Furthermore, based on the advantage function, the relevant loss of the actor network in the PPO algorithm is calculated. For the actor network, the loss function for interaction as an actor module is calculated as follows:

[0015] In the formula, Losses to the actors; E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates for the first e In the round, the _ t The probability ratio of the new strategy to the old strategy at each time step. This represents the corresponding advantage function. This means that the clip function is used to cut the clipped image. Limited to the range Inside; The value represents the shear rate, which is a hyperparameter that controls the cutting range.

[0016] Furthermore, the formula for calculating the loss function of the commenter network, which is the interaction of the commenter modules, is as follows:

[0017] In the formula, E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates the first e In the round, the _ t The dominance function value calculated at each time step.

[0018] Furthermore, the joint loss function of the actor prototype network The expression is:

[0019] In the formula, The loss of the actor network as an actor module interaction in the PPO algorithm, For prototype loss, These are the weighting coefficients for the prototype loss; The prototype loss The formula used to control the distance between child tag prototypes is:

[0020] In the formula, For consistency loss, For separation loss, and These are the weighting coefficients for the corresponding losses.

[0021] Furthermore, the consistency loss The formula for calculating the compactness of a class is as follows: This is used to shorten the distance between support set samples and their corresponding sub-label prototypes.

[0022] In the formula, N It is the number of classes included in each few-shot task. K It is the number of samples of each class drawn from the support set in each few-shot task; C It represents the total number of all sub-labels included in a multi-label classification task. Indicates belonging to the first c Support set samples for each sub-label category It is the actor network for supporting the collection of samples The embedding vector representation, This indicates that the embedding vector and the sub-label c The corresponding sub-label prototype vector The distance between them; The separation loss This is used to increase the distance between different sub-tag prototypes to enhance inter-class separability. The calculation formula is as follows:

[0023] In the formula, C It represents the total number of all sub-labels included in a multi-label classification task. This indicates a child tag. c The corresponding sub-label prototype vector with child tags d The corresponding sub-label prototype vector The distance between them; It is the boundary threshold hyperparameter.

[0024] The present invention also provides a rolling bearing composite fault diagnosis system based on prototype strategy optimization. The diagnosis system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the rolling bearing composite fault diagnosis method based on prototype strategy optimization as described above.

[0025] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the prototype-based strategy-optimized method for diagnosing composite faults in rolling bearings as described above.

[0026] In summary, compared with the prior art, the rolling bearing composite fault diagnosis method and equipment based on prototype strategy optimization provided by the present invention have the following beneficial effects: 1) Overcoming the limitations of traditional prototype networks, which are only suitable for single-label classification and cannot effectively represent complex fault features: This invention proposes a multi-label prototype computing mechanism. This mechanism decouples each complex fault sample and contributes its features to the prototype vectors corresponding to its various sub-labels. A weighted average is used to construct a sub-label prototype vector representation for each feature (e.g., inner ring fault, outer ring fault, specific operating condition). Specifically, for few-sample tasks, samples of the corresponding categories are selected to generate support sets and query sets. The single labels of all samples in the query set are converted into multiple sub-labels containing different feature information. For each sample in the query set, each sub-label... c Find all those that support this sub-tag c For each sample, sum all the embedding vectors corresponding to the found samples and take the average. Use the average value as the sub-label. c sub-label prototype vector and the prototype vector of each sub-label The overall prototype vector p is formed by arranging the labels in order. This mechanism not only preserves the information structure of multiple features coexisting in complex faults, but also improves the feature learning efficiency under few-sample conditions by reusing samples, providing a new theoretical path for multi-label few-sample fault diagnosis, which has important scientific significance and application prospects.

[0027] 2) Integrating Prototype Network Theory and Reinforcement Learning Algorithms: This invention embeds prototype network theory into the Actor network of the proximal policy optimization algorithm in reinforcement learning, proposing a prototype policy optimization framework. Under this framework, the multi-label identification process of complex faults is modeled as a sequential decision-making process, effectively avoiding the subjectivity of manually pre-setting the label order. The actor network and the critic network sequentially select fault labels based on the current state (sample features), and evaluate the merits of each decision step through the reward mechanism of reinforcement learning. Not only does the pruning objective function of the PPO algorithm effectively constrain the magnitude of policy updates, ensuring stable convergence even with small sample conditions, but a prototype loss is also designed based on the distance between sub-label prototypes to perform joint loss function optimization with the PPO loss. The aim is for the actor prototype network to learn a prototype space representation with sufficiently strong feature extraction capabilities and easy inter-class differentiation, thereby obtaining efficient and accurate fault diagnosis and identification results under limited sample conditions.

[0028] 3) When predicting the sub-label of each sample, the previously predicted action is incorporated into the prediction of the next sub-label. This is called the historical action embedding mechanism, which serves as reinforcement learning. In the multi-label sequence decision-making process, historical prediction results have a significant impact on subsequent decisions. This invention encodes the sub-labels selected at each time step into feature vectors and concatenates them with the feature vector of the current sample, inputting them together into the network for learning. This mechanism enables the actor prototype network to perceive the identified fault types, thereby avoiding repeated predictions and optimizing the label combination order in subsequent decisions, greatly improving the overall accuracy and logical consistency of multi-label recognition. Attached Figure Description

[0029] Figure 1 This is a flowchart of a rolling bearing composite fault diagnosis method based on prototype strategy optimization provided by an embodiment of the present invention; Figure 2 This is a structural diagram of the joint loss function of this invention; Figure 3 In the diagram, (a) and (b) are the confusion matrix and t-sne visualization of the experimental prediction results of the fault diagnosis case of the present invention, respectively. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0031] This invention provides a method for diagnosing composite faults in rolling bearings based on prototyping policy optimization. Starting from the practical application needs of diagnosing composite faults in rolling bearings, this method innovatively introduces a multi-label prototyping mechanism. By decoupling composite fault samples, its contributions are distributed to multiple single-fault prototypes, thus extending the prototype network to multi-label scenarios. Furthermore, the prototype network is embedded into the actor network within the proximal policy optimization (PPO) algorithm. Through reinforcement learning, policy optimization of the multi-label prototypes is achieved, enabling automatic sequence decision-making for multi-label faults under limited sample conditions. This invention effectively improves feature utilization and model generalization ability, thereby enhancing the perception and decision-making capabilities of the prototype network, ultimately achieving highly accurate and reliable diagnosis of multi-label rolling bearing composite faults with limited samples.

[0032] The diagnostic method specifically relates to a few-sample, multi-label rolling bearing composite fault diagnosis method based on prototype strategy optimization. It optimizes the prototype strategy by embedding a multi-label prototype network into the actor network of the PPO algorithm, thereby achieving accurate diagnosis and intelligent identification of rolling bearing composite faults under few-sample conditions.

[0033] The diagnostic method mainly includes the following steps: Step 1: The original vibration signals of the rolling bearing under various working conditions and different fault characteristics are preprocessed. The preprocessed original vibration signals are divided into training set and test set. The Actor Prototypical Network and Critic Network in the Proximal Policy Optimization (PPO) algorithm are randomly initialized.

[0034] Step 2: Construct an N-way K-shot few-shot task based on the training set. For the few-shot task, select samples of the corresponding categories to generate a support set and a query set. Convert the single label of all samples in the query set into multiple sub-labels containing different feature information. For each sub-label contained in each sample in the query set... c Find all those that support this sub-tag c For each sample, the embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector and the prototype vector of each sub-label The total prototype vector p is formed by arranging the labels in order.

[0035] The embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector The corresponding formula is:

[0036] In the formula, This indicates an indicator function. If the expression inside the indicator function is true, the function value is 1; otherwise, the function value is 0. Indicates the first i The first sample c Sub-label values, This indicates that the neural encoder in the feature extraction module of the actor network is for the first... i Sample The embedding vector representation.

[0037] Step 3: Under each few-shot task, samples are sequentially extracted from the query set and fed into the actor network to generate corresponding embedding vectors. Then, the distance between the embedding vector and the prototype vector p is calculated, and the distance is converted into the action probability distribution under different sub-labels corresponding to the extracted samples through softmax. The action corresponding to the sub-label with the highest action probability is selected to obtain the corresponding reward, and then the selection of the next sub-label is carried out. This process is repeated until all sub-labels of the extracted samples are selected. During each selection process, the selected action, reward and the corresponding sample itself are stored in the experience replay pool.

[0038] The actor network is used to generate all sub-label prototype vectors from samples in the support set, and to generate corresponding working probability distributions based on the distances between the embedding vectors of samples in the query set and each prototype vector. The formula for calculating the action probability distribution at any time step in any round is as follows:

[0039] In the formula, These represent the learning parameters of the actor network. a This represents the vector of possible actions. Indicates the first e In the round, the _ t The state of the actor's network at a given time step. This represents the embedding representation of the actor network for that state. d This represents the distance function, where p represents each sub-label. c Corresponding sub-label prototype vector The overall prototype vector is composed of the corresponding sub-labels arranged in order.

[0040] Determine the action to be selected from the obtained action probability distribution. (That is, the action with the highest probability among the remaining optional actions), and generate a corresponding reward, the formula is:

[0041] In the formula, Indicates the first e In the round, the _ t The actions taken by the actors' network at a given time step. Indicates the state Next action The corresponding probability value, This is a set of labels containing all the true sub-labels of the extracted samples. Specifically, the reward value here does not need to be manually set; instead, the probability value corresponding to the selected action is recorded as the reward size. If the prediction is correct, the reward value will be positive, and the higher the action probability, the larger the reward value will be. If the prediction is incorrect, the reward value will be negative, and the higher the action probability, the smaller the reward value will be. In this way, the probability of the desired correct action will be as high as possible, and the probability of the incorrect action will be as low as possible. This allows for adaptive adjustment of weights based on the action probability to control the size of the reward value.

[0042] The data generated during each of the above interactions will be stored in the experience replay pool. The process continues until the set number of training rounds is reached to ensure that all samples in the query set have completed the interaction.

[0043] Step four: Each time, a specific batch of data is selected from the experience replay pool and input into the constructed actor network and critic network; based on the critic network, the loss function included in the PPO algorithm and the prototype loss function are combined into a joint loss function to optimize the actor network and perform gradient backpropagation, resulting in the actor prototype network; the vibration signal of the rolling bearing to be tested is input into the actor prototype network, and the actor prototype network outputs an action decision sequence to complete the fault diagnosis; wherein, each dimension of the action decision sequence contains different fault information; the prototype loss function is set based on the distance between the sub-label prototype vectors.

[0044] Each update round will select a certain batch of data from the experience replay pool to be input into the actor network to generate new sub-label prototype vector representations and action probability distributions under the new strategy, in order to calculate the probability ratio between the old and new strategies. The calculation formula is as follows:

[0045] In the formula, Indicates the state Take action below The corresponding new probability value, Indicates the state Take action below The corresponding old probability value.

[0046] Similarly, the data needs to be input into the critic network, which provides an evaluation value for each corresponding state, using the following formula:

[0047] In the formula, This represents the learning parameters of the Critic network. This indicates that the commentator network has a response to each corresponding state. Embedded representation.

[0048] Then calculate the advantage function. The formula is:

[0049] In the formula, Indicates the first e In the round, the _ t The reward value obtained by the actor network at a given time step. ∈(0,1) represents the discount factor, which is mainly used to control the weight of future rewards; and These respectively represent the commentator network's attitude towards the state. and state The given evaluation value; the calculated advantage function can be used to measure the performance in the state. Take action Compared to the average quality of movement, when When, it indicates a desire to increase the probability of that action; conversely, when When the probability of an action is reduced, it indicates a desire to decrease the probability of that action. The introduction of the advantage function has significant theoretical implications and will be used to calculate the loss function.

[0050] The loss of the actor network in the PPO algorithm is calculated based on the advantage function. The loss function for the actor network as an actor module interacting is calculated as follows:

[0051] In the formula, Losses to the actors; E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates for the first e In the round, the _ t The probability ratio of the new strategy to the old strategy at each time step. This represents the corresponding advantage function. This means that the clip function is used to cut the clipped image. Limited to the range This prevents the strategy from being updated too drastically. The value represents the shearing rate, a hyperparameter that controls the cutting range. It is typically set to 0.1 or 0.2, but can be adjusted as needed based on actual conditions. When, it indicates a desire to increase the probability of that action, but if Exceed Then use the cropped value (i.e. Instead, use ) to limit the policy update magnitude from being too large; conversely, when When this is the case, it indicates a desire to reduce the probability of that action, but if Below Then the cropped value will also be used (i.e. To replace it, the update range of the control strategy should not be too small.

[0052] Accordingly, the formula for calculating the loss function of the commenter network, which is the interaction of the commenter module, is as follows:

[0053] In the formula, E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates the first e In the round, the _ t The dominance function value calculated at each time step.

[0054] For the multi-label prototype computation part of the actor network, a corresponding prototype loss is designed based on the distance distribution between its sub-label prototype vectors, and the prototype loss and the actor prototype network are used as the loss function for actor module interaction. The final joint loss function that makes up the actor's prototype network.

[0055] The joint loss function of the actor prototype network The expression is:

[0056] In the formula, The loss of the actor network as an actor module interaction in the PPO algorithm, For prototype loss, These are the weighting coefficients for the prototype loss.

[0057] The prototype loss The formula used to control the distance between child tag prototypes is:

[0058] In the formula, For consistency loss, For separation loss, and These are the weighting coefficients for the corresponding losses.

[0059] The consistency loss The formula for calculating the compactness of a class is as follows: This is used to shorten the distance between support set samples and their corresponding sub-label prototypes.

[0060] In the formula, N It is the number of classes included in each few-shot task. K It is the number of samples of each class drawn from the support set in each few-shot task; C It is the number of all sub-labels included in the multi-label classification task, and also the number of prototype vectors of all sub-labels; Indicates belonging to the first c Support set samples for each sub-label category It is the actor network for supporting the collection of samples The embedding vector representation, This indicates that the embedding vector and the sub-label c The corresponding sub-label prototype vector The distance between them.

[0061] The separation loss This is used to increase the distance between different sub-tag prototypes to enhance inter-class separability. The calculation formula is as follows:

[0062] In the formula, C It represents the total number of all sub-labels in a multi-label classification task, and also the total number of prototypes. This indicates a child tag. c The corresponding sub-label prototype vector with child tags d The corresponding sub-label prototype vector The distance between them; This is a boundary threshold hyperparameter, meaning that the distance between the expected sub-label prototype vectors is greater than... When the distance between the prototypes of a pair of child tags is greater than... When the distance between these two sub-label prototype vectors is less than 0, the corresponding loss will be 0; while when the distance between these two sub-label prototype vectors is less than 0, the loss will be 0. At that time, it will produce The loss value is used as a penalty to encourage the actor network to learn further in the direction of maximizing the distance between different sub-label prototypes. Therefore, the value of this hyperparameter needs to be adjusted according to the actual dataset.

[0063] The present invention will be further described in detail below with reference to specific embodiments.

[0064] Please see Figure 1 The present invention provides a flowchart of a few-sample, multi-label rolling bearing composite fault diagnosis method based on prototype strategy optimization, which is carried out according to the following steps: Step 1: Data Preparation and Organization: This embodiment of the invention uses a publicly available rolling bearing dataset provided by Paderborn University (PU), Germany, for a few-sample case analysis. All tested bearings are model 6203 rolling bearings, and the health states involved include four types: normal (N), outer ring failure (O), inner ring failure (I), and combined outer and inner ring failure (OI). The health states and operating conditions of the bearings selected for the experiments in this embodiment are shown in Tables 1 and 2, respectively. Table 1 Health status of the selected experimental bearings

[0065] Table 2 Operating Condition Setting Parameters

[0066] This embodiment of the invention ultimately selected vibration signal data from rolling bearings under the latter three operating conditions, corresponding to the four health states mentioned above, resulting in a total of twelve categories of bearing data. Each category contains a mixture of bearing data from three selected test bearings under the corresponding health state. Here, the signal segment sampled from each rolling bearing is divided into 100 samples, corresponding to 80 training samples and 20 test samples, with each sample containing 4096 data points. Therefore, each category of bearing data consists of 300 samples, corresponding to 240 training samples and 60 test samples. Ultimately, all categories of bearing data will contain a total of 12 * 300 = 3600 samples, also divided into 2880 training samples and 720 test samples. Simultaneously, the Actor Prototypical Network and Critic Network in the Proximal Policy Optimization (PPO) algorithm are randomly initialized.

[0067] Step 2: Task Construction and Prototype Generation: Based on the training samples, an N-way K-shot few-shot task is constructed. For the few-shot task, corresponding category samples are selected to generate a support set and a query set. Then, the multi-label prototyping mechanism proposed in this embodiment of the invention is used to generate a prototype vector corresponding to each sub-label: First, the single label of all query samples is converted into multiple sub-labels containing different feature information. Then, for each sub-label contained in each sample in the query set... cThis requires finding all samples in the support set that have the given sub-label, summing the embedding vectors of all the found samples, and taking the average. This average is then used as the sub-label. c The prototype vector representation of the sub-tags is calculated using the following formula: (1) In equation (1), This indicates an indicator function. If the expression inside the indicator function is true, the function value is 1; otherwise, the function value is 0. Indicates the first i The first sample c Sub-label values, This indicates that the neural encoder in the feature extraction module of the actor network is for the first... i Sample Embedded vector representation; This is how each sub-tag is calculated. c After representing the prototype vectors of the sub-tags, each sub-tag prototype vector... The labels are arranged in order to form the overall prototype vector p, which contains all the sub-label information related to the selected category in the few-shot task.

[0068] Step 3: For each few-shot task, samples are sequentially drawn from the query set and fed into the actor network to generate corresponding embedding vectors. The distance between this embedding vector and the prototype vector p is then calculated, and softmax is used to convert the distance into an action probability distribution under different sub-labels. The action corresponding to the sub-label with the highest probability is selected to obtain the corresponding reward, and the process moves to the next sub-label. This process is repeated until all sub-labels of the drawn samples have been selected. During each selection process, the selected action, reward, and the corresponding sample itself are stored in the experience replay pool. The specific interaction process is as follows: First, the actor network is responsible for generating all sub-label prototype vectors from the support set samples. Simultaneously, it generates the corresponding action probability distribution based on the distance between the embedding vector of the query sample and each sub-prototype vector. The action probability distribution at any time step in any round is given by the following formula: (2) In equation (2), This represents the learning parameters of the actor prototype network. a This represents the vector of possible actions. Indicates the first e In the round, the _ t The state of the actor's network at a given time step. This represents the embedding representation of the actor prototype network for that state. d This represents the distance function, where p represents each sub-label.c Corresponding sub-label prototype vector The overall prototype vector is composed of the corresponding sub-labels arranged in order. Then, the action to be selected is determined from the obtained action probability distribution. (That is, the action with the highest probability among the remaining optional actions), and generate a corresponding reward, the formula is: (3) In equation (3), Indicates the first e In the round, the _ t The actions taken by the agent at each time step. Indicates the state Next action The corresponding probability value, This is a set of labels containing all the true sub-labels of the sample. Specifically, the reward value here is not manually set; instead, the probability value corresponding to the selected action is recorded as the reward size. If the prediction is correct, the reward value will be positive, and the higher the action probability, the larger the reward value will be. If the prediction is incorrect, the reward value will be negative, and the higher the action probability, the smaller the reward value will be. In this way, the probability of the desired correct action should be as high as possible, and the probability of the incorrect action should be as low as possible. Therefore, the size of the reward value can be controlled by adaptively adjusting the weights based on the action probability.

[0069] Finally, the data generated during each of the above interactions is stored in the experience replay pool. The process continues until the set number of training rounds is reached to ensure that all samples in the query set have completed the interaction.

[0070] Step 4: Each time, a specific batch of data is selected from the experience replay pool and input into the constructed actor network and critic network. Based on the critic network, the loss function included in the PPO algorithm and the prototype loss function are combined into a joint loss function to optimize the actor network and perform gradient backpropagation, resulting in the actor prototype network. The vibration signal of the rolling bearing to be tested is input into the actor prototype network, which outputs an action decision sequence to complete the fault diagnosis. This action decision sequence corresponds to the fault prediction results of multiple sub-labels for each test sample; the prototype loss function is set based on the distance between the prototype vectors of the sub-labels.

[0071] First, in each update round, a certain batch of data will be selected from the experience replay pool and used as input into the actor network to generate new sub-label prototype representations, action probability distributions under the new strategy, and to calculate the probability ratio between the old and new strategies. The calculation formula is as follows: (4) In equation (4), Indicates the state Take action below The corresponding new probability value, Indicates the state Take action below The corresponding old probability value; Next, the data needs to be input into the critic network to provide an evaluation value for each corresponding state, using the following formula: (5) In equation (5), This represents the learning parameters of the Critic network. This indicates that the commentator network has a response to each corresponding state. Embedded representation; Then calculate the advantage function. The formula is: (6) In equation (6), Indicates the first e In the round, the _ t The reward value obtained by the actor network at a given time step. ∈(0,1) represents the discount factor, which is mainly used to control the weight of future rewards; and These respectively represent the commentator network's attitude towards the state. and state The given evaluation value; the calculated advantage function can be used to measure the performance in the state. Take action Compared to the average quality of movement, when When, it indicates a desire to increase the probability of that action; conversely, when When the probability of an action is reduced, it indicates a desire to decrease the probability of that action. The introduction of this advantage function has significant theoretical implications and will be used in the calculation of the loss function. The composition of the loss function of all network modules in this invention is as follows: Figure 2 As shown, firstly, based on the advantage function, the relevant loss of the actor network in the PPO algorithm can be calculated. For the actor network, which is the interaction loss function of the actor module, the calculation formula is as follows: (7) In equation (7), E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates for the first e In the round, the _ t The probability ratio of the new strategy to the old strategy at each time step. This represents the corresponding advantage function. This means that the clip function is used to cut the clipped image. Limited to the range This prevents the strategy from being updated too drastically. The value represents the shearing rate, a hyperparameter that controls the cutting range. It is typically set to 0.1 or 0.2, but can be adjusted as needed based on actual conditions. When, it indicates a desire to increase the probability of that action, but if Exceed Then use the cropped value (i.e. Instead, use ) to limit the policy update magnitude from being too large; conversely, when When this is the case, it indicates a desire to reduce the probability of that action, but if Below Then the cropped value will also be used (i.e. To replace it, the update range of the control strategy should not be too small.

[0072] Accordingly, the loss function for the commenter network, which is the interaction of the commenter modules, is calculated as follows: (8) In equation (8), E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates the first e In the round, the _ t The dominance function value calculated at each time step; In addition, for the multi-label prototype calculation part of the actor network, this invention designs a corresponding prototype loss based on the distance distribution between its sub-label prototype vectors, and uses it and the actor prototype network as the loss function for actor module interaction. The final joint loss function that makes up the actor prototype network is calculated using the following formula: The final joint loss function of the actor prototype network The expression is: (9) In equation (9), The loss of the actor network as an actor module interaction in the PPO algorithm, For prototype loss, These are the weighting coefficients for the prototype loss; The prototype loss The formula used to control the distance between child tag prototypes is: (10) In equation (10), For consistency loss, For separation loss, and These are the weighting coefficients for the corresponding losses; The consistency loss The formula used to enhance intra-class compactness by bringing support set samples closer to their respective sub-label prototypes is as follows: (11) In equation (11), N It is the number of classes included in each few-shot task. K It is the number of samples of each class drawn from the support set in each few-shot task; C It represents the total number of all sub-labels in a multi-label classification task, and also the total number of prototypes. Indicates belonging to the first c Support set samples for each sub-label category It is the actor network for supporting the collection of samples The embedding vector representation, This indicates that the embedding vector and the sub-label c The corresponding sub-label prototype vector The distance between them.

[0073] The separation loss This is used to increase the distance between different sub-tag prototypes to enhance inter-class separability. The calculation formula is as follows: (12) In equation (12), where C It represents the total number of all sub-labels in a multi-label classification task, and also the total number of prototypes. This indicates a child tag. c The corresponding sub-label prototype vector with child tags d The corresponding sub-label prototype vector The distance between them; This is a boundary threshold hyperparameter, meaning it's expected that the distance between a pair of child label prototypes is greater than this value. When the distance between these prototypes is less than 0, the corresponding loss will be 0; while when the distance between these two sub-label prototype vectors is less than 0, the loss will be 0. At that time, it will produce The loss value is used as a penalty to encourage the model to learn further in the direction of maximizing the distance between prototype vectors of different sub-labels. Therefore, the value of this hyperparameter needs to be adjusted according to the actual dataset.

[0074] Therefore, the loss function for each part can be calculated, resulting in the final joint loss function. Through backpropagation of the joint loss function, the parameters of both the actor prototype network and the critic network within the prototype policy optimization framework are continuously updated and optimized. The training process uses Adam as the optimizer, with learning rates of 1e-7 and 3e-7 for the actor and critic networks, respectively. The few-shot task is set to 4-way 5-shot, with 50 training epochs, 300 few-shot tasks, 60 training rounds, a maximum time step of 3 for each round, and 10 PPO updates. Finally, the trained actor prototype network is saved, and its performance is validated on the test set to obtain its prediction results for fault diagnosis.

[0075] In this embodiment of the invention, Table 3 shows the prediction results of the proposed method and some other methods on the test set. It is evident that the prediction accuracy of the proposed method is significantly higher than that of other few-shot learning methods, demonstrating superior performance. Furthermore, the confusion matrix and t-SNE visualization of the prediction results of the proposed method are provided by [the relevant documentation / component]. Figure 3 Give, from Figure 3 As can be seen from the results, the proposed method has a relatively high prediction accuracy for each type of fault, and the classes in the learned prototype space are basically separable, which can effectively extract fault features and achieve accurate fault identification with a small number of samples.

[0076] Table 3. Accuracy Results of Five Models

[0077] In summary, the experimental results verify that the proposed prototype strategy optimization-based few-sample multi-label rolling bearing composite fault diagnosis method contributes to improving the diagnostic performance of the prototype network. Therefore, the proposed method can be well applied to few-sample multi-label fault diagnosis of rolling bearings.

[0078] The present invention also provides a rolling bearing composite fault diagnosis system based on prototype strategy optimization. The diagnosis system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the rolling bearing composite fault diagnosis method based on prototype strategy optimization as described above.

[0079] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the prototype-based strategy-optimized method for diagnosing composite faults in rolling bearings as described above.

[0080] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for diagnosing composite faults in rolling bearings based on prototype strategy optimization, characterized in that, The steps are as follows: (1) Construct an N-way K-shot few-shot task based on the training set, and select corresponding category samples to generate a support set and a query set for the few-shot task; convert the single label of all samples in the query set into multiple sub-labels containing different feature information to represent each sample in the query set. c Find all those who own this sub-tag in the support group. c For each sample, the embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector and the prototype vector of each sub-label The total prototype vector p is formed by arranging the data according to the label order; where the training set consists of the original vibration signals of different fault characteristics of rolling bearings under various working conditions. (2) Under each few-sample task, samples are sequentially extracted from the query set and fed into the actor network in the near-end policy optimization algorithm to generate corresponding embedding vectors. Then, the distance between the embedding vector and the prototype vector p is calculated, and the distance is converted into the action probability distribution under different sub-labels corresponding to the extracted samples through softmax. The action corresponding to the sub-label with the highest action probability is selected to obtain the corresponding reward, and the selection of the next sub-label is entered. This process is repeated until all sub-labels of the extracted samples are selected. The selected action, reward and the corresponding sample itself are stored in the experience replay pool during each selection process. (3) Each time, a specific batch of data is selected from the experience replay pool and input into the constructed actor network; the loss function contained in the near-end strategy optimization algorithm and the prototype loss function are combined to form a joint loss function to optimize the actor network and perform gradient backpropagation to obtain the actor prototype network; the vibration signal of the rolling bearing to be tested is input into the actor prototype network, and the actor prototype network outputs the action decision sequence to complete the fault diagnosis; wherein, each dimension of the action decision sequence contains different fault information; the prototype loss function is set based on the distance between the sub-label prototype vectors.

2. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 1, characterized in that: The embedding vectors corresponding to all the found samples are summed, and the average value is taken as the sub-label. c sub-label prototype vector The corresponding formula is: In the formula, Indicates an indicator function; Indicates the first i The first sample c Sub-label values, This indicates that the neural encoder in the feature extraction module of the actor network is for the first... i Sample The embedding vector representation.

3. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 2, characterized in that: The formula for calculating the probability distribution of actions is: In the formula, These represent the learning parameters of the actor network. a This represents the vector of possible actions. Indicates the first e In the round, the _ t The state of the actor's network at a given time step. This represents the embedding representation of the actor network for that state. d This represents the distance function, where p represents each sub-label. c Corresponding sub-label prototype vector The overall prototype vector is composed of the corresponding sub-labels arranged in order.

4. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 3, characterized in that: Determine the action to be selected from the obtained action probability distribution. And generate corresponding rewards, the formula is: In the formula, Indicates the first e In the round, the _ t The actions taken by the actors' network at a given time step. Indicates the state Next action The corresponding probability value, This is the set of labels that contains all the real sub-labels of the extracted samples.

5. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in any one of claims 1-4, characterized in that: The loss of the actor network in the PPO algorithm is calculated based on the advantage function. The loss function for the actor network as an actor module interacting is calculated as follows: In the formula, Losses to the actors; E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates for the first e In the round, the _ t The probability ratio of the new strategy to the old strategy at each time step. This represents the corresponding advantage function. This means that the clipping function is used to cut the clipping bar. Limited to the range Inside; The value represents the shear rate, which is a hyperparameter that controls the cutting range.

6. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 5, characterized in that: The formula for calculating the loss function of the commenter network, which is the interaction of the commenter module, is as follows: In the formula, E This indicates the number of rounds to update the network parameters. T Indicates the maximum time step. Indicates the first e In the round, the _ t The dominance function value calculated at each time step.

7. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 6, characterized in that: The joint loss function of the actor prototype network The expression is: In the formula, The loss of the actor network as an actor module interaction in the PPO algorithm, For prototype loss, These are the weighting coefficients for the prototype loss; The prototype loss The formula used to control the distance between child tag prototypes is: In the formula, For consistency loss, For separation loss, and These are the weighting coefficients for the corresponding losses.

8. The rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in claim 7, characterized in that: The consistency loss The formula for calculating the intra-class compactness is as follows: This is used to shorten the distance between support set samples and their corresponding sub-label prototypes. In the formula, N It is the number of classes included in each few-shot task. K It is the number of samples of each class drawn from the support set in each few-shot task; C It represents the total number of all sub-labels included in a multi-label classification task. Indicates belonging to the first c Support set samples for each sub-label category It is the actor network for supporting the collection of samples The embedding vector representation, This indicates that the embedding vector and the sub-label c The corresponding sub-label prototype vector The distance between them; The separation loss This is used to increase the distance between different sub-tag prototypes to enhance inter-class separability. The calculation formula is as follows: In the formula, C It represents the total number of all sub-labels included in a multi-label classification task. This indicates a child tag. c The corresponding sub-label prototype vector with child tags d The corresponding sub-label prototype vector The distance between them; It is the boundary threshold hyperparameter.

9. A composite fault diagnosis system for rolling bearings based on prototype strategy optimization, characterized in that: The diagnostic system includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it performs the rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the rolling bearing composite fault diagnosis method based on prototype strategy optimization as described in any one of claims 1-8.