Fault diagnosis model establishment method and fault diagnosis method

By using the noise reduction processing of the target piecewise linear function in the fault diagnosis model, the demand for computing resources and storage resources is solved, the accuracy and efficiency of fault detection of mechanical parts are improved, the demand for computing resources and storage resources existing in the existing technology is solved, and the technical problems existing in the existing technology are solved.

CN116012276BActive Publication Date: 2025-09-23WUHU MIDEA KITCHEN & BATH APPLIANCES MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111221603.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2025-09-23
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

The existing attention mechanism-based model occupies a large amount of computing resources in mechanical parts fault detection, is difficult to apply to miniaturized equipment, and has low noise reduction accuracy and poor adaptability.

Method used

A denoising processing module adopts a target piecewise linear function. By deleting the attention modules whose target slope is less than the target gradient, redundant modules are streamlined, hardware equipment and network bandwidth requirements are reduced, and attention modules with practical value are retained through attention conversion to generate a target piecewise linear function that dynamically responds to noise signals.

Benefits of technology

The accuracy and efficiency of the fault diagnosis model are improved, the demand for hardware resources and network bandwidth is reduced, and the technical problems existing in the existing technology are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116012276B_ABST
    Figure CN116012276B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology and provides a method for establishing a fault diagnosis model and a fault diagnosis method. The method comprises: for a trained current fault diagnosis model, if the target slope corresponding to a target noise reduction processing module among multiple noise reduction processing modules is less than the target gradient, deleting the attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model; if the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, using the fault diagnosis model that last met the test accuracy greater than the target accuracy as the target fault diagnosis model. By streamlining the attention modules with low actual effectiveness, redundant modules can be reduced, the requirements for hardware equipment and network bandwidth can be lowered, and the attention modules with practical value can be retained as much as possible to effectively avoid recognition errors caused by noise signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for establishing a fault diagnosis model and a fault diagnosis method. Background Art

[0002] AI-based image and sound recognition technologies are widely used in mechanical component fault detection. Before recognition, images are typically subjected to noise reduction using a soft thresholding method. However, this method suffers from low noise reduction accuracy and poor adaptability. Related technologies have designed models based on attention mechanisms for noise reduction, but these mechanisms often require significant computational resources, making them difficult to apply to small devices. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method for establishing a fault diagnosis model to reduce the model's requirements on hardware devices and network bandwidth.

[0004] The present invention also provides a fault diagnosis method.

[0005] The present invention also provides a device for establishing a fault diagnosis model.

[0006] The present invention also provides a fault diagnosis device.

[0007] The present invention also provides an electronic device.

[0008] The present invention also provides a non-transitory computer-readable storage medium.

[0009] The present invention also provides a computer program product.

[0010] According to a method for establishing a fault diagnosis model according to an embodiment of the first aspect of the present invention, the fault diagnosis model includes multiple noise reduction processing modules, each of which includes a target piecewise linear function, the slope of which is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The method includes:

[0011] For the trained current fault diagnosis model, if a target slope corresponding to a target noise reduction processing module among the multiple noise reduction processing modules is less than a target gradient, deleting an attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model;

[0012] When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model;

[0013] The features of the object to be diagnosed are features of an image to be diagnosed or features of a sound to be diagnosed.

[0014] According to the method for establishing a fault diagnosis model in an embodiment of the present invention, by streamlining the attention modules that are not actually effective, it is possible to reduce redundant modules, lower the requirements for hardware equipment and network bandwidth, and retain the attention modules with practical value to the greatest extent possible, which can effectively avoid recognition errors caused by noise signals, thereby improving the accuracy and efficiency of the fault diagnosis model results when performing fault diagnosis.

[0015] According to one embodiment of the present invention, after obtaining the new fault diagnosis model and before using the fault diagnosis model with the last test accuracy greater than the target accuracy as the target fault diagnosis model, the method further includes:

[0016] When the test accuracy of the trained new fault diagnosis model is greater than the target accuracy, the new fault diagnosis model is used as the current fault diagnosis model, and the target gradient is increased.

[0017] According to one embodiment of the present invention, the parameters of the target piecewise linear function include a threshold, a first slope within the threshold, a second slope outside the threshold, and a third slope;

[0018] When a target slope corresponding to a target noise reduction processing module among the multiple noise reduction processing modules is less than a target gradient, deleting an attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model, including:

[0019] When a target slope among the first slope, the second slope, and the third slope corresponding to the target noise reduction processing module is less than a target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

[0020] According to one embodiment of the present invention, the first slope, the second slope and the third slope are determined by the following method:

[0021] Inputting the features of the object to be diagnosed into the first sub-processing layer of the noise reduction processing module, the first sub-processing layer extracts the features of the object to be diagnosed and outputs multiple groups of first object features;

[0022] The multiple groups of first object features are input into the second sub-processing layer of the noise reduction processing module, and the second sub-processing layer performs attention conversion on the multiple groups of first object features and outputs the first slope, the second slope and the third slope.

[0023] According to one embodiment of the present invention, before training the current fault diagnosis model, the method further includes:

[0024] Constructing an initial fault diagnosis model, the initial fault diagnosis model comprising a feature extraction module, a plurality of noise reduction processing modules, and a recognition module connected in sequence, the feature extraction module being configured to extract features of an object to be diagnosed from an input object to be diagnosed, the noise reduction processing module being configured to output second object features based on the input features of the object to be diagnosed, and the recognition module being configured to output a fault diagnosis result based on the input second object features;

[0025] Training the initial fault diagnosis model, and obtaining a threshold value of the target piecewise linear function corresponding to the noise reduction processing module in the trained initial fault diagnosis model;

[0026] Deleting the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model to obtain the current fault diagnosis model;

[0027] The current fault diagnosis model is trained.

[0028] According to one embodiment of the present invention, deleting the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model includes:

[0029] Traversing the thresholds corresponding to the multiple noise reduction processing modules;

[0030] When the threshold of the current noise reduction processing module is greater than the target value, the current noise reduction processing module and the noise reduction processing modules subsequent to the current noise reduction processing module are deleted.

[0031] According to an embodiment of the present invention, the feature of the object to be diagnosed is an image feature to be diagnosed or a sound feature to be diagnosed.

[0032] A fault diagnosis method according to an embodiment of the second aspect of the present invention includes:

[0033] Input the object to be diagnosed into the feature extraction module of the target fault diagnosis model, and output the features of the object to be diagnosed;

[0034] Inputting the feature of the object to be diagnosed into the noise reduction processing module of the target fault diagnosis model and outputting a second object feature;

[0035] The second object feature is input into the recognition module of the target fault diagnosis model, and the fault diagnosis result is output; wherein,

[0036] The target fault diagnosis model is the target fault diagnosis model obtained by any of the above-mentioned establishment methods, and the object to be diagnosed is an image or a sound.

[0037] According to the fault diagnosis method of an embodiment of the present invention, fault identification is performed on the second object feature after effective noise reduction through the recognition module of the fault diagnosis model, which can effectively avoid the recognition error caused by the noise signal, and the model is streamlined, which can simultaneously ensure the accuracy of the fault diagnosis result and the efficiency of the recognition.

