A mechanical fault small sample data generation method and device based on differential evolution
By generating small sample data of mechanical faults through differential evolution, constructing local neighborhoods and combining them with remaining service life information, the problem of sample imbalance in mechanical fault diagnosis models is solved, and the training stability and diagnostic effect of the models are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUIZHOU UNIV
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-07
AI Technical Summary
Mechanical fault diagnosis models are susceptible to uneven distribution of sample size during training, which can lead to insufficient ability to identify a minority of fault types and affect the overall diagnostic performance.
By using a differential evolution-based method, small sample data of mechanical failures are generated, local neighborhoods are constructed, and remaining service life information is combined to adaptively generate candidate synthetic samples. The synthetic samples are then screened through validity judgment to enhance the minority class sample set and form a balanced training dataset.
This improves the training stability and diagnostic performance of the mechanical fault diagnosis model in small sample scenarios, ensures the representativeness and rationality of the generated samples, and avoids the sample distribution from deviating from the true distribution.
Smart Images

Figure CN121980428B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data augmentation technology, and in particular to a method and apparatus for generating small sample data of mechanical faults based on differential evolution. Background Technology
[0002] Mechanical equipment operates in complex environments during industrial production, and its operational status is easily affected by various factors such as load changes, component wear, and environmental conditions, potentially leading to bearing failures, gear failures, or other structural abnormalities. To achieve timely monitoring and fault identification of mechanical equipment, it is typically necessary to train fault diagnosis models using historical operating data. This enables the models to determine the presence of potential faults based on the equipment's operational characteristics. Therefore, constructing high-quality fault diagnosis training datasets is a crucial foundation for mechanical fault diagnosis technology.
[0003] However, in real-world applications, the frequency of different types of faults often varies significantly. Some common operating states or common fault types can accumulate a large amount of sample data, while certain abnormal or early fault states, due to their low probability of occurrence, often only yield a small amount of sample data. This results in a significant difference in the number of samples for different categories in the training dataset. In this situation, the fault diagnosis model is easily affected by the uneven distribution of sample numbers during training, causing the model to tend to learn features of categories with a larger sample size, while its ability to identify fault types with a smaller sample size is insufficient, thus affecting the overall effectiveness of mechanical equipment fault diagnosis. Summary of the Invention
[0004] This application provides a method and apparatus for generating small sample data of mechanical faults based on differential evolution, which can enhance minority class samples in mechanical fault diagnosis, alleviate the problem of sample imbalance, and thus improve the training effect of mechanical fault diagnosis model.
[0005] The first aspect of this application provides a method for generating small sample data of mechanical faults based on differential evolution, including:
[0006] Acquire mechanical equipment operating status data, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into a minority class sample set and a majority class sample set;
[0007] For each original sample in the minority class sample set, a corresponding local neighborhood is constructed;
[0008] Based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples, adaptive differential evolution is performed on each of the original samples to obtain candidate synthetic samples;
[0009] Perform a validity determination on the candidate synthetic samples, and add the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set;
[0010] The synthetic sample set is merged with the original minority class sample set to obtain the enhanced minority class sample set;
[0011] The enhanced minority class sample set is merged with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset.
[0012] Optionally, constructing a corresponding local neighborhood for each original sample in the minority class sample set includes:
[0013] For the target sample in the minority class sample set, calculate the sample distance between the target sample and the other minority class samples;
[0014] The samples are sorted from closest to furthest based on their distance.
[0015] Select the neighboring samples that are ranked first by the sample distance and are within the first preset number to form the local neighborhood of the target sample.
[0016] Optionally, the step of performing adaptive differential evolution on each of the original samples based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples to obtain candidate synthetic samples includes:
[0017] Select neighboring samples from the local neighborhood to participate in the generation of the candidate synthetic samples;
[0018] The generation weight of each minority class sample is determined based on the normalized remaining lifetime information, and the number of candidate synthetic samples generated corresponding to each minority class sample is determined based on the generation weight.
[0019] Adjust the scaling factor and crossover rate based on historical generation data;
[0020] Based on the adjusted scaling factor, a donor vector is selected from a preset mutation strategy; the preset mutation strategy includes difference vector, random sample perturbation, and neighbor mean guidance.
[0021] Adjust the variation amplitude of the donor vector according to the remaining service life information;
[0022] The original sample is crossed with the donor vector after adjusting the mutation magnitude to obtain the candidate synthetic sample.
[0023] Optionally, determining the generation weight of each minority class sample based on the normalized remaining lifetime information, and determining the number of candidate synthetic samples generated corresponding to each minority class sample based on the generation weight, includes:
[0024] A nonlinear mapping is performed on the normalized remaining useful life information to obtain basic weights; an enhancement process is performed on the basic weights to obtain initial weights.
[0025] Identify boundary samples based on the outlier status of the minority class samples in the sample space;
[0026] A boundary enhancement coefficient is applied to the initial weights corresponding to the boundary samples to obtain the generated weights;
[0027] The number of candidate synthetic samples generated for each minority class sample is determined according to the proportion of the generated weight to the total weight.
[0028] Optionally, adjusting the variation amplitude corresponding to the donor vector based on the remaining useful life information includes:
[0029] For samples with low remaining useful life, reduce the variation amplitude corresponding to the donor vector;
[0030] For samples with high remaining useful life, increase the variation amplitude corresponding to the donor vector;
[0031] The step of crossing the original sample with the donor vector after adjusting the mutation magnitude to obtain the candidate synthetic sample includes:
[0032] The original sample is cross-referenced with the donor vector after adjusting the variation magnitude;
[0033] During the crossover process, at least one feature dimension is randomly selected, such that the value of at least one feature dimension is derived from the donor vector after adjusting the mutation amplitude;
[0034] Output the candidate synthesized sample after crossover.
[0035] Optionally, the step of performing a validity determination on the candidate synthesized samples and adding the candidate synthesized samples that meet the validity determination conditions to the synthesized sample set includes:
[0036] Calculate the minimum distance between the candidate synthetic sample and the existing synthetic sample;
[0037] When the minimum distance is greater than a preset distance threshold, the candidate synthetic sample is determined to satisfy the diversity constraint.
[0038] When the minimum distance is less than or equal to the preset distance threshold, the candidate synthetic sample is discarded and regenerated;
[0039] Boundary constraint processing is performed on the candidate synthetic samples that satisfy the diversity constraints, restricting the values of each feature dimension to between the minimum and maximum values of the corresponding feature dimensions in the minority class sample set;
[0040] The candidate synthetic samples that have completed the boundary constraint processing are added to the synthetic sample set.
[0041] Optionally, in the process of performing validity determination on the candidate synthetic samples and adding the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set, the method further includes:
[0042] The interpretability of the candidate synthetic samples is evaluated.
[0043] Optimize the sample generation process based on the interpretability evaluation results.
[0044] Optionally, the interpretability evaluation of the candidate synthesized samples includes:
[0045] The consistency of the distribution between the candidate synthetic samples and the real samples in the feature space is calculated to obtain the feature space consistency evaluation result;
[0046] Calculate the correlation between the remaining useful life label and each feature in the candidate synthetic samples to obtain the remaining useful life correlation evaluation results;
[0047] The difference in feature contributions between the candidate synthetic samples and the real samples to the model output is calculated to obtain the consistency evaluation result of decision contribution.
[0048] Based on the preset fault evolution rules, it is determined whether the candidate synthetic sample conforms to the fault evolution law, so as to obtain the fault evolution rationality evaluation result.
[0049] Optionally, optimizing the sample generation process based on the interpretability evaluation results includes:
[0050] Based on the feature space consistency evaluation results, the remaining useful life correlation evaluation results, the decision contribution consistency evaluation results, and the fault evolution rationality evaluation results, the candidate synthetic samples are screened.
[0051] Candidate synthetic samples that have abnormal feature space distribution, whose remaining service life label contradicts the sample features, whose feature contribution deviates from the true sample distribution, or do not conform to the fault evolution law are removed.
[0052] Based on the screened candidate synthetic samples, adjust the scaling factor, crossover rate, generation weight, or mutation amplitude in the sample generation process.
[0053] The candidate synthetic samples are then generated based on the adjusted sample generation parameters.
[0054] A second aspect of this application provides a device for generating small sample data of mechanical faults based on differential evolution, used to implement the method of the first aspect and any possible implementation thereof, the device comprising:
[0055] The acquisition unit is used to acquire mechanical equipment operating status data, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into a minority class sample set and a majority class sample set.
[0056] The construction unit is used to construct a corresponding local neighborhood for each original sample in the minority class sample set;
[0057] The generation unit is used to perform adaptive differential evolution generation on each of the original samples based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples, so as to obtain candidate synthetic samples;
[0058] An execution unit is configured to perform validity determination on the candidate synthetic samples and add the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set.
[0059] The first merging unit is used to merge the synthetic sample set with the original minority class sample set to obtain an enhanced minority class sample set.
[0060] The second merging unit is used to merge the enhanced minority class sample set with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset.
[0061] A third aspect of this application provides an electronic device, comprising:
[0062] Processor, memory, input / output units, and bus;
[0063] The processor is connected to the memory, the input / output unit, and the bus;
[0064] The memory stores a program, and the processor calls the program to execute the method of the first aspect and any possible implementation of the first aspect.
[0065] The fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, causes the computer to perform the methods of the first aspect and any possible implementation thereof.
[0066] As can be seen from the above technical solutions, this application has the following advantages:
[0067] 1. By combining local neighborhood information and remaining service life information to generate synthetic samples, the generated samples can maintain the characteristic distribution of the original minority class samples and reflect the characteristic pattern of equipment operating status changes with service life, thereby improving the representativeness and rationality of the generated samples.
[0068] 2. By performing validity determination and multi-dimensional screening on candidate synthetic samples during the sample generation process, the generated samples are prevented from being overly concentrated or deviating from the distribution of real samples, thereby improving the overall quality of synthetic samples.
[0069] 3. By enhancing the minority class samples and constructing a training dataset together with the majority class samples, the class distribution in the mechanical fault diagnosis training data is made more balanced, thereby improving the training stability and diagnostic effect of the mechanical fault diagnosis model in small sample scenarios. Attached Figure Description
[0070] Figure 1 This is a flowchart illustrating an embodiment of the method for generating small sample data of mechanical faults based on differential evolution in this application.
[0071] Figure 2 This is a flowchart illustrating a sub-implementation of the method for generating small sample data of mechanical faults based on differential evolution in this application.
[0072] Figure 3 This is a flowchart illustrating another embodiment of the method for generating small sample data of mechanical faults based on differential evolution in this application;
[0073] Figure 4 This is a flowchart illustrating another embodiment of the method for generating small sample data of mechanical faults based on differential evolution in this application;
[0074] Figure 5 This is a flowchart illustrating another embodiment of the method for generating small sample data of mechanical faults based on differential evolution in this application;
[0075] Figure 6 This is a flowchart illustrating another embodiment of the method for generating small sample data of mechanical faults based on differential evolution in this application;
[0076] Figure 7 This is a schematic diagram of the structure of an embodiment of the mechanical fault small sample data generation device based on differential evolution in this application;
[0077] Figure 8 This is a schematic diagram of the structure of one embodiment of the electronic device in this application. Detailed Implementation
[0078] This application provides a method and apparatus for generating small sample data of mechanical faults based on differential evolution, which is used to enhance minority class samples in mechanical fault diagnosis, alleviate the sample imbalance problem, and thus improve the training effect of mechanical fault diagnosis model.
[0079] The method described in this application can be applied to servers, terminals, or other devices with logical processing capabilities; therefore, this application does not limit its application. For ease of description, the following description uses a server as the executing entity.
[0080] The embodiments of this application will now be described with reference to the accompanying drawings.
[0081] Please see Figure 1 , Figure 1 An embodiment of the method for generating small sample data of mechanical faults based on differential evolution provided in this application includes:
[0082] 101. Obtain the operating status data of mechanical equipment, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into minority class sample set and majority class sample set;
[0083] During the operation of mechanical equipment, various sensors, such as vibration sensors, temperature sensors, current sensors, or acoustic sensors, deployed at key parts of the equipment continuously collect equipment operating status data. The collected multi-source operating status data is uploaded to a server for unified storage and management. The server performs basic preprocessing on the raw operating status data, including time alignment, outlier removal, data normalization, or segmentation, to form sample data that reflects the characteristics of different operating states of the equipment. Based on this, the sample data is labeled with fault types according to historical fault records, maintenance logs, or equipment operation tag information, constructing a fault diagnosis sample set containing multiple equipment operating states and fault categories. Subsequently, the number of samples in each category is counted, and fault categories with significantly fewer samples are identified based on the sample distribution, and the corresponding samples are divided into minority class sample sets. At the same time, categories with relatively more samples are divided into majority class sample sets, thus forming an initial training data structure with differences in the number of samples.
[0084] The mechanical equipment operating status data collected in this application refers to the multi-dimensional physical quantity signals collected during the equipment operation process through the aforementioned sensors, which may include, but are not limited to:
[0085] Vibration sensor: Collects vibration acceleration signals from key parts of the equipment (such as bearing housings and gearbox housings), with units of g or m / s².
[0086] Temperature sensor: Collects temperature values of key components of the equipment (such as bearings and gear meshing points), in °C;
[0087] Current sensor: Collects the three-phase current signal of the drive motor, measured in amperes (A).
[0088] Acoustic sensor: Collects sound pressure signals during equipment operation, measured in Pa.
[0089] The aforementioned multi-physical quantity signals are collected synchronously through a data acquisition system, forming the original data basis for the equipment's operating status.
[0090] 102. For each original sample in the minority class sample set, construct the corresponding local neighborhood;
[0091] After partitioning the minority class sample set, the server searches for neighboring samples in the sample feature space, centering on each original minority class sample, to determine the set of neighboring samples that are similar to the original sample in terms of feature distribution. Specifically, sample feature vectors can be constructed based on vibration signal features, spectral features, time-frequency features, or statistical features, and the distance metric between samples can be calculated in the feature space. By selecting several samples that are relatively close as neighboring samples, a corresponding local neighborhood structure is established for each original sample. This local neighborhood is used to describe the local distribution relationship of minority class samples in the feature space, so that each original sample not only contains its own feature information, but can also be associated with a set of samples with similar features, providing a reference data basis for subsequent sample generation.
[0092] 103. Based on the remaining lifetime information corresponding to the local neighborhood and minority class samples, adaptive differential evolution is performed on each original sample to generate candidate synthetic samples;
[0093] After obtaining the local neighborhood corresponding to each original sample, the server further combines the remaining service life information of the minority class samples to analyze the differences between the samples and constructs a difference vector within the local neighborhood to describe the changing trend of the neighborhood samples in the feature space. On this basis, the original samples are expanded and generated through an adaptive differential evolution strategy. That is, the sample features are combined and perturbed according to the difference relationship between the original samples and the neighborhood samples, so that the generated samples maintain the fault characteristic attributes of the original samples while forming new sample distribution points in the feature space. At the same time, the evolution parameters in the differential generation process are adaptively adjusted according to the remaining service life information, so that the generated samples can reflect the evolution trend of the equipment operating status with the change of service life in terms of feature change amplitude, thereby obtaining a set of candidate synthetic samples.
[0094] It should be noted that in this application, the remaining useful life information is not directly calculated from the original data, but is a pre-assigned value at the category level based on prior knowledge of actual engineering practices. The specific basis is as follows:
[0095] Definition of Remaining Useful Life: Remaining Useful Life (RUL) is a core metric in the field of Predictive Health Management (PHM), used to quantify the length of time a device will take from its current state to failure. This application incorporates RUL as physical prior information into the sample generation process to enhance the physical interpretability of the generated samples.
[0096] Method for obtaining RUL: In practical applications, a typical RUL range is assigned to each type of sample based on the health status of the device. Specifically, as described below:
[0097] Minority sample (failure state): Its RUL is set to a shorter range, such as 5 or 20 time units, reflecting that it is close to failure;
[0098] The majority class of samples (normal state): their RUL is set to a longer range, such as 30 or 100 time units, reflecting their longer remaining lifespan. This assignment method is based on engineering experience, namely that samples are scarce and critical when the equipment is close to failure, which is consistent with actual operating conditions.
[0099] The role of RUL in this application: RUL information serves as an additional attribute of the sample. During the generation process, through weighted sampling and variation amplitude control, it guides the generated samples to conform to the degradation trajectory of the real device. In specific implementation, the RUL value does not rely on complex calculations but participates in the generation process as preset supervisory information, providing clear engineering justification.
[0100] 104. Perform validity determination on candidate synthetic samples and add candidate synthetic samples that meet the validity determination conditions to the synthetic sample set;
[0101] After obtaining candidate synthetic samples, the server performs a validity determination on each candidate synthetic sample. The validity determination includes diversity constraint determination and boundary constraint determination.
[0102] The diversity constraint determination is as follows: calculate the Euclidean distance between the candidate synthetic sample and each sample in the current synthetic sample set, and record the minimum value of the Euclidean distance as the minimum neighbor distance; when the minimum neighbor distance is greater than or equal to the preset distance threshold, the candidate synthetic sample is determined to satisfy the diversity constraint; when the minimum neighbor distance is less than the preset distance threshold, the candidate synthetic sample is determined to be too close to the existing synthetic sample and does not satisfy the diversity constraint, and the candidate synthetic sample is discarded or regenerated.
[0103] The boundary constraint determination is as follows: For each feature dimension of the candidate synthetic sample, a range check is performed. If the j-th feature value is less than the minimum value of the minority class sample in the j-th feature dimension, the j-th feature value is corrected to the minimum value; if the j-th feature value is greater than the maximum value of the minority class sample in the j-th feature dimension, the j-th feature value is corrected to the maximum value; if the j-th feature value is between the minimum and maximum value, the j-th feature value remains unchanged. The candidate synthetic sample after range check or correction is determined to satisfy the boundary constraints.
[0104] 105. Merge the synthetic sample set with the original minority class sample set to obtain the enhanced minority class sample set;
[0105] After the effective candidate sample screening is completed, the server merges the synthetic samples stored in the synthetic sample set with the original minority class samples, so that the newly generated samples and the original minority class samples together constitute the expanded sample set. During the merging process, the sample data is uniformly formatted and the labels are inherited, so that the new samples maintain the same fault category identification as the original minority class samples, and are stored and organized according to a unified data structure. In this way, the originally small number of fault category samples are supplemented, thereby forming an enhanced minority class sample set with a significantly increased number of samples.
[0106] 106. Merge the enhanced minority class sample set with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset.
[0107] After obtaining the enhanced minority class sample set, the server further integrates the enhanced minority class sample set with the original majority class sample set and constructs a new training data structure according to a unified data format. During the integration process, the samples of each class are uniformly sorted and indexed, so that the enhanced minority class samples and the majority class samples together constitute a complete training dataset. The final mechanical fault diagnosis training dataset increases the number of minority class samples while maintaining the original sample information, which alleviates the quantitative differences between different classes of samples and provides a more balanced data foundation for subsequent mechanical fault diagnosis model training.
[0108] In this embodiment, after constructing the fault diagnosis sample set, the samples are divided into minority and majority classes, and a local neighborhood structure is established around the minority class samples. Based on this, adaptive differential evolution is performed to generate candidate synthetic samples in combination with the remaining service life information. At the same time, samples that conform to the distribution law of minority class features are selected through validity judgment and added to the synthetic sample set. Subsequently, the synthetic samples are merged with the original minority class samples and majority class samples step by step to supplement the number of minority class samples and maintain consistency with the feature distribution of the original samples. This results in the construction of a mechanical fault diagnosis training dataset with a more balanced class distribution, which can improve the training stability and diagnostic effect of the mechanical fault diagnosis model in scenarios with mixed samples and imbalanced classes.
[0109] Please see Figure 2 In some embodiments of this application, step 102 in the above embodiments, which constructs a corresponding local neighborhood for each original sample in the minority class sample set, may include the following steps:
[0110] 201. For a target sample in a minority class sample set, calculate the sample distance between the target sample and the other minority class samples;
[0111] The server selects a sample from the minority class sample set as the target sample and obtains the corresponding sample feature vector in the feature space. At the same time, it traverses the remaining sample data in the minority class sample set excluding the target sample and extracts the corresponding feature vector information. Then, it calculates the distance value between the target sample and the remaining samples based on the numerical differences of each feature dimension to reflect the similarity of different samples in the feature space. During the calculation process, the difference of each feature dimension is squared and accumulated, and then the square root of the accumulated result is calculated to obtain the distance value between the target sample and each of the remaining samples. The distance results are recorded to form a distance data set between the target sample and the remaining minority class samples.
[0112] 202. Sort the samples from closest to furthest distance;
[0113] After obtaining the distance data between the target sample and each sample, the server performs a unified sorting process on all distance results. Using the distance value as the sorting basis, samples with smaller distances are placed at the front and samples with larger distances are placed at the back, thus forming an ordered sequence that reflects the similarity between samples. During the sorting process, the sample identification information corresponding to each distance value is recorded simultaneously, so that the sorted sequence can clearly indicate the proximity of each sample to the target sample in the feature space, providing a data basis for the selection of subsequent neighboring samples.
[0114] 203. Select the neighboring samples that are ranked first by sample distance and are within the first preset number to form the local neighborhood of the target sample.
[0115] After distance sorting is completed, the server selects a preset number of samples from the beginning of the sorted sequence as neighbor samples and associates these neighbor samples with the target sample to form a local sample set. The number of neighbor samples can be preset according to the size of the minority class sample set. When the number of available neighbor samples is insufficient, the number of neighbor samples can be reduced according to the actual number of samples to complete the neighborhood construction. When the number of available samples is too small to form an effective neighborhood structure, neighborhood construction is not performed on the target sample. In this way, each target sample can be associated with a set of samples with similar features in the feature space, thereby forming a local neighborhood structure to describe the local distribution relationship of the samples.
[0116] In this embodiment, by calculating the feature distance between minority class samples and sorting them according to the distance size, several neighboring samples that are closest to the target sample are selected to construct a local neighborhood. This allows each minority class sample to establish a relationship with similar samples in the feature space, thereby forming a data structure that reflects the local sample distribution characteristics. This provides a reliable local data foundation for subsequent sample generation based on neighborhood relationships, enabling the generated samples to expand around the feature distribution area of the original minority class samples, avoiding deviation of the generated samples from the original data distribution, and improving the rationality of the generated samples.
[0117] Please see Figure 3 In some embodiments of this application, step 103 in the above embodiments, based on the remaining lifetime information corresponding to the local neighborhood and minority class samples, performs adaptive differential evolution on each original sample to obtain candidate synthetic samples, and may include the following steps:
[0118] 301. Select neighboring samples from the local neighborhood to participate in the generation of candidate synthetic samples;
[0119] For each original sample in the minority class sample set, the server obtains the local neighborhood structure established in step 102 for that original sample, and selects several neighboring samples in that local neighborhood as reference objects for sample generation. During the selection process, the set of neighboring samples participating in the generation calculation can be determined based on the feature similarity between the neighboring samples and the original sample or by random sampling, so that the selected neighboring samples can reflect the local feature distribution of the area near the original sample. By selecting neighboring samples from the local neighborhood to participate in sample generation, the subsequent generation operation is only performed in the feature area around the original sample, providing a basic data source for the generation of candidate synthetic samples.
[0120] 302. Determine the generation weight of each minority class sample based on the normalized remaining lifetime information, and determine the number of candidate synthetic samples generated for each minority class sample based on the generation weight.
[0121] The server obtains the remaining lifetime information for each minority class sample and normalizes the remaining lifetime data to allow for comparison of lifetime information for different samples within a uniform numerical range. Then, based on the normalized remaining lifetime value, it determines the generation weight of each sample in the sample generation process, ensuring that samples at different stages of operation contribute differently to the number of generated samples. On this basis, it allocates the corresponding number of candidate synthetic samples to each minority class sample according to the generation weight, enabling samples with representative features to generate more candidate samples, thus forming a sample generation allocation relationship associated with the sample state.
[0122] 303. Adjust the scaling factor and crossover rate based on historical generation data;
[0123] When performing sample generation, the server records the distribution of each candidate sample and the proportion of effective samples in the historical generation process, and adjusts the key parameters in the differential evolution algorithm based on these historical generation results. Specifically, according to the effective proportion of previously generated samples or changes in sample distribution, the scaling factor and crossover rate in differential evolution are adaptively updated so that the parameter settings used in the current generation stage can adapt to the current sample distribution characteristics, thereby providing a more reasonable parameter configuration for subsequent donor vector generation and crossover operations.
[0124] 304. Based on the adjusted scaling factor, select one of the preset mutation strategies to generate a donor vector;
[0125] After obtaining the updated scaling factor, the server selects one of the pre-configured mutation strategies for generating the donor vector, constructs a difference vector using the feature differences between the selected neighbor samples, and then calculates the corresponding donor vector by combining the feature vector of the current original sample and the scaling factor. This donor vector is used to describe the direction and magnitude of the sample's change in the feature space, providing new candidate feature data for subsequent sample crossover operations.
[0126] Specifically, a mutation strategy based on the difference vector of local neighborhood samples can be adopted, which constructs the mutation direction by utilizing the feature difference relationship between local neighborhood samples, thereby generating the donor vector; or, a mutation strategy based on random sample perturbation can be adopted, which introduces a random perturbation term on the sample feature vector to form a new mutation direction, thereby obtaining the donor vector; or, a mutation strategy guided by the mean of local neighborhood samples can be adopted, which calculates the feature mean of local neighborhood samples and uses this mean as the guiding direction to generate the donor vector, so that the donor vector maintains a consistent trend of change with the local sample distribution in the feature space.
[0127] 305. Adjust the variation amplitude of the donor vector based on the remaining service life information;
[0128] After obtaining the donor vector, the server further combines the remaining lifespan information of the corresponding original sample to adjust the variation range of the donor vector in the feature space. Specifically, the variation range of each feature in the donor vector is proportionally adjusted according to the remaining lifespan value so that the variation range can reflect the feature differences of the equipment operating status with the lifespan, thereby ensuring that the generated sample matches the actual trend of equipment operating status changes in the feature variation range.
[0129] 306. Cross the original sample with the donor vector after adjusting the mutation amplitude to obtain candidate synthetic samples.
[0130] After adjusting the donor vector variation amplitude, the server combines the original sample feature vector with the donor vector according to a preset crossover rule. By selecting data from the original sample or the donor vector in each feature dimension, a new sample feature vector is constructed, thereby generating new candidate sample data. While maintaining the feature attributes of the original sample, the candidate sample introduces the difference features of the neighboring sample, so that it forms a new distribution position in the feature space, thus obtaining the candidate synthetic sample.
[0131] In this embodiment, neighboring samples are selected from the local neighborhood to participate in sample generation. The generation weight and number of samples are assigned to each minority class sample in combination with the normalized remaining lifespan information. At the same time, the scaling factor and crossover rate are adjusted according to the historical generation situation. After generating the donor vector, the variation amplitude is adjusted according to the remaining lifespan information. Finally, candidate synthetic samples are obtained through crossover operation. This allows the generated samples to maintain the local distribution characteristics around the original samples and reflect the characteristic differences caused by the change of equipment operating status with lifespan, thereby improving the rationality and representativeness of the generated samples.
[0132] In some embodiments of this application, step 302 in the above embodiments, which determines the generation weight of each minority class sample based on the normalized remaining lifetime information and determines the number of candidate synthetic samples generated for each minority class sample based on the generation weight, may include the following steps:
[0133] 3021. Perform nonlinear mapping on the normalized remaining useful life information to obtain the basic weights; perform enhancement processing on the basic weights to obtain the initial weights;
[0134] The server obtains the normalized remaining useful life data corresponding to the minority class samples and performs non-linear mapping on the remaining useful life data to form weight values with differentiated distribution after mapping, thus obtaining the basic weight corresponding to each minority class sample. Subsequently, enhancement processing is performed on the basic weight to further adjust the weight values, making the weight differences between samples in different operating stages more obvious, thus obtaining the initial weight corresponding to each minority class sample, and using the initial weight as the basis for the allocation of the number of samples generated in the future.
[0135] 3022. Identify boundary samples based on the outlier status of minority class samples in the sample space;
[0136] After obtaining the initial weights of each minority class sample, the server analyzes the distribution of minority class samples in the feature space. By calculating the distance relationship or sample density information between the sample and its neighboring samples, it identifies sample data located in the edge region of the minority class sample distribution. When the distance between a minority class sample and its neighboring samples is relatively large, or the density of its surrounding samples is significantly lower than the overall sample distribution density, the sample is identified as a boundary sample, thus obtaining a boundary sample set to reflect the edge distribution of minority class samples in the sample space.
[0137] 3023. Apply boundary enhancement coefficients to the initial weights corresponding to the boundary samples to obtain the generated weights;
[0138] For the identified boundary samples, the server applies a boundary enhancement coefficient to their initial weights, amplifying the weight values and increasing the weight of the boundary samples during the sample generation process. For ordinary samples that are not identified as boundary samples, their initial weights remain unchanged or only basic weights are processed. In this way, samples located on the edge of the minority class sample distribution have a higher degree of participation in the subsequent sample generation process, thereby obtaining the generation weight corresponding to each minority class sample.
[0139] 3024. Determine the number of candidate synthetic samples generated for each minority class sample according to the proportion of the generated weight to the total weight.
[0140] After obtaining the generation weights corresponding to all minority class samples, the server summarizes and statistically analyzes the generation weights of each sample and calculates the proportion of each sample's generation weight in the total weight. Based on the weight proportion, the number of candidate synthetic samples to be generated is allocated. Specifically, based on the preset total number of candidate synthetic samples to be generated, the number of samples to be generated is allocated to each minority class sample according to the proportion of each sample's generation weight, so that the number of samples to be generated is consistent with the sample weight, thereby determining the number of candidate synthetic samples that need to be generated for each minority class sample in the sample generation stage.
[0141] In this embodiment, initial weights are obtained by nonlinearly mapping the normalized remaining service life information and enhancing the weights. At the same time, boundary samples are identified based on the outlier degree of minority class samples in the feature space, and boundary enhancement coefficients are applied to the boundary samples to increase their weights. Subsequently, the number of candidate synthetic samples generated is allocated to each minority class sample according to the proportion of the generated weights in the total weights. This allows the number of generated samples to reflect both the equipment's operating life status and the distribution characteristics of the samples in the feature space. As a result, the generated samples maintain a more reasonable spatial distribution while supplementing the number of minority class samples, thereby improving the coverage of minority class data structures by the generated samples.
[0142] In some embodiments of this application, step 303 in the above embodiments, which adjusts the scaling factor and cross rate based on historical generation data, may include the following steps:
[0143] 3031. Record the number of successfully generated samples and the total number of attempts during the candidate synthesis sample generation process;
[0144] When the server performs the candidate synthetic sample generation operation, it records each sample generation attempt and counts the number of successfully generated samples and the total number of generation attempts during the generation process. The number of successfully generated samples represents the number of samples that meet the generation conditions and are retained in the current generation stage, while the total number of attempts represents the total number of times the generation operation is performed in the sample generation stage. By continuously recording and updating these two types of data, statistical information reflecting the historical sample generation situation is formed.
[0145] 3032. Calculate the historical generation success rate based on the number of successfully generated samples and the total number of attempts;
[0146] After obtaining the number of successfully generated samples and the total number of attempts, the server calculates the ratio between the two to obtain the historical success rate of sample generation. Specifically, by calculating the ratio of the number of successfully generated samples to the total number of attempts, a success rate value representing the effectiveness of the generation operation is obtained. This success rate is used to reflect the overall effectiveness of the sample generation operation under the current parameter configuration and serves as an important basis for subsequent parameter adjustments.
[0147] 3033. When the historical generation success rate is greater than the preset threshold, increase the scaling factor and cross rate;
[0148] After obtaining the historical generation success rate, the server compares the success rate with a pre-set threshold. When the success rate is greater than the threshold, it means that the generated samples under the current generation strategy are more likely to meet the generation conditions. At this time, the scaling factor and crossover rate in the differential evolution process are increased and adjusted to further expand the range of variation of the donor vector in the feature space, and at the same time increase the feature crossover probability, so that the subsequently generated samples have a larger range of variation in the feature space.
[0149] 3034. When the historical generation success rate is less than or equal to the preset threshold, reduce the scaling factor and cross rate.
[0150] When the server determines that the historical generation success rate is less than or equal to the preset threshold, it indicates that the proportion of generated samples that meet the conditions under the current generation strategy is low. At this time, the scaling factor and crossover rate in the differential evolution process are reduced and adjusted to reduce the change amplitude of the donor vector in the feature space and reduce the feature crossover probability. This makes the range of change of the subsequently generated samples in the feature space closer to the original sample distribution, thereby improving the stability of sample generation.
[0151] In this embodiment, by recording the number of successfully generated samples and the total number of attempts during the candidate synthetic sample generation process, and calculating the historical generation success rate based on the ratio between the two, the scaling factor and crossover rate are adjusted by increasing or decreasing based on the comparison between the success rate and the preset threshold. This allows the key parameters in the differential evolution process to be dynamically adjusted according to the actual generation effect, thereby enabling the sample generation process to automatically match more suitable parameter settings at different stages, and improving the stability and effectiveness of the candidate synthetic sample generation process.
[0152] In some embodiments of this application, step 305 of the above embodiments, which adjusts the variation amplitude corresponding to the donor vector based on the remaining useful life information, and step 306, which cross-references the original sample with the donor vector after adjusting the variation amplitude to obtain candidate synthetic samples, may specifically include the following steps:
[0153] 3051. For samples with low remaining useful life, reduce the variation amplitude corresponding to the donor vector;
[0154] After obtaining the donor vector, the server acquires the remaining lifespan information corresponding to the current original sample and determines the operating stage of the sample based on this information. When the remaining lifespan of the sample is at a low level, it indicates that the device corresponding to the sample is nearing the end of its lifespan. Its operating status characteristics are usually relatively concentrated and the range of change is relatively small. At this time, the feature change amplitude in the donor vector is reduced. By reducing the change ratio of each feature dimension of the donor vector, the range of change of the generated sample in the feature space is made closer to that of the original sample, thereby maintaining the stability of the feature distribution of this type of sample.
[0155] 3052. For samples with high remaining useful life, increase the variation amplitude corresponding to the donor vector;
[0156] When the server determines that the remaining service life of the sample is at a high level, it indicates that the device is in an early or mid-stage of operation, and its operating status characteristics have a greater range of variation in actual operation. At this time, the feature variation amplitude in the donor vector is amplified. By increasing the change ratio of each feature dimension of the donor vector, the range of variation of the generated sample in the feature space is appropriately expanded, so that the generated sample can cover a richer feature distribution area.
[0157] 3061. Perform a binomial cross between the original sample and the donor vector after adjusting the variation amplitude;
[0158] After adjusting the donor vector variation amplitude, the server combines the feature vector of the original sample with the adjusted donor vector according to the binomial cross rule. Based on the cross probability, the server selects the corresponding feature values from the original sample or the donor vector in each feature dimension to form a new sample feature structure, so that the generated sample contains both the feature information of the original sample and the change information in the donor vector.
[0159] 3062. During the crossover process, at least one feature dimension is randomly selected, such that the value of at least one feature dimension is derived from the donor vector after adjusting the mutation amplitude;
[0160] When performing crossover operations, the server randomly selects at least one dimension from all feature dimensions and forces the feature values of that dimension to come from the donor vector after adjusting the mutation magnitude. This ensures that the crossover-generated samples contain at least some of the donor vector change information in their feature structure, thereby avoiding the generated samples being exactly the same as the original samples and ensuring that the sample generation operation can produce new feature combinations.
[0161] 3063. Output the candidate synthesized samples after crossover.
[0162] After completing the cross-calculation of all feature dimensions, the server outputs the new feature vector as the generation result and records the data corresponding to the feature vector as candidate synthetic samples for subsequent sample validity determination and sample screening.
[0163] In this embodiment, by adjusting the variation amplitude of the donor vector based on the remaining useful life information, the generated samples corresponding to samples with low remaining useful life maintain a small range of feature changes, while the generated samples corresponding to samples with high remaining useful life have a larger space for feature changes. At the same time, in the cross-step stage, the original sample features are combined with the donor vector features through a binary cross-step method, and by randomly selecting the feature dimension, new feature changes are ensured to be introduced into the generated samples. Thus, the generated samples can maintain the correlation with the original samples and form a new feature distribution, thereby improving the diversity and rationality of the candidate synthetic samples.
[0164] Please see Figure 4 In some embodiments of this application, after step 105 in the above embodiments merges the synthesized sample set with the original minority class sample set to obtain an enhanced minority class sample set, the method may further include the following steps:
[0165] 401. For each sample in the augmented minority class sample set, calculate the number of neighboring samples within a preset neighborhood radius;
[0166] After obtaining the augmented minority class sample set, the server performs neighborhood analysis on each sample in the set. Specifically, it constructs a preset neighborhood radius in the feature space with the current sample as the center and searches for other sample data within this neighborhood radius. By counting the number of samples falling within this neighborhood radius, the number of neighborhood samples corresponding to the current sample is obtained. During the calculation process, the distance relationship between sample feature vectors is judged. When the distance between samples is less than or equal to the preset neighborhood radius, the sample is included in the neighborhood sample set, thus obtaining the number of neighborhood samples corresponding to each sample within its neighborhood radius.
[0167] 402. When the number of neighborhood samples reaches the minimum number of points threshold, the corresponding sample is identified as a core sample.
[0168] After obtaining the number of neighboring samples for each sample, the server compares this number with a pre-set minimum point threshold. When the number of neighboring samples for a sample reaches or exceeds the minimum point threshold, the sample is identified as a core sample, and the position of the core sample in the feature space and its corresponding set of neighboring samples are recorded. In this way, core samples located in dense sample areas are identified in the augmented minority class sample set, providing basic nodes for subsequent sample clustering expansion.
[0169] 403. Expand sample clustering based on the density reachability relationship between core samples;
[0170] After identifying the core samples, the server determines whether the samples meet the density reachability condition based on the neighborhood relationship between different core samples in the feature space. When the neighborhood of a core sample contains another sample, the sample is assigned to the same density region. Starting from the core sample, the neighborhood range is continuously expanded, and samples that meet the density reachability condition are gradually added to the same cluster set. This forms several density clustering regions in the enhanced minority class sample set to describe the main distribution structure of the samples in the feature space.
[0171] 404. Samples that do not belong to any density reachable region are removed as noise samples.
[0172] After completing the density clustering expansion, the server checks the clustering status of all samples. When a sample is not assigned to any density-reachable region, it is identified as a noise sample and removed from the enhanced minority class sample set. This results in a sample set after removing outliers, making the remaining samples more consistent with the main data distribution structure.
[0173] In this embodiment, after obtaining the enhanced minority class sample set, the number of neighboring samples within a preset neighborhood radius is calculated and core samples are identified. Then, the samples are clustered and expanded according to the density reachability relationship between the core samples, and samples that do not belong to any density reachability region are removed as noise samples. This allows the enhanced minority class samples to be further filtered according to the density structure in the feature space, thereby removing abnormal samples that may deviate from the true sample distribution and improving the overall data quality of the enhanced minority class sample set.
[0174] Please see Figure 5 In some embodiments of this application, step 104 in the above embodiments performs a validity determination on the candidate synthetic samples and adds the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set, which may specifically include the following steps:
[0175] 501. Calculate the minimum distance between the candidate synthetic sample and the existing synthetic sample;
[0176] After generating candidate synthetic samples, the server obtains the feature vector of the current candidate synthetic sample and reads the feature vector information of each existing synthetic sample from the set of generated synthetic samples. By calculating the feature distance between the candidate synthetic sample and each existing synthetic sample, multiple distance values are obtained. Then, the minimum distance among these distance values is selected as the minimum distance between the candidate synthetic sample and the existing synthetic samples, thereby reflecting the closeness between the candidate sample and the existing synthetic samples in the feature space.
[0177] 502. When the minimum distance is greater than the preset distance threshold, the candidate synthetic sample is determined to meet the diversity constraint;
[0178] After obtaining the minimum distance, the distance value is compared with a pre-set distance threshold. When the minimum distance is greater than the distance threshold, it indicates that the candidate synthetic sample maintains a sufficient degree of difference from the existing synthetic samples in the feature space. At this time, the candidate synthetic sample is determined to meet the diversity constraint condition and is allowed to enter the subsequent processing stage.
[0179] 503. When the minimum distance is less than or equal to the preset distance threshold, discard the candidate synthetic sample and regenerate it;
[0180] If the comparison result shows that the minimum distance is less than or equal to the preset distance threshold, it means that the candidate synthetic sample is too close to the existing synthetic sample, which is likely to cause excessive concentration or repeated distribution among the generated samples. In this case, the candidate synthetic sample is not retained, but discarded, and the candidate sample generation operation is re-executed to obtain a new candidate synthetic sample.
[0181] 504. Perform boundary constraint processing on candidate synthetic samples that meet the diversity constraints, and restrict the values of each feature dimension to between the minimum and maximum values of the corresponding feature dimension in the minority class sample set;
[0182] For candidate synthetic samples that have already met the diversity constraints, further boundary constraint processing is applied to each feature dimension. By obtaining the minimum and maximum value ranges of each feature dimension in the minority class sample set, and performing range checks on each feature dimension of the candidate synthetic sample, when the value of a certain feature dimension exceeds the corresponding range, it is adjusted so that the value of that dimension falls back into the feature value range of the minority class sample, thereby ensuring that the value range of the generated sample in the feature space is consistent with that of the original minority class sample.
[0183] 505. Add the candidate synthetic samples that have completed the boundary constraint processing to the synthetic sample set.
[0184] After completing the feature boundary constraint processing, the adjusted candidate synthetic samples are saved as valid generated samples and added to the synthetic sample set for unified management, so that the number of samples in the synthetic sample set gradually increases, so as to provide samples for subsequent execution and construction operations with training data.
[0185] In this embodiment, the minimum distance between the candidate synthetic sample and the existing synthetic sample is calculated and the diversity constraint is determined accordingly. Boundary constraint processing is then performed while maintaining sufficient feature differences between the candidate sample and the existing sample. This ensures that the generated samples can maintain a certain distribution difference and that the values of each feature dimension fall within a reasonable range of minority class samples. In this way, while expanding the number of minority class samples, the generated samples are avoided from being too concentrated or deviating from the original data distribution, thereby improving the overall quality of the synthetic sample set.
[0186] Please see Figure 6 In some embodiments of this application, step 104 in the above embodiments, in the process of performing validity determination on candidate synthetic samples and adding candidate synthetic samples that meet the validity determination conditions to the synthetic sample set, may further include the following steps:
[0187] 601. Evaluate the interpretability of candidate synthetic samples;
[0188] After determining the basic validity of the candidate synthetic samples, an interpretability evaluation can be performed to further assess the structural consistency between the generated samples and the real samples. This involves a comprehensive analysis of the candidate samples from multiple perspectives, including feature space distribution, remaining useful life, model decision feature contributions, and fault evolution patterns, to determine whether the candidate synthetic samples are consistent with the real samples in terms of feature structure and physical meaning. Only after a candidate synthetic sample meets the validity criteria must it also pass the interpretability evaluation before being added to the synthetic sample set. This ensures that the samples ultimately added to the synthetic sample set reflect the characteristic diversity of the equipment under different health states while also guaranteeing the rationality of the samples.
[0189] 602. Optimize the sample generation process based on the interpretability evaluation results.
[0190] After obtaining the interpretability evaluation results, these results are used as feedback to optimize the sample generation process. Candidate samples that do not conform to the characteristic distribution or operational patterns are filtered out, and key parameters in the sample generation stage are adjusted based on the filtering results. This ensures that subsequently generated candidate samples better reflect the distribution patterns of actual equipment operating conditions. The interpretability evaluation is not only used to further filter candidate synthetic samples but also to optimize the process of generating candidate synthetic samples, making it easier for the generated candidate synthetic samples to meet the conditions for multiple rounds of filtering, thus improving efficiency.
[0191] Specifically, step 601 may include:
[0192] 6011. Calculate the consistency of the distribution of candidate synthetic samples and real samples in the feature space to obtain the feature space consistency evaluation result;
[0193] For the currently generated candidate synthetic samples, their feature vectors in the feature space are obtained and compared with the feature vector distribution of the real minority class samples. By analyzing the positional relationship, distance relationship or density distribution of the candidate synthetic samples in the feature space, it is determined whether the candidate synthetic samples fall into the main distribution area of the real samples, thereby obtaining the feature space consistency evaluation result that reflects the degree of consistency between the candidate samples and the real sample distribution.
[0194] Specifically, FSC can be used to measure the consistency of the distribution of generated samples and real samples in the feature space, taking into account location relationships, distance relationships, or density distribution. The calculation formula is as follows:
[0195]
[0196]
[0197] in, d Indicates the total number of feature dimensions; This indicates that all candidate synthetic samples generated in a single iteration are in the th iteration. k The mean of each feature dimension; This indicates that all real samples are in the first... k The mean of each feature dimension; This indicates that all real samples are in the first... k Standard deviation of each feature dimension; The FSC index represents the generated samples; The FSC metric represents the performance of a single sample. In practical applications, the FSC threshold can be set to control whether candidate synthetic samples fall within the main distribution area of real samples.
[0198] The server compares the mean differences of the generated candidate synthetic samples and the real samples across various features using the FSC metric, and normalizes the results by considering the standard deviation of the real sample features. This provides a direct reflection of how closely the distribution of the generated candidate synthetic samples in the feature space matches that of the real samples. The smaller the FSC value, the more consistent the distribution of the generated samples with that of the real samples in the feature space, and the higher the quality of the generated candidate synthetic samples.
[0199] 6012. Calculate the correlation between the remaining useful life label and each feature in the candidate synthetic samples to obtain the remaining useful life correlation evaluation results;
[0200] Further, the remaining useful life labels corresponding to the candidate synthetic samples are obtained, and the correlation between the labels and the various feature dimensions of the samples is analyzed. By calculating the degree of correlation between different features and remaining useful life, it is determined whether the useful life labels in the candidate samples are consistent with the trend of sample feature changes, thereby obtaining the correlation evaluation results that reflect the reasonableness of the relationship between remaining useful life information and features.
[0201] Specifically, the degree of correlation can be represented by the RC index, and the calculation formula is as follows:
[0202]
[0203] in, d Indicates the total number of feature dimensions; The Spearman rank correlation coefficient represents the correlation coefficient between two variable sequences. represents the remaining lifespan corresponding to the i-th candidate synthetic sample; represents the feature value of the i-th candidate synthetic sample in the k-th feature dimension.
[0204] There is a complex intrinsic relationship between RUL and equipment characteristics. By calculating the RC index, the server can quantify the degree of correlation between the RUL labels and various features in the generated samples. The higher the RC value, the stronger the correlation between the RUL labels and features in the generated samples. This indicates that the generated samples can better reflect the changes in equipment health status over time, thereby improving the interpretability of the model for equipment failure prediction.
[0205] 6013. Calculate the difference in feature contributions between candidate synthetic samples and real samples to the model output to obtain the consistency evaluation results of decision contribution;
[0206] Within the framework of model prediction or model interpretation, the contribution of each feature of candidate synthetic samples and real samples to the prediction results during the model output process is analyzed. By comparing the differences in the contributions of different features in model decision-making, it is determined whether the feature role of candidate samples at the model decision-making level is consistent with that of real samples, thereby obtaining an evaluation result reflecting the degree of consistency between candidate samples and real samples in the model decision-making mechanism.
[0207] Specifically, this contribution difference can be represented by the DC metric. DC quantifies the contribution of a sample to the model decision using the SHAP value, and the calculation formula is as follows:
[0208]
[0209] Where m represents the total number of candidate synthetic samples participating in the evaluation; d represents the total number of feature dimensions; This represents the SHAP value corresponding to the j-th feature of the i-th candidate synthetic sample; The SHAP value corresponding to the j-th feature of the i-th real minority class sample is used as a benchmark reference value for the feature decision contribution.
[0210] The server calculates the difference in SHAP values between generated samples and real samples. The DC metric assesses whether the impact of generated samples on model decisions is consistent with that of real samples. The smaller the DC value, the closer the contribution of generated candidate synthetic samples to model decisions is to real samples. This means that generated candidate synthetic samples can better simulate the role of real samples in model decisions, thereby improving the interpretability of model decisions.
[0211] 6014. Based on the preset fault evolution rules, determine whether the candidate synthetic sample conforms to the fault evolution law, so as to obtain the fault evolution rationality evaluation result.
[0212] By combining the pre-set fault evolution law during the operation of mechanical equipment, the changing trends of candidate synthetic samples in different feature dimensions are analyzed. When the feature change trend of the candidate sample is consistent with the law of gradual fault development or performance degradation, it is judged to conform to the fault evolution law, thereby obtaining the evaluation result reflecting the rationality of the candidate sample in the actual fault development logic.
[0213] Specifically, the following formula can be used to evaluate the rationality assessment results of the fault evolution:
[0214]
[0215] in This represents the number of samples that conform to physical laws. This represents the total number of generated samples. A higher FER value indicates that the generated samples better conform to the fault evolution pattern, and the higher the quality and practicality of the generated samples.
[0216] Specifically, step 602 may include:
[0217] 6021. Based on the results of the feature space consistency evaluation, the remaining useful life correlation evaluation, the decision contribution consistency evaluation, and the failure evolution rationality evaluation, the candidate synthetic samples are screened.
[0218] After obtaining multi-dimensional evaluation results, the various evaluation results are comprehensively analyzed, and the candidate synthetic samples are judged according to the pre-set screening rules. When the candidate sample meets the evaluation conditions in terms of feature space distribution, lifetime information correlation, model decision contribution and fault evolution law, the candidate sample is retained; otherwise, it is marked as a sample that needs to be removed or regenerated.
[0219] 6022. Eliminate candidate synthetic samples that have abnormal feature space distribution, contradict the remaining service life label with the sample features, have feature contributions that deviate from the true sample distribution, or do not conform to the fault evolution law;
[0220] For candidate samples identified as anomalous during the above evaluation process, they are removed from the candidate sample set. Such anomalous samples include those that deviate significantly from the true sample distribution area in the feature space, those whose remaining service life label is inconsistent with the trend of sample feature changes, those that show anomalous feature contributions in model decision-making, and those that do not conform to the evolution law of equipment failure, thereby ensuring that the remaining candidate samples have high data reliability.
[0221] 6023. Based on the screened candidate synthetic samples, adjust the scaling factor, crossover rate, generation weight, or mutation amplitude in the sample generation process;
[0222] After the candidate sample screening is completed, the key parameters used in the sample generation stage are adjusted based on the distribution of retained sample features and various evaluation results. These include parameters such as scaling factor, crossover rate, sample generation weight, and mutation magnitude of donor vector in differential evolution, so that the parameter configuration is more adapted to the current sample distribution.
[0223] 6024. Continue to generate candidate synthetic samples based on the adjusted sample generation parameters.
[0224] After the parameter adjustment is completed, the updated generation parameters are reapplied to the candidate sample generation stage, so that subsequent sample generation operations can continue to be executed under the new parameter configuration, thereby continuously generating new candidate synthetic samples and entering the subsequent validity determination and evaluation process.
[0225] Furthermore, the process of generating candidate synthetic samples can be optimized according to the following formula:
[0226]
[0227]
[0228]
[0229]
[0230] in, This represents the multi-objective fitness value during the Bayesian optimization process; , , These represent preset weight coefficients, all of which are non-negative and sum to 1. They are used to balance the weight proportions of different optimization objectives. The area under the ROC curve of the fault diagnosis classification model represents the improvement effect of synthetic samples on the model's classification performance. In practical applications, the fitness value... The smaller the value, the better the overall quality of the synthesized sample set. This can be adjusted... , , The weighting ratio is adjusted to achieve synergistic optimization of the diagnostic model's classification performance and the interpretability of synthetic samples.
[0231] in, This represents the true rate function, which corresponds to the model's ability to identify minority class fault samples under different classification thresholds; The inverse function of the false positive rate is used to map the integral variable t to the false positive rate value under the corresponding classification threshold. This represents the true cases, i.e., the number of real fault samples that are correctly identified as fault classes by the model. This represents false negatives, i.e., the number of real fault samples that are incorrectly classified as normal by the model. This represents false positives, i.e., the number of real normal samples that are incorrectly classified as faulty by the model. This represents true negative examples, which is the number of real normal samples that are correctly identified as normal by the model. The true rate is the proportion of the number of fault samples correctly identified by the model out of the total number of real fault samples. The false positive rate is the proportion of normal samples that the model incorrectly identifies as faulty out of the total number of truly normal samples. In practical applications, The value range is from 0 to 1. The closer the value is to 1, the better the fault identification effect of the classification model, and the more significant the performance improvement effect of synthetic samples on the diagnostic model.
[0232] In this embodiment, an interpretability evaluation mechanism is introduced into the process of determining the validity of candidate synthetic samples. The candidate samples are comprehensively evaluated from multiple dimensions such as feature space distribution, remaining useful life correlation, model decision contribution, and fault evolution law. Abnormal samples are screened based on the evaluation results. At the same time, the sample generation parameters are dynamically adjusted according to the screening results, so that the sample generation process forms a closed-loop optimization mechanism. This ensures that the generated samples not only supplement the minority class samples in terms of quantity, but also maintain consistency with the real samples in terms of feature structure and fault evolution logic, thereby improving the credibility and practical value of the generated samples.
[0233] In the foregoing embodiments, the specific implementation process of the method provided in this application has been described in detail. It should be understood that, to implement the above method, this application also provides corresponding devices and computer-readable storage media, the technical concepts of which are consistent with the foregoing method embodiments, and both are used to implement all or part of the steps in the foregoing method. The technical solutions of the devices and computer-readable storage media involved in this application will be further described below in conjunction with specific embodiments.
[0234] Please see Figure 7 , Figure 7 An embodiment of the mechanical fault small sample data generation device based on differential evolution provided in this application is used to achieve, as follows: Figures 1 to 6 The method in any possible implementation of the illustrated embodiment includes:
[0235] The acquisition unit 701 is used to acquire mechanical equipment operating status data, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into a minority class sample set and a majority class sample set.
[0236] Construction unit 702 is used to construct the corresponding local neighborhood for each original sample in the minority class sample set;
[0237] The generation unit 703 is used to perform adaptive differential evolution generation on each original sample based on the remaining lifetime information corresponding to the local neighborhood and minority class samples to obtain candidate synthetic samples.
[0238] The execution unit 704 is used to perform validity determination on the candidate synthetic samples and add the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set;
[0239] The first merging unit 705 is used to merge the synthetic sample set with the original minority class sample set to obtain an enhanced minority class sample set;
[0240] The second merging unit 706 is used to merge the enhanced minority class sample set with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset.
[0241] In this implementation, the functions of each unit are as described above. Figures 1 to 6 The steps in the illustrated embodiments are the same and will not be repeated here.
[0242] Please see Figure 8 , Figure 8 One embodiment of the electronic device provided in this application includes:
[0243] Processor 801, memory 802, input / output unit 803, and bus 804;
[0244] The processor 801 is connected to the memory 802, the input / output unit 803, and the bus 804;
[0245] The memory 802 stores a program, which the processor 801 calls to execute. Figures 1 to 6 The steps in the illustrated embodiment.
[0246] In this embodiment, the function of processor 801 is the same as described above. Figures 1 to 6 The steps in the illustrated embodiments are the same and will not be repeated here.
[0247] This application also provides a computer-readable storage medium on which a program is stored. When the program is executed on a computer, it causes the computer to perform the aforementioned actions. Figures 1 to 6 The method in any possible implementation.
[0248] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0249] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0250] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0251] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0252] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for generating small sample data of mechanical faults based on differential evolution, characterized in that, include: Acquire mechanical equipment operating status data, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into a minority class sample set and a majority class sample set; For each original sample in the minority class sample set, a corresponding local neighborhood is constructed; Based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples, adaptive differential evolution is performed on each of the original samples to obtain candidate synthetic samples; Perform a validity determination on the candidate synthetic samples, and add the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set; The synthetic sample set is merged with the original minority class sample set to obtain the enhanced minority class sample set; The enhanced minority class sample set is merged with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset. The process of generating candidate synthetic samples by performing adaptive differential evolution on each of the original samples based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples includes: Select neighboring samples from the local neighborhood to participate in the generation of the candidate synthetic samples; The generation weight of each minority class sample is determined based on the normalized remaining lifetime information, and the number of candidate synthetic samples generated corresponding to each minority class sample is determined based on the generation weight. Adjust the scaling factor and crossover rate based on historical generation data; Based on the adjusted scaling factor, a donor vector is selected from a preset mutation strategy; the preset mutation strategy includes difference vector, random sample perturbation, and neighbor mean guidance. Adjust the variation amplitude of the donor vector according to the remaining service life information; The original sample is intersected with the donor vector after adjusting the mutation magnitude to obtain the candidate synthetic sample; The step of determining the generation weight of each minority class sample based on the normalized remaining lifetime information, and determining the number of candidate synthetic samples generated corresponding to each minority class sample based on the generation weight, includes: A nonlinear mapping is performed on the normalized remaining useful life information to obtain basic weights; an enhancement process is performed on the basic weights to obtain initial weights. Identify boundary samples based on the outlier status of the minority class samples in the sample space; A boundary enhancement coefficient is applied to the initial weights corresponding to the boundary samples to obtain the generated weights; The number of candidate synthetic samples generated for each minority class sample is determined according to the proportion of the generated weight to the total weight. The step of adjusting the variation amplitude corresponding to the donor vector based on the remaining useful life information includes: For samples with low remaining useful life, reduce the variation amplitude corresponding to the donor vector; For samples with high remaining useful life, increase the variation amplitude corresponding to the donor vector; The step of crossing the original sample with the donor vector after adjusting the mutation magnitude to obtain the candidate synthetic sample includes: The original sample is cross-referenced with the donor vector after adjusting the variation magnitude; During the crossover process, at least one feature dimension is randomly selected, such that the value of at least one feature dimension is derived from the donor vector after adjusting the mutation amplitude; Output the candidate synthesized sample after crossover.
2. The method according to claim 1, characterized in that, The construction of corresponding local neighborhoods for each original sample in the minority class sample set includes: For the target sample in the minority class sample set, calculate the sample distance between the target sample and the other minority class samples; The samples are sorted from closest to furthest in terms of distance. Select the neighboring samples that are ranked first by the sample distance and are within the first preset number to form the local neighborhood of the target sample.
3. The method according to claim 1, characterized in that, The step of performing validity determination on the candidate synthetic samples and adding the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set includes: Calculate the minimum distance between the candidate synthetic sample and the existing synthetic sample; When the minimum distance is greater than a preset distance threshold, the candidate synthetic sample is determined to satisfy the diversity constraint. When the minimum distance is less than or equal to the preset distance threshold, the candidate synthetic sample is discarded and regenerated; Boundary constraint processing is performed on the candidate synthetic samples that satisfy the diversity constraints, restricting the values of each feature dimension to between the minimum and maximum values of the corresponding feature dimensions in the minority class sample set; The candidate synthetic samples that have completed the boundary constraint processing are added to the synthetic sample set.
4. The method according to any one of claims 1 to 3, characterized in that, In the process of performing validity determination on the candidate synthetic samples and adding the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set, the method further includes: The interpretability of the candidate synthetic samples is evaluated. Optimize the sample generation process based on the interpretability evaluation results.
5. The method according to claim 4, characterized in that, The evaluation of the interpretability of the candidate synthetic samples includes: The consistency of the distribution between the candidate synthetic samples and the real samples in the feature space is calculated to obtain the feature space consistency evaluation result; Calculate the correlation between the remaining useful life label and each feature in the candidate synthetic samples to obtain the remaining useful life correlation evaluation results; The difference in feature contributions between the candidate synthetic samples and the real samples to the model output is calculated to obtain the consistency evaluation result of decision contribution. Based on the preset fault evolution rules, it is determined whether the candidate synthetic sample conforms to the fault evolution law, so as to obtain the fault evolution rationality evaluation result.
6. The method according to claim 5, characterized in that, The process of optimizing sample generation based on interpretability evaluation results includes: Based on the feature space consistency evaluation results, the remaining useful life correlation evaluation results, the decision contribution consistency evaluation results, and the fault evolution rationality evaluation results, the candidate synthetic samples are screened. Candidate synthetic samples that have abnormal feature space distribution, whose remaining service life label contradicts the sample features, whose feature contribution deviates from the true sample distribution, or do not conform to the fault evolution law are removed. Based on the screened candidate synthetic samples, adjust the scaling factor, crossover rate, generation weight, or mutation amplitude in the sample generation process. The candidate synthetic samples are then generated based on the adjusted sample generation parameters.
7. A device for generating small sample data of mechanical faults based on differential evolution, characterized in that, The apparatus for implementing the method according to any one of claims 1 to 6 comprises: The acquisition unit is used to acquire mechanical equipment operating status data, construct a fault diagnosis sample set, and divide the fault diagnosis sample set into a minority class sample set and a majority class sample set. The construction unit is used to construct a corresponding local neighborhood for each original sample in the minority class sample set; The generation unit is used to perform adaptive differential evolution generation on each of the original samples based on the remaining lifetime information corresponding to the local neighborhood and the minority class samples, so as to obtain candidate synthetic samples; An execution unit is configured to perform validity determination on the candidate synthetic samples and add the candidate synthetic samples that meet the validity determination conditions to the synthetic sample set. The first merging unit is used to merge the synthetic sample set with the original minority class sample set to obtain an enhanced minority class sample set. The second merging unit is used to merge the enhanced minority class sample set with the majority class sample set to obtain the enhanced mechanical fault diagnosis training dataset.