[0038] According to one embodiment of the present invention, the object to be diagnosed is an image, the feature of the object to be diagnosed is a feature of the image to be diagnosed, and the second object feature is a second image feature;

[0039] or,

[0040] The object to be diagnosed is sound, the feature of the object to be diagnosed is a feature of the sound to be diagnosed, and the second object feature is a second sound feature.

[0041] According to a third aspect of an embodiment of the present invention, a device for establishing a fault diagnosis model includes a plurality of noise reduction processing modules, each of which includes a target piecewise linear function, wherein the slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The device includes:

[0042] a first processing module, configured to, for a trained current fault diagnosis model, delete an attention module corresponding to the target slope of a target noise reduction processing module among the multiple noise reduction processing modules when the target slope corresponding to the target noise reduction processing module is less than the target gradient, to obtain a new fault diagnosis model;

[0043] The second processing module is used to use the fault diagnosis model that meets the test accuracy greater than the target accuracy for the last time as the target fault diagnosis model when the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy;

[0044] The features of the object to be diagnosed are features of an image to be diagnosed or features of a sound to be diagnosed.

[0045] A fault diagnosis device according to an embodiment of a fourth aspect of the present invention includes:

[0046] The third processing module is used to input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed;

[0047] a fourth processing module, configured to input the feature of the object to be diagnosed into a noise reduction processing layer of the target fault diagnosis model and output a second object feature;

[0048] A fifth processing module is used to input the second object feature into the recognition layer of the target fault diagnosis model and output the fault diagnosis result; wherein, the target fault diagnosis model is the target fault diagnosis model obtained by the above-mentioned establishment method, and the object to be diagnosed is an image or sound.

[0049] According to an embodiment of the fifth aspect of the present invention, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for establishing a fault diagnosis model or the steps of the fault diagnosis method as described above are implemented.

[0050] According to the non-transitory computer-readable storage medium of the sixth aspect of the present invention, a computer program is stored thereon, and when the computer program is executed by a processor, the method for establishing a fault diagnosis model or the steps of the fault diagnosis method as described above are implemented.

[0051] According to the seventh aspect of the present invention, a computer program product includes a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for establishing a fault diagnosis model or a fault diagnosis method.

[0052] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0053] By streamlining the attention modules that are not actually effective, we can reduce redundant modules, lower the requirements for hardware equipment and network bandwidth, and retain the attention modules with practical value as much as possible, which can effectively avoid recognition errors caused by noise signals, thereby improving the accuracy and efficiency of the fault diagnosis model when performing fault diagnosis.

[0054] Furthermore, while maintaining substantially the same accuracy, the number of layers in the fault diagnosis model can be effectively reduced.

[0055] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 11 is a flow chart of a method for establishing a fault diagnosis model according to an embodiment of the present invention;

[0058] Figure 2 This is one of the principle schematic diagrams of the noise reduction processing module in the fault diagnosis method provided by an embodiment of the present invention;

[0059] Figure 3 This is one of the flowcharts of the fault diagnosis method provided by an embodiment of the present invention;

[0060] Figure 4 is a piecewise linear function graph in the related art;

[0061] Figure 5 is a target piecewise linear function graph provided by an embodiment of the present invention;

[0062] Figure 6 This is a threshold statistical analysis diagram provided by an embodiment of the present invention;

[0063] Figure 7 Schematic diagram of the structure of a device for establishing a fault diagnosis model provided by an embodiment of the present invention;

[0064] Figure 8 This is one of the flowcharts of the fault diagnosis method provided by an embodiment of the present invention;

[0065] Figure 9 is a structural diagram of a fault diagnosis device provided by an embodiment of the present invention;

[0066] Figure 10 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0068] In the description of the embodiments of the present invention, it should be noted that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore should not be understood as limiting the embodiments of the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0069] In the description of the embodiments of the present invention, it should be noted that, unless otherwise specified or limited, the terms "connected" and "connection" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; mechanical connections, electrical connections; and direct connections or indirect connections through an intermediary. Those skilled in the art will understand the specific meanings of the above terms in the embodiments of the present invention based on the specific circumstances.

[0070] In the embodiments of the present invention, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, a first feature being "above," "above," or "above" a second feature may mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is at a higher level than the second feature. A first feature being "below," "below," or "below" a second feature may mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is at a lower level than the second feature.

[0071] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0072] The following combination Figures 1-6 as well as Figure 8 A fault diagnosis method according to an embodiment of the present invention is described.

[0073] The fault diagnosis method can be applied to fault detection of household appliances or commercial appliances. Household appliances include, but are not limited to, kitchen appliances, cleaning appliances, and refrigeration appliances. Kitchen appliances include, but are not limited to, range hoods and gas stoves.

[0074] The executor of the fault diagnosis method can be an electrical device, or a processor or processing device connected to the electrical device for communication, or an operating terminal of a quality inspection or maintenance personnel, wherein the operating terminal includes but is not limited to: a mobile phone, tablet computer or computer of a quality inspection or maintenance personnel.

[0075] The fault diagnosis model includes a feature extraction module, multiple noise reduction processing modules, and a recognition module. These modules are connected sequentially, with the output of the feature extraction module connected to the input of the first noise reduction module, the output of the first noise reduction module connected to the input of the second noise reduction module, and finally the output of the last noise reduction module connected to the input of the recognition module. The recognition module outputs the recognition result.

[0076] The fault diagnosis model can be applied to fault detection of household appliances or commercial appliances. Household appliances include, but are not limited to, kitchen appliances, cleaning appliances, and refrigeration appliances. Kitchen appliances include, but are not limited to, range hoods and gas stoves.

[0077] The input of the fault diagnosis model is the object to be diagnosed, which can be an image or a sound.

[0078] Taking an image as an example, the object to be diagnosed contains noise information, that is, unnecessary or redundant interference information in the image.

[0079] For example, in scenes with a lot of image pollution, such as smoke, rain, or oil smoke, the collected images will contain more noise signals generated by environmental interference.

[0080] The object to be diagnosed can be captured by a camera.

[0081] For example, consider a sound signal containing noise. This noise includes both the signal responsible for fault diagnosis and other redundant signals. For example, if a bearing is being diagnosed using the sound of rotating bearings, the audio file to be diagnosed would contain the sound of the rotating bearings, which is mixed with a significant amount of noise and redundant signals.

[0082] The object to be diagnosed can be collected by a microphone or the like.

[0083] like Figure 8 As shown, the fault diagnosis method according to the embodiment of the present invention includes: steps 810 to 830.

[0084] Step 810: Input the object to be diagnosed into the feature extraction module of the target fault diagnosis model, and output the features of the object to be diagnosed;

[0085] Through the feature extraction module of the target fault diagnosis model, the semantic information of the object to be diagnosed can be extracted, thereby obtaining the features of the object to be diagnosed for judging whether there is a fault or not.

[0086] The dimension of the feature of the object to be diagnosed is C×W×1, where C is the channel, that is, the number of convolution kernels in the convolution layer; W is the width of the feature of the object to be diagnosed, and 1 is the height of the feature of the object to be diagnosed.

[0087] In this embodiment, the channel is placed in the first dimension by default. Of course, in other embodiments, the channel can also be placed in other dimensions, such as W×1×C.

[0088] Step 820: Input the feature of the object to be diagnosed into the noise reduction processing module of the target fault diagnosis model, and output the second object feature;

[0089] Among them, the target piecewise linear function is used to reduce the noise of the features of the object to be diagnosed.

[0090] like Figure 4 As shown, it is a soft threshold function in the related art. The value of the soft threshold function within the threshold range is 0. This design completely discards the valid data in the noise and has a poor noise reduction effect.

[0091] like Figure 5 As shown, the target piecewise linear function is a piecewise function with the positive and negative values ​​of the threshold τ as the dividing point. The corresponding expressions within the threshold τ and outside the threshold τ are both linear functions, and the slope of the target piecewise linear function is not fixed.

[0092] It should be noted that the threshold and slope of the target piecewise linear function are correlated with the noise signal in the characteristics of the object to be diagnosed.

[0093] The slopes of the linear functions corresponding to the intervals of the target piecewise linear function may be the same or different.

[0094] The input value x and output value y of the target piecewise linear function are both real numbers, where the y value is the residual value corresponding to the x value.

[0095] The second object feature is an image feature obtained by performing noise reduction on the feature of the object to be diagnosed.

[0096] In this step, based on the features of the object to be diagnosed and the target piecewise linear function, the residual value corresponding to the features of the object to be diagnosed can be obtained.

[0097] Based on the feature of the object to be diagnosed and the residual value, a second object feature can be obtained.

[0098] In the actual execution process, the noise reduction processing module of the target fault diagnosis model can be one or more piecewise linear soft threshold residual modules (APUs) with full attention mechanism.

[0099] The working principle of the APU is described in detail below.

[0100] like Figure 2 As shown, the APU includes: a first submodule, a second submodule, a third submodule and a fourth submodule, wherein:

[0101] The first submodule is used for the first subprocessing layer of the noise reduction processing module, the second submodule is used for the second subprocessing layer of the noise reduction processing module, the third submodule is used for the third subprocessing layer of the noise reduction processing module, and the fourth submodule is used for the fourth subprocessing layer of the noise reduction processing module.

[0102] In some embodiments, as Figure 2 As shown, step 820 may include:

[0103] Inputting the features of the object to be diagnosed into the first sub-processing layer of the noise reduction processing module of the target fault diagnosis model, the first sub-processing layer extracts the features of the object to be diagnosed and outputs multiple groups of first object features;

[0104] The multiple groups of first object features are input into the second sub-processing layer of the noise reduction processing module of the target fault diagnosis model. The second sub-processing layer performs attention conversion on the multiple groups of first object features and outputs parameters of the target piecewise linear function.

[0105] The first object feature is a feature having a higher level of voice information than the feature of the object to be diagnosed.

[0106] The multiple groups of first object features are at least four groups of first object features, wherein each group of first object features is the same.

[0107] In the actual execution process, the features of the object to be diagnosed are input into the APU module, and the first submodule in the APU module extracts the features of the object to be diagnosed, thereby outputting multiple groups of first object features.

[0108] In some embodiments, the first submodule operates as follows:

[0109] Input the features of the object to be diagnosed into the first sub-processing layer of the noise reduction processing module of the target fault diagnosis model. The first sub-processing layer extracts the features of the object to be diagnosed and outputs multiple groups of first object features, including:

[0110] The features of the object to be diagnosed are input into the first sub-processing layer, which performs batch normalization, depth residual and multi-kernel convolution processing on the features of the object to be diagnosed, and outputs multiple groups of first object features.

[0111] In this embodiment, the first submodule includes: a batch normalization module, a depth residual module and a convolution module.

[0112] The features of the object to be diagnosed are input into the first submodule, and batch normalization, depth residual and multi-core convolution processing are performed respectively, and multiple groups of first object features can be output.

[0113] Among them, batch normalization is used to normalize the features of the objects to be diagnosed.

[0114] Convolution processing is used to increase the number of channels of the output features. For example, the number of convolutions can be set to 4C, so that the number of channels of the output features becomes four times the original number, that is, four groups of first object features with a dimension of 4C×W×1 are obtained.

[0115] The multiple groups of first object features output by the first submodule in the APU module can be used as input quantities of the second submodule and the third submodule in the APU module respectively.

[0116] After obtaining multiple sets of first object features, the multiple sets of first object features are input into the second submodule, and the second submodule performs attention conversion on the multiple sets of first object features, and can output parameters of the target piecewise linear function.

[0117] The parameters of the target piecewise linear function include the cutoff points of the target piecewise linear function and the slope value of the expression within each segment range.

[0118] In this embodiment, the dividing point of the target piecewise linear function is the positive and negative value of the threshold τ. Based on the threshold τ, the target piecewise function can be divided into three interval segments: x<-τ, -τ≤x≤τ and x>τ, among which -τ≤x≤τ is the interval segment within the threshold, and x<-τ and x>τ are two interval segments outside the threshold respectively.

[0119] The function expressions in each interval segment all have corresponding slopes, among which the slope corresponding to the interval segment x<-τ is a, the slope corresponding to the interval segment -τ≤x≤τ is b, and the slope corresponding to the interval segment x>τ is c.

[0120] It should be noted that the values ​​of a, b, and c are not fixed, and the values ​​of a, b, and c may be the same or different.

[0121] This step is described by taking the output of the first submodule as 4C×W×1 as an example.

[0122] During the actual execution process, multiple groups of first object features with a dimension of 4C×W×1 are input into the second submodule of the APU. The second submodule splits the character string of multiple groups of first object features with a dimension of 4C×W×1 into two parts from the middle, each part has a dimension of 2C×W×1.

[0123] And perform attention conversion on the first object features of each 2C×W×1 dimension respectively:

[0124] By performing attention conversion on two sets of 2C×W×1 dimensional first object features, the threshold τ of the target piecewise linear function and the slope b within the threshold interval are output respectively;

[0125] In the process of calculating the threshold τ and the slope b within the threshold interval, the final result needs to be mapped to ensure that the values ​​of τ and b are within the range of 0-1.

[0126] By performing attention conversion on the other two groups of first object features with 2C×W×1 dimensions, the slopes a and c outside the threshold interval of the target piecewise linear function are output respectively.

[0127] In some embodiments, the plurality of sets of first object features are input into a second sub-processing layer of a noise reduction processing module of a target fault diagnosis model, the second sub-processing layer performs attention conversion on the plurality of sets of first object features, and outputs parameters of a target piecewise linear function, including:

[0128] The two sets of first object features are input into the second sub-processing layer, and the second sub-processing layer performs absolute value, global average pooling, full connection, batch normalization, depth residual, full connection processing and mapping processing on the two sets of first object features, and outputs the threshold of the target piecewise linear function and the first slope of the target piecewise linear function within the threshold respectively;

[0129] The other two groups of first object features are input into the second sub-processing layer, and the second sub-processing layer performs absolute value, global average pooling, full connection, batch normalization, depth residual and full connection processing on the other two groups of first object features, and outputs the third slope outside the threshold and the second slope outside the threshold of the target piecewise linear function, respectively.

[0130] In this embodiment, the second submodule of the APU performs absolute value and global average pooling (GAP) processing on two groups of first object features of 2C×W×1 dimensions to obtain two corresponding groups of 2×1×1 outputs.

[0131] Then, the first object feature of 2×1×1 dimension is subjected to full connection (FC), batch normalization (BatchNormalization), Relu and full connection (FC) operations;

[0132] Then, the numerical value outputted by the above steps is inputted into the sigmoid function, and mapped by the sigmoid function to obtain the first slope of the target piecewise linear function within the threshold and the threshold of the target piecewise linear function.

[0133] Among them, the sigmoid function is the activation function of the neural network, which is used for the output of hidden layer neurons. Its value range is (0, 1) and it is used to map a real number to the interval (0, 1).

[0134] It should be noted that, in the process of operating the first object feature of 2×1×1 dimension, there are 2C channel features. The feature output of one C channel can be the threshold τ of the target piecewise linear function, and the feature output of the other C channel can be the first slope b of the target piecewise linear function within the threshold, so as to distinguish the output results.

[0135] The second submodule of the APU performs absolute value and global average pooling (GAP) operations on the other two groups of first object features of 2C×W×1 dimensions to obtain two corresponding groups of 2×1×1 outputs.

[0136] Then, the first object feature of 2×1×1 dimension is subjected to full connection (FC), batch normalization (BatchNormalization), ReLU and full connection (FC) operations; the third slope and second slope of the target piecewise linear function outside the threshold are directly obtained respectively.

[0137] It should be noted that, in the process of operating the first object feature of 2×1×1 dimension, there are 2C channel features. The feature output of one C channel can be the third slope c of the target piecewise linear function outside the threshold, and the feature output of the other C channel can be the second slope a of the target piecewise linear function outside the threshold, so as to distinguish the output results.

[0138] After obtaining the demarcation point τ and the values ​​of the slopes a, b, and c in each interval segment, the target piecewise linear function can be determined based on τ and the values ​​of a, b, and c.

[0139] It should be noted that the target piecewise linear function generated through the above steps has a non-fixed cutoff point and a slope, but is associated with the noise signal in the image to be measured, and can respond well to the external noise signal.

[0140] The target piecewise linear function consists of multiple sub-linear segments, allowing for flexible design based on different application scenarios. Based on different noise conditions, the target piecewise linear function can be classified into: no gradient within the threshold and the same gradient outside the threshold; no gradient within the threshold and different gradients outside the threshold; gradient within the threshold and the same gradient outside the threshold; gradient within the threshold and different gradients outside the threshold; and any other types of linear segment functions.

[0141] like Figure 4 shows a case where there is no gradient within the threshold, such as Figure 5 A case is shown where there is a gradient within the threshold and the gradient is the same outside the threshold.

[0142] According to the fault diagnosis method provided by an embodiment of the present invention, a target piecewise linear function associated with the noise signal is dynamically generated based on the noise signal through an attention mechanism. This method can not only effectively perform denoising on the features of the image to be detected, but also retain the valid data portion in the noise signal, significantly improving the accuracy of the denoising results and having a wide range of application scenarios.

[0143] According to some embodiments of the present invention, step 820 may include:

[0144] Inputting the plurality of sets of first object features into a third sub-processing layer of a noise reduction processing module of a target fault diagnosis model, wherein the third sub-processing layer performs feature extraction on the plurality of sets of first object features to obtain third image features;

[0145] Input the third image feature into the target piecewise linear function and output the residual value;

[0146] The features of the object to be diagnosed and the residual value are input into the fourth sub-processing layer of the noise reduction processing module of the target fault diagnosis model. The fourth sub-processing layer fuses the residual value and the features of the object to be diagnosed and outputs the second object features.

[0147] According to this embodiment, after obtaining multiple sets of first object features, the multiple sets of first object features are input into the third submodule of the APU, and the third submodule extracts features from the multiple sets of first object features and outputs third image features.

[0148] The third image feature is a feature having a higher level of voice information than the first object feature.

[0149] The third image feature is a feature with the same dimension as the feature of the object to be diagnosed.

[0150] The third submodule uses the third image feature as the input value x of the target piecewise linear function and outputs the residual value y corresponding to the third image feature.

[0151] The residual value is an error value caused by noise between the feature of the object to be diagnosed and the feature of the second object.

[0152] Based on the residual value, the features of the object to be diagnosed can be denoised, thereby suppressing the noise and avoiding the influence of noise on the detection results.

[0153] It should be noted that the dimension of the residual value is the same as the dimension of the feature of the object to be diagnosed, which is C×W×1.

[0154] The residual value y output by the third submodule can be used as the input of the fourth submodule.

[0155] The residual value y and the feature of the object to be diagnosed are both input into the fourth submodule as input quantities of the fourth submodule, and the fourth submodule fuses the residual value y and the feature of the object to be diagnosed to output the second object feature.

[0156] It should be noted that the dimension of the second object feature is the same as the dimension of the residual value and the dimension of the feature of the object to be diagnosed, which is C×W×1.

[0157] In some embodiments, the plurality of sets of first object features are input into a third sub-processing layer of a noise reduction processing module of a target fault diagnosis model. The third sub-processing layer extracts features from the plurality of sets of first object features to obtain third image features, including:

[0158] The multiple groups of first object features are input into the third sub-processing layer, and the third sub-processing layer performs batch normalization, depth residual and single-kernel convolution processing on the multiple groups of first object features to obtain third image features.

[0159] In this embodiment, the third submodule includes: a batch normalization module, a depth residual module and a convolution module.

[0160] The third sub-module performs batch normalization on multiple groups of first object features through the batch normalization module, performs deep residual processing on multiple groups of first object features through the deep residual module, and performs single-kernel convolution processing on multiple groups of first object features through the convolution module to extract more advanced semantic information and restore the dimension of the output feature channel.

[0161] For example, the number of convolutions can be set to C, so that the dimension of the output feature channel is changed back to the third image feature of C×W×1.

[0162] During the research and development process, the inventors discovered that in the existing soft threshold function, the slope within the threshold range is 0, and the slope outside the threshold remains at a fixed value of 1. This neither ensures that the network can effectively respond to changes in external noise, nor does it completely discard valid data in the noise within the threshold range.

[0163] According to the above-mentioned embodiment of the present application, the target piecewise linear function threshold and the slope within the threshold are automatically derived by the network according to the attention mechanism, so that the target piecewise linear function threshold and the slope within the threshold are non-fixed values, so that the entire network has stronger robustness and is more resistant to the influence of noise, thereby greatly improving the accuracy of network judgment.

[0164] Step 830: Input the second object feature into the recognition module of the target fault diagnosis model and output the fault diagnosis result;

[0165] In this step, the fault diagnosis results include two situations: faulty and non-faulty.

[0166] The second object feature is a feature obtained by performing noise reduction on the image feature to be detected.

[0167] By inputting the second object feature output by the APU module into the recognition module of the target fault diagnosis model to recognize the second object feature, it can be determined whether the object to be tested is faulty.

[0168] It should be noted that, in the actual implementation process, before performing step 130, one or more noise reduction processing modules, that is, one or more APU modules, may be set in the target fault diagnosis model to improve the noise reduction accuracy.

[0169] Taking the setting of three APU modules as an example, after outputting the features of the object to be diagnosed in step 110, the features of the object to be diagnosed are input to the first APU module, and the first APU module outputs the features of the object to be diagnosed after a noise reduction process.

[0170] The features of the object to be diagnosed that have undergone the primary noise reduction process are used as input values ​​of the second APU module, and the features of the object to be diagnosed that have undergone the secondary noise reduction process are outputted through the second APU module.

[0171] The features of the object to be diagnosed that have undergone the secondary noise reduction process are used as input values ​​of the third APU module, and the third APU module outputs the features of the object to be diagnosed that have undergone the tertiary noise reduction process.

[0172] The features of the object to be diagnosed that have undergone three noise reduction processes are used as the second object features and input into the recognition module of the target fault diagnosis model, and the fault diagnosis results are output through the recognition module.

[0173] By setting up multiple layers of noise reduction processing modules, the noise reduction accuracy can be significantly improved.

[0174] It is understandable that in the actual implementation process, the target fault diagnosis model needs to be trained first.

[0175] In some embodiments, the target fault diagnosis model is obtained by training using sample objects to be diagnosed as samples and sample fault diagnosis results corresponding to the sample objects to be diagnosed as sample labels.

[0176] Among them, the target fault diagnosis model includes a feature extraction module, a noise reduction processing module and a recognition module.

[0177] The sample objects to be diagnosed and the sample fault diagnosis results are all pre-obtained data.

[0178] In the actual implementation process, an image of a mechanical part can be input, and the input image can be diagnosed and classified into two categories according to whether the machine has a fault.

[0179] The image data is randomly input into the target fault diagnosis model in batches for training.

[0180] During the training process, an iteration round or classification accuracy threshold can be set in advance. When this iteration round or classification accuracy threshold is reached, the training is terminated and the target fault diagnosis model is saved, thereby completing the training of the target fault diagnosis model.

[0181] It is understandable that each time the features of the object to be diagnosed and the fault diagnosis results generated by the target fault diagnosis model can be used as sample data in the next model training process.

[0182] As the sample data gradually expands, the final output diagnosis results will become more accurate.

[0183] In practical applications, such as target detection, instance segmentation, image oil smoke removal and many other image-related applications, the target fault diagnosis model is deployed in machinery or bearing detection equipment. When the machine is started, the target fault diagnosis model is loaded and the camera is turned on, and the recorded images are continuously input into the target fault diagnosis model.

[0184] Based on the output of the target fault diagnosis model, it can be determined whether the current equipment has a fault.

[0185] According to the fault diagnosis method provided by an embodiment of the present invention, a target piecewise linear function that can dynamically respond to the noise signal in the image to be tested is generated through an attention mechanism, so that the function can respond to different noise signals and thus significantly improve the noise reduction effect; at the same time, useful noise signals can also be retained to improve the precision and accuracy of the noise reduction results, thereby improving the accuracy of the fault diagnosis results, and has a wide range of applicability and good flexibility.

[0186] In some embodiments, step 830 includes:

[0187] Inputting the second object feature into a recognition module of a target fault diagnosis model, the recognition module sequentially performs batch normalization, depth residual, global average pooling, and matrix transformation on the second object feature to obtain a fourth image feature;

[0188] Based on the fourth image feature, a fault diagnosis result is output.

[0189] In this embodiment, the second object feature is a feature with 1×1×1 dimensions.

[0190] The recognition module includes: batch normalization module, deep residual module, global average pooling module, matrix transformation module and classification module.

[0191] The batch normalization module, the depth residual module and the global average pooling module perform batch normalization, ReLU and global average pooling (GAP) operations on the second object feature, and the output can be converted into N×1×1 dimensions.

[0192] N is a hyperparameter used to represent the channel dimension. N can take any positive integer value.

[0193] The value of N can be user-defined, for example, N can be set to 3 or 6.

[0194] The obtained features with dimension N×1×1 are input to the matrix transformation module for reshape operation to transform the N×1×1 features into a vector with length N.

[0195] Reshape is a function that transforms a matrix into a matrix of a specific dimension. In this step, a feature with a dimension of N×1×1 is subjected to matrix transformation to obtain an N-dimensional vector with a length of N.

[0196] The N-dimensional vector output by the matrix transformation module is input to the classification module, a fully connected (FC) operation is performed, and a softmax operation is performed to output the fault classification result.

[0197] Among them, the Softmax function is used to output the classification result, that is, to output the two states of fault or no fault.

[0198] In this way, by performing fault identification on the second object feature after effective noise reduction through the identification module of the target fault diagnosis model, the identification error caused by the noise signal can be effectively avoided, thereby improving the accuracy and precision of the fault diagnosis result.

[0199] In some embodiments, the object to be diagnosed may be an image, the object feature to be diagnosed may be a feature of the image to be diagnosed, and the second object feature may be a second image feature. For example, the image may be captured during a kitchen range hood or stove fault diagnosis task, or during a dishwasher fault diagnosis task.

[0200] In other embodiments, the object to be diagnosed is sound, the object feature to be diagnosed is the sound feature to be diagnosed, and the second object feature is the second sound feature. For example, the sound may be audio collected during a kitchen range hood fault diagnosis task.

[0201] The following introduces the method for establishing the target fault diagnosis model in this fault diagnosis method.

[0202] The following combination Figures 1-6 The method for establishing a fault diagnosis model according to an embodiment of the present invention is described.

[0203] like Figure 1 As shown, the method for establishing the fault diagnosis model includes: step 110 and step 120.

[0204] Step 110: For the trained current fault diagnosis model, if the target slope corresponding to the target noise reduction processing module among the multiple noise reduction processing modules is less than the target gradient, delete the attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model;

[0205] Step 120: When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0206] It is understandable that before step 110 , the basic structure of the fault diagnosis model may be constructed first.

[0207] The fault diagnosis model includes a feature extraction module, multiple noise reduction processing modules (APUs), and a recognition module. These modules are connected sequentially, with the output of the feature extraction module connected to the input of the first noise reduction module, the output of the first noise reduction module connected to the input of the second noise reduction module, and finally the output of the final noise reduction module connected to the input of the recognition module. The recognition module outputs the recognition result.

[0208] The initial number of noise reduction processing modules (APUs) may be relatively large. In some embodiments, the initial number of noise reduction processing modules (APUs) may be 50-500, such as 50 or 100.

[0209] After the initial construction is completed, the fault diagnosis model can be trained. In actual execution, the fault diagnosis model can be trained through samples and sample labels until the fault diagnosis model has a high diagnostic accuracy or a specified number of training times.

[0210] It should be noted that in related technologies, after training, the trained fault diagnosis model may be used for actual fault diagnosis. However, because this fault diagnosis model contains a large number of noise reduction processing modules, which include many attention modules, it requires a large amount of computing and network resources, making it difficult to deploy on small terminals.

[0211] In an embodiment of the present invention, the slope of each noise reduction processing module can be counted. When the target slope corresponding to the target noise reduction processing module is less than the target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

[0212] For a new fault diagnosis model, the new fault diagnosis model is retrained, and after the training is completed, the accuracy of its diagnosis results is tested.

[0213] In actual execution, the trained new fault diagnosis model is used to diagnose the test object to obtain the test diagnosis result, and the test accuracy is obtained based on the test diagnosis result and the test label.

[0214] After multiple streamlining, when the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that meets the test accuracy greater than the target accuracy for the last time is used as the target fault diagnosis model.

[0215] This can greatly reduce the attention modules of the fault diagnosis model, reduce redundant modules, and lower the requirements for hardware equipment and network bandwidth.

[0216] According to the method for establishing a fault diagnosis model in an embodiment of the present invention, by streamlining attention modules with low actual effectiveness, it is possible to reduce redundant modules, lower the requirements for hardware equipment and network bandwidth, and retain attention modules with actual value to the greatest extent possible, which can effectively avoid recognition errors caused by noise signals, thereby improving the accuracy and efficiency of the fault diagnosis model results when performing fault diagnosis.

[0217] In some embodiments, after obtaining a new fault diagnosis model in step 110 and before using the fault diagnosis model with the last test accuracy greater than the target accuracy as the target fault diagnosis model in step 120, the method may further include:

[0218] When the test accuracy of the trained new fault diagnosis model is greater than the target accuracy, the new fault diagnosis model is used as the current fault diagnosis model and the target gradient is increased.

[0219] In actual implementation, the fault diagnosis model that has been initially constructed can be trained;

[0220] Counting the slopes of each noise reduction processing module, if the target slope corresponding to the target noise reduction processing module is less than the target gradient, deleting the attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model;

[0221] Retrain a new fault diagnosis model and test the accuracy of the new fault diagnosis model;

[0222] When the test accuracy is greater than the target accuracy, the slopes of the noise reduction processing modules are counted again. When the target slope corresponding to the target noise reduction processing module is less than the new target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

[0223] If the test accuracy is not greater than the target accuracy, the process is terminated, and the fault diagnosis model that last meets the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0224] The target gradient can be preset, for example, the gradient value starts from 0.01 and increases by 0.01 each time until it reaches a maximum gradient of 0.1.

[0225] At the first simplification, the target gradient is the minimum gradient value, which increases each time.

[0226] The fault diagnosis model obtained by the above simplification method can achieve a simpler network structure while maintaining basically the same accuracy, which can help speed up the recognition efficiency of the model when applied.

[0227] In some embodiments, the parameters of the target piecewise linear function include a threshold, a first slope within the threshold, a second slope outside the threshold, and a third slope;

[0228] When a target slope corresponding to a target noise reduction processing module among the multiple noise reduction processing modules is less than a target gradient, an attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model, including:

[0229] When the target slope among the first slope, the second slope and the third slope corresponding to the target noise reduction processing module is less than the target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

[0230] In other words, for any noise reduction processing module, if the slope of the module is less than the target gradient, only the attention module corresponding to the slope needs to be deleted. In this way, while ensuring that the accuracy of the entire model is not affected, as few attention modules as possible can be retained, further streamlining the fault diagnosis model.

[0231] The first slope, the second slope, and the third slope are determined by the following method:

[0232] Inputting the features of the object to be diagnosed into the first sub-processing layer of the noise reduction processing module, the first sub-processing layer extracts the features of the object to be diagnosed and outputs multiple groups of first object features;

[0233] The multiple sets of first object features are input into the second sub-processing layer of the noise reduction processing module. The second sub-processing layer performs attention conversion on the multiple sets of first object features and outputs a first slope, a second slope and a third slope.

[0234] In some embodiments, before step 110, training the current fault diagnosis model, the method may further include:

[0235] Constructing an initial fault diagnosis model, the initial fault diagnosis model includes a feature extraction module, multiple noise reduction processing modules and a recognition module connected in sequence, the feature extraction module is used to extract the features of the object to be diagnosed from the input object to be diagnosed, the noise reduction processing module is used to output a second object feature based on the input object feature to be diagnosed, and the recognition module is used to output a fault diagnosis result based on the input second object feature;

[0236] Training an initial fault diagnosis model and obtaining a threshold of a target piecewise linear function corresponding to a noise reduction processing module in the trained initial fault diagnosis model;

[0237] Delete the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model to obtain the current fault diagnosis model;

[0238] Train the current fault diagnosis model.

[0239] The fault diagnosis model includes a feature extraction module, multiple noise reduction processing modules (APUs), and a recognition module. These modules are connected sequentially, with the output of the feature extraction module connected to the input of the first noise reduction module, the output of the first noise reduction module connected to the input of the second noise reduction module, and finally the output of the final noise reduction module connected to the input of the recognition module. The recognition module outputs the recognition result.

[0240] The initial number of noise reduction processing modules (APUs) may be relatively large. In some embodiments, the initial number of noise reduction processing modules (APUs) may be 50-500, such as 50 or 100.

[0241] After the initial construction is completed, the fault diagnosis model can be trained. In actual execution, the fault diagnosis model can be trained through samples and sample labels until the fault diagnosis model has a high diagnostic accuracy or a specified number of training times.

[0242] It should be noted that in related technologies, after training, the trained fault diagnosis model may be used for actual fault diagnosis. However, due to the large number of noise reduction processing modules in this fault diagnosis model, it requires a large amount of computing and network resources, making it difficult to deploy on a small terminal.

[0243] The inventors of the present invention have found through research that Figure 7 As shown in FIG, under different noise interference, the threshold changes corresponding to different layers of noise reduction processing modules are statistically analyzed. The inventors found that the threshold value continuously approaches 1 as the number of layers of noise reduction processing modules increases.

[0244] Therefore, we can set a boundary value ε. When the distance between the threshold τ and 1 is less than the boundary value ε, we can assume that the entire network no longer needs to be deepened, thereby completing the estimation of the number of network structure layers of the entire deep residual shrinkage network. This can avoid wasting more piecewise linear soft thresholding APU modules, thereby saving the network's computational overhead.

[0245] The denoising processing modules whose thresholds are greater than the target value (1-ε) can be deleted, thereby reducing the number of layers in the model.

[0246] In some embodiments, deleting a noise reduction processing module whose threshold is greater than a target value in the initial fault diagnosis model may include:

[0247] Traversing the thresholds corresponding to multiple noise reduction processing modules;

[0248] When the threshold of the current noise reduction processing module is greater than the target value, the current noise reduction processing module and the noise reduction processing modules subsequent to the current noise reduction processing module are deleted.

[0249] It should be noted that the thresholds corresponding to the noise reduction processing modules gradually increase. When the threshold of a noise reduction processing module is greater than the target value, it means that the thresholds of other noise reduction processing modules thereafter are also greater than the target value. The above method can reduce the amount of calculation.

[0250] In actual implementation, the fault diagnosis model that has been initially constructed can be trained;

[0251] and obtaining the threshold of the target piecewise linear function corresponding to the noise reduction processing module in the trained initial fault diagnosis model;

[0252] Delete the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model to obtain the current fault diagnosis model;

[0253] Train the current fault diagnosis model;

[0254] Count the slopes of each noise reduction processing module in the current fault diagnosis model. If the target slope corresponding to the target noise reduction processing module is less than the target gradient, delete the attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model.

[0255] Retrain a new fault diagnosis model and test the accuracy of the new fault diagnosis model;

[0256] When the test accuracy is greater than the target accuracy, the slopes of the noise reduction processing modules are counted again. When the target slope corresponding to the target noise reduction processing module is less than the new target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

[0257] If the test accuracy is not greater than the target accuracy, the process is terminated, and the fault diagnosis model that last meets the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0258] The target gradient can be preset, for example, the gradient value starts from 0.01 and increases by 0.01 each time until it reaches a maximum gradient of 0.1.

[0259] At the first simplification, the target gradient is the minimum gradient value, which increases each time.

[0260] The fault diagnosis model obtained by the above simplification method can effectively reduce the number of layers of the fault diagnosis model while maintaining basically the same accuracy, and retain as few attention modules as possible to achieve a simpler network structure, which can help speed up the recognition efficiency of the model when applied.

[0261] The following describes a device for establishing a fault diagnosis model provided by an embodiment of the present invention. The device for establishing a fault diagnosis model described below and the method for establishing a fault diagnosis model described above can refer to each other.

[0262] The fault diagnosis model includes multiple noise reduction processing modules, each of which includes a target piecewise linear function, and the slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed.

[0263] like Figure 7 As shown, the apparatus for establishing the fault diagnosis model includes: a first processing module 710 and a second processing module 720 .

[0264] A first processing module 710 is configured to, for the trained current fault diagnosis model, delete an attention module corresponding to the target slope of a target noise reduction processing module among the multiple noise reduction processing modules if the target slope corresponding to the target noise reduction processing module is less than the target gradient, thereby obtaining a new fault diagnosis model;

[0265] The second processing module 720 is configured to use the fault diagnosis model that last met the test accuracy greater than the target accuracy as the target fault diagnosis model when the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy.

[0266] According to the device for establishing a fault diagnosis model in an embodiment of the present invention, by streamlining attention modules with low actual effectiveness, it is possible to reduce redundant modules, lower the requirements for hardware equipment and network bandwidth, and retain attention modules with actual value to the greatest extent possible, which can effectively avoid recognition errors caused by noise signals, thereby improving the accuracy and efficiency of the fault diagnosis model results when performing fault diagnosis.

[0267] In some embodiments, the establishing means may further include:

[0268] The first determination module is used to, after obtaining a new fault diagnosis model and before taking the fault diagnosis model whose last test accuracy is greater than the target accuracy as the target fault diagnosis model, take the new fault diagnosis model as the current fault diagnosis model and increase the target gradient if the test accuracy of the trained new fault diagnosis model is greater than the target accuracy.

[0269] In some embodiments, the parameters of the target piecewise linear function include a threshold, a first slope within the threshold, a second slope outside the threshold, and a third slope; the first processing module 710 is also used to delete the attention module corresponding to the target slope of the target noise reduction processing module when the target slope among the first slope, the second slope, and the third slope corresponding to the target noise reduction processing module is less than the target gradient, so as to obtain a new fault diagnosis model.

[0270] In some embodiments, the establishing means may further include:

[0271] A first establishment module is used to construct an initial fault diagnosis model before training the current fault diagnosis model. The initial fault diagnosis model includes a feature extraction module, multiple noise reduction processing modules and a recognition module connected in sequence. The feature extraction module is used to extract the features of the object to be diagnosed from the input object to be diagnosed. The noise reduction processing module is used to output a second object feature based on the input object feature. The recognition module is used to output a fault diagnosis result based on the input second object feature.

[0272] A first acquisition module is used to train an initial fault diagnosis model and obtain a threshold value of a target piecewise linear function corresponding to a noise reduction processing module in the trained initial fault diagnosis model;

[0273] A first deletion module is used to delete the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model to obtain a current fault diagnosis model;

[0274] The first training module is used to train the current fault diagnosis model.

[0275] In some embodiments, the first deletion module is further used to traverse the thresholds corresponding to multiple noise reduction processing modules; when the threshold of the current noise reduction processing module is greater than the target value, the current noise reduction processing module and the noise reduction processing modules after the current noise reduction processing module are deleted.

[0276] The following describes a fault diagnosis device provided by an embodiment of the present invention. The fault diagnosis device described below and the fault diagnosis method described above can be referenced to each other.

[0277] like Figure 9 As shown, the fault diagnosis device may include: a third processing module 910 , a fourth processing module 920 and a fifth processing module 930 .

[0278] The third processing module 910 is used to input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed;

[0279] The fourth processing module 920 is used to input the feature of the object to be diagnosed into the noise reduction processing layer of the target fault diagnosis model and output the second object feature;

[0280] The fifth processing module 930 is used to input the second object feature into the recognition layer of the target fault diagnosis model and output the fault diagnosis result; wherein the target fault diagnosis model is a target fault diagnosis model obtained based on any of the above-mentioned establishment methods.

[0281] According to the fault diagnosis device provided by the embodiment of the present invention, fault identification is performed on the second object feature after effective noise reduction through the recognition module of the fault diagnosis model, which can effectively avoid the recognition error caused by the noise signal. Moreover, due to the high degree of simplification of the fault diagnosis model, the accuracy and efficiency of the fault diagnosis result are high.

[0282] Figure 10 An example of a physical structure diagram of an electronic device is shown below. Figure 10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute a method for establishing a fault diagnosis model. The fault diagnosis model includes multiple noise reduction processing modules, and the noise reduction processing module includes a target piecewise linear function. The slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The method includes:

[0283] For the trained current fault diagnosis model, when the target slope corresponding to the target noise reduction processing module among the multiple noise reduction processing modules is less than the target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model;

[0284] When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0285] Alternatively, the processor 1010 may call logic instructions in the memory 1030 to execute a fault diagnosis method, which includes:

[0286] Input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed;

[0287] Inputting the feature of the object to be diagnosed into the noise reduction processing layer of the target fault diagnosis model and outputting the second object feature;

[0288] The second object feature is input into the recognition layer of the target fault diagnosis model, and the fault diagnosis result is output; wherein the target fault diagnosis model is the target fault diagnosis model obtained by the above-mentioned establishment method.

[0289] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0290] Furthermore, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for establishing a fault diagnosis model provided by the above-mentioned method embodiments. The fault diagnosis model includes multiple noise reduction processing modules, and the noise reduction processing module includes a target piecewise linear function. The slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The method includes:

[0291] For the trained current fault diagnosis model, when the target slope corresponding to the target noise reduction processing module among the multiple noise reduction processing modules is less than the target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model;

[0292] When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0293] Alternatively, a computer can execute the fault diagnosis method provided by each of the above method embodiments, which includes:

[0294] Input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed;

[0295] Inputting the feature of the object to be diagnosed into the noise reduction processing layer of the target fault diagnosis model and outputting the second object feature;

[0296] The second object feature is input into the recognition layer of the target fault diagnosis model, and the fault diagnosis result is output; wherein the target fault diagnosis model is the target fault diagnosis model obtained by the above-mentioned establishment method.

[0297] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for establishing a fault diagnosis model provided in the above embodiments is implemented. The fault diagnosis model includes multiple noise reduction processing modules, and the noise reduction processing module includes a target piecewise linear function. The slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The method includes:

[0298] For the trained current fault diagnosis model, when the target slope corresponding to the target noise reduction processing module among the multiple noise reduction processing modules is less than the target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model;

[0299] When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model.

[0300] Alternatively, when the computer program is executed by a processor, the fault diagnosis method provided in each of the above embodiments is implemented, and the method includes:

[0301] Input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed;

[0302] Inputting the feature of the object to be diagnosed into the noise reduction processing layer of the target fault diagnosis model and outputting the second object feature;

[0303] The second object feature is input into the recognition layer of the target fault diagnosis model, and the fault diagnosis result is output; wherein the target fault diagnosis model is the target fault diagnosis model obtained by the above-mentioned establishment method.

[0304] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0305] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0306] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

[0307] The above embodiments are intended to illustrate the present invention only and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications, or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention and should be encompassed by the scope of the claims of the present invention.

Claims

1. A method for establishing a fault diagnosis model, characterized in that: The fault diagnosis model includes multiple noise reduction processing modules, each of which includes a target piecewise linear function. The slope of the target piecewise linear function is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The method includes: For the trained current fault diagnosis model, if a target slope corresponding to a target noise reduction processing module among the multiple noise reduction processing modules is less than a target gradient, deleting an attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model; When the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, the fault diagnosis model that last met the test accuracy greater than the target accuracy is used as the target fault diagnosis model; The features of the object to be diagnosed are features of an image to be diagnosed or features of a sound to be diagnosed.

2. The method for establishing a fault diagnosis model according to claim 1, wherein: After obtaining the new fault diagnosis model and before taking the fault diagnosis model that last satisfied that the test accuracy was greater than the target accuracy as the target fault diagnosis model, the method further includes: When the test accuracy of the trained new fault diagnosis model is greater than the target accuracy, the new fault diagnosis model is used as the current fault diagnosis model, and the target gradient is increased.

3. The method for establishing a fault diagnosis model according to claim 1, wherein: The parameters of the target piecewise linear function include a threshold, a first slope within the threshold, a second slope outside the threshold, and a third slope; When a target slope corresponding to a target noise reduction processing module among the multiple noise reduction processing modules is less than a target gradient, deleting an attention module corresponding to the target slope of the target noise reduction processing module to obtain a new fault diagnosis model, including: When a target slope among the first slope, the second slope, and the third slope corresponding to the target noise reduction processing module is less than a target gradient, the attention module corresponding to the target slope of the target noise reduction processing module is deleted to obtain a new fault diagnosis model.

4. The method for establishing a fault diagnosis model according to claim 3, wherein: The first slope, the second slope, and the third slope are determined by the following method: Inputting the features of the object to be diagnosed into the first sub-processing layer of the noise reduction processing module, the first sub-processing layer extracts the features of the object to be diagnosed and outputs multiple groups of first object features; The multiple groups of first object features are input into the second sub-processing layer of the noise reduction processing module, and the second sub-processing layer performs attention conversion on the multiple groups of first object features and outputs the first slope, the second slope and the third slope.

5. The method for establishing a fault diagnosis model according to any one of claims 1 to 4, characterized in that: Before training the current fault diagnosis model, the method further includes: Constructing an initial fault diagnosis model, the initial fault diagnosis model comprising a feature extraction module, a plurality of noise reduction processing modules, and a recognition module connected in sequence, the feature extraction module being configured to extract features of an object to be diagnosed from an input object to be diagnosed, the noise reduction processing module being configured to output second object features based on the input features of the object to be diagnosed, and the recognition module being configured to output a fault diagnosis result based on the input second object features; Training the initial fault diagnosis model, and obtaining a threshold value of the target piecewise linear function corresponding to the noise reduction processing module in the trained initial fault diagnosis model; Deleting the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model to obtain the current fault diagnosis model; The current fault diagnosis model is trained.

6. The method for establishing a fault diagnosis model according to claim 5, characterized in that: The step of deleting the noise reduction processing module whose threshold is greater than the target value in the initial fault diagnosis model includes: Traversing the thresholds corresponding to the multiple noise reduction processing modules; When the threshold of the current noise reduction processing module is greater than the target value, the current noise reduction processing module and the noise reduction processing modules subsequent to the current noise reduction processing module are deleted.

7. A fault diagnosis method, characterized in that: include: Input the object to be diagnosed into the feature extraction module of the target fault diagnosis model, and output the features of the object to be diagnosed; Inputting the feature of the object to be diagnosed into the noise reduction processing module of the target fault diagnosis model and outputting a second object feature; The second object feature is input into the recognition module of the target fault diagnosis model, and the fault diagnosis result is output; wherein, The target fault diagnosis model is the target fault diagnosis model obtained based on the establishment method according to any one of claims 1 to 6, and the object to be diagnosed is an image or a sound.

8. A device for establishing a fault diagnosis model, characterized in that: The fault diagnosis model includes a plurality of noise reduction processing modules, each of which includes a target piecewise linear function, the slope of which is obtained by performing attention conversion based on the characteristics of the object to be diagnosed. The device includes: a first processing module, configured to, for a trained current fault diagnosis model, delete an attention module corresponding to the target slope of a target noise reduction processing module among the multiple noise reduction processing modules when the target slope corresponding to the target noise reduction processing module is less than the target gradient, to obtain a new fault diagnosis model; The second processing module is configured to, when the test accuracy of the trained new fault diagnosis model is not greater than the target accuracy, use the fault diagnosis model that last met the test accuracy greater than the target accuracy as the target fault diagnosis model; The features of the object to be diagnosed are features of an image to be diagnosed or features of a sound to be diagnosed.

9. A fault diagnosis device, characterized in that: include: The third processing module is used to input the object to be diagnosed into the feature extraction layer of the target fault diagnosis model and output the features of the object to be diagnosed; a fourth processing module, configured to input the feature of the object to be diagnosed into a noise reduction processing layer of the target fault diagnosis model and output a second object feature; The fifth processing module is used to input the second object feature into the recognition layer of the target fault diagnosis model and output the fault diagnosis result; wherein, The target fault diagnosis model is the target fault diagnosis model obtained based on the establishment method according to any one of claims 1 to 6, and the object to be diagnosed is an image or a sound.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for establishing a fault diagnosis model according to any one of claims 1 to 6 or the steps of the fault diagnosis method according to claim 7 are implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for establishing a fault diagnosis model according to any one of claims 1 to 6 or the steps of the fault diagnosis method according to claim 7 are implemented.

12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for establishing a fault diagnosis model according to any one of claims 1 to 6 or the steps of the fault diagnosis method according to claim 7 are implemented.

Citation Information

Patent Citations

  • Fault diagnosis method and device of rolling bearing of low-speed heavy-duty equipment and medium

    CN108303255A

  • Electromyographic signal gesture recognition method based on deep learning and attention mechanism

    CN108388348